El 25/07/14 a les 18:42, Guillem Barba Domingo ha escrit:
Another (provably better) option is that "generic getter/setter" get
the domain to apply to find product.template.company instance from a
function. By default it search by record+company but
"product_cost_by_warehouse" extend it to search also by warehouse.
We can use the same method as product_by_location uses to dinamically
define the grouping, so you can group by company, company/warehouse,
whatever field you want.
I think 95% of cases fit perfect with generic getter/setter and have a
mixin reduces a lot the code of modules. If we think a little bit the
design we can find a good solution for the rest 5%.
IMHO, of course
Agree on this. Also if you need custom specific stuff, you can override
the getter/setter, as proposed by Guillem.
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk