IRC logs of #tryton for Sunday, 2011-11-20

chat.freenode.net #tryton log beginning Sun Nov 20 00:00:01 CET 2011
-!- plantian(~ian@c-67-169-72-36.hsd1.ca.comcast.net) has left #tryton10:22
cedkthe FUD has already started: https://groups.google.com/d/topic/tryton-es/wEslb5bN5AA/discussion10:33
marc0shi12:31
marc0scan anyone point me out to an example of a domain on a many2many field? I want to filter out the party field of one model of my own by the category of that party12:33
cedkmarc0s: could you show the code because I don't understand your target13:10
marc0scedk: sure, one sec13:10
marc0scedk: http://paste.pocoo.org/show/510486/13:12
marc0scedk: i want to filter the parties that can be selected as company_id to those belonging to a specific category13:12
marc0ss/filter/restrict/13:12
marc0sbeing category a many2many field at party model13:13
cedkmarc0s: which category?13:17
marc0scedk: in my case will be 'Insurance Companies' (a category created by the module)13:18
marc0scedk: http://hg.tenak.net/tryton/insurance/file/c2945fcffd78/insurance.xml#l1113:19
cedkmarc0s: this will not work very well14:10
cedkmarc0s: you can not set a domain based on such record14:10
cedkmarc0s: at least not easily14:11
marc0scedk: aha...14:11
cedkmarc0s: have you thought about using a field to check party of "Insurance Companies" ?14:11
marc0scedk: and some pointer to the 'hard way'? :P14:11
cedkmarc0s: we never did it in Tryton :-(14:12
cedkmarc0s: one way, you create a function field that will return the id of "category_insurance_companies"14:12
cedkmarc0s: this you use it as value for the domain14:12
cedklike this: [('categories', '=', Eval('insurance_company_id'))]14:13
marc0scedk: i see14:13
marc0scedk: probably the easier way is to have such field to mark a party as an 'insurance company'14:14
cedkmarc0s: yeps14:14
marc0scedk: moreover when the customer told me that they ain't gonna be using parties categories, at least now...14:15
cedkmarc0s: but I think in the future we will have a PYSON statement to get the xml id14:15
marc0scedk: nice14:15
cedkmarc0s: this will be required for some features like view in separated files, buttons on Model etc.14:15
marc0scedk: thanks :)14:16
marc0scedk: hope to have this module finished more earlier than later, do you think it will be nice to submit it to code review (aka will probably somebody look at it) before packaging and releasing it?14:17
marc0sit's for a company that manages insurances of cars, health, life and that stuff (they are not the insurance company itself, but kind of a reseller)14:18
marc0smaybe the term would be broker or something like that14:19
cedkmarc0s: do you think it is generic module?14:31
marc0scedk: think so, but we can discuss about it... maybe my perception of generic is not the same as yours ;)14:32
marc0scedk: i'll be open to suggestions anyway :)14:33
marc0slunch time, see you later14:33
-!- Timitos(~kp@88.217.184.172) has left #tryton19:24

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!