irc.libera.chat #tryton log beginning Thu May 19 12:00:01 AM CEST 2022 | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 22:48 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 22:48 | |
-!- springwurm(~springwur@5.104.149.54) has joined #tryton | 05:16 | |
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton | 06:22 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 06:34 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 06:34 | |
-!- rpit(~rpit@p4ffb7313.dip0.t-ipconnect.de) has joined #tryton | 07:13 | |
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton | 07:27 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:18c2:1aff:fef9:2b7f) has joined #tryton | 07:35 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:18c2:1aff:fef9:2b7f) has joined #tryton | 11:31 | |
-!- springwurm(~springwur@5.104.149.54) has joined #tryton | 12:04 | |
acaubet | when 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 |
---|---|---|
acaubet | someone knows any workarround? I have tried with changing different format numbers on cell properties with not success. | 14:40 |
cedk | acaubet: you must set as float or Decimal so relatorio can guess the type | 14:41 |
acaubet | cedk: do you mean relatorio://float(move.quantity) ? Does not work | 14:43 |
cedk | acaubet: no need to cast if it is already a float | 14:55 |
acaubet | so relatorio://move.quantity returns '68.36 | 14:56 |
cedk | acaubet: it must be in a cell | 14:56 |
acaubet | with 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 |
cedk | see opendocument line 574 | 14:57 |
cedk | acaubet: formatting will always give you a string | 14:58 |
acaubet | cedk: maybe as format_currency returns the number with comma instead of point as it does with quantity it's not readed as number | 14:58 |
cedk | I do not follow any more what you are talking about | 15:00 |
acaubet | recap: (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 problem | 15:03 |
acaubet | (3) relatorio://move.quantity renders with dot separation for decimals, which calc does not recognize as number, so is considered as text | 15:04 |
acaubet | end recap | 15:05 |
cedk | acaubet: ods does not work like that, there is a type for the cell and guess type set it depending on the value | 15:06 |
acaubet | ok, I can make it work with <table:table-cell table:style-name="ce5" office:value-type="float" calcext:value-type="float"> | 15:12 |
acaubet | can not find this setting on the Calc UI | 15:12 |
cedk | acaubet: it is guess_type that does that | 15:13 |
acaubet | Okey! Finally I understand what you meant | 15:21 |
acaubet | But 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 |
acaubet | fods* | 15:23 |
cedk | acaubet: this is because you have a paragraph and style so table-cell is not the grand parent | 15:34 |
cedk | you have more than just the value in the cell | 15:34 |
cedk | also you can not have style | 15:35 |
acaubet | cedk: god thanks! sorry for the XY problem | 15:45 |
-!- nicoe(~nicoe@2a02:578:852a:c00:18c2:1aff:fef9:2b7f) has joined #tryton | 19:37 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!