IRC logs of #tryton for Monday, 2018-06-18 #tryton log beginning Mon Jun 18 00:00:01 CEST 2018
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton22:04
-!- yangoon1( has joined #tryton02:34
-!- smarro(~sebastian@ has joined #tryton04:12
-!- JanGB( has joined #tryton04:47
-!- JanGB( has joined #tryton05:09
-!- jmpoure( has joined #tryton05:56
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton06:04
-!- JanGB( has joined #tryton06:11
-!- tbruyere( has joined #tryton06:20
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton06:25
-!- mrichez( has joined #tryton06:58
-!- Timitos( has joined #tryton07:16
-!- udono( has joined #tryton07:17
-!- rpit( has joined #tryton07:30
-!- zmijunkie( has joined #tryton07:33
-!- nicoe(~nicoe@2a02:578:858c:500:ee55:f9ff:fe7b:f7ac) has joined #tryton07:52
-!- VlijmenFileer(~VlijmenFi@ has joined #tryton08:10
-!- JanGB( has joined #tryton09:18
sisalpcedk : there is a gis module in the download directory
sisalpcedk: it is the one I had problems with.09:47
pokolisisalp: probably this is not the gis module, but the gis backend for trytond09:50
pokolisisalp: you should not download this sources to the module directory09:51
pokolisisalp: al modules are listed on (which does not contain the gis folder)09:51
sisalppokoli: good point, I missed this file. I have to adapt my download directive then. thank you.09:56
-!- JanGB( has joined #tryton09:59
-!- mariomop(~quassel@ has joined #tryton11:07
-!- zmijunkie1( has joined #tryton11:16
-!- zmijunkie( has joined #tryton11:21
-!- Tesla42( has joined #tryton11:27
Tesla42I want to add variables to the invoice footer11:28
Tesla42So on company->reports->footer menu, is there a way to write e. g. . ${}11:28
pokoliTesla42: there is no variable evaluation on company footer, but you can directly write the copmany name11:29
pokoliTesla42: may I ask you which variables do you want to print?11:29
Tesla42is there a way to add expression execution or variable evaluation feater there?11:30
Tesla42I want to print the bank iban bic11:30
Tesla42I have bank account module installed11:30
Tesla42I hate redundant data11:31
pokoliTesla42: but the bank account and the bic of the company is static, you can put it directly on the footer11:31
pokoliTesla42: this way it will be showed on all the reports11:31
pokoliTesla42: otherwise you can customize the template to include the bank account of the company after the footer11:32
Tesla42But when I change the account later I can accidentially forget to change the footer11:32
Tesla42I know customization of the template is possible11:32
Tesla42but this is more hierarchical11:33
Tesla42better abstraction11:33
Tesla42can the footer be changed by additional module managing "dynamic" footer?11:33
pokoliTesla42: yes, you can create a custom module to include a dynamic_footer field and evaluate variables there11:34
Tesla42I think that would also be helpfull for other user11:35
Tesla42are there other people asking for this feature?11:35
pokoliTesla42: we normally solve it by adding modifiing the template or using the static content on the footer11:39
Tesla42is there a template repository, where different example templates are hostet, manageable by tryton?11:41
pokoliTesla42: don't think so... But templates are written with relatiorio and his docs has some examples:
-!- zmijunkie( has joined #tryton12:43
-!- smarro(~sebastian@ has joined #tryton12:51
Tesla42thanks I will try to change the template13:24
Tesla42changing the template does not do anything14:16
Tesla42I saved the new template in the home dorectory14:16
Tesla42and opened it in tryton remports14:17
Tesla42and save the dataset14:17
Tesla42no difference in the reports/invoices14:17
Tesla42I also tried to replace the original template file -> no difference14:17
semarieif I remember correctly, templates should be "register" inside tryton14:18
Tesla42what does this mean?14:19
Tesla42I allready opened it in the reports menu14:19
Tesla42in tryton14:19
rmuTesla42: inovice is persistet in DB once created14:20
rmuTesla42: try different report14:20
Tesla42I recreated the invoice with new sell14:20
semarieTesla42: under Administration > User Interface > Actions > Reports14:21
Tesla42i did this14:22
Tesla42that menu has also some weird behavior14:23
pokoliTesla42: could you describe what do you understand by "weird behaviour"?14:24
Tesla42if I remove the template in the menu by clicking the wipe symbol and save it14:24
Tesla42then a new field appears14:24
Tesla42with the relative path to the default template14:25
pokoliTesla42: because there is a base template on the module definition, which is used if no custom tmemplate is provided14:25
Tesla42but i can change the base template path14:25
Tesla42but it says I have no permissions to change it14:25
Tesla42I opened the new template there and pressed save14:26
Tesla42got some progress14:28
Tesla42added text changed14:28
Tesla42but onyl in header and main part not at the footer14:28
Tesla42I found the problem14:31
Tesla42there must be enough spacing between text and template or templates to each other14:32
Tesla42how can I find out what the variable name of my account is?14:35
pokoliTesla42: you should use the field name of your model.14:37
-!- VlijmenFileer(~VlijmenFi@ has joined #tryton14:38
-!- tafelgeschirr(~tafelgesc@ has joined #tryton14:39
-!- zmijunkie( has joined #tryton16:20
-!- zmijunkie( has joined #tryton16:35
-!- zmijunkie( has joined #tryton17:54
-!- zmijunkie( has joined #tryton17:59
-!- Tesla42( has joined #tryton18:04
-!- yangoon( has joined #tryton18:30
-!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton20:01
-!- rpit( has joined #tryton20:04
-!- smarro(~sebastian@ has joined #tryton20:12
Tesla42I do not understand where this variable names come from:
Tesla42I do not understand this concept21:08
Tesla42if I want to have the content of the field in menu item party->parties->banking21:09
Tesla42how do I know what is the name of it?21:09
cedkTesla42: look at the code21:10
cedkTesla42: or you can browse Adminstration>Models>Models21:12
Tesla42I saw this menu already, but did not find the entry21:12
Tesla42I found ""21:15
Tesla42maybe ""21:17
Tesla42how do I debug print?21:17
Tesla42is there a tryton console?21:17
cedkTesla42: do not understand21:19
Tesla42I want to check, if I found the right variable21:19
rmuTesla42: just insert temporary prints into the code ;) or put import pdb; pdb.set_trace() into places where you want so inspect stuff21:19
Tesla42I also not found in the models menu21:20
cedkTesla42: I can see rec_name field definition in company model21:22
cedkTesla42: is not a model21:22
rmuTesla42: that doesn't make sense. points to company model, so you will find definition of in company21:22
rmucedk was faster ;)21:22
cedkTesla42: invoice is a model account.invoice which has a field Many2One company that point to model21:23
Tesla42and if I want to have the first bank account of a special party, so I have access:21:26
Tesla42is this right?21:30
cedkTesla42: it depends from which record?21:30
cedkTesla42: also instances uses attribute and not item21:31
Tesla42sounds like days on fidling and debugging21:33
Tesla42I need a tracing tool21:33
Tesla42clicking on a field in the menu should show the name to reference in template21:34
rmuTesla42: you mean in report?21:34
rmubut it does show you21:34
Tesla42ok where?21:35
rmugo to Administration>Models>Models21:35
rmusearch for the model of your report21:35
rmuvoila, you have a list of fields available, including field names21:36
rmuthe 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
rmufield type many2one means this field references another model21:37
rmuif you install graphviz and pydot you can open "graph" report on model21:38
Tesla42but I do not understand this without example21:38
Tesla42I know, I added a bank account number, a european iban21:39
Tesla42I think it is on bank.account.number21:40
Tesla42but i want to habe that one referenced in the party configuration21:40
Tesla42with this many2one thing21:40
Tesla42what are the exact steps to find out, what variable name that field has?21:43
rmui don't understand21:43
rmubank.account.number is a model21:45
Tesla42I start on menu: I click on parties->parties and select 'myparty' , click on tab banking21:45
Tesla42there I can find some bank accounts associated with that party21:46
rmuyeah, but this relationship is "Many" to "Many"21:46
Tesla42but I defined it on banking->accounts21:46
Tesla42yes you said there is the relationship many2many,  but how to resolve this?21:47 model has field "bank_accounts"21:48
rmubut this field contains a list21:48
rmu(if referenced from report)21:48
rmuso either use something like [0] to take the first element if appropriate, or use a for-loop to loop over all bank accounts21:49
Tesla42if I look at models21:49
rmuor introduce a function field that somehow "knows" how to extract the one and only bank account21:49
Tesla42ther is
rmuin model party.party21:50
Tesla42there is no
rmui see "account_payable", "account_receivable" and  so on and "bank_accounts"21:50
rmudon't understand where you are looking for ""21:51
cedkTesla42: you must look at the fields of the model by switching to form view21:51
Tesla42doublicking on it shows it21:52
Tesla42now we have
Tesla42which is a list21:53
Tesla42ok party must also be a list or dict21:54
Tesla42now we have['myparty'].bank_accounts[0]21:54
Tesla42and there I have many2on from account to bank.account21:57
rmuusually, 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 that21:57
Tesla42now we have['myparty'].bank_accounts[0].account.number21:57
rmubank.account model doesn't have field account21:59

Generated by 2.17.3 by Marius Gedminas - find it at!