Merge lp:~numerigraphe-team/ocb-addons/7.0-picking-custom-default-origin into lp:openobject-addons

Proposed by Numérigraphe
Status: Work in progress
Proposed branch: lp:~numerigraphe-team/ocb-addons/7.0-picking-custom-default-origin
Merge into: lp:openobject-addons
Diff against target: 14 lines (+2/-1)
1 file modified
stock/stock.py (+2/-1)
To merge this branch: bzr merge lp:~numerigraphe-team/ocb-addons/7.0-picking-custom-default-origin
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+142895@code.launchpad.net

Description of the change

I propose to make it possible for custom code to set a default value for the field "origin" when copying a stock picking.
Lionel Sausin.

To post a comment you must log in.
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

I'm putting this proposal on hold until the new WMS code lands into the trunk, and then I'll resubmit.

I'm going to propose it to the OCB backport in the meanwhile.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2012-12-21 16:48:08 +0000
3+++ stock/stock.py 2013-01-11 13:44:28 +0000
4@@ -708,8 +708,9 @@
5 if ('name' not in default) or (picking_obj.name=='/'):
6 seq_obj_name = 'stock.picking.' + picking_obj.type
7 default['name'] = self.pool.get('ir.sequence').get(cr, uid, seq_obj_name)
8+ default['backorder_id'] = False
9+ if 'origin' not in default:
10 default['origin'] = ''
11- default['backorder_id'] = False
12 if 'invoice_state' not in default and picking_obj.invoice_state == 'invoiced':
13 default['invoice_state'] = '2binvoiced'
14 res=super(stock_picking, self).copy(cr, uid, id, default, context)

Subscribers

People subscribed via source and target branches

to all changes: