25
25
##############################################################################
27
from tools.translate import _
28
from osv import osv, fields
30
class procurement_order(osv.osv):
27
from openerp.tools.translate import _
29
from openerp.osv import osv, fields
32
class procurement_order(osv.Model):
31
33
_inherit = "procurement.order"
34
36
'production_ids': fields.many2many('mrp.production', 'mrp_production_procurement_order_rel', 'procurement_id', 'production_id', 'Production orders'),
35
37
'production_created': fields.many2one('mrp.production', 'Production order'),
38
40
def make_mo(self, cr, uid, ids, context=None):
39
41
""" writes the production created to the procurement
40
42
@return: same res than original make_mo
42
res = super(procurement_order, self).make_mo(cr, uid, ids, context=context)
44
res = super(procurement_order, self).make_mo(
45
cr, uid, ids, context=context)
44
47
self.write(cr, uid, [line], {'production_created': res.get(line)})
b'\\ No newline at end of file'