Hi,
Le 11 mai 2011 à 21:27, Nicolas Évrard a écrit :
> What you could do it the following:
>
> - add a boolean field that mark the line as free
> - override the function field of sale.line ('get_amount' I think)
> that when this boolean field is ticked will return 0
> - I guess that for purchase line, it will work the same way
I proposed myself to try to solve this issue.
Would it be an acceptable solution :
— add a boolean "Givable" on product to tell it can be given for free
— add a "Free" checkbox next to the list_price field on the sale_line_view_form
— set unit_price to 0.0 when "Free" checkbox is checked on the
sale_line_view_form
— set unit_price to readonly state when "Free" checkbox is checked on the
sale_line_view_form
— change SaleLine required state for unit_price to accept a 0.0 value when
"Free" checkbox is checked
Jean-Christophe Michel
--
Symétrie
livres et partitions, édition multimédia
30 rue Jean-Baptiste Say
69001 LYON (FRANCE)
tél +33 (0)478 29 52 14
fax +33 (0)478 30 01 11
web www.symetrie.com
--
[email protected] mailing list