openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #23341
[Bug 1102217] Re: [7.0/trunk] Opening With Last Closing Balance error
** Branch linked: lp:~openerp-community/openobject-addons/trunk-
bug-1102217
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1102217
Title:
[7.0/trunk] Opening With Last Closing Balance error
Status in OpenERP Addons (modules):
Confirmed
Bug description:
Hello,
when use a payment method for POS with the "Opening With Last Closing Balance" option checked, it works incorrectly. I test it a lot of times and it opens the cash session with a incorrect value (it is not the last). The value which opens is earlier than the last.
The code used when create the new cash session is (account_cash_statement.py at line 203):
last_bank_statement_ids = self.search(cr, uid, domain,
limit=1, order='create_date desc', context=context)
The "order by" is based on the create_date column of the table
'account_bank_statement'. This column saves the time including
millisecs with 6 digits and Python did not understand to order for.
The column 'closing_date' is the best candidate to improve the result:
last_bank_statement_ids = self.search(cr, uid, domain,
limit=1, order='closing_date desc', context=context)
It works correctly.
Regards
Fco.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1102217/+subscriptions
References