This question has been flagged

I upgraded Ubuntu 12.04 to 14.04 LTS and after having some problems not being able te print, which were solved with help from this community. I now have the problem I cannot print sales orders which have been created before the upgrade (also upgraded OpenERP).

But the new ones are printable. Error msg is :

ascii
4,00 Stuk(s
4
5
ordinal not in range(128)

(<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'4,00\xa0Stuk(s', 4, 5, 'ordinal not in range(128)'), <traceback object at 0x7fbea533a7a0>)

Log file says :

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 654, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 760, in exp_report_get
    return self._check_report(report_id)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 738, in _check_report
    netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 71, in abort_response
    raise openerp.osv.osv.except_osv(description, details)
except_osv: (u'ascii\n4,00\xa0Stuk(s\n4\n5\nordinal not in range(128)', (<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'4,00\xa0Stuk(s', 4, 5, 'ordinal not in range(128)'), <traceback object at 0x7fbea533a7a0>))

Hope this rings a bell for someone. Looking at this I would says it is complaining about the number of items and the uom used for that.

Avatar
Discard

Please post your code where you are creating that string

Author

Dear Grover, I have no code regarding that string. It is in standard OpenERP. After the upgrade this has started on all old orders.

Author Best Answer

I have solved this problem. I was checking my database and suddenly saw that there was no instance of our widely used "Stuk(s)" (pieces in Dutch) as UOM. The problem existed because somehow in the upgrade Ubuntu did to Postgres this entry in the table was lost. I recreated this UOM and now everything works fine again.

Thanks Grover for taking some time to look into it.

Problem Solved!

 

EDIT!!!: As it turns out this was only a partial answer. It works now on most reports, but not on all of the reports. This is somewhat strange. It keeps saying this on the standard order forms from OpenERP. So If somebody know more about this, please share this with me.

EDIT 2 : Now I solved it by removing the UOM on the report and then readding it. This solved my problem.

I opened the report in Openoffice, removed the UOM under Quantity. Saved and uploaded the report.

Readded UOM under Quantity and saved and uploaded the report again and it works!

Hope it helps someone.

Avatar
Discard

This could be due to translation issues. The default OpenERP reports will look for a generated UoM from the default data (when you first install a module). This is most likely "Unit(s)", using the "Stuks" translation for the dutch translation. Check the translated terms to see if you properly translated the new record. Another option would most likely be to update the database using flag "-u all" in order to let OpenERP re-create the record for the missing UoM, as well as reloading the Dutch translation to replace the missing translation.

Author

Ludo, just for the hell of it I will try that too, it never does any harm :)