[IMP] procurement: Products reserverd from stock & added Manufucture Order in procure...
authorTejas Tank <tta@openerp.com>
Wed, 3 Oct 2012 09:43:41 +0000 (15:13 +0530)
committerTejas Tank <tta@openerp.com>
Wed, 3 Oct 2012 09:43:41 +0000 (15:13 +0530)
bzr revid: tta@openerp.com-20121003094341-suosaw2sum3grn7k

addons/mrp/mrp_view.xml
addons/procurement/procurement.py
addons/project_mrp/project_procurement.py
addons/purchase/purchase.py

index a198d73..7294ad0 100644 (file)
             <data>
                 <xpath expr="//field[@name='move_id']" position="before">
                     <field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]"/>
+                    <field name="production_id"/>
                 </xpath>
                 <xpath expr="//field[@name='close_move']" position="after">
                     <group colspan="4"  groups="product.group_mrp_properties">
index d47c3fe..ab644dd 100644 (file)
@@ -362,7 +362,7 @@ class procurement_order(osv.osv):
         """ Changes procurement state to Running and writes message.
         @return: True
         """
-        message = _('From stock: products assigned.')
+        message = _('Products reserverd from stock.')
         self.write(cr, uid, ids, {'state': 'running',
                 'message': message}, context=context)
         self.message_post(cr, uid, ids, body=message, context=context)
index f70d434..5f9a94f 100644 (file)
@@ -84,8 +84,7 @@ class procurement_order(osv.osv):
                 'project_id':  project and project.id or False,
                 'company_id': procurement.company_id.id,
             },context=context)            
-            self.write(cr, uid, [procurement.id], {'task_id': task_id, 'state': 'running', 'message':'from project: task created.'}, context=context)
-            self.document_send_note(cr, uid, [procurement.id], body='%s %s:%s %s' % (_("Task"), procurement.origin or '', procurement.product_id.name, _("created")), context=context)
+            self.write(cr, uid, [procurement.id], {'task_id': task_id, 'state': 'running', 'message':'from project: task created.'}, context=context)            
         self.project_task_create_note(cr, uid, ids, context=context)
         return task_id
 
index ed99b9f..4dda418 100644 (file)
@@ -1082,8 +1082,7 @@ class procurement_order(osv.osv):
             }
             res[procurement.id] = self.create_procurement_purchase_order(cr, uid, procurement, po_vals, line_vals, context=new_context)
             self.write(cr, uid, [procurement.id], {'state': 'running', 'purchase_id': res[procurement.id]})
-            self.document_send_note(cr, uid, [procurement.id], body='%s %s %s' % (_("Draft Purchase Order"), name or '', _("created")), context=context)
-        self.purchase_order_create_note(self, cr, uid, ids, context=context)
+        self.purchase_order_create_note(cr, uid, ids, context=context)
         return res
 
     def purchase_order_create_note(self, cr, uid, ids, context=None):