chat.freenode.net #tryton log beginning Mon Apr 5 12:00:01 AM CEST 2021 | ||
-!- ChanServ(ChanServ@services.) has joined #tryton | 22:13 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 22:21 | |
udono | LordVan: Hi, it depends if you use variants. Then you should consider for each of your new fields: is it one setting for all of its variants? --> put in template, otherwise its save to put in product. But it depends on your setup. | 22:47 |
---|---|---|
LordVan | i do not plan to use variants | 22:47 |
udono | LordVan: so it could be easier to put the fields on product. This way you save a click when accessing the product from invoice, sale, purchase. | 22:50 |
udono | afk | 22:50 |
LordVan | yes definitely want to save that click | 22:51 |
LordVan | cuz it is unneded | 22:51 |
LordVan | I mean yeah i could make it variants instead but i do not see any benefit (at the moment .. still reading the source ^⁾ | 23:00 |
-!- srgdts(~srgdts@unaffiliated/srgdts) has joined #tryton | 01:52 | |
-!- thaneor2(~acer8@r167-61-33-158.dialup.adsl.anteldata.net.uy) has joined #tryton | 02:13 | |
-!- thaneor3(~ldlc6@r167-61-33-158.dialup.adsl.anteldata.net.uy) has joined #tryton | 02:13 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 06:49 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 06:52 | |
cedk | LordVan: usually when you do not know, it is better to put it on template | 06:53 |
cedk | LordVan: this is because it is simpler to move it later on product than the opposite | 06:54 |
cedk | but when you add a field on Template, you must register also an empty Product class so there will be a function field created | 06:54 |
LordVan | cedk, hmm interesting. | 07:40 |
LordVan | well i was still ondering over that over night | 07:41 |
LordVan | let me quickly explain more what I need: 1) I have my standard products/templates which are named like "Standard-<material name> <material thickness" there is absolutely nothing price or inventory stuff needed here as each will likely be more or less unique and then 2) there are those products that are actually ordered more often which i want to put into tryton properly so they can be re-used . they also need material + mateiral thickness (+ | 07:43 |
LordVan | some other custom fields or attributes but that aside now) | 07:43 |
LordVan | so I see 2 options now: | 07:43 |
LordVan | 1) have one generic Template with variants on the different materials and material thicknesses -- for the "Standard" ones | 07:43 |
LordVan | or 2) make one template/product pair for each | 07:44 |
LordVan | about 1): it'd be like Template "Sheet Metal Part" and then the Variants like "Steel, St37 1,00mm" , "Stainless Steel 1.4301 brushed 1,50 mm" | 07:44 |
LordVan | and so on | 07:45 |
LordVan | for the actually repeatedly ordered parts (that also nave customer drawing numbers,..) I am pretty sure it makes more sense to make a template/product pair for each | 07:46 |
LordVan | (in fact i might use the product/variant for different versions of the same part, but then again i am not too sure because sometimes there are changes even in material so more likely a seperate template/product pair for versions too..) | 07:46 |
LordVan | so the thing i am currently thinking about is mostly the "standard" parts | 07:47 |
LordVan | since they will be created once, witha price of 0 - they are just placeholders after all and then never be changed,.. | 07:47 |
LordVan | but i am leaning towards making a seperate template/product pair for each as well as to have consistent handling between those and the other products (ie not have lots of variants/products on the standard ones, but only 1 product per template for the "repeatedly ordered" parts) | 07:48 |
LordVan | cedk, did i manage to explain what my plan is or is it unclear? | 07:54 |
LordVan | actually after a bit of testing on the demo server .. i think | 08:28 |
LordVan | i will go for Template(product) "Sheet Metal" and Product(Variants) being "1.4301 1,00mm", "S235JG 1,00mm" , .. | 08:28 |
LordVan | with the extra data in either attributes or extra fields | 08:29 |
LordVan | still weighing the pro's and cons | 08:29 |
LordVan | but i think i'lll make fields | 08:29 |
-!- ludo2(~Thunderbi@2001:912:1480:380::1) has joined #tryton | 08:29 | |
LordVan | as to wether I will then later on make Temlate-Product pairs for the repeatedly ordered things or not i will decide after some testing, but first i need this part up and running | 08:30 |
LordVan | btw | 08:30 |
LordVan | not sure how many people did see this yesterday, so I post again: | 08:30 |
LordVan | i want to override on_change_product in SaleLine (to add some extra logic) .. ( do I have to copy/add the @fields again too on the new method? or is it enough to leave it on the original since i will call taht with super() anyway after overridign with @classmethod | 08:30 |
LordVan | [I want to just automatically copy some data from the product/variant to the sale line | 08:31 |
-!- alidipatrick(~alidipatr@154.126.12.140) has joined #tryton | 08:32 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton | 08:43 | |
LordVan | ok attributes are .. too roundabout to use for stuff you need on every product ^^ i'll make fields ;) | 08:52 |
cedk | LordVan: for on_change you add a decorator for each field you will use in your code | 09:22 |
LordVan | ok so that is enough. thanks a lot. | 09:30 |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 09:39 | |
LordVan | hm | 09:54 |
LordVan | i wonder .. why on the demo server can I enter a code but on my install i cannot .. probalby different module(s) | 09:55 |
LordVan | (i mean "code" on the variants) | 09:55 |
cedk | LordVan: I guess you have setup a sequence for product | 09:56 |
LordVan | yes i was just lookign at that | 09:56 |
LordVan | i think i set it up for testing once | 09:56 |
LordVan | and forgot | 09:56 |
LordVan | can i just remove it and then use it "normally" again? | 09:57 |
LordVan | or would that potentially break something ? (i only have test articles in my db so far btw) | 09:57 |
cedk | LordVan: I do not think it will be a problem | 09:58 |
LordVan | yeah i just tested it | 09:59 |
LordVan | thanks | 09:59 |
LordVan | now to figure out the correct xpath for the next step .. *wanders off to read the source* | 10:01 |
-!- jani-matti(~quassel@93-90-53-6.welcomnet.fi) has joined #tryton | 10:17 | |
-!- mariomop(~quassel@181.29.189.235) has joined #tryton | 10:50 | |
LordVan | I'm kind of stuck with an error in my XML i just seem not to be able to spot .. running trytond-admin gives me this error: (complete traceback in the paste | 11:57 |
LordVan | ValueError: too many values to unpack (expected 2) | 11:57 |
LordVan | https://dpaste.org/CeSM | 11:58 |
LordVan | what am I missing? | 11:59 |
LordVan | it's effectively (with obvious changes) the same as my code to change the sale line fomr | 11:59 |
LordVan | first xml product.xml | 12:00 |
LordVan | second view/sale_line_form.xml | 12:00 |
LordVan | ah wait | 12:02 |
LordVan | i just forgot to save a change | 12:03 |
LordVan | from product_form to product_view_form | 12:03 |
LordVan | .. | 12:03 |
-!- mmm33(~i@37.170.168.83) has joined #tryton | 12:08 | |
LordVan | and of course i wanted tbefore the label not before the field .. ah well | 12:08 |
udono | LordVan: hi, it's line 6: ref="product.product_form" the pattern is: module_name.view_name | 12:16 |
LordVan | yes thanks i already found the problem | 12:16 |
LordVan | now i am trying to figure out why those fields are readonly | 12:16 |
udono | LordVan: … because you define them on template? | 12:17 |
LordVan | nope | 12:17 |
LordVan | i defined on Product only | 12:17 |
udono | LordVan: did you update the module in the database? | 12:17 |
udono | LordVan: trytond-admin -u … -d … | 12:18 |
LordVan | i ran trytond-admin yes | 12:18 |
LordVan | but let me re-run the module update | 12:18 |
udono | LordVan: depends on your setup, after this maybe restart the trytond service… | 12:19 |
LordVan | i always restart the service and run trytond-admin because it just takes no time to do the service restart anyway | 12:19 |
LordVan | copy paste error ... | 12:21 |
LordVan | i accidentally copied this too states = { 'readonly': Eval('sale_state') != 'draft', }, | 12:21 |
LordVan | help = 'extra text to be appended to material' | 12:21 |
LordVan | (same fields as on sale_line already) | 12:21 |
LordVan | obviously that is always false there | 12:21 |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 12:25 | |
-!- thaneor(~acer8@r167-61-33-158.dialup.adsl.anteldata.net.uy) has joined #tryton | 12:33 | |
LordVan | hmm i just looked at https://github.com/tryton/product/blob/develop/view/product_form_simple.xml and then wrote my own view to extend that https://github.com/LordVan/tryton-modules/blob/master/rm_extra_data/view/product_form_simple.xml | 12:50 |
LordVan | but my fields are nto showing | 12:50 |
LordVan | the xpath seesm fine to me? | 12:50 |
-!- alidipatrick(~alidipatr@197.149.39.7) has joined #tryton | 12:56 | |
udono | LordVan: the simple form you can only see it on template: https://hg.tryton.org/modules/product/file/tip/view/template_form.xml | 13:02 |
LordVan | udono, i know | 13:03 |
LordVan | but when i checked there it is still the original form | 13:03 |
LordVan | do i need to add some xml to make the template form use the "new" version? | 13:04 |
LordVan | ah wait | 13:04 |
LordVan | do you mean i need to add some xml to replace the line that adds the simple view there? | 13:05 |
udono | LordVan: it should be visible on template, in form view of the o2m Variants field. | 13:06 |
LordVan | like xpath expr="/form/notebook/page/field[@name='producsts]" position='replace' ? | 13:06 |
LordVan | it is not | 13:06 |
LordVan | visible there now | 13:06 |
LordVan | maybe i need to add something there? https://github.com/LordVan/tryton-modules/blob/master/rm_extra_data/product.xml | 13:06 |
udono | LordVan: I don't think it is needed | 13:08 |
LordVan | well it definitely is not using it .. do i maybe need to set a priority? i have seen that somewhere | 13:11 |
udono | LordVan: maybe, but not sure either. Just give it a try | 13:12 |
LordVan | yeah was goign to | 13:13 |
LordVan | hmm actualyl there is a traceback from trytond-admin .. hmm DomainValidationError | 13:17 |
LordVan | probably got a wrong view name or sth .. | 13:17 |
udono | LordVan: Runs the client with --dev, otherwise restart the client | 13:20 |
LordVan | i have restarted the client severa times | 13:20 |
LordVan | also as i said that error was from the last trytond-admin run | 13:20 |
LordVan | https://dpaste.org/bzod | 13:20 |
LordVan | is there no way to get more meaningful errors with xml issue slike this? it doesn't seem to mention which line it was parsing anywhere /(unless i'm blind) | 13:22 |
LordVan | i mean besides "In tag record model ir.ui.view with id .. | 13:22 |
cedk | LordVan: I guess you have set a view_type on the view inheriting another one which is not allowed | 13:25 |
LordVan | i have not set view_type | 13:26 |
LordVan | never in fact used that so far | 13:26 |
LordVan | cedk, https://github.com/LordVan/tryton-modules/blob/master/rm_extra_data/product.xml <- this is the xml with the record entry it complains about | 13:27 |
cedk | LordVan: I guess you have modified the XML between updates | 13:30 |
LordVan | what do you mean? | 13:30 |
udono | LordVan: try to remove the product.xml content and update, then put it back and update again | 13:30 |
LordVan | ah ok let me do that | 13:32 |
LordVan | ah cool it works now | 13:35 |
LordVan | thanks .. I wouldn't have figured that out anytime soon I think (more likely by conincidence) .. I didn't even know this could be an issue | 13:35 |
udono | mmm33: so just continue here. comming from #tryton.de | 13:38 |
udono | mmm33: plz try with more verbosity and pase again trytond-admin -vvv -c /etc/tryton/trytond.conf -d tryton –all | 13:40 |
-!- thaneor(~acer8@r167-61-54-188.dialup.adsl.anteldata.net.uy) has joined #tryton | 14:16 | |
-!- thaneor1(~ldlc6@r167-61-54-188.dialup.adsl.anteldata.net.uy) has joined #tryton | 14:16 | |
-!- alidipatrick(~alidipatr@197.149.31.55) has joined #tryton | 14:32 | |
cedk | quite depressing, I just reviewed 2/3 of the issue with patch and about 80% have already been reviewed but with comment that the author never took into consideration | 16:26 |
cedk | as most of the time I'm the reviewer, I feel like reducing my review work as many are not respecting it | 16:27 |
udono | cedk: Iam not so quick, last review was an hour ago :-) | 16:40 |
cedk | udono: I'm talking about the 200 issues with patch and no move since months | 16:45 |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 17:32 | |
-!- alidipatrick(~alidipatr@197.149.31.55) has joined #tryton | 18:01 | |
-!- LordVan(~lordvan@gentoo/developer/LordVan) has joined #tryton | 18:36 | |
LordVan | hi | 19:09 |
LordVan | looking at product.py line 58 .. is it preferred to have more complicated readonly logic in a method? (like product.code_readonly) ? | 19:18 |
LordVan | i only need readonly if state is not draft and no product is selected (i want to readonly automatically filled in fields to avoid user lazyness (i mean errors of course ^^) | 19:19 |
LordVan | or is it ok to just write Eval('sale.state') != 'draft' || Eval('product') | 19:21 |
LordVan | ? | 19:21 |
LordVan | err never mind me i make the method | 19:23 |
LordVan | [unless what i am testing now works] | 19:24 |
-!- lucascastro(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton | 19:28 | |
LordVan | I have to say .. the framework is real nice to work with .. | 19:31 |
LordVan | states = {'readonly': (Eval('sale_state') != 'draft') | Eval('product'), }, | 19:31 |
LordVan | is easy to write and read :D | 19:31 |
LordVan | hm | 21:16 |
LordVan | why would the product code not save ? .. | 21:16 |
LordVan | i assign it call .save() | 21:20 |
LordVan | but then it is still empty | 21:20 |
LordVan | (it is not readonly) | 21:20 |
LordVan | I need to set suffix_code | 21:23 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!