Rohan Nayani(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-802322-ron into 
lp:openobject-addons.

Requested reviews:
  Rucha (Open ERP) (rpa-openerp)
Related bugs:
  Bug #802322 in OpenERP Addons: "orderpoint"
  https://bugs.launchpad.net/openobject-addons/+bug/802322

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-802322-ron/+merge/66237
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-802322-ron/+merge/66237
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-802322-ron.
=== modified file 'procurement/schedulers.py'
--- procurement/schedulers.py	2011-01-14 00:11:01 +0000
+++ procurement/schedulers.py	2011-06-29 05:23:24 +0000
@@ -183,6 +183,7 @@
                     'product_qty': -product.virtual_available,
                     'product_uom': product.uom_id.id,
                     'location_id': location_id,
+                    'company_id': warehouse.company_id.id,
                     'procure_method': 'make_to_order',
                     })
                 wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_confirm', cr)

=== modified file 'purchase/purchase.py'
--- purchase/purchase.py	2011-04-26 07:39:18 +0000
+++ purchase/purchase.py	2011-06-29 05:23:24 +0000
@@ -775,6 +775,8 @@
         prod_obj = self.pool.get('product.product')
         acc_pos_obj = self.pool.get('account.fiscal.position')
         po_obj = self.pool.get('purchase.order')
+        wharehouse_obj = self.pool.get('stock.warehouse')
+
         for procurement in self.browse(cr, uid, ids, context=context):
             res_id = procurement.move_id.id
             partner = procurement.product_id.seller_id # Taken Main Supplier of Product of Procurement.
@@ -821,6 +823,8 @@
                 'partner_id': partner_id,
                 'partner_address_id': address_id,
                 'location_id': procurement.location_id.id,
+                'warehouse_id': wharehouse_obj.search(cr, uid, [('company_id','=',procurement.company_id.id or company)])[0],
+                'company_id': procurement.company_id.id or company,
                 'pricelist_id': pricelist_id,
                 'order_line': [(0,0,line)],
                 'company_id': procurement.company_id.id,

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to