On 17 Jan 2015 18:05, "NotZippy" <[email protected]> wrote: > > Hi > > This topic was touched in a very long thread here https://groups.google.com/forum/#!msg/tryton/MgFedysKKFQ/20jh4pAXgMIJ specifically the message from Cédric Krier > > I don't think list price should be moved to variant but more the > possibility to add an extra per variant. And this is very, very easy to > do now because the design was thought for that. > > How might this be implemented, so that existing modules respect this ? >From what I can see the sales module calls Product.get_sale_price, which pulls the price from product.list_price, how can that be changed or intercepted ?
It seems the most logical place would be to make a module to override Product.get_sale_price. The sale price can be altered from the product.list_price for various reasons, and that is probably where it is best done perhaps? It could be done in sales but you might want a sale prices outside the context of a sale, for example when generating product pages of an online store. Even if I define an attribute list_price and assign it to the product it is ignored and the product template attribute is returned. > > Any clarification would be appreciated.. > > thanks > Nz
