El 04/01/18 a les 18:13, 'Udo Spallek' via tryton-dev ha escrit: > Hi, > > Thu, 4 Jan 2018 15:31:45 +0100 > Sergi Almacellas Abellana <se...@koolpi.com>: >> El 04/01/18 a les 11:26, Cédric Krier ha escrit: >>> In general, I think it is the wrong way to implement a discount. The >>> discount should modify the unit price. > > Is this in general your proposal? > > On sale.line/invoice.line, if there is a product, it has a list price. > We can calculate the percentage between product list price and line unit > price as line discount. > When changing unit price value the discount to the product list_price > is re-calculated. > When changing discount value, the unit price is re-calculated from > product list_price. > As an exception the unit price also can be an individual amount if > there is no product given. Without a product, there is no discount, > the discount field becomes invisible.
Moreless. Probably the discount can be a functional field which should update the unit_price. But this will be better discusses as a blueprint on https://discuss.tryton.org/ -- Sergi Almacellas Abellana www.koolpi.com Twitter: @pokoli_srk -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/bed9d94f-6276-ea30-d20b-f3cd680db019%40koolpi.com.