chat.freenode.net #tryton log beginning Fri Jan 18 00:00:01 CET 2013 | ||
2013-01-18 00:24 <cedk> zodman: I think my mistake was to use the rc version of grunt | ||
2013-01-18 00:25 <cedk> zodman: but as jquery moved to it, I thought it was stable enough | ||
2013-01-18 04:10 <iamnoob> ding dong! | ||
2013-01-18 04:10 <iamnoob> how can i filter the records from a Many2One field? | ||
2013-01-18 05:32 <plantian> iamnoob: What do you mean? In a method programmatically or to restrict the many2one field when a user selects it in a form? | ||
2013-01-18 06:58 <iamnoob> plantian: hi again :) i have 2 Many2One field.. in the first Many2One i select a certain record.. let say (name: tester) ,, what i want to do it.. in the second Many2One. only those records that is related to (name: tester) will come up. and available | ||
2013-01-18 06:59 <iamnoob> plantian: actually i got no idea. im checking if adding a domain will do what i need.. | ||
2013-01-18 07:40 <iamnoob> anyone up? | ||
2013-01-18 07:57 <eriam> ACTION is around | ||
2013-01-18 08:13 <rmu> yes | ||
2013-01-18 08:27 <iamnoob> rmu: i need to filter out the records that can be selected on a Many2One field.. but i dont know how to accomplish this.. i still cant get how domain works.. | ||
2013-01-18 09:29 <rmu> iamnoob: here is an example http://hg.tryton.org/modules/production/file/480ac60072ed/bom.py#l57 | ||
2013-01-18 09:30 <rmu> iamnoob: http://doc.tryton.org/2.6/trytond/doc/topics/domain.html | ||
2013-01-18 09:50 <iamnoob> rmu:thanks ill check it now | ||
2013-01-18 10:59 <rmu> cedk: i think codereview is not a proper forum to discuss this production "rounding" issue. | ||
2013-01-18 13:08 <navis> Hi, is it not possible in an on_change_with_<field> method to call the parrent of the calling object ? | ||
2013-01-18 13:09 <navis> I added a «tax_amount» field on invoice_line, with an on_change_with_tax_amount() method | ||
2013-01-18 13:11 <navis> that method calls self._compute_taxes(), which errors out with (at the end) «AttributeError: 'account.invoice' Model has no attribute 'party'» | ||
2013-01-18 13:11 <navis> the instruction leading to the error is «context = self.invoice.get_tax_context()» | ||
2013-01-18 13:12 <navis> so I guess invoice is not there... | ||
2013-01-18 13:13 <navis> any idea ? | ||
2013-01-18 14:44 <cedk> navis: you don't have the party from the on_change_with | ||
2013-01-18 15:09 <navis> cedk: isn't the whole object availlable ? I thought we could access everything from self ? | ||
2013-01-18 15:09 <navis> cedk: including the parent object and its attributes | ||
2013-01-18 15:31 <cedk> navis: not from on_change because it is only the value the client sent | ||
2013-01-18 15:35 <navis> cedk: ok I understand... is there any other mean to calculate the taxes on a line ? | ||
2013-01-18 15:36 <navis> cedk: the server needs the full story to do its magic: line and invoice | ||
2013-01-18 15:39 <navis> cedk: or is the client able to send the parent invoice data ? | ||
2013-01-18 15:39 <navis> cedk: only what is needed in get_tax_context | ||
2013-01-18 15:44 <cedk> navis: yes with _parent_invoice.<field> | ||
2013-01-18 15:58 <navis> cedk: super, thanks | ||
2013-01-18 16:19 <sharoonthomas> cedk: I am in the process of migrating nereid to use the active record pattern and the new Pool.register way of registering pool items | ||
2013-01-18 16:20 <sharoonthomas> cedk: i was wondering if we could make better use of flask blueprints in a similar fashion. | ||
2013-01-18 16:20 <sharoonthomas> cedk: can you give me a link to when/where the pool is built for a database (based on installed modules) ? | ||
2013-01-18 16:24 <cedk> sharoonthomas: it is in the Pool | ||
2013-01-18 16:24 <cedk> sharoonthomas: but I must say I'm pretty happy of the current implementation except for the module name to pass to register | ||
2013-01-18 16:26 <sharoonthomas> cedk: i loved the design | ||
2013-01-18 16:27 <sharoonthomas> cedk: i am wondering how best to handle nereid view handlers in cases where some urls act on records (most of the time) while others act on class | ||
2013-01-18 16:28 <sharoonthomas> cedk: i was thinking of using the same strategy of the tryton dispatcher which looks for im_self to decide the argument to pass | ||
2013-01-18 16:37 <cedk> sharoonthomas: why not | ||
2013-01-18 16:38 <sharoonthomas> cedk: the tricky part of course is identifying the id in the url and converting it into an instance (in the rpc dispatcher it is always args[0]) | ||
2013-01-18 16:39 <cedk> sharoonthomas: but there is a url matcher for that? | ||
2013-01-18 16:40 <sharoonthomas> cedk: i think it will be just a matter of writing a custom converter http://werkzeug.pocoo.org/docs/routing/#custom-converters | ||
2013-01-18 16:41 <cedk> sharoonthomas: looks good | ||
2013-01-18 16:43 <sharoonthomas> cedk: something like "/product/<record(model='product.product'):product>" | ||
2013-01-18 16:44 <cedk> sharoonthomas: why not having the model in the url | ||
2013-01-18 16:51 <horfulus> hi | ||
2013-01-18 16:51 <horfulus> a question, can I work with tryton by using sqlite? | ||
2013-01-18 16:52 <sharoonthomas> cedk: thinking more about it, i think the model is not needed | ||
2013-01-18 16:52 <horfulus> hi mr marc0s | ||
2013-01-18 17:06 <horfulus> work in production, I mean | ||
2013-01-18 17:47 -!- calbasi(~joan@14.66.14.37.dynamic.jazztel.es) has left #tryton | ||
2013-01-18 18:01 <cedk> horfulus: I will not recommend it | ||
2013-01-18 18:01 <cedk> horfulus: because there is no constraint on it like fk | ||
2013-01-18 18:01 <cedk> horfulus: sqlite is more about testing and prototyping | ||
2013-01-18 18:04 <horfulus> thanks cedk | ||
2013-01-18 18:06 <horfulus> sqlite is beautiful, but .. | ||
2013-01-18 18:46 -!- navis(~user@87.67.252.86) has left #tryton | ||
2013-01-18 18:47 <odicha> Hi all! | ||
2013-01-18 18:49 <odicha> A question about accounts. Field type can change its value after it's created?? yes, no , or can it break something | ||
2013-01-18 18:49 <odicha> from payable to other, i.e. | ||
2013-01-18 22:29 <plantian> A setup.py file in a custom module is not required if you never plan to install the module in site-packages right? | ||
2013-01-18 22:53 <cedk> plantian: no | ||
2013-01-18 22:53 <cedk> plantian: but still always a good practice, you never know | ||
2013-01-18 22:54 -!- FvD_(~FvD@186.87.212.114) has left #tryton | ||
2013-01-18 23:38 <plantian> cedk: Okay, maybe I will add it later, I'm just trying to simplify the upgrading process to try and get a single custom module to work in 2.6. There are a lot of API changes like you said. | ||
2013-01-18 23:42 <cedk> plantian: having unittest helps a lot for such process | ||
2013-01-18 23:43 <plantian> cedk: yeah, maybe after i get the module to install I will start adding some | ||
2013-01-18 23:43 <plantian> i think the xml might be the hardest thing to update | ||
2013-01-18 23:44 <cedk> plantian: I don't remember any big change in XML | ||
2013-01-18 23:44 <plantian> cedk: no big changes, just lot of small changes | ||
2013-01-18 23:45 <plantian> nested fields, connecting permissions, some attributes change |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!