Divyesh Makwana(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-911159-mdi into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #911159 in OpenERP Addons: "account_voucher : onchange_journal() takes at 
least 12 arguments (10 given)."
  https://bugs.launchpad.net/openobject-addons/+bug/911159

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-911159-mdi/+merge/87342

Hello Sir,

I have fix the issue: https://bugs.launchpad.net/openobject-addons/+bug/911159 
"account_voucher : onchange_journal() takes at least 12 arguments (10 given)".

Thanks and Regards,

Divyesh Makwana(MDI)
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-911159-mdi/+merge/87342
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-911159-mdi.
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py	2011-12-31 07:57:20 +0000
+++ account_voucher/account_voucher.py	2012-01-03 12:39:04 +0000
@@ -448,7 +448,9 @@
         default['value']['account_id'] = account_id
         default['value']['type'] = ttype or tr_type
 
-        vals = self.onchange_journal(cr, uid, ids, journal_id, line_ids, tax_id, partner_id, company_id, context)
+        date = time.strftime('%Y-%m-%d')
+        amount = 0.0
+        vals = self.onchange_journal(cr, uid, ids, journal_id, line_ids, tax_id, partner_id, date, amount, ttype, company_id, context)
         default['value'].update(vals.get('value'))
 
         return default
@@ -1051,7 +1053,7 @@
                 voucher_currency = voucher_brw.currency_id and voucher_brw.currency_id.id or voucher_brw.journal_id.company_id.currency_id.id
                 # We want to set it on the account move line as soon as the original line had a foreign currency
                 if line.move_line_id.currency_id and line.move_line_id.currency_id.id != company_currency:
-                    # we compute the amount in that foreign currency. 
+                    # we compute the amount in that foreign currency.
                     if line.move_line_id.currency_id.id == current_currency:
                         # if the voucher and the voucher line share the same currency, there is no computation to do
                         sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1
@@ -1270,7 +1272,7 @@
 
     def _currency_id(self, cr, uid, ids, name, args, context=None):
         '''
-        This function returns the currency id of a voucher line. It's either the currency of the 
+        This function returns the currency id of a voucher line. It's either the currency of the
         associated move line (if any) or the currency of the voucher or the company currency.
         '''
         res = {}

_______________________________________________
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

Reply via email to