Rifakat (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-18373-rha into
lp:openobject-addons/6.0.
Requested reviews:
Vo Minh Thu (OpenERP) (vmt-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-18373-rha/+merge/80996
Hello,
While importing payment lines from Bank statement, it raises error on call
onchange_partner_id() which passes default argument voucher_cuurrency_id
instead of currency_id.
Kindly review it.
Regards,
Rifakat
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-18373-rha/+merge/80996
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-18373-rha.
=== modified file 'account/account.py'
--- account/account.py 2011-10-24 12:22:19 +0000
+++ account/account.py 2011-11-02 10:40:29 +0000
@@ -337,9 +337,10 @@
accounts = self.browse(cr, uid, ids, context=context)
for account in accounts:
level = 0
- if account.parent_id:
- obj = self.browse(cr, uid, account.parent_id.id)
- level = obj.level + 1
+ parent = account.parent_id
+ while parent:
+ level += 1
+ parent = parent.parent_id
res[account.id] = level
return res
@@ -387,7 +388,11 @@
'manage this. So if you import from another software system you may have to use the rate at date. ' \
'Incoming transactions always use the rate at date.', \
required=True),
- 'level': fields.function(_get_level, string='Level', method=True, store=True, type='integer'),
+ 'level': fields.function(_get_level, string='Level', method=True, type='integer',
+ store={
+ 'account.account': (_get_children_and_consol, ['level', 'parent_id'], 10),
+ }),
+
}
_defaults = {
=== modified file 'account_payment/wizard/account_payment_populate_statement.py'
--- account_payment/wizard/account_payment_populate_statement.py 2011-09-26 11:48:36 +0000
+++ account_payment/wizard/account_payment_populate_statement.py 2011-11-02 10:40:29 +0000
@@ -79,7 +79,7 @@
if not line.move_line_id.id:
continue
context.update({'move_line_ids': [line.move_line_id.id]})
- result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), voucher_currency_id= statement.currency.id, ttype='payment', date=line.ml_maturity_date, context=context)
+ result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='payment', date=line.ml_maturity_date, context=context)
voucher_res = {
'type': 'payment',
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp