WE2BS / openerp-rent

This OpenERP6 module manages the leasing of products to partners.
http://doc.we2bs.com/openerp-rent/
GNU General Public License v3.0
17 stars 10 forks source link

Issue on submit form #2

Closed jafnh closed 13 years ago

jafnh commented 13 years ago

I have upgraded into Python 2.6 to use this module. All things runs smooth but, when I'm submiting and hit the confirm button, I get this:

\addons\rent\rent.py", line 533, in get_invoice_comment ValueError: unsupported format character 'n' (0x6e) at index 22

Actually, this field is empty.

thibautd commented 13 years ago

Hi,

Are you using the 0.3 version (packaged) ? Could you paste the entire error message please? Did you modify something ?

jafnh commented 13 years ago
Traceback (most recent call last):
  File "netsvc.pyo", line 489, in dispatch
  File "service\web_services.pyo", line 599, in dispatch
  File "osv\osv.pyo", line 122, in wrapper
  File "osv\osv.pyo", line 196, in exec_workflow
  File "osv\osv.pyo", line 189, in exec_workflow_cr
  File "workflow\wkf_service.pyo", line 80, in trg_validate
  File "workflow\instance.pyo", line 48, in validate
  File "workflow\workitem.pyo", line 61, in process
  File "workflow\workitem.pyo", line 174, in _split_test
  File "workflow\workitem.pyo", line 182, in _join_test
  File "workflow\workitem.pyo", line 41, in create
  File "workflow\workitem.pyo", line 61, in process
  File "workflow\workitem.pyo", line 174, in _split_test
  File "workflow\workitem.pyo", line 182, in _join_test
  File "workflow\workitem.pyo", line 41, in create
  File "workflow\workitem.pyo", line 53, in process
  File "workflow\workitem.pyo", line 107, in _execute
  File "workflow\wkf_expr.pyo", line 68, in execute
  File "workflow\wkf_expr.pyo", line 58, in _eval_expr
  File "tools\safe_eval.pyo", line 284, in safe_eval
  File "", line 1, in 
  File "osv\orm.pyo", line 181, in 
  File "C:\OpenERP\Servidor\addons\rent\rent.py", line 336, in action_generate_invoices
  File "C:\OpenERP\Servidor\addons\rent\rent.py", line 582, in get_invoice_for_once_period
  File "C:\OpenERP\Servidor\addons\rent\rent.py", line 558, in get_invoice_at
  File "C:\OpenERP\Servidor\addons\rent\rent.py", line 533, in get_invoice_comment
ValueError: unsupported format character 'n' (0x6e) at index 22

Yes, 0.3 Stable. I didn't change anything. Just translated to pt_BR, creating the .po file.

thibautd commented 13 years ago

I think you mistranslated a string and you added a "%n" in this string :

"Rental from %s to %s, invoice %d/%d.\n"
"Invoice for the period from %s to %s."

Also, once translation is finished, feel free to propose it for official integration in the future 0.4.

jafnh commented 13 years ago

That's right. It's fixed, and fully working now. I will review twice the translation, and after tests, I will send to an oficial integration. Thanks man.

thibautd commented 13 years ago

Thanks for your contribution,