Xavier ALT (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-16328-xal into
lp:openobject-addons/6.1.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-16328-xal/+merge/96171
Hi,
This is a forward-port of OPW 16328.
Do no try to create write_off entries in partial_reconcile() when called from
the fiscal year closing wizard.
Thanks,
Xavier
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-16328-xal/+merge/96171
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/6.1-opw-16328-xal into
lp:openobject-addons/6.1.
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2012-02-13 18:07:41 +0000
+++ account/account_move_line.py 2012-03-06 16:33:29 +0000
@@ -827,7 +827,12 @@
if r[0][1] != None:
raise osv.except_osv(_('Error'), _('Some entries are already reconciled !'))
- if (not currency_obj.is_zero(cr, uid, account.company_id.currency_id, writeoff)) or \
+ if context.get('fy_closing'):
+ # We don't want to generate any write-off when being called from the
+ # wizard used to close a fiscal year (and it doesn't give us any
+ # writeoff_acc_id).
+ pass
+ elif (not currency_obj.is_zero(cr, uid, account.company_id.currency_id, writeoff)) or \
(account.currency_id and (not currency_obj.is_zero(cr, uid, account.currency_id, currency))):
if not writeoff_acc_id:
raise osv.except_osv(_('Warning'), _('You have to provide an account for the write off/exchange difference entry !'))
_______________________________________________
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