Merge lp:~unifield-team/unifield-addons/uf_370-fix_chained_location_reason_type_move into lp:unifield-addons

Proposed by Quentin THEURET @Amaris
Status: Merged
Merged at revision: 4494
Proposed branch: lp:~unifield-team/unifield-addons/uf_370-fix_chained_location_reason_type_move
Merge into: lp:unifield-addons
Diff against target: 46 lines (+19/-13)
1 file modified
stock/stock.py (+19/-13)
To merge this branch: bzr merge lp:~unifield-team/unifield-addons/uf_370-fix_chained_location_reason_type_move
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+76226@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Patrick Amstutz (patrick-amstutz) wrote :

ne pas oublier les tests yaml dans sale, merci.

Revision history for this message
Patrick Amstutz (patrick-amstutz) wrote :

> ne pas oublier les tests yaml dans sale, merci.
pas la bonne branche sorry

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 2011-09-20 12:14:48 +0000
3+++ stock/stock.py 2011-09-20 14:29:24 +0000
4@@ -1808,23 +1808,29 @@
5 result.setdefault(m.picking_id, [])
6 result[m.picking_id].append( (m, dest) )
7 return result
8+
9+ def hook__create_chained_picking(self, cr, uid, pick_values, picking):
10+ return pick_values
11
12 def _create_chained_picking(self, cr, uid, pick_name, picking, ptype, move, context=None):
13+ if not context:
14+ context={}
15 res_obj = self.pool.get('res.company')
16 picking_obj = self.pool.get('stock.picking')
17- pick_id= picking_obj.create(cr, uid, {
18- 'name': pick_name,
19- 'origin': tools.ustr(picking.origin or ''),
20- 'type': ptype,
21- 'note': picking.note,
22- 'move_type': picking.move_type,
23- 'auto_picking': move[0][1][1] == 'auto',
24- 'stock_journal_id': move[0][1][3],
25- 'company_id': move[0][1][4] or res_obj._company_default_get(cr, uid, 'stock.company', context=context),
26- 'address_id': picking.address_id.id,
27- 'invoice_state': 'none',
28- 'date': picking.date,
29- })
30+ pick_values = {'name': pick_name,
31+ 'origin': tools.ustr(picking.origin or ''),
32+ 'type': ptype,
33+ 'note': picking.note,
34+ 'move_type': picking.move_type,
35+ 'auto_picking': move[0][1][1] == 'auto',
36+ 'stock_journal_id': move[0][1][3],
37+ 'company_id': move[0][1][4] or res_obj._company_default_get(cr, uid, 'stock.company', context=context),
38+ 'address_id': picking.address_id.id,
39+ 'invoice_state': 'none',
40+ 'date': picking.date,
41+ }
42+ pick_values = self.hook__create_chained_picking(cr, uid, pick_values, picking)
43+ pick_id= picking_obj.create(cr, uid, pick_values, context=context)
44 return pick_id
45 def create_chained_picking(self, cr, uid, moves, context=None):
46 res_obj = self.pool.get('res.company')

Subscribers

People subscribed via source and target branches

to all changes: