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
1=== modified file 'l10n_it_sale/stock/picking.py'
2--- l10n_it_sale/stock/picking.py 2013-06-16 13:00:19 +0000
3+++ l10n_it_sale/stock/picking.py 2014-01-23 12:59:18 +0000
4@@ -59,7 +59,7 @@
5 'note': fields.text('Note'),
6 }
7
8-class stock_picking(orm.Model):
9+class stock_picking_out(orm.Model):
10 _inherit = "stock.picking.out"
11 _columns = {
12 'carriage_condition_id': fields.many2one('stock.picking.carriage_condition', 'Carriage condition'),
13@@ -71,7 +71,7 @@
14
15 def action_invoice_create(self, cursor, user, ids, journal_id=False,
16 group=False, type='out_invoice', context=None):
17- res = super(stock_picking, self).action_invoice_create(cursor, user, ids, journal_id,
18+ res = super(stock_picking_out, self).action_invoice_create(cursor, user, ids, journal_id,
19 group, type, context)
20 for picking in self.browse(cursor, user, ids, context=context):
21 self.pool.get('account.invoice').write(cursor, user, res[picking.id], {
22@@ -84,9 +84,11 @@
23 #-----------------------------------------------------------------------------
24 # EVITARE LA COPIA DI 'NUMERO DDT'
25 #-----------------------------------------------------------------------------
26- def copy(self, cr, uid, id, default={}, context=None):
27+ def copy(self, cr, uid, id, default=None, context=None):
28+ if default is None:
29+ default = {}
30 default.update({'ddt_number': ''})
31- return super(stock_picking, self).copy(cr, uid, id, default, context)
32+ return super(stock_picking_out, self).copy(cr, uid, id, default, context=context)
33
34 # Redefinition of the new fields in order to update the model stock.picking in the orm
35 # FIXME: this is a temporary workaround because of a framework bug (ref: lp996816).

Subscribers

People subscribed via source and target branches