[7.0/trunk] Opening With Last Closing Balance error

Bug #1102217 reported by Francisco Martinez
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Medium
OpenERP R&D Addons Team 3

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.

Related branches

Revision history for this message
Hiral Patel (OpenERP) (hip-openerp) wrote :

Hello Francisco Martinez,

I have checked your issue and got the same problem. I have attached the video to reproduce it.

Thanks for reporting.

Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Medium
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
summary: - OpenERP 7: Opening With Last Closing Balance error
+ [7.0/trunk] Opening With Last Closing Balance error
Revision history for this message
Ishwar Malvi(OpenERP) (ima-openerp) wrote :

Hello,

  It has been fix committed in https://code.launchpad.net/~openerp-community/openobject-addons/trunk-bug-1102217 branch.
  Revision No: 8546.
  Revision ID: <email address hidden>

  It will be available in trunk soon.

Thanks,
Ishwar Malvi

Changed in openobject-addons:
status: Confirmed → In Progress
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.