IRC logs of #tryton for Thursday, 2022-05-19

irc.libera.chat #tryton log beginning Thu May 19 12:00:01 AM CEST 2022
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton22:48
-!- ChanServ changed mode/#tryton -> +o cedk 22:48
-!- springwurm(~springwur@5.104.149.54) has joined #tryton05:16
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton06:22
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton06:34
-!- ChanServ changed mode/#tryton -> +o cedk 06:34
-!- rpit(~rpit@p4ffb7313.dip0.t-ipconnect.de) has joined #tryton07:13
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton07:27
-!- nicoe(~nicoe@2a02:578:852a:c00:18c2:1aff:fef9:2b7f) has joined #tryton07:35
-!- nicoe(~nicoe@2a02:578:852a:c00:18c2:1aff:fef9:2b7f) has joined #tryton11:31
-!- springwurm(~springwur@5.104.149.54) has joined #tryton12:04
acaubetwhen doing a custom fods report, record.quantity (or any float field) is represented as '68.36 (notice the apostrophe) and calc don't reconize this as a number.14:39
acaubetsomeone knows any workarround? I have tried with changing different format numbers on cell properties with not success.14:40
cedkacaubet: you must set as float or Decimal so relatorio can guess the type14:41
acaubetcedk: do you mean relatorio://float(move.quantity)  ? Does not work14:43
cedkacaubet: no need to cast if it is already a float14:55
acaubetso relatorio://move.quantity returns '68.3614:56
cedkacaubet: it must be in a cell14:56
acaubetwith unit_price I can do this to solve, but not with quantity as don't have currency: relatorio://format_currency(move.unit_price, user.language, currency=company.currency)14:57
cedksee opendocument line 57414:57
cedkacaubet: formatting will always give you a string14:58
acaubetcedk: maybe as format_currency returns the number with comma instead of point as it does with quantity it's not readed as number14:58
cedkI do not follow any more what you are talking about15:00
acaubetrecap: (1) it must be in a cell -> as I understand the same way as other fields, with an hipperlink with relatorio://15:02
acaubet(2) format_currency renders with comma on decimal separator, so I can apply formulas with no problem15:03
acaubet(3) relatorio://move.quantity renders with dot separation for decimals, which calc does not recognize as number, so is considered as text15:04
acaubetend recap15:05
cedkacaubet: ods does not work like that, there is a type for the cell and guess type set it depending on the value15:06
acaubetok, I can make it work with <table:table-cell table:style-name="ce5" office:value-type="float" calcext:value-type="float">15:12
acaubetcan not find this setting on the Calc UI15:12
cedkacaubet: it is guess_type that does that15:13
acaubetOkey! Finally I understand what you meant15:21
acaubetBut it's not working for me, I just check the output fodt result code and shows <table:table-cell table:style-name="ce10" office:value-type="string" calcext:value-type="string"><text:p><text:span text:style-name="T2">4.0</text:span></text:p>15:22
acaubetfods*15:23
cedkacaubet: this is because you have a paragraph and style so table-cell is not the grand parent15:34
cedkyou have more than just the value in the cell15:34
cedkalso you can not have style15:35
acaubetcedk: god thanks! sorry for the XY problem15:45
-!- nicoe(~nicoe@2a02:578:852a:c00:18c2:1aff:fef9:2b7f) has joined #tryton19:37

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!