Merge lp:~savoirfairelinux-openerp/openerp-accountedge/fix-1234795 into lp:~openerp-accountedge/openerp-accountedge/6.1

Proposed by Virgil Dupras
Status: Merged
Merged at revision: 25
Proposed branch: lp:~savoirfairelinux-openerp/openerp-accountedge/fix-1234795
Merge into: lp:~openerp-accountedge/openerp-accountedge/6.1
Diff against target: 31 lines (+6/-8)
1 file modified
hr_expense_line_account/hr_expense_line_account.py (+6/-8)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/openerp-accountedge/fix-1234795
Reviewer Review Type Date Requested Status
Joao Alfredo Gama Batista code review, no test Approve
Maxime Chambreuil (http://www.savoirfairelinux.com) code review Approve
Review via email: mp+189151@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) :
review: Approve (code review)
Revision history for this message
Joao Alfredo Gama Batista (joao-gama) :
review: Approve (code review, no test)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hr_expense_line_account/hr_expense_line_account.py'
--- hr_expense_line_account/hr_expense_line_account.py 2013-08-08 19:16:49 +0000
+++ hr_expense_line_account/hr_expense_line_account.py 2013-10-03 17:49:59 +0000
@@ -31,6 +31,8 @@
31 '''31 '''
32 Get the automatic value of the account_id field.32 Get the automatic value of the account_id field.
33 '''33 '''
34 if not product_id:
35 return None
34 # Retrieve the product36 # Retrieve the product
35 product = self.pool.get('product.product').browse(cr, uid, product_id)37 product = self.pool.get('product.product').browse(cr, uid, product_id)
36 # Product -> Accounting -> Expense account38 # Product -> Accounting -> Expense account
@@ -59,14 +61,10 @@
5961
6062
61 def onchange_product_id(self, cr, uid, ids, product_id, uom_id, employee_id, context=None):63 def onchange_product_id(self, cr, uid, ids, product_id, uom_id, employee_id, context=None):
62 if product_id:64 res = super(hr_expense_line, self).onchange_product_id(cr, uid, ids, product_id, uom_id, employee_id, context=context)
63 values = super(hr_expense_line, self).onchange_product_id(cr, uid, ids, product_id, uom_id, employee_id, context=context)
64 for id in ids:65 for id in ids:
65 this = self.browse(cr, uid, id)66 account_id = self.get_account_id(cr, uid, product_id, context)
66 account_id = self.get_account_id(cr, uid, product_id, context)67 res['value']['account_id'] = account_id
67 values['value'].update({68 return res
68 'account_id' : account_id
69 })
70 return values
7169
72hr_expense_line()70hr_expense_line()

Subscribers

People subscribed via source and target branches