On 2016-08-25 10:22, Sergi Almacellas Abellana wrote: > El 25/08/16 a les 10:02, Jesús Martín Jiménez ha escrit: > >Hi, > > > >I'm testing a customized module and I run into an issue I'm not sure how > >to resolve. My module has an extras_depend of stock_lot and an on_change > >method for lot field. It works well, but when I try to pass the unittest > >test, it fails with this traceback [1]. I'm not sure if it is a bug or > >the desired behavior. > > For me is the expected behavior if you define the on_change_lot method when > the stock_lot module is not installed. > > That can be solved by defining the on_change only if the stock_lot module is > installed, which can be done on the __setup__ method of the class.
This is not very elegant. Indeed I think it will be better to install the extra_depends in the setupClass. -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] 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/20160825094107.GA12158%40tetsuo.
