IRC logs of #tryton for Monday, 2014-05-05

chat.freenode.net #tryton log beginning Mon May 5 00:00:01 CEST 2014
2014-05-05 03:10 -!- digitalsatori(~Thunderbi@116.234.181.110) has joined #tryton
2014-05-05 03:31 -!- asoleh(~asoleh@36.70.65.253) has joined #tryton
2014-05-05 05:21 -!- asoleh(~asoleh@36.70.65.253) has joined #tryton
2014-05-05 06:44 -!- frispete_(~frispete@p54A93990.dip0.t-ipconnect.de) has joined #tryton
2014-05-05 07:16 -!- yangoon(~mathiasb@p549F2F9A.dip0.t-ipconnect.de) has joined #tryton
2014-05-05 07:28 -!- digitalsatori(~Thunderbi@114.94.143.109) has joined #tryton
2014-05-05 08:45 -!- LordVan(~LordVan@gentoo/developer/LordVan) has joined #tryton
2014-05-05 08:53 -!- mar(~marius@v100.nfq.lt) has joined #tryton
2014-05-05 08:54 <mar> is there any fast way of testing changes to forms / lists without reloading everyting?
2014-05-05 08:56 -!- udono(~udono@ip-176-199-172-92.unitymediagroup.de) has joined #tryton
2014-05-05 08:58 -!- corro(~corro@46.22.23.85) has joined #tryton
2014-05-05 09:02 -!- asoleh(~asoleh@36.70.65.253) has joined #tryton
2014-05-05 09:07 -!- bechamel(~Adium@cismwks02-virtual1.cism.ucl.ac.be) has joined #tryton
2014-05-05 09:14 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2014-05-05 09:19 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2014-05-05 09:20 -!- jeancavallo(~giovanni@bob75-9-88-181-2-176.fbx.proxad.net) has joined #tryton
2014-05-05 09:26 -!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton
2014-05-05 09:57 -!- jeancavallo(~giovanni@bob75-9-88-181-2-176.fbx.proxad.net) has joined #tryton
2014-05-05 10:14 -!- pobsteta(~Thunderbi@37.162.218.2) has joined #tryton
2014-05-05 10:40 -!- nicoe(~nicoe@2001:6f8:3aa:0:b699:baff:fe56:2328) has joined #tryton
2014-05-05 10:55 -!- grasbauer(~jan@145.253.113.2) has joined #tryton
2014-05-05 11:11 -!- digitalsatori(~Thunderbi@114.94.143.109) has joined #tryton
2014-05-05 11:27 -!- mariomop(~quassel@host46.186-125-147.telecom.net.ar) has joined #tryton
2014-05-05 11:50 -!- meanmicio(~lfm@230.Red-83-40-188.dynamicIP.rima-tde.net) has joined #tryton
2014-05-05 11:50 -!- meanmicio(~lfm@fsf/member/meanmicio) has joined #tryton
2014-05-05 11:57 <mar> I 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"/>
2014-05-05 11:57 <mar> can someone help me diagnose the problem?
2014-05-05 12:02 <pokoli> mar: you're referencing a view which doesn't exist in the current database
2014-05-05 12:02 <pokoli> mar: is [module_name] in the depends section of tryton.cfg of you're current module?
2014-05-05 12:02 <mar> it's inside the model
2014-05-05 12:02 <mar> module
2014-05-05 12:03 <grasbauer> mar: tahn you can leave the module name empty
2014-05-05 12:03 -!- bvo(~bruno@80.146.165.65) has joined #tryton
2014-05-05 12:03 <mar> do I need to run update or something?
2014-05-05 12:04 <mar> ok, update helped
2014-05-05 12:04 <pokoli> mar: yes, and refresh the view
2014-05-05 12:04 <mar> <mar> is there any fast way of testing changes to forms / lists without reloading everyting?
2014-05-05 12:05 <mar> and second question: how do I add adding functionality into "tree" (embedded in form), the "+" sign?
2014-05-05 12:06 <mar> grasbauer, I get *view_id.split('.')))
2014-05-05 12:06 <mar> TypeError: get_id() takes exactly 3 arguments (2 given) if I don't specify
2014-05-05 12:07 <cedk> grasbauer: no, in views module prefix is always required
2014-05-05 12:33 <mar> anyone? how do I add adding functionality into "tree" (embedded in form), the "+" sign?
2014-05-05 12:35 <cedk> mar: I guess: http://doc.tryton.org/3.2/trytond/doc/ref/models/fields.html?highlight=add_remove#trytond.model.fields.One2Many.add_remove
2014-05-05 12:36 <cedk> mar: but it is pretty rare to need this
2014-05-05 12:36 <mar> maybe I'm trying to do something wrong
2014-05-05 12:37 <mar> I have stock.move -> stock_move-invoice_line <- invoice.line
2014-05-05 12:37 <mar> I 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 created
2014-05-05 12:38 <mar> currently I display stock_move-invoice_line using tree view
2014-05-05 12:38 <cedk> mar: use a M2M
2014-05-05 12:39 <mar> can M2M have additional fields on relation?>
2014-05-05 12:39 -!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton
2014-05-05 12:40 <cedk> mar: don't understand
2014-05-05 12:41 <mar> my stock_move-invoice_line has additional fields like quantity, etc
2014-05-05 12:41 <cedk> mar: why? quantity is on move and line
2014-05-05 12:42 <mar> one Move can have multiple relations to one line
2014-05-05 12:42 <cedk> mar: and so what?
2014-05-05 12:43 <mar> so I need to save "split" quantity on relation
2014-05-05 12:43 <cedk> mar: by the way, what you are doing already exist with module account_invoice_stock
2014-05-05 12:45 <mar> something similar probably, but it doesn't meet my requirements :/
2014-05-05 12:46 <cedk> mar: quite strange
2014-05-05 12:48 <mar> so can Many2Many have additional fields on relation model?
2014-05-05 12:50 <cedk> mar: if you want to not accessible
2014-05-05 12:51 <cedk> mar: but I still persist that it is useless in this case
2014-05-05 12:52 <mar> it may be, I don't argue about that
2014-05-05 12:59 <pokoli> mar: can you expose your requirements? sometimes is usefull for others to help :)
2014-05-05 13:10 -!- sharoonthomas(~sharoonth@118.91.181.250) has joined #tryton
2014-05-05 13:16 <mar> my requirement is to calculate product cost_amount
2014-05-05 13:16 <mar> in anglosaxon style
2014-05-05 13:16 <mar> and there's a lot of custom functionality already, like custom FIFO, etc
2014-05-05 13:17 <mar> and landed costs (if the term is clear)
2014-05-05 13:17 <mar> and standart stock_anglosaxon module doesn't handle my case, and tryton is 2.8
2014-05-05 13:25 <mar> how can I change default add_remove functionality, and list invoice_lines instead of my relation and create relation on "add"
2014-05-05 13:27 <pokoli> mar: and you can not adapt stock_anglosaxon module to fit your case?
2014-05-05 13:27 <mar> pokoli, nope
2014-05-05 13:28 <mar> it basically just adds stuff that I don't need / use
2014-05-05 13:28 <pokoli> mar: don't understand the last question, bot tu show the add_remove functionality you only need to define a domain in the add_remove attribute
2014-05-05 13:28 <pokoli> mar: and this domain will apply to the add_remove functionality
2014-05-05 13:28 <pokoli> mar: which stuff?
2014-05-05 13:29 <mar> pokoli, add/remove adds existing entries (and I can limit what I can add with domain)
2014-05-05 13:30 <mar> but I don't have existing entries yet, I want to create entry from another model when I select it
2014-05-05 13:30 <pokoli> mar: you need to store the relation from the other model?
2014-05-05 13:31 <mar> I have stock.move -> stock_move-invoice_line <- invoice.line
2014-05-05 13:31 <mar> i'm editing stock.move
2014-05-05 13:32 <mar> i want to add invoice.line (create stock_move-invoice_line)
2014-05-05 13:33 <pokoli> mar: that's managed by the Many2Many field
2014-05-05 13:34 <mar> will M2M field handle additional fields on relation?
2014-05-05 13:45 <pokoli> mar: you can save it on the table but will not be accesible by the Many2Many widget
2014-05-05 13:46 <pokoli> mar: can you explain you you need diferent quantites on the relation that on the stock_move, invoice_line?
2014-05-05 13:48 <mar> because I need to save additional information in relation
2014-05-05 13:49 <mar> like quantity, landed_cost = true/false, etc
2014-05-05 13:49 <mar> I need quantity because one stock.move can have multiple relations into one invoice.line
2014-05-05 13:53 <pokoli> mar: sorry for my lag of knowledge, but what does landed_cost mean?
2014-05-05 13:53 <pokoli> mar: sure, but the sum the quantity of all the invoice_lines must be the quantity of the stock_moves, except those ignored/recreated
2014-05-05 13:54 <pokoli> mar: so maybe you can use invoice_line quantity instead of saving another
2014-05-05 13:54 <mar> there are some services, like transportation cost, that client wants to include into cost_amount of product
2014-05-05 13:55 <mar> and they call it "landed cost"
2014-05-05 13:55 <mar> and they can basacally associate any invoice like like that
2014-05-05 13:55 <mar> *invoice line
2014-05-05 13:58 <pokoli> mar: you use sale_shipment_cost module?
2014-05-05 13:59 <mar> pokoli, yes
2014-05-05 14:00 <mar> but shipment is just one of things they want to include into "landed cost"
2014-05-05 14:00 <pokoli> mar: and where you have stored all the other landed costs?
2014-05-05 14:00 <pokoli> related to moves?
2014-05-05 14:00 <mar> on relation between move and invoice_line
2014-05-05 14:02 <pokoli> mar: so it's manually added?
2014-05-05 14:02 <mar> yes
2014-05-05 14:02 <mar> i think so
2014-05-05 14:03 <pokoli> mar: so you can add it on and intermediate model, which has the relation with the invoice_line and the stock_move
2014-05-05 14:03 <mar> so my intermediate model is the relation between stock_move and invoice_line
2014-05-05 14:03 <pokoli> mar: and forget the Many2Many, and add a One2Many to the intermediate model, from invoices and from moves if you want
2014-05-05 14:04 <mar> but how can I add "invoices" into move?
2014-05-05 14:04 <mar> "invoice lines"
2014-05-05 14:04 <pokoli> mar: you cant, you only can add your intermediate model
2014-05-05 14:04 <pokoli> mar: which contain invoices, and the other information you need
2014-05-05 14:05 <mar> but I don't have the relation until I "join" it
2014-05-05 14:06 <pokoli> mar: don't understand
2014-05-05 14:19 -!- jeancavallo(~giovanni@bob75-9-88-181-2-176.fbx.proxad.net) has joined #tryton
2014-05-05 14:20 -!- sharoonthomas(~sharoonth@118.91.181.250) has joined #tryton
2014-05-05 14:43 -!- grasbauer(~jan@dslb-094-222-158-218.pools.arcor-ip.net) has joined #tryton
2014-05-05 14:46 -!- sharoonthomas(~sharoonth@118.91.181.250) has joined #tryton
2014-05-05 14:51 <mar> pokoli, I create stock_move-invoice_line when I select invoice_line
2014-05-05 14:51 <pokoli> mar: yes, so you can then add all the info you need on the internmediate model, just create a view for it
2014-05-05 15:24 <mar> pokoli, how to I attach it to One2Many field?
2014-05-05 15:24 <mar> I want One2Many List, click on "+", select invoice.line -> add -> create relation, close the window
2014-05-05 15:24 <mar> can I do it like that?
2014-05-05 15:25 <mar> or are you suggesting another way?
2014-05-05 15:33 <pokoli> mar: with the intermediate fields you must create a new record and select the invoice_line from there
2014-05-05 15:45 <mar> su you're suggesting workflow:
2014-05-05 15:45 <mar> "+" -> "New" -> select invoice -> save -> select?
2014-05-05 15:51 <mar> can I create my own widget?
2014-05-05 15:51 <pokoli> mar: sure you can create you're own widget, but i won't recomend it
2014-05-05 15:51 <pokoli> mar: as you will have to patch the client
2014-05-05 15:51 <mar> ok, bad idea
2014-05-05 15:52 <pokoli> mar: "New" -> select invoice -> fill aditional fields -> save
2014-05-05 15:52 <pokoli> mar: and you can also fill aditional fields by an on_change
2014-05-05 15:53 <mar> can I add like special button, which opens list and allows me to select invoice line?
2014-05-05 15:53 <mar> because I don't need additional fill steps, etc
2014-05-05 15:53 <mar> and I don't want to open empty lists
2014-05-05 15:56 <mar> or maybe I can override default "+" action to open invoice.lines instead of stock.move-invoice.line?
2014-05-05 16:26 -!- alisonken1lap3(~alisonken@18.18.ultimate-int.uia.net) has joined #tryton
2014-05-05 16:55 <pokoli> mar: you can add a wizard
2014-05-05 16:56 <pokoli> mar: and call the wizard from a button
2014-05-05 16:56 <mar> can I somehow print relation field from Many2Many?
2014-05-05 17:20 -!- mar(~marius@v100.nfq.lt) has joined #tryton
2014-05-05 17:22 <pokoli> mar: what do you want to print?
2014-05-05 17:54 -!- grasbauer(~jan@p54B9943C.dip0.t-ipconnect.de) has joined #tryton
2014-05-05 18:01 -!- Telesight(~anthony@77-175-159-159.FTTH.ispfabriek.nl) has joined #tryton
2014-05-05 18:26 -!- littlebit(~Thunderbi@ulmg-4d02296d.pool.mediaWays.net) has joined #tryton
2014-05-05 18:42 -!- littlebit(~Thunderbi@ulmg-4d02296d.pool.mediaWays.net) has joined #tryton
2014-05-05 18:55 -!- pobsteta(~Thunderbi@4cb54-3-88-160-87-54.fbx.proxad.net) has joined #tryton
2014-05-05 18:57 -!- LordVan(~lordvan@93.82.207.62) has joined #tryton
2014-05-05 18:57 -!- LordVan(~lordvan@gentoo/developer/LordVan) has joined #tryton
2014-05-05 18:57 -!- pablovannini(~pablo@host126.186-109-85.telecom.net.ar) has joined #tryton
2014-05-05 19:00 <mar> :/
2014-05-05 19:19 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2014-05-05 19:24 -!- grasbauer(~jan@p54B9943C.dip0.t-ipconnect.de) has joined #tryton
2014-05-05 20:20 <mar> how 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)
2014-05-05 20:20 <mar> when I try to save entry created from OneToMany relation
2014-05-05 20:20 <mar> there are missing fields quantity and internal_quantity that I specify and see in Form
2014-05-05 20:28 <cedk> mar: if they are readonly, they are not send
2014-05-05 20:28 <mar> how can I set read-only field values?
2014-05-05 20:29 <cedk> mar: it has no sense
2014-05-05 20:29 <mar> I currently set them in on_change
2014-05-05 20:29 <cedk> mar: then it is a function field
2014-05-05 20:29 <mar> but I want to "save"i t
2014-05-05 20:29 <mar> into db
2014-05-05 20:29 <mar> so that I can filter later
2014-05-05 20:29 <cedk> mar: it is a function field
2014-05-05 20:30 <cedk> mar: data the user don't input should not be stored as it is duplication
2014-05-05 20:31 <mar> will tryton save it into db if it's function field?
2014-05-05 20:31 <cedk> mar: no it is a function
2014-05-05 20:31 <mar> so I make it invisible and not readonly then?
2014-05-05 20:32 <cedk> mar: data the user don't input should not be stored as it is duplication
2014-05-05 20:33 <mar> what about cost price and other fields then? user doesn't edit those directly\
2014-05-05 20:39 <cedk> mar: yes they are writen by code
2014-05-05 20:39 <mar> so how do I do that?
2014-05-05 22:07 -!- nicoe(~nicoe@91.179.27.60) has joined #tryton
2014-05-05 23:02 -!- mar(~marius@84.240.20.35) has joined #tryton
2014-05-05 23:25 <mar> domain=[('origin', '=', Eval('stock_move.origin'))]
2014-05-05 23:25 <mar> how do I do this one correctly?
2014-05-05 23:26 <mar> Eval('stock_move.origin') evalues to u'' for some reason...
2014-05-05 23:54 -!- cjbarnes18(~craig@host109-157-158-41.range109-157.btcentralplus.com) has joined #tryton

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!