c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #35043
[Bug 847630] Re: [6.1] account_voucher : onchange_partner_id method call to fix in few modules
Still, calls and signature doesn't match. However, don't use my preview
patch, it is inverted.
bzr revno openobject-addons/
5383
bzr revno openobject-server/
3768
[2011-10-18 07:04:30,964][test_voucher] DEBUG:tests.l10n_ch:Exception during evaluation of !python block in yaml_file .../openobject-addons/l10n_ch/test/l10n_ch_dta.yml.
Traceback (most recent call last):
File ".../openobject-server/openerp/tools/yaml_import.py", line 426, in process_python
unsafe_eval(code_obj, {'ref': self.get_id}, code_context)
File ".../openobject-addons/l10n_ch/test/l10n_ch_dta.yml", line 13, in <module>
account_id: account.a_pay
File ".../openobject-addons/account_payment/wizard/account_payment_populate_statement.py", line 79, in populate_statement
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)
TypeError: onchange_partner_id() got an unexpected keyword argument 'voucher_currency_id'
[2011-10-18 07:04:30,965][test_voucher] ERROR:tests.l10n_ch:onchange_partner_id() got an unexpected keyword argument 'voucher_currency_id'
Traceback (most recent call last):
File ".../openobject-server/openerp/tools/yaml_import.py", line 740, in process
self._process_node(node)
File ".../openobject-server/openerp/tools/yaml_import.py", line 755, in _process_node
self.process_python(node)
File ".../openobject-server/openerp/tools/yaml_import.py", line 426, in process_python
unsafe_eval(code_obj, {'ref': self.get_id}, code_context)
File ".../openobject-addons/l10n_ch/test/l10n_ch_dta.yml", line 13, in <module>
account_id: account.a_pay
File ".../openobject-addons/account_payment/wizard/account_payment_populate_statement.py", line 79, in populate_statement
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)
TypeError: onchange_partner_id() got an unexpected keyword argument 'voucher_currency_id'
[2011-10-18 07:04:30,965][test_voucher] ERROR:init.test:Tests failed to execute in module l10n_ch
Traceback (most recent call last):
File ".../openobject-server/openerp/modules/loading.py", line 100, in load_test
_load_data(cr, module_name, idref, mode, 'test')
File ".../openobject-server/openerp/modules/loading.py", line 135, in _load_data
tools.convert_yaml_import(cr, module_name, fp, idref, mode, noupdate)
File ".../openobject-server/openerp/tools/yaml_import.py", line 805, in yaml_import
yaml_interpreter.process(yaml_string)
File ".../openobject-server/openerp/tools/yaml_import.py", line 740, in process
self._process_node(node)
File ".../openobject-server/openerp/tools/yaml_import.py", line 755, in _process_node
self.process_python(node)
File ".../openobject-server/openerp/tools/yaml_import.py", line 426, in process_python
unsafe_eval(code_obj, {'ref': self.get_id}, code_context)
File ".../openobject-addons/l10n_ch/test/l10n_ch_dta.yml", line 13, in <module>
account_id: account.a_pay
File ".../openobject-addons/account_payment/wizard/account_payment_populate_statement.py", line 79, in populate_statement
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)
And voucher signature is :
./openobject-addons/account_voucher/account_voucher.py:412:
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None):
Which signature will stay ?
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/847630
Title:
[6.1] account_voucher : onchange_partner_id method call to fix in few
modules
Status in OpenERP Addons (modules):
New
Bug description:
Hello,
In 6.1, the signature of the voucher method onchange_partner_id changed.
"currency_id" has been replaced by "voucher_currency_id"
Then following modules must be updated:
l10n_ch
account_payment
account_coda_import
A patch proposal to change calls in those modules is attached.
An other option could be to recover the preview signature for compatibility reasons.
And to keep clarity in the code, doing a simple copy of in parameter currency_id into the voucher_currency_id variable.
Regards,
Yannick
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/847630/+subscriptions
References