On 24 Jul 18:22, Guillem Barba Domingo wrote: > Hi, > > it's known that there is in the roadmap to remove "ir.property" from Tryton. > > To be prepared for this change, which we strongly endorse, NaN·tic and > ZikZakMedia have started to implement company dependant values as > Functional fields which get the value from auxiliar model. > > You can find an example of company dependant configuration field here [1] > and company dependant party field (as example of instanciable model) here > [2]. > You can see that getter and setter could be generalized, and if two modules > need to add "company related" fields to the same model we will have > repeated code and, maybe, some issues because of define twice (or more > times) the same model/field. > > For these reason, I propose that company module provide some Mixin and > other "infraestructure" to avoid duplicate code. You can find a PoC of > Mixin I propose here [3] and example that use it it here [4]. > > I also think that models to store "company dependant" fields should be > provided by core modules (I'm talking about "product.category.company" in > [4]). > > What do you think?
I think there is no need of mixin. Indeed using a mixin will just reproduce the same issue as for Property field. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/
pgpf02cCS4r3p.pgp
Description: PGP signature