Merge lp:~initos.com/account-invoice-report/7.0-fix_lang_for_draft into lp:~account-core-editors/account-invoice-report/7.0
Proposed by
Katja Matthes
Status: | Merged |
---|---|
Approved by: | Yannick Vaucher @ Camptocamp |
Approved revision: | 62 |
Merged at revision: | 63 |
Proposed branch: | lp:~initos.com/account-invoice-report/7.0-fix_lang_for_draft |
Merge into: | lp:~account-core-editors/account-invoice-report/7.0 |
Diff against target: |
59 lines (+12/-11) 2 files modified
invoice_webkit/invoice.py (+10/-9) invoice_webkit/view/invoice_view.xml (+2/-2) |
To merge this branch: | bzr merge lp:~initos.com/account-invoice-report/7.0-fix_lang_for_draft |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Yannick Vaucher @ Camptocamp | code review, no test | Approve | |
Markus Schneider (community) | review & testing | Approve | |
Pedro Manuel Baeza | code review | Needs Fixing | |
Review via email: mp+224109@code.launchpad.net |
Description of the change
Steps to reproduce:
1) In invoice tree view klick 'Create' to open draft formular for a new invoice
2) Choose for partner_id a partner with an other language than English
3) Set text_condition{1,2}
Result
English version of condition text is set to note{1,2}.
Expected Result:
Use language of set partner while setting note{1,2}.
Solution:
Add partner_id as parameter to on_change function for text_condition{1,2}
To post a comment you must log in.
Hi, Katja,
You're right that current code doesn't work, but this is because the line that made the work is incorrect:
try : .partner_ id.lang
lang = self.browse(cr, uid, inv_id)
inv_id is an id, not a list of ids, so you don't need to put index 0 to access browse_record.
I think it's better to simply fix this instead of changing all the code you put.
Regards.