chat.freenode.net #tryton log beginning Thu Sep 12 00:00:02 CEST 2013 | ||
WUD | Hi, If I set a field with default_ static method, can I access it using the self.fieldName method in my code? | 07:51 |
---|---|---|
-!- priyankarani(~priyanka@122.177.31.229) has left #tryton | 08:15 | |
WUD | Is there no way in Tryton's API to set a field on a Model at the time it's initialising, i.e. showing in the view, | 08:38 |
WUD | even before it's stored in the db, when I'm using the self | 08:39 |
nicoe | WUD: it's default_<field name> | 08:45 |
WUD | It doesn't work. | 08:48 |
WUD | say I have set a field with default_field_name and I try to use self.field_name to access it, it just comes as None | 08:49 |
WUD | nicoe: | 08:49 |
nicoe | default_ is to set the default value when presenting it in the client | 08:50 |
nicoe | WUD: But also when saving the object | 08:51 |
nicoe | Before it is not set | 08:51 |
WUD | yeah, but i want to use the default field before I have saved | 08:51 |
WUD | as self.field | 08:51 |
nicoe | WUD: why ? | 08:58 |
WUD | I want to set the _parent_sale field on pos | 09:03 |
WUD | sorry | 09:03 |
WUD | _parent_sale field on sale.line | 09:03 |
nicoe | There is no _parent_sale field on sale.line but there is a sale field | 09:05 |
WUD | yeah, it's not a field, but on the on_change product, there is something called _parent_sale | 09:08 |
WUD | and I'm assuming it's the parent of the current sale.line | 09:08 |
WUD | https://github.com/tryton/sale/blob/develop/sale.py#L959 | 09:09 |
nicoe | WUD: yes it's the sale | 09:26 |
nicoe | WUD: so the sale field I'm talking about | 09:26 |
nicoe | WUD: The on_change field is an indication for the client of which field he should send when the field change | 09:27 |
nicoe | the _parent prefix allows to send information about a specific parent (many2one field) | 09:28 |
nicoe | in this case 'sale' | 09:28 |
nicoe | because it is named _parent_sale | 09:28 |
WUD | so any fields on the parent, I can use in my child ? | 09:29 |
WUD | modules are a mess without inherits | 09:29 |
nicoe | WUD: cleaner IMOH | 09:33 |
WUD | nicoe: sure, but then I can't get my 2.6 module to work in 2.8 | 09:34 |
WUD | is there a way to set the _parent_ field explicitly? | 10:07 |
-!- WUD(~WUD@122.177.31.229) has left #tryton | 10:26 | |
jvblasco | morning everyone | 11:04 |
-!- priyankarani(~priyanka@122.177.31.229) has left #tryton | 11:06 | |
prusglajotemis | Hello. How can I programmatically delete the action keyword ? | 17:03 |
cedk | prusglajotemis: what do you mean? | 17:06 |
prusglajotemis | for example i want delete a lot of "form print" (sale, purchase, ...) and i want do that from my own module | 17:11 |
cedk | prusglajotemis: action can be inactivate using the active field | 17:13 |
zodman | cedk: i submit a patch for vatnumber for supporting vat_mx on the issue http://code.google.com/p/vatnumber/issues/detail?id=16 | 17:13 |
cedk | zodman: ok but I'm also thinking about mergin vatnumber with stdnum | 17:35 |
prusglajotemis | cedk: but when I inactivate action the action keyword still exist (in toolbar). | 17:40 |
cedk | prusglajotemis: restart the client | 17:40 |
prusglajotemis | cedk: yes I restart client. I inactivate report so what has changed is that when I click on keyword and get error: 'Report (purchase.purchase) not find!') | 17:51 |
oscar | how can I to do this in windows: trytond -d MYDB -u my_module? | 19:10 |
oscar | with neso | 19:10 |
cedk | oscar: you can not | 19:11 |
nicoe | oscar: you can not | 19:11 |
cedk | oscar: but you can export the DB and import it with the update flag | 19:12 |
oscar | cedk and nicoe: Thanks I will try to export and import method | 19:14 |
cedk | zodman: also you better update review than delete older and create new | 19:16 |
oscar | cedk: where I put the flag "update" for import database | 19:19 |
oscar_ | cedk and nicoe: Thanks I will try to export and import method? | 19:20 |
cedk | oscar_: in the popup that asks for new DB name | 19:21 |
oscar_ | cedk: Ok, but Popup field database name don't let me put spaces or flags (in Windows) | 19:25 |
cedk | oscar_: what are you talking about? | 19:28 |
cedk | oscar_: check the checkbox! | 19:28 |
oscar_ | cedk: thank you is solved! | 19:35 |
-!- dcormier(~dcormier@2607:fad8:4:6:f2de:f1ff:fe70:193f) has left #tryton | 20:12 | |
motaro | When you change something on the xml for a view how do you make tryton reload the module? | 21:09 |
cedk | motaro: if you change in view/ it is done automaticaly if auto_reload is set | 21:18 |
motaro | is not set, thank you. | 21:23 |
Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!