Merge lp:~enlightx-deactivatedaccount/openobject-italia/7.0-fix-1271907 into lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0

Proposed by Davide Corio
Status: Merged
Approved by: Davide Corio
Approved revision: 235
Merged at revision: 234
Proposed branch: lp:~enlightx-deactivatedaccount/openobject-italia/7.0-fix-1271907
Merge into: lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0
Diff against target: 35 lines (+6/-4)
1 file modified
l10n_it_sale/stock/picking.py (+6/-4)
To merge this branch: bzr merge lp:~enlightx-deactivatedaccount/openobject-italia/7.0-fix-1271907
Reviewer Review Type Date Requested Status
Lorenzo Battistini code review Approve
Review via email: mp+202846@code.launchpad.net
To post a comment you must log in.
233. By Davide Corio

[FIX] manage empty defaults

234. By Davide Corio

[DEL] (probably) not useful statement

235. By Davide Corio

[FIX] default=None

Revision history for this message
Lorenzo Battistini (elbati) :
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'l10n_it_sale/stock/picking.py'
--- l10n_it_sale/stock/picking.py 2013-06-16 13:00:19 +0000
+++ l10n_it_sale/stock/picking.py 2014-01-23 12:59:18 +0000
@@ -59,7 +59,7 @@
59 'note': fields.text('Note'),59 'note': fields.text('Note'),
60 }60 }
6161
62class stock_picking(orm.Model):62class stock_picking_out(orm.Model):
63 _inherit = "stock.picking.out"63 _inherit = "stock.picking.out"
64 _columns = {64 _columns = {
65 'carriage_condition_id': fields.many2one('stock.picking.carriage_condition', 'Carriage condition'),65 'carriage_condition_id': fields.many2one('stock.picking.carriage_condition', 'Carriage condition'),
@@ -71,7 +71,7 @@
7171
72 def action_invoice_create(self, cursor, user, ids, journal_id=False,72 def action_invoice_create(self, cursor, user, ids, journal_id=False,
73 group=False, type='out_invoice', context=None):73 group=False, type='out_invoice', context=None):
74 res = super(stock_picking, self).action_invoice_create(cursor, user, ids, journal_id,74 res = super(stock_picking_out, self).action_invoice_create(cursor, user, ids, journal_id,
75 group, type, context)75 group, type, context)
76 for picking in self.browse(cursor, user, ids, context=context):76 for picking in self.browse(cursor, user, ids, context=context):
77 self.pool.get('account.invoice').write(cursor, user, res[picking.id], {77 self.pool.get('account.invoice').write(cursor, user, res[picking.id], {
@@ -84,9 +84,11 @@
84 #-----------------------------------------------------------------------------84 #-----------------------------------------------------------------------------
85 # EVITARE LA COPIA DI 'NUMERO DDT'85 # EVITARE LA COPIA DI 'NUMERO DDT'
86 #-----------------------------------------------------------------------------86 #-----------------------------------------------------------------------------
87 def copy(self, cr, uid, id, default={}, context=None):87 def copy(self, cr, uid, id, default=None, context=None):
88 if default is None:
89 default = {}
88 default.update({'ddt_number': ''})90 default.update({'ddt_number': ''})
89 return super(stock_picking, self).copy(cr, uid, id, default, context)91 return super(stock_picking_out, self).copy(cr, uid, id, default, context=context)
9092
91# Redefinition of the new fields in order to update the model stock.picking in the orm93# Redefinition of the new fields in order to update the model stock.picking in the orm
92# FIXME: this is a temporary workaround because of a framework bug (ref: lp996816).94# FIXME: this is a temporary workaround because of a framework bug (ref: lp996816).

Subscribers

People subscribed via source and target branches