IRC logs of #tryton for Monday, 2014-05-05 #tryton log beginning Mon May 5 00:00:01 CEST 2014
-!- digitalsatori(~Thunderbi@ has joined #tryton03:10
-!- asoleh(~asoleh@ has joined #tryton03:31
-!- asoleh(~asoleh@ has joined #tryton05:21
-!- frispete_( has joined #tryton06:44
-!- yangoon( has joined #tryton07:16
-!- digitalsatori(~Thunderbi@ has joined #tryton07:28
-!- LordVan(~LordVan@gentoo/developer/LordVan) has joined #tryton08:45
-!- mar( has joined #tryton08:53
maris there any fast way of testing changes to forms / lists without reloading everyting?08:54
-!- udono( has joined #tryton08:56
-!- corro(~corro@ has joined #tryton08:58
-!- asoleh(~asoleh@ has joined #tryton09:02
-!- bechamel( has joined #tryton09:07
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:14
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:19
-!- jeancavallo( has joined #tryton09:20
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton09:26
-!- jeancavallo( has joined #tryton09:57
-!- pobsteta(~Thunderbi@ has joined #tryton10:14
-!- nicoe(~nicoe@2001:6f8:3aa:0:b699:baff:fe56:2328) has joined #tryton10:40
-!- grasbauer(~jan@ has joined #tryton10:55
-!- digitalsatori(~Thunderbi@ has joined #tryton11:11
-!- mariomop( has joined #tryton11:27
-!- meanmicio( has joined #tryton11:50
-!- meanmicio(~lfm@fsf/member/meanmicio) has joined #tryton11:50
marI get error: Exception: Reference to [module_name].line_move_view_tree not found when I do  <field name="line_moves" colspan="4" view_ids="[module_name].line_move_view_tree"/>11:57
marcan someone help me diagnose the problem?11:57
pokolimar: you're referencing a view which doesn't exist in the current database12:02
pokolimar: is [module_name] in the depends section of tryton.cfg of you're current module?12:02
marit's inside the model12:02
grasbauermar: tahn you can leave the module name empty12:03
-!- bvo(~bruno@ has joined #tryton12:03
mardo I need to run update or something?12:03
marok, update helped12:04
pokolimar: yes, and refresh the view12:04
mar<mar> is there any fast way of testing changes to forms / lists without reloading everyting?12:04
marand second question: how do I add adding functionality into "tree" (embedded in form), the "+" sign?12:05
margrasbauer, I get     *view_id.split('.')))12:06
marTypeError: get_id() takes exactly 3 arguments (2 given) if I don't specify12:06
cedkgrasbauer: no, in views module prefix is always required12:07
maranyone?  how do I add adding functionality into "tree" (embedded in form), the "+" sign?12:33
cedkmar: I guess:
cedkmar: but it is pretty rare to need this12:36
marmaybe I'm trying to do something wrong12:36
marI have stock.move -> stock_move-invoice_line <- invoice.line12:37
marI want to display stock_move-invoice_line relations in stock.move edit form and allow adding invoice.lines (when I add invoice line, stock_move-invoice_line is created12:37
marcurrently I display stock_move-invoice_line using tree view12:38
cedkmar: use a M2M12:38
marcan M2M have additional fields on relation?>12:39
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton12:39
cedkmar: don't understand12:40
marmy stock_move-invoice_line has additional fields like quantity, etc12:41
cedkmar: why? quantity is on move and line12:41
marone Move can have multiple relations to one line12:42
cedkmar: and so what?12:42
marso I need to save "split" quantity on relation12:43
cedkmar: by the way, what you are doing already exist with module account_invoice_stock12:43
marsomething similar probably, but it doesn't meet my requirements :/12:45
cedkmar: quite strange12:46
marso can Many2Many have additional fields on relation model?12:48
cedkmar: if you want to not accessible12:50
cedkmar: but I still persist that it is useless in this case12:51
marit may be, I don't argue about that12:52
pokolimar: can you expose your requirements? sometimes is usefull for others to help :)12:59
-!- sharoonthomas(~sharoonth@ has joined #tryton13:10
marmy requirement is to calculate product cost_amount13:16
marin anglosaxon style13:16
marand there's a lot of custom functionality already, like custom FIFO, etc13:16
marand landed costs (if the term is clear)13:17
marand standart stock_anglosaxon module doesn't handle my case, and tryton is 2.813:17
marhow can I change default add_remove functionality, and list invoice_lines instead of my relation and create relation on "add"13:25
pokolimar: and you can not adapt stock_anglosaxon module to fit your case?13:27
marpokoli, nope13:27
marit basically just adds stuff that I don't need / use13:28
pokolimar: don't understand the last question, bot tu show the add_remove functionality you only need to define a domain in the add_remove attribute13:28
pokolimar: and this domain will apply to the add_remove functionality13:28
pokolimar: which stuff?13:28
marpokoli, add/remove adds existing entries (and I can limit what I can add with domain)13:29
marbut I don't have existing entries yet, I want to create entry from another model when I select it13:30
pokolimar: you need to store the relation from the other model?13:30
marI have stock.move -> stock_move-invoice_line <- invoice.line13:31
mari'm editing stock.move13:31
mari want to add invoice.line (create stock_move-invoice_line)13:32
pokolimar: that's managed by the Many2Many field13:33
marwill M2M field handle additional fields on relation?13:34
pokolimar: you can save it on the table but will not be accesible by the Many2Many widget13:45
pokolimar: can you explain you you need diferent quantites on the relation that on the stock_move, invoice_line?13:46
marbecause I need to save additional information in relation13:48
marlike quantity, landed_cost = true/false, etc13:49
marI need quantity because one stock.move can have multiple relations into one invoice.line13:49
pokolimar: sorry for my lag of knowledge, but what does landed_cost mean?13:53
pokolimar: sure, but the sum the quantity of all the invoice_lines must be the quantity of the stock_moves, except those ignored/recreated13:53
pokolimar: so maybe you can use invoice_line quantity instead of saving another13:54
marthere are some services, like transportation cost, that client wants to include into cost_amount of product13:54
marand they call it "landed cost"13:55
marand they can basacally associate any invoice like like that13:55
mar*invoice line13:55
pokolimar: you use sale_shipment_cost module?13:58
marpokoli, yes13:59
marbut shipment is just one of things they want to include into "landed cost"14:00
pokolimar: and where you have stored all the other landed costs?14:00
pokolirelated to moves?14:00
maron relation between move and invoice_line14:00
pokolimar: so it's manually added?14:02
mari think so14:02
pokolimar: so you can add it on and intermediate model, which has the relation with the invoice_line and the stock_move14:03
marso my intermediate model is the relation between stock_move and invoice_line14:03
pokolimar: and forget the Many2Many, and add a One2Many to the intermediate model, from invoices and from moves if you want14:03
marbut how can I add "invoices" into move?14:04
mar"invoice lines"14:04
pokolimar: you cant, you only can add your intermediate model14:04
pokolimar: which contain invoices, and the other information you need14:04
marbut I don't have the relation until I "join" it14:05
pokolimar: don't understand14:06
-!- jeancavallo( has joined #tryton14:19
-!- sharoonthomas(~sharoonth@ has joined #tryton14:20
-!- grasbauer( has joined #tryton14:43
-!- sharoonthomas(~sharoonth@ has joined #tryton14:46
marpokoli, I create stock_move-invoice_line when I select invoice_line14:51
pokolimar: yes, so you can then add all the info you need on the internmediate model, just create a view for it14:51
marpokoli, how to I attach it to One2Many field?15:24
marI want One2Many List, click on "+", select invoice.line -> add -> create relation, close the window15:24
marcan I do it like that?15:24
maror are you suggesting another way?15:25
pokolimar: with the intermediate fields you must create a new record and select the invoice_line from there15:33
marsu you're suggesting workflow:15:45
mar"+" -> "New" -> select invoice -> save -> select?15:45
marcan I create my own widget?15:51
pokolimar: sure you can create you're own widget, but i won't recomend it15:51
pokolimar: as you will have to patch the client15:51
marok, bad idea15:51
pokolimar: "New" -> select invoice -> fill aditional fields -> save15:52
pokolimar: and you can also fill aditional fields by an on_change15:52
marcan I add like special button, which opens list and allows me to select invoice line?15:53
marbecause I don't need additional fill steps, etc15:53
marand I don't want to open empty lists15:53
maror maybe I can override default "+" action to open invoice.lines instead of stock.move-invoice.line?15:56
-!- alisonken1lap3( has joined #tryton16:26
pokolimar: you can add a wizard16:55
pokolimar: and call the wizard from a button16:56
marcan I somehow print relation field from Many2Many?16:56
-!- mar( has joined #tryton17:20
pokolimar: what do you want to print?17:22
-!- grasbauer( has joined #tryton17:54
-!- Telesight( has joined #tryton18:01
-!- littlebit( has joined #tryton18:26
-!- littlebit( has joined #tryton18:42
-!- pobsteta( has joined #tryton18:55
-!- LordVan(~lordvan@ has joined #tryton18:57
-!- LordVan(~lordvan@gentoo/developer/LordVan) has joined #tryton18:57
-!- pablovannini( has joined #tryton18:57
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton19:19
-!- grasbauer( has joined #tryton19:24
marhow come tryton generates SQL  INSERT "line_move" ("stock_move","invoice_line","landed_cost", create_uid, create_date) VALUES ( 58618, 9, false, 1, '2014-05-05T21:19:24.806891'::timestamp)20:20
marwhen I try to save entry created from OneToMany relation20:20
marthere are missing fields quantity and internal_quantity that I specify and see in Form20:20
cedkmar: if they are readonly, they are not send20:28
marhow can I set read-only field values?20:28
cedkmar: it has no sense20:29
marI currently set them in on_change20:29
cedkmar: then it is a function field20:29
marbut I want to "save"i t20:29
marinto db20:29
marso that I can filter later20:29
cedkmar: it is a function field20:29
cedkmar: data the user don't input should not be stored as it is duplication20:30
marwill tryton save it into db if it's function field?20:31
cedkmar: no it is a function20:31
marso I make it invisible and not readonly then?20:31
cedkmar: data the user don't input should not be stored as it is duplication20:32
marwhat about cost price and other fields then? user doesn't edit those directly\20:33
cedkmar: yes they are writen by code20:39
marso how do I do that?20:39
-!- nicoe(~nicoe@ has joined #tryton22:07
-!- mar(~marius@ has joined #tryton23:02
mardomain=[('origin', '=', Eval('stock_move.origin'))]23:25
marhow do I do this one correctly?23:25
marEval('stock_move.origin') evalues to u'' for some reason...23:26
-!- cjbarnes18( has joined #tryton23:54

Generated by 2.11.0 by Marius Gedminas - find it at!