IRC logs of #tryton for Friday, 2014-08-01

chat.freenode.net #tryton log beginning Fri Aug 1 00:00:02 CEST 2014
-!- digitalsatori(~Thunderbi@116.234.181.110) has joined #tryton00:53
-!- digitalsatori(~Thunderbi@101.87.130.104) has joined #tryton03:58
-!- VaticanCameos(~pritishc@182.68.110.212) has joined #tryton06:05
-!- marius_(~marius@v100.nfq.lt) has joined #tryton06:32
-!- frispete(~frispete@p54A91DCE.dip0.t-ipconnect.de) has joined #tryton06:41
-!- VaticanCameos(~pritishc@182.68.87.28) has joined #tryton07:19
VaticanCameosI got disconnected....damn net07:19
VaticanCameosLooks like my message didn't get through. Reposting: "Can anyone point me to a resource on querying the tryton database using SQL queries? I hear it uses python-sql now but not sure how to implement it. Say I have a User class which inherits from ModelSQL. How would I use the User class to query the tryton DB?"07:34
-!- VaticanCameos(~pritishc@182.68.212.28) has joined #tryton07:54
-!- grasbauer(~jan@dslb-092-078-071-134.092.078.pools.vodafone-ip.de) has joined #tryton07:57
PilouVaticanCameos: some SQL queries in tryton modules: http://hg.tryton.org/modules/account/file/74753e4bdd1f/tax.py#l185 http://hg.tryton.org/modules/sale/file/d5069bf6a171/sale.py#l1487 http://hg.tryton.org/modules/stock/file/64d376876173/product.py#l23908:03
VaticanCameosPilou: thank you so much! going through those now.08:03
-!- alisonken1home(~alisonken@pool-71-104-227-145.lsanca.dsl-w.verizon.net) has joined #tryton08:07
VaticanCameosSo basically it is like User.__table__(), and cursor = Transaction.cursor() is used to execute the query.08:09
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:00
-!- jeancavallo(~giovanni@bob75-9-88-181-2-176.fbx.proxad.net) has joined #tryton09:13
-!- nicoe(~nicoe@balisto.office.b2ck.com) has joined #tryton09:32
-!- nicoe(~nicoe@balisto.office.b2ck.com) has joined #tryton09:40
-!- prksh(~prksh@122.177.107.89) has joined #tryton09:46
grasbauerif I make a field required in product.product which is not set on many records and I save the template from the template_form the wrong product.product gets deleted - is this the right behavoir or do I have to search for other mistakes?09:48
cedkgrasbauer: I can not believe this could happen in vanilla code09:49
grasbauercedk: do you have a hint how to debug this?09:51
cedkgrasbauer: not at all09:54
-!- pobsteta(~Thunderbi@37.160.27.168) has joined #tryton09:55
pokoligrasbauer: you can search for a delete call, as it seems that there is some code that delete it10:02
pokoligrasbauer: and also test that the product is active, so maybe it's inactive and you don't see it10:02
-!- aasnan(~angel@142.Red-2-139-177.staticIP.rima-tde.net) has joined #tryton10:06
-!- angelnan(~angel@142.Red-2-139-177.staticIP.rima-tde.net) has joined #tryton10:07
-!- aasnan(~angel@142.Red-2-139-177.staticIP.rima-tde.net) has joined #tryton10:07
-!- aasnan(~angel@142.Red-2-139-177.staticIP.rima-tde.net) has joined #tryton10:08
-!- angelnan(~angel@142.Red-2-139-177.staticIP.rima-tde.net) has joined #tryton10:08
grasbauerpokoli: really starnge - I log the changes in the client it prints {u'products': None, 'id': None}10:08
grasbauerpokoli: but i think I found the error in a Many2Many cascading the delete10:11
pokoligrasbauer: should be the Many2Many10:15
-!- pobsteta(~Thunderbi@37.160.27.168) has joined #tryton10:17
-!- frispete(~frispete@p54A91DCE.dip0.t-ipconnect.de) has joined #tryton10:46
-!- alisonken1home(~alisonken@pool-71-104-227-145.lsanca.dsl-w.verizon.net) has joined #tryton11:16
-!- aasnan(~angel@142.Red-2-139-177.staticIP.rima-tde.net) has joined #tryton11:39
-!- zultron(~zultron@99-190-134-148.lightspeed.austtx.sbcglobal.net) has joined #tryton11:49
-!- zultron_(~zultron@99-190-134-148.lightspeed.austtx.sbcglobal.net) has joined #tryton12:05
-!- ronaldm(~ronaldm@197.211.216.214) has joined #tryton12:43
-!- pobsteta(~Thunderbi@37.160.27.168) has joined #tryton13:04
grasbauercedk, pokoli: its a bug - but I have no idea what causes this13:17
pokoligrasbauer: and how can we reproduce it?13:18
grasbauercedk: new database, only module product installed, add a template, after set description of product.product to required - save and the product.product gets deleted13:18
grasbauerpokoli: try it - empty database. than add product-module only. after create a template. save. than in the product module add required=True to product.product. reload the view. open the template. str-s - variant gone .....13:20
grasbauerpokoli: requiered to description for exeample13:21
pokoligrasbauer: sounds strange to me13:21
pokoligrasbauer: can you test that the product is not inactive?13:22
grasbauerpokoli: the product is deleted13:23
grasbauer:'(13:40
-!- hiaselhans(~Thunderbi@212.186.45.207) has joined #tryton13:50
cedkgrasbauer: it can not be deleted as it is not saved because it is invalid14:00
grasbauercedk: I think it's get deleted because its invalid14:01
grasbauercedk: if there a required is added afterwards, the record is read, but if you store the parent, the invalid child gets deleted ....14:02
grasbauercedk: but I can't find where it is triggered ...14:06
cedkgrasbauer: I don't understand the scenario14:09
grasbauercedk: I have added a field which is required to product.product - not all product having set this right now. So if i open the template with a product where the new field is missing, saving the template results in deletion of the invalid product14:12
cedkgrasbauer: that's not possible to save if not valid14:12
grasbauercedk: yes - but I would expect the typical reaction of a highlighted field - not the deletion of the record without any noise14:13
grasbauercedk: the current behavior makes it impossible to add required fields to a one2many without default values - the invalid records are deleted without any warning ....14:16
cedkgrasbauer: first you must not expect a good behavior by adding required without default value14:16
grasbauercedk: I can not decide as a developer since i don't know the records14:18
-!- smarro(~sebastian@200.107.230.29) has joined #tryton14:19
grasbauercedk: customer want's a field required for having better data - he needs to set the values by his own ....14:19
grasbauercedk: currently the products are deleted because they are not valid - but I would expect the typical warning on write ....14:20
grasbauercedk: can you give me a hint, where the deletion is decided? searching since hours ;)14:28
cedkgrasbauer: this is the culpitre: http://hg.tryton.org/tryton/file/3cd86f67c9c8/tryton/gui/window/view_form/model/field.py#l71514:31
cedkcomes from the F**king OpenERP14:31
-!- kstenger(~karla@200.124.209.158) has joined #tryton14:32
cedkfor me, it should never remove the record14:32
grasbauercedk: I'm always impressed how deep you know each part of the system ;)14:33
cedkgrasbauer: just a print stack at the deletion method14:34
grasbauercedk: whats to do next? issue, review and so on or are you deleting this easter egg of open erp?14:36
cedkgrasbauer: I think it deserve an issue and some though about the expected behavior14:39
grasbauercedk: ok14:39
-!- kstenger(~karla@200.124.209.158) has joined #tryton14:45
marius_is it possible to have not-required selection?14:46
cedkmarius_: you have to define a empty value: ('', '')14:48
-!- ronaldm(~ronaldm@197.221.242.194) has joined #tryton14:54
-!- ronaldm(~ronaldm@197.221.242.194) has joined #tryton15:00
-!- munro(~ronaldm@197.221.242.194) has joined #tryton15:14
-!- smarro(~sebastian@200.107.230.29) has joined #tryton15:22
-!- ronaldm(~ronaldm@197.221.242.194) has joined #tryton15:23
-!- ronaldm(~ronaldm@197.221.242.194) has joined #tryton15:26
-!- VaticanCameos(~pritishc@182.68.136.83) has joined #tryton15:43
-!- pobsteta(~Thunderbi@37.162.164.127) has joined #tryton15:50
grasbauercedk: can you give me a hint where the invalid fields are highlighted. Now I have the problem, that the tabs are set to active if there is a wrong entry inside ...15:54
cedkgrasbauer: sounds correct15:56
grasbauercedk: I mean NOT active ... ;)15:57
cedkgrasbauer: it is in form.py15:57
cedkgrasbauer: if it is inside a one2many, it is because it is not implemented16:00
grasbauercedk: ok - it's inside one2many16:01
cedkgrasbauer: but still good to encode a feature request16:09
-!- ronaldm(~ronaldm@197.221.242.194) has joined #tryton16:14
-!- alisonken1lap3(~alisonken@18.18.ultimate-int.uia.net) has joined #tryton16:47
-!- grasbauer(~jan@dslb-092-078-071-134.092.078.pools.vodafone-ip.de) has joined #tryton16:51
-!- ronaldm(~ronaldm@197.221.242.194) has joined #tryton16:56
-!- sharkcz(~sharkcz@server.danny.cz) has joined #tryton17:44
-!- munro(~ronaldm@197.221.242.194) has joined #tryton17:58
-!- ronaldm(~ronaldm@197.221.242.194) has joined #tryton18:05
-!- zodman(zodman@50.115.163.209) has joined #tryton18:08
-!- VaticanCameos(~pritishc@182.68.137.52) has joined #tryton18:20
-!- pobsteta(~Thunderbi@37.162.164.127) has joined #tryton18:35
-!- munro(~ronaldm@197.221.242.194) has joined #tryton19:27
-!- ronaldm(~ronaldm@197.221.242.194) has joined #tryton19:27
kstengersay I have a One2Many relationship, call it foo.  Then in a method of the class where I define this relationship I want to refer to the items in foo, but filtering them somehow, is there a way to do this with a domain (alike to foo.search(...)), or else how could I do this?20:10
-!- ronaldm(~ronaldm@197.221.242.194) has joined #tryton20:20
-!- munro(~ronaldm@197.221.242.194) has joined #tryton20:32
-!- mariomop(~quassel@host180.186-125-110.telecom.net.ar) has joined #tryton21:05
-!- prksh(~prksh@180.188.247.158) has joined #tryton21:15
-!- ronaldm(~ronaldm@wvale-ggsn-55.131.econet.co.zw) has joined #tryton21:28
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton23:09
-!- uranus(~uranus@ool-182fa854.dyn.optonline.net) has joined #tryton23:36
-!- marius_(~marius@84.240.8.12) has joined #tryton23:45

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