Tryton - Issues

 

Issue6548

Title Wrong set_lang call in reports
Priority bug Status resolved
Superseder Nosy List ced, reviewbot, roundup-bot
Type behavior Components account_invoice, account_payment_sepa, purchase, sale, stock
Assigned To ced Keywords review
Reviews 42621002, 42631002, 35601002, 38601002, 44281002
View: 42621002, 42631002, 35601002, 38601002, 44281002

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

Messages
New changeset b2fd25a7bfdd by Cédric Krier in branch 'default':
Fix chained set_lang call in report
http://hg.tryton.org/modules/stock/rev/b2fd25a7bfdd
New changeset 9207e69b36e4 by Cédric Krier in branch 'default':
Fix chained set_lang call in report
http://hg.tryton.org/modules/purchase/rev/9207e69b36e4
New changeset 4c6ecaef8cd7 by Cédric Krier in branch 'default':
Fix chained set_lang call in report
http://hg.tryton.org/modules/account_invoice/rev/4c6ecaef8cd7
New changeset 2a749baaa633 by Cédric Krier in branch 'default':
Fix chained set_lang call in report
http://hg.tryton.org/modules/sale/rev/2a749baaa633
New changeset 2620aa20d391 by Cédric Krier in branch 'default':
Fix chained set_lang call in report
http://hg.tryton.org/modules/account_payment_sepa/rev/2620aa20d391
New review44281002 at https://codereview.tryton.org/44281002/#ps1
New review38601002 at https://codereview.tryton.org/38601002/#ps1
New review35601002 at https://codereview.tryton.org/35601002/#ps1
New review42631002 at https://codereview.tryton.org/42631002/#ps1
New review42621002 at https://codereview.tryton.org/42621002/#ps1
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-11-01 10:34:15cedlinkissue6900 superseder
2017-09-07 18:53:33roundup-botsetmessages: + msg35577
2017-09-07 18:53:04roundup-botsetmessages: + msg35576
2017-09-07 18:52:38roundup-botsetmessages: + msg35575
2017-09-07 18:52:12roundup-botsetmessages: + msg35574
2017-09-07 18:51:49roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg35573
2017-08-31 23:44:39reviewbotsetmessages: + msg35471
2017-08-31 23:44:38reviewbotsetreviews: 42621002, 42631002, 35601002, 38601002 -> 42621002, 42631002, 35601002, 38601002, 44281002
2017-08-31 23:44:36reviewbotsetmessages: + msg35470
2017-08-31 23:44:35reviewbotsetreviews: 42621002, 42631002, 35601002 -> 42621002, 42631002, 35601002, 38601002

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