On 2016-07-06 03:21, Maxime Richez wrote: > > > > > > > I do not understand. The context inside the execution of > > get_purchase_price stays the same. So what do you name "previous > > context"? > > > > i mean, inside the method get_purchase_price, the method get_pattern from > ProductSupplierPrice is called. Has the method get_pattern the same > context ? because when try to get 'purchase_date' from the context, it > doesn't seems to find the variable.
Yes calls inside a method get the same context (except if Transaction.set_context is called). > have i choose the best way (see my code) using get_pattern and surcharging > "match" method for returning a product supplier price between 2 dates ? Yes I think. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/20160706103309.GD4037%40tetsuo.