IRC logs of #tryton for Thursday, 2015-07-09

chat.freenode.net #tryton log beginning Thu Jul 9 00:00:01 CEST 2015
-!- bvillasanti(~bvillasan@181.16.21.34) has joined #tryton00:19
-!- bvillasanti(~bvillasan@181.16.21.34) has joined #tryton01:32
-!- smarro(~sebastian@190.105.93.196) has joined #tryton02:35
-!- digitalsatori(~Thunderbi@116.234.234.14) has joined #tryton05:04
-!- digitalsatori1(~Thunderbi@116.234.234.14) has joined #tryton05:18
-!- digitalsatori(~Thunderbi@116.234.234.14) has joined #tryton05:52
-!- frispete(~frispete@p54A91EB2.dip0.t-ipconnect.de) has joined #tryton06:40
-!- yangoon1(~mathiasb@p549F09EF.dip0.t-ipconnect.de) has joined #tryton07:00
-!- sunny_dealmeida(~quassel@203.76.189.239) has joined #tryton07:24
-!- Telesight(~anthony@4dafe0c0.ftth.telfortglasvezel.nl) has joined #tryton07:33
-!- nicoe(~nicoe@2a02:a03f:3089:9d00:ee55:f9ff:fe7b:f7ac) has joined #tryton07:38
-!- bechamel(~Adium@host-85-201-213-94.dynamic.voo.be) has joined #tryton07:55
-!- digitalsatori(~Thunderbi@116.234.234.14) has joined #tryton07:58
-!- udono(~udono@ip-178-202-238-79.hsi09.unitymediagroup.de) has joined #tryton08:14
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:15
-!- rpit(~rpit@2a02:908:e670:6ac0:847e:c54c:f0ea:61f0) has joined #tryton09:19
-!- bechamel(~Adium@109.131.46.232) has joined #tryton09:25
-!- Timitos(~kpreisler@2001:4c50:34c:9d00:ae7b:a1ff:feaf:55f0) has joined #tryton09:45
-!- digitalsatori(~Thunderbi@116.234.234.14) has joined #tryton09:54
-!- michael-kohlhaas(~michael-k@unaffiliated/michael-kohlhaas) has joined #tryton10:07
-!- digitalsatori(~Thunderbi@116.234.234.14) has joined #tryton10:33
-!- digitalsatori(~Thunderbi@116.234.234.14) has joined #tryton10:37
-!- digitalsatori(~Thunderbi@116.234.234.14) has joined #tryton10:55
-!- Jitesh_Nair(~jitesh@unaffiliated/jitesh-nair/x-6738125) has joined #tryton11:07
Jitesh_Nairhow to assign a Many2One variable11:08
Jitesh_Nairiam trying to assign a product to purchase.product_supplier instance11:08
Jitesh_Nairbut iam getting assertion error11:09
Jitesh_Nairhttp://dpaste.com/2VYKQ0511:09
Jitesh_Nairhttp://dpaste.com/1WP7ARJ11:11
Jitesh_Nairthe second one was without a iterator11:12
pokoliJitesh_Nair:  product_supplier.product = product11:13
pokoliJitesh_Nair: you are tryting to assing a tuple to a Many2one11:13
Jitesh_Nairya the second example does it11:13
pokoliJitesh_Nair: how do you get product?11:13
pokolixE11:13
Jitesh_Nairplease check the second one11:13
Jitesh_Nairsearching the product11:14
pokoliJitesh_Nair: search always return a list11:14
pokoliJitesh_Nair: so you have to pick the first instance11:14
Jitesh_Nairyup i unpacked it11:14
Jitesh_Nairand then assigned it11:14
pokoliJitesh_Nair: so it seems that it's not unpacekd11:14
Jitesh_Nairi also tried to assign the id11:15
Jitesh_Nairlemme show you11:15
pokoliproduct, = Product.search([], limit=1)11:15
Jitesh_Nairhttp://dpaste.com/3M23MR611:16
Jitesh_Nairproduct = self.Product.search([('code', '=', code), ('description', '=', 'Stock'),11:16
Jitesh_Nair                                               ('type', '=', 'goods')])[-1]11:16
Jitesh_Nairproduct = self.Product.search([('code', '=', code), ('description', '=', 'Stock'),('type', '=', 'goods')])[-1]11:17
Jitesh_Nairwhen i was using proteus all i had to do was use a .new() function11:17
pokoliJitesh_Nair: can I see the full code?11:17
-!- digitalsatori(~Thunderbi@116.234.234.14) has joined #tryton11:18
Jitesh_Nairhttp://dpaste.com/0P7AA5811:18
Jitesh_Nairsince i could not understand what was happening in .new() of proteus i had to create the instance and assign them11:20
pokoliJitesh_Nair: product it's a many2one to product.template, so you have to use the template instead of the product11:20
Jitesh_Nairohh i missed that...11:22
Jitesh_Nairpokoli, it has so many dependency , when using new() i dint have to pass the company or product(actually no company is created for the supplier), is there any way to do the same skipping in this method?11:25
pokoliJitesh_Nair: nor product, nor party have company field11:26
pokoliJitesh_Nair: but product supplier has, as the prices may be diferent between companies11:26
Jitesh_Nairso does proteus create a company when we call the new() function11:27
Jitesh_Nairbecause when i was using proteus i dint pass any company to the supplier11:27
-!- digitalsatori(~Thunderbi@116.234.234.14) has joined #tryton11:29
Jitesh_Nairpokoli, it worked thanks11:44
pokoliJitesh_Nair: you're welcome11:45
-!- digitalsatori(~Thunderbi@116.234.234.14) has joined #tryton12:13
-!- kstenger(~karla@200.124.209.158) has joined #tryton13:49
-!- FvD(~Thunderbi@ip95-153-64-186.ct.co.cr) has joined #tryton14:05
-!- smarro(~sebastian@190.105.93.196) has joined #tryton14:40
-!- Timitos(~kpreisler@77.47.6.170.dynamic.cablesurf.de) has joined #tryton15:09
-!- VaticanCameos(~pritishc@182.68.172.234) has joined #tryton16:45
-!- Telesight(~anthony@4dafe0c0.ftth.telfortglasvezel.nl) has joined #tryton17:12
-!- juanfe(~juanfe@190.85.115.49) has joined #tryton17:28
-!- FvD(~Thunderbi@ip95-153-64-186.ct.co.cr) has joined #tryton18:33
-!- sunny_dealmeida(~quassel@203.76.189.239) has joined #tryton19:25
-!- nineinchnick(~jwas@109.231.22.187) has joined #tryton20:34
-!- michael-kohlhaas(~michael-k@unaffiliated/michael-kohlhaas) has joined #tryton22:19
-!- smarro(~sebastian@190.105.93.196) has joined #tryton22:30
-!- jcnorman(~jcnorman@24-197-138-90.dhcp.spbg.sc.charter.com) has joined #tryton23:18
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton23:49

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