chat.freenode.net #tryton log beginning Mon Jun 18 00:00:01 CEST 2018 | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 22:04 | |
-!- yangoon1(~mathiasb@i59F4A85D.versanet.de) has joined #tryton | 02:34 | |
-!- smarro(~sebastian@190.105.87.138) has joined #tryton | 04:12 | |
-!- JanGB(~jan@x2f7fa56.dyn.telefonica.de) has joined #tryton | 04:47 | |
-!- JanGB(~jan@nat3.hmt-leipzig.de) has joined #tryton | 05:09 | |
-!- jmpoure(~jmpoure@soy95-3-82-237-147-64.fbx.proxad.net) has joined #tryton | 05:56 | |
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton | 06:04 | |
-!- JanGB(~jan@nat3.hmt-leipzig.de) has joined #tryton | 06:11 | |
-!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton | 06:20 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 06:25 | |
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton | 06:58 | |
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton | 07:16 | |
-!- udono(~udono@121-058-210-188.ip-addr.inexio.net) has joined #tryton | 07:17 | |
-!- rpit(~ralf@p200300C88F352A0078DC87435C614607.dip0.t-ipconnect.de) has joined #tryton | 07:30 | |
-!- zmijunkie(~Adium@b2b-78-94-52-226.unitymedia.biz) has joined #tryton | 07:33 | |
-!- nicoe(~nicoe@2a02:578:858c:500:ee55:f9ff:fe7b:f7ac) has joined #tryton | 07:52 | |
-!- VlijmenFileer(~VlijmenFi@111.95.210.199) has joined #tryton | 08:10 | |
-!- JanGB(~jan@nat3.hmt-leipzig.de) has joined #tryton | 09:18 | |
sisalp | cedk : there is a gis module in the download directory https://downloads.tryton.org/4.8/trytond_gis-4.8.0.tar.gz | 09:46 |
---|---|---|
sisalp | cedk: it is the one I had problems with. | 09:47 |
pokoli | sisalp: probably this is not the gis module, but the gis backend for trytond | 09:50 |
pokoli | sisalp: you should not download this sources to the module directory | 09:51 |
pokoli | sisalp: al modules are listed on https://downloads.tryton.org/4.8/modules.txt (which does not contain the gis folder) | 09:51 |
sisalp | pokoli: good point, I missed this file. I have to adapt my download directive then. thank you. | 09:56 |
-!- JanGB(~jan@nat3.hmt-leipzig.de) has joined #tryton | 09:59 | |
-!- mariomop(~quassel@181.90.153.86) has joined #tryton | 11:07 | |
-!- zmijunkie1(~Adium@b2b-78-94-52-226.unitymedia.biz) has joined #tryton | 11:16 | |
-!- zmijunkie(~Adium@b2b-78-94-52-226.unitymedia.biz) has joined #tryton | 11:21 | |
-!- Tesla42(~stefan@helme-3.informatik.tu-chemnitz.de) has joined #tryton | 11:27 | |
Tesla42 | hi | 11:27 |
Tesla42 | I want to add variables to the invoice footer | 11:28 |
Tesla42 | So on company->reports->footer menu, is there a way to write e. g. . ${invoice.company.rec_name} | 11:28 |
Tesla42 | ? | 11:28 |
pokoli | Tesla42: there is no variable evaluation on company footer, but you can directly write the copmany name | 11:29 |
pokoli | Tesla42: may I ask you which variables do you want to print? | 11:29 |
Tesla42 | is there a way to add expression execution or variable evaluation feater there? | 11:30 |
Tesla42 | I want to print the bank iban bic | 11:30 |
Tesla42 | I have bank account module installed | 11:30 |
Tesla42 | I hate redundant data | 11:31 |
pokoli | Tesla42: but the bank account and the bic of the company is static, you can put it directly on the footer | 11:31 |
pokoli | Tesla42: this way it will be showed on all the reports | 11:31 |
pokoli | Tesla42: otherwise you can customize the template to include the bank account of the company after the footer | 11:32 |
Tesla42 | But when I change the account later I can accidentially forget to change the footer | 11:32 |
Tesla42 | I know customization of the template is possible | 11:32 |
Tesla42 | but this is more hierarchical | 11:33 |
Tesla42 | better abstraction | 11:33 |
Tesla42 | can the footer be changed by additional module managing "dynamic" footer? | 11:33 |
pokoli | Tesla42: yes, you can create a custom module to include a dynamic_footer field and evaluate variables there | 11:34 |
Tesla42 | I think that would also be helpfull for other user | 11:35 |
Tesla42 | are there other people asking for this feature? | 11:35 |
pokoli | Tesla42: we normally solve it by adding modifiing the template or using the static content on the footer | 11:39 |
Tesla42 | ok | 11:40 |
Tesla42 | is there a template repository, where different example templates are hostet, manageable by tryton? | 11:41 |
pokoli | Tesla42: don't think so... But templates are written with relatiorio and his docs has some examples:https://relatorio.readthedocs.io/en/latest/ | 11:50 |
-!- zmijunkie(~Adium@b2b-78-94-52-226.unitymedia.biz) has joined #tryton | 12:43 | |
-!- smarro(~sebastian@190.105.87.138) has joined #tryton | 12:51 | |
Tesla42 | thanks I will try to change the template | 13:24 |
Tesla42 | changing the template does not do anything | 14:16 |
Tesla42 | I saved the new template in the home dorectory | 14:16 |
Tesla42 | and opened it in tryton remports | 14:17 |
Tesla42 | and save the dataset | 14:17 |
Tesla42 | no difference in the reports/invoices | 14:17 |
Tesla42 | I also tried to replace the original template file -> no difference | 14:17 |
semarie | if I remember correctly, templates should be "register" inside tryton | 14:18 |
Tesla42 | what does this mean? | 14:19 |
Tesla42 | I allready opened it in the reports menu | 14:19 |
Tesla42 | in tryton | 14:19 |
rmu | Tesla42: inovice is persistet in DB once created | 14:20 |
rmu | Tesla42: try different report | 14:20 |
Tesla42 | I recreated the invoice with new sell | 14:20 |
semarie | Tesla42: under Administration > User Interface > Actions > Reports | 14:21 |
Tesla42 | i did this | 14:22 |
semarie | oh | 14:22 |
Tesla42 | that menu has also some weird behavior | 14:23 |
pokoli | Tesla42: could you describe what do you understand by "weird behaviour"? | 14:24 |
Tesla42 | if I remove the template in the menu by clicking the wipe symbol and save it | 14:24 |
Tesla42 | then a new field appears | 14:24 |
Tesla42 | with the relative path to the default template | 14:25 |
pokoli | Tesla42: because there is a base template on the module definition, which is used if no custom tmemplate is provided | 14:25 |
Tesla42 | but i can change the base template path | 14:25 |
Tesla42 | but it says I have no permissions to change it | 14:25 |
Tesla42 | I opened the new template there and pressed save | 14:26 |
Tesla42 | got some progress | 14:28 |
Tesla42 | added text changed | 14:28 |
Tesla42 | but onyl in header and main part not at the footer | 14:28 |
Tesla42 | I found the problem | 14:31 |
Tesla42 | there must be enough spacing between text and template or templates to each other | 14:32 |
Tesla42 | how can I find out what the variable name of my account is? | 14:35 |
pokoli | Tesla42: you should use the field name of your model. | 14:37 |
-!- VlijmenFileer(~VlijmenFi@111.95.210.199) has joined #tryton | 14:38 | |
-!- tafelgeschirr(~tafelgesc@5.104.149.54) has joined #tryton | 14:39 | |
-!- zmijunkie(~Adium@i577B3506.versanet.de) has joined #tryton | 16:20 | |
-!- zmijunkie(~Adium@i577B3506.versanet.de) has joined #tryton | 16:35 | |
-!- zmijunkie(~Adium@i577B3506.versanet.de) has joined #tryton | 17:54 | |
-!- zmijunkie(~Adium@200116b80a67a1004916d2591a246275.dip.versatel-1u1.de) has joined #tryton | 17:59 | |
-!- Tesla42(~stefan@vpn-198-0019.hrz.tu-chemnitz.de) has joined #tryton | 18:04 | |
-!- yangoon(~mathiasb@i59F4A96C.versanet.de) has joined #tryton | 18:30 | |
-!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton | 20:01 | |
-!- rpit(~ralf@p200300C88F352A0078DC87435C614607.dip0.t-ipconnect.de) has joined #tryton | 20:04 | |
-!- smarro(~sebastian@190.105.87.138) has joined #tryton | 20:12 | |
Tesla42 | I do not understand where this variable names come from: invoice.company.rec_name | 20:31 |
rmu | Tesla42: http://doc.tryton.org/4.8/trytond/doc/ref/models/models.html?highlight=rec_name#trytond.model.ModelStorage.rec_name | 20:43 |
Tesla42 | I do not understand this concept | 21:08 |
Tesla42 | if I want to have the content of the field in menu item party->parties->banking | 21:09 |
Tesla42 | how do I know what is the name of it? | 21:09 |
cedk | Tesla42: look at the code | 21:10 |
Tesla42 | ok | 21:10 |
cedk | Tesla42: or you can browse Adminstration>Models>Models | 21:12 |
Tesla42 | I saw this menu already, but did not find the entry | 21:12 |
Tesla42 | I found "bank.account-party.party" | 21:15 |
Tesla42 | and | 21:15 |
Tesla42 | maybe "party.party.account" | 21:17 |
Tesla42 | how do I debug print? | 21:17 |
Tesla42 | is there a tryton console? | 21:17 |
cedk | Tesla42: do not understand | 21:19 |
Tesla42 | I want to check, if I found the right variable | 21:19 |
rmu | Tesla42: just insert temporary prints into the code ;) or put import pdb; pdb.set_trace() into places where you want so inspect stuff | 21:19 |
Tesla42 | ok | 21:20 |
Tesla42 | I also not found invoice.company.rec_name in the models menu | 21:20 |
cedk | Tesla42: I can see rec_name field definition in company model | 21:22 |
cedk | Tesla42: invoice.company is not a model | 21:22 |
rmu | Tesla42: that doesn't make sense. invoice.company points to company model, so you will find definition of invoice.company.rec_name in company | 21:22 |
rmu | cedk was faster ;) | 21:22 |
cedk | Tesla42: invoice is a model account.invoice which has a field Many2One company that point to company.company model | 21:23 |
Tesla42 | ok | 21:24 |
Tesla42 | and if I want to have the first bank account of a special party, so I have access: | 21:26 |
Tesla42 | party['myparty'].bank.account.number | 21:27 |
Tesla42 | ? | 21:27 |
Tesla42 | party['myparty'].bank.account.number[0] | 21:27 |
Tesla42 | is this right? | 21:30 |
cedk | Tesla42: it depends from which record? | 21:30 |
cedk | Tesla42: also instances uses attribute and not item | 21:31 |
Tesla42 | ok | 21:33 |
Tesla42 | sounds like days on fidling and debugging | 21:33 |
Tesla42 | I need a tracing tool | 21:33 |
Tesla42 | clicking on a field in the menu should show the name to reference in template | 21:34 |
rmu | Tesla42: you mean in report? | 21:34 |
Tesla42 | yes | 21:34 |
rmu | but it does show you | 21:34 |
Tesla42 | ok where? | 21:35 |
rmu | go to Administration>Models>Models | 21:35 |
rmu | search for the model of your report | 21:35 |
rmu | voila, you have a list of fields available, including field names | 21:36 |
Tesla42 | ok | 21:37 |
rmu | the model form view shows field name (that you will want to reference in your report), field type, description, module that introduces the field etc... | 21:37 |
rmu | field type many2one means this field references another model | 21:37 |
Tesla42 | ok | 21:38 |
rmu | if you install graphviz and pydot you can open "graph" report on model | 21:38 |
Tesla42 | but I do not understand this without example | 21:38 |
Tesla42 | I know, I added a bank account number, a european iban | 21:39 |
Tesla42 | I think it is on bank.account.number | 21:40 |
Tesla42 | but i want to habe that one referenced in the party configuration | 21:40 |
Tesla42 | with this many2one thing | 21:40 |
Tesla42 | what are the exact steps to find out, what variable name that field has? | 21:43 |
rmu | i don't understand | 21:43 |
rmu | bank.account.number is a model | 21:45 |
Tesla42 | I start on menu: I click on parties->parties and select 'myparty' , click on tab banking | 21:45 |
Tesla42 | there I can find some bank accounts associated with that party | 21:46 |
rmu | yeah, but this relationship is "Many" to "Many" | 21:46 |
Tesla42 | but I defined it on banking->accounts | 21:46 |
Tesla42 | yes you said there is the relationship many2many, but how to resolve this? | 21:47 |
rmu | party.party model has field "bank_accounts" | 21:48 |
Tesla42 | ok | 21:48 |
rmu | but this field contains a list | 21:48 |
rmu | (if referenced from report) | 21:48 |
rmu | so either use something like [0] to take the first element if appropriate, or use a for-loop to loop over all bank accounts | 21:49 |
Tesla42 | no | 21:49 |
Tesla42 | if I look at models | 21:49 |
rmu | or introduce a function field that somehow "knows" how to extract the one and only bank account | 21:49 |
Tesla42 | ther is party.party.account | 21:49 |
Tesla42 | and party.party.lang | 21:49 |
rmu | in model party.party | 21:50 |
Tesla42 | there is no party.party.bank_account | 21:50 |
Tesla42 | or party.party.bank_accounts | 21:50 |
rmu | i see "account_payable", "account_receivable" and so on and "bank_accounts" | 21:50 |
rmu | don't understand where you are looking for "party.party.bank_accounts" | 21:51 |
cedk | Tesla42: you must look at the fields of the model by switching to form view | 21:51 |
Tesla42 | ok | 21:52 |
Tesla42 | doublicking on it shows it | 21:52 |
Tesla42 | ok | 21:53 |
Tesla42 | now we have party.party.bank_accounts | 21:53 |
Tesla42 | which is a list | 21:53 |
Tesla42 | ok party must also be a list or dict | 21:54 |
Tesla42 | now we have party.party['myparty'].bank_accounts[0] | 21:54 |
Tesla42 | right? | 21:55 |
Tesla42 | and there I have many2on from account to bank.account | 21:57 |
Tesla42 | means | 21:57 |
rmu | usually, in a report, only "objects" is defined, containing a list of instances of the model you are generating the report on. I'm not sure you can reference arbitrary instances/models like that | 21:57 |
Tesla42 | now we have party.party['myparty'].bank_accounts[0].account.number | 21:57 |
Tesla42 | right? | 21:58 |
rmu | bank.account model doesn't have field account | 21:59 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!