Tryton - Issues

 

Issue6548

Title Wrong set_lang call in reports
Priority bug Status in-progress
Superseder Nosy List ced
Type behavior Components
Assigned To ced Keywords
Reviews

Created on 2017-06-06.09:52:42 by ced, last changed by ced.

Messages
msg34347 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-06-29.11:52:15
Indeed we can not chain the calls like that because the first set_lang returns None and so the other will not be called.
Instead I think we must add a line for each call:

replace text:p="set_lang(…)"
replace text:p="record.set_lang(…)"
msg33979 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-06-09.11:25:01
Indeed I think the right thing to do is to use the new 'replace' directive from relatorio 0.6.2. Like that, the empty line will be removed.
So the statement will be:

replace text:p="set_lang(…) and record.set_lang(…) and ''"
msg33978 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-06-09.10:55:11
Indeed it comes from issue4904
msg33919 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-06-06.09:52:41
The calls to set_lang has been on a single line in most report template (I think it is by issue6011). This makes them not being called because the last statement erase of the line erases the all lines.
relatorio control statements should always be put on a single line.
I propose to fix it after issue6545 to get a reviewable patch.
History
Date User Action Args
2017-06-29 11:52:15cedsetmessages: + msg34347
2017-06-09 11:25:01cedsetmessages: + msg33979
2017-06-09 10:55:11cedsetmessages: + msg33978
2017-06-06 09:52:42cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)