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
=== modified file 'stock/stock.py'
--- stock/stock.py 2011-09-20 12:14:48 +0000
+++ stock/stock.py 2011-09-20 14:29:24 +0000
@@ -1808,23 +1808,29 @@
1808 result.setdefault(m.picking_id, [])1808 result.setdefault(m.picking_id, [])
1809 result[m.picking_id].append( (m, dest) )1809 result[m.picking_id].append( (m, dest) )
1810 return result1810 return result
1811
1812 def hook__create_chained_picking(self, cr, uid, pick_values, picking):
1813 return pick_values
18111814
1812 def _create_chained_picking(self, cr, uid, pick_name, picking, ptype, move, context=None):1815 def _create_chained_picking(self, cr, uid, pick_name, picking, ptype, move, context=None):
1816 if not context:
1817 context={}
1813 res_obj = self.pool.get('res.company')1818 res_obj = self.pool.get('res.company')
1814 picking_obj = self.pool.get('stock.picking')1819 picking_obj = self.pool.get('stock.picking')
1815 pick_id= picking_obj.create(cr, uid, {1820 pick_values = {'name': pick_name,
1816 'name': pick_name,1821 'origin': tools.ustr(picking.origin or ''),
1817 'origin': tools.ustr(picking.origin or ''),1822 'type': ptype,
1818 'type': ptype,1823 'note': picking.note,
1819 'note': picking.note,1824 'move_type': picking.move_type,
1820 'move_type': picking.move_type,1825 'auto_picking': move[0][1][1] == 'auto',
1821 'auto_picking': move[0][1][1] == 'auto',1826 'stock_journal_id': move[0][1][3],
1822 'stock_journal_id': move[0][1][3],1827 'company_id': move[0][1][4] or res_obj._company_default_get(cr, uid, 'stock.company', context=context),
1823 'company_id': move[0][1][4] or res_obj._company_default_get(cr, uid, 'stock.company', context=context),1828 'address_id': picking.address_id.id,
1824 'address_id': picking.address_id.id,1829 'invoice_state': 'none',
1825 'invoice_state': 'none',1830 'date': picking.date,
1826 'date': picking.date,1831 }
1827 })1832 pick_values = self.hook__create_chained_picking(cr, uid, pick_values, picking)
1833 pick_id= picking_obj.create(cr, uid, pick_values, context=context)
1828 return pick_id1834 return pick_id
1829 def create_chained_picking(self, cr, uid, moves, context=None):1835 def create_chained_picking(self, cr, uid, moves, context=None):
1830 res_obj = self.pool.get('res.company')1836 res_obj = self.pool.get('res.company')

Subscribers

People subscribed via source and target branches

to all changes: