chat.freenode.net #tryton log beginning Mon Jul 2 00:00:02 CEST 2018 | ||
-!- fsanchez(~fsanchez@190.236.1.105) has joined #tryton | 22:15 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 22:17 | |
-!- thaneor(~lenovo3@r186-53-74-198.dialup.adsl.anteldata.net.uy) has joined #tryton | 22:57 | |
-!- fsanchez(~fsanchez@190.236.14.32) has joined #tryton | 23:49 | |
-!- thaneor1(~lenovo3@r186-48-183-55.dialup.adsl.anteldata.net.uy) has joined #tryton | 00:34 | |
-!- thaneor(~lenovo3@r186-48-183-55.dialup.adsl.anteldata.net.uy) has joined #tryton | 02:48 | |
-!- yangoon(~mathiasb@i59F4D629.versanet.de) has joined #tryton | 02:56 | |
-!- fsanchez(~fsanchez@190.239.80.2) has joined #tryton | 04:23 | |
-!- prakhar(~prakhar@103.255.235.42) has joined #tryton | 05:08 | |
-!- thaneor(~lenovo3@r186-48-183-55.dialup.adsl.anteldata.net.uy) has joined #tryton | 05:24 | |
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton | 06:08 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 06:28 | |
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton | 06:41 | |
-!- jmpoure(~jmpoure@63.109.206.77.rev.sfr.net) has joined #tryton | 06:52 | |
-!- Tesla42(~stefan@helme-3.informatik.tu-chemnitz.de) has joined #tryton | 07:20 | |
-!- prakhar(~prakhar@182.69.224.30) has joined #tryton | 07:29 | |
Tesla42 | h | 07:40 |
---|---|---|
Tesla42 | hi | 07:40 |
Tesla42 | i am here again | 07:41 |
Tesla42 | yesterday i couldn't solve one problem | 07:41 |
Tesla42 | translation of some fileds in report did not work | 07:41 |
Tesla42 | https://github.com/TheTesla/tryton-invoice-template | 07:42 |
Tesla42 | this <line.type> in the footer is not translated | 07:42 |
Tesla42 | I hoped it is translated in the way it is in the menu/view | 07:42 |
cedk | Tesla42: footer is only evaluated once with the context of the report | 07:46 |
-!- irclog(~irclog@moretus.b2ck.com) has joined #tryton | 07:47 | |
Tesla42 | i do not mean the footer field | 07:47 |
cedk | Tesla42: ha you want the string translated of a selection | 07:49 |
cedk | Tesla42: you must use a descriptor: http://doc.tryton.org/4.8/trytond/doc/ref/models/fields.html#trytond.model.fields.Selection.translated | 07:49 |
-!- NeonKing-(~Neonking@176-179-38-86.abo.bbox.fr) has joined #tryton | 08:12 | |
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton | 08:16 | |
-!- NeonKing(~Neonking@unaffiliated/neonking) has joined #tryton | 08:17 | |
-!- nlopez73(~nlopez73@static-160-102-225-77.ipcom.comunitel.net) has joined #tryton | 08:35 | |
-!- rpit(~ralf@p200300C88F330400F43B3E3F0C8F79A2.dip0.t-ipconnect.de) has joined #tryton | 08:40 | |
-!- JanGB(~jan@x2f7f844.dyn.telefonica.de) has joined #tryton | 09:03 | |
-!- nlopez73_(~nlopez73@static-160-102-225-77.ipcom.comunitel.net) has joined #tryton | 09:13 | |
Tesla42 | ah ok | 09:24 |
-!- JanGB1(~jan@nat3.hmt-leipzig.de) has joined #tryton | 10:25 | |
-!- smorillo(4de166a0@gateway/web/cgi-irc/kiwiirc.com/ip.77.225.102.160) has joined #tryton | 10:53 | |
-!- yangoon(~mathiasb@i59F4D629.versanet.de) has joined #tryton | 11:02 | |
-!- fsanchez(~fsanchez@190.239.80.2) has joined #tryton | 11:04 | |
-!- prakhar(~prakhar@122.177.99.101) has joined #tryton | 11:09 | |
Tesla42 | where du I have to do this? | 11:23 |
Tesla42 | should i write <line.type.translated()> ? | 11:23 |
cedk | Tesla42: it must be defined like a field on the Model | 11:24 |
Tesla42 | didn't something like that before | 11:25 |
-!- mariomop(~quassel@181.93.207.230) has joined #tryton | 11:25 | |
Tesla42 | what do I have to do step by step? | 11:25 |
cedk | Tesla42: see http://hg.tryton.org/modules/party/file/921ad32c82a9/party.py#l318 | 11:26 |
Tesla42 | can I do this in the tryton gui? | 11:27 |
Tesla42 | is it in administration->models->models ? | 11:29 |
Tesla42 | not possible that way? | 11:32 |
pokoli | Tesla42: no, you should create a new fied on the model that is only possible using a module | 11:36 |
Tesla42 | ok so I have to write a module? | 11:36 |
Tesla42 | or to edit the module | 11:36 |
Tesla42 | ? | 11:37 |
pokoli | Tesla42: write a new module that extends the model | 11:38 |
pokoli | Tesla42: you can also include the report as part of this module | 11:38 |
Tesla42 | ok | 11:39 |
Tesla42 | why is there no generic selection translation solution? | 11:41 |
Tesla42 | is it possible to implement this? | 11:41 |
-!- smn(4de166a0@gateway/web/cgi-irc/kiwiirc.com/ip.77.225.102.160) has joined #tryton | 11:43 | |
Tesla42 | do i have to extend the report module? | 11:46 |
-!- nlopez73(4de166a0@gateway/web/cgi-irc/kiwiirc.com/ip.77.225.102.160) has joined #tryton | 11:48 | |
-!- smn(4de166a0@gateway/web/cgi-irc/kiwiirc.com/ip.77.225.102.160) has left #tryton | 11:49 | |
-!- smorillo(4de166a0@gateway/web/cgi-irc/kiwiirc.com/ip.77.225.102.160) has joined #tryton | 11:50 | |
-!- mariomop(~quassel@181.93.207.230) has joined #tryton | 11:59 | |
-!- nlopez73(4de166a0@gateway/web/cgi-irc/kiwiirc.com/ip.77.225.102.160) has joined #tryton | 12:01 | |
-!- mariomop(~quassel@host82.190-31-227.telecom.net.ar) has joined #tryton | 12:28 | |
pokoli | Tesla42: current code is here: http://hg.tryton.org/trytond/file/6fc99c9dd8da/trytond/model/fields/selection.py | 12:31 |
-!- prakhar(~prakhar@182.69.217.244) has joined #tryton | 12:31 | |
pokoli | Tesla42: for me it will be best if something can be implemented to allow using the translated string on reports without the need of creating a new field on the report | 12:32 |
pokoli | Tesla42: but not sure how to implement this | 12:33 |
-!- thaneor1(~lenovo3@r179-24-118-81.dialup.adsl.anteldata.net.uy) has joined #tryton | 12:35 | |
-!- lukio(~lukio@190.19.220.68) has joined #tryton | 13:08 | |
-!- smorillo(4de166a0@gateway/web/cgi-irc/kiwiirc.com/ip.77.225.102.160) has joined #tryton | 13:20 | |
-!- smorillo(4de166a0@gateway/web/cgi-irc/kiwiirc.com/ip.77.225.102.160) has joined #tryton | 13:30 | |
-!- jpellicer(~jpellicer@185.107.106.118) has joined #tryton | 14:07 | |
-!- jmpoure(~jmpoure@63.109.206.77.rev.sfr.net) has joined #tryton | 14:45 | |
-!- JanGB(~jan@x2f7f844.dyn.telefonica.de) has joined #tryton | 14:46 | |
-!- csotelo(~csotelo@179.43.97.56) has joined #tryton | 14:49 | |
-!- hedererjs(~hedererjs@dig50-1-78-222-206-45.fbx.proxad.net) has joined #tryton | 15:25 | |
-!- csotelo(~csotelo@179.43.97.56) has joined #tryton | 15:47 | |
-!- prakhar1(~prakhar@122.177.81.135) has joined #tryton | 16:25 | |
-!- Tesla42(~stefan@2001:bc8:3f13:ffc2:4c96:5ed9:d4f3:b00b) has joined #tryton | 17:17 | |
-!- lukio(~lukio@181.93.80.78) has joined #tryton | 17:55 | |
Tesla42 | http://hg.tryton.org/modules/party/file/921ad32c82a9/party.py#l318 | 17:56 |
Tesla42 | on line 318 the type_string is used nowhere | 17:56 |
Tesla42 | why? | 17:56 |
-!- smorillo(250f6795@gateway/web/cgi-irc/kiwiirc.com/ip.37.15.103.149) has joined #tryton | 17:58 | |
Timitos | Tesla42: you only need to define the 'type_string' and then you can use it in your report | 18:03 |
Tesla42 | ok | 18:03 |
Tesla42 | and for this contact_mechanism type string I need: | 18:03 |
Tesla42 | contacttype = fields.Selection([(None, ''), ('contact_mechanism', ?)], 'Type') | 18:04 |
Tesla42 | contactstring = contacttype.translated('type') | 18:05 |
Tesla42 | maybe I am completely wrong | 18:07 |
Timitos | Tesla42: contacttype_string = contacttype.translated('contacttype') would be my version | 18:07 |
Tesla42 | ah ok | 18:08 |
Timitos | Tesla42: but on contact mechanism model there is already a "type" field. why do you try to implement this again? | 18:08 |
Tesla42 | I want to have the translation of it | 18:08 |
Tesla42 | for the report | 18:08 |
Tesla42 | the translation is already available in the view | 18:08 |
Tesla42 | but not in the report | 18:09 |
Tesla42 | https://github.com/TheTesla/tryton-invoice-template | 18:09 |
Tesla42 | on the line in the footer | 18:09 |
Timitos | Tesla42: but then there is no need to reimplement the type field. Just use "type_string = type.translated('type')" on the contact mechanism model | 18:11 |
Tesla42 | yes, that is, what i wanted to know | 18:12 |
Tesla42 | I found the file ^^ | 18:14 |
Tesla42 | https://github.com/TheTesla/tryton-invoice-template | 18:14 |
Tesla42 | /usr/lib/python3/dist-packages/trytond/modules/party/contact_mechanism.py | 18:14 |
Tesla42 | this one ^ | 18:15 |
-!- JanGB(~jan@x2f7f844.dyn.telefonica.de) has joined #tryton | 18:15 | |
Tesla42 | 45 type = fields.Selection(_TYPES, 'Type', required=True, states=STATES, | 18:17 |
Tesla42 | 46 sort=False, depends=DEPENDS) | 18:17 |
Tesla42 | 47 type_string = type.translates('type') | 18:17 |
-!- thaneor(~lenovo3@r179-24-118-81.dialup.adsl.anteldata.net.uy) has joined #tryton | 18:17 | |
Tesla42 | like that? | 18:17 |
Timitos | Tesla42: yes. but the common way how to do this would be to create a custom module and to add the translated type string there | 18:20 |
Tesla42 | I know, but I think it is too hard for me now to dreate a custom module | 18:20 |
Tesla42 | later maybe | 18:20 |
Tesla42 | it is not translating | 18:44 |
Tesla42 | now I think I have to add the translation | 18:44 |
-!- lukio(~lukio@181.93.80.78) has joined #tryton | 18:58 | |
Tesla42 | what do I have to do that i can see the contact_mechanism.type translated in the report? | 19:10 |
Tesla42 | do i have to reference the translated value in the report template | 19:43 |
Tesla42 | ? | 19:43 |
Tesla42 | I solved it myself | 19:46 |
Tesla42 | yes, i have to reference type_string | 19:46 |
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton | 20:01 | |
Tesla42 | thanks very much | 20:21 |
Tesla42 | it works | 20:21 |
Tesla42 | https://github.com/TheTesla/tryton-invoice-template | 20:21 |
-!- lukio(~lukio@181.93.80.78) has joined #tryton | 20:42 | |
-!- JanGB(~jan@x2f7f844.dyn.telefonica.de) has joined #tryton | 20:53 | |
-!- irclog(~irclog@moretus.b2ck.com) has joined #tryton | 21:15 | |
-!- smorillo(250f6795@gateway/web/cgi-irc/kiwiirc.com/ip.37.15.103.149) has joined #tryton | 21:48 | |
-!- orphean(~Orphean@31.192.224.224) has joined #tryton | 21:56 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!