already reconcilled entry cause unhandled exception
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
High
|
Unassigned |
Bug Description
Server raise the following error when clicking "confirm" on Financial Statement.
/home/dex/
raise _('Already Reconciled')
Exception in thread Thread-284:
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "/home/
new_e = Exception(
File "/home/
value = str(value)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 48:
Versions:
oo-server: (trunk) r1565
oo-client: (trunk) r865
oo-addons: (trunk) r2067
Steps to reproduce the error:
- Create a new DB (with demo data)
- Choose "Accounting only profile"
- Configure the base, use default params
(note: I choose `Luxembourg' chart of account)
- Go to: Financial Management > Entries Encoding > Entries by Statements > New Statement
- Choose Journal: x Bank Journal
- Clic Import Invoice, clic Customer Invoice, clic Add (this add an entry with field Move = Test invoice 1), clic Ok
- Clic Compute, and fill Ending balance
- Clic Confirm
(note: now this entry is reconcilled)
- Go to: Financial Management > Entries Encoding > Entries by Statements > New Statement
- Choose Journal: x Bank Journal
- Add a new entry to one2many field "Statement lines"
- in field Name, enter: débug
- in field Partner, choose Agrolait
- in field Amount, enter: 50,00
- in field Reconcile, choose: [1850,00] (autocompleted as they're only one entry)
- Clic compute, and fill Ending balance
- And finally, clic confirm
Note: if we change the Name field, with something ascii complient (ex: debug), the behaviour is correct (i.e.: We get and exception box which say that we can't reconcille the entry)
Changed in openobject-server: | |
importance: | Undecided → High |
Here is another patch, completing the commit 2669 from Stéphane.
in netsvc.py, line 356, we have: tools.ustr( e.exception) ) # avoid problems of pickeling
new_e = Exception(
this cause problem because e.exception have type Exception, so ustr do a str() on it, which break if the exception string is / contrain unicode.