openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #00811
[Merge] lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3
mtr(OpenERP) has proposed merging lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
Requested reviews:
OpenERP R&D Team (openerp-dev)
Related bugs:
#586706 [account_followup]sending date not propogated
https://bugs.launchpad.net/bugs/586706
#643552 The titles of the buttons for sales in exception are obscure
https://bugs.launchpad.net/bugs/643552
#674420 "Recreate procurement" on shipping exception ignores partial deliveries
https://bugs.launchpad.net/bugs/674420
sale:-"Recreate procurement" on shipping exception ignores partial deliveries --fixes lp:674420
->fixed for multiple sale order line.
--
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr2/+merge/41843
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
=== modified file 'sale/sale.py'
--- sale/sale.py 2010-11-25 04:10:33 +0000
+++ sale/sale.py 2010-11-25 10:34:56 +0000
@@ -671,6 +671,8 @@
def action_ship_create(self, cr, uid, ids, *args):
wf_service = netsvc.LocalService("workflow")
picking_id = False
+ move_obj = self.pool.get('stock.move')
+ proc_obj = self.pool.get('procurement.order')
company = self.pool.get('res.users').browse(cr, uid, uid).company_id
for order in self.browse(cr, uid, ids, context={}):
proc_ids = []
@@ -722,6 +724,7 @@
'note': line.notes,
'company_id': order.company_id.id,
})
+
if line.product_id:
proc_id = self.pool.get('procurement.order').create(cr, uid, {
'name': line.name,
@@ -742,6 +745,16 @@
})
proc_ids.append(proc_id)
self.pool.get('sale.order.line').write(cr, uid, [line.id], {'procurement_id': proc_id})
+
+ if order.state == 'shipping_except':
+ for pick in order.picking_ids:
+ for move in pick.move_lines:
+ if move.state == 'cancel':
+ mov_ids = move_obj.search(cr, uid, [('state', '=', 'cancel'),('sale_line_id', '=', line.id),('picking_id', '=', pick.id)])
+ if mov_ids:
+ for mov in move_obj.browse(cr, uid, mov_ids):
+ move_obj.write(cr, uid, [move_id], {'product_qty': mov.product_qty, 'product_uos_qty': mov.product_uos_qty})
+ proc_obj.write(cr, uid, [proc_id], {'product_qty': mov.product_qty, 'product_uos_qty': mov.product_uos_qty})
val = {}
for proc_id in proc_ids:
@@ -749,9 +762,10 @@
if picking_id:
wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
-
+
if order.state == 'shipping_except':
val['state'] = 'progress'
+ val['shipped'] = False
if (order.order_policy == 'manual'):
for line in order.order_line:
Follow ups