openerp-community team mailing list archive
Mailing list archive
Re: how to make module depends on sales discount ?
On 12/06/14 17:54, Mohamed M. Hagag wrote:
is this doable from the __openerp__.py depends field or i have to make a
module config_settings.py and write the code to activate sale discount ?
I think to talk about the option "Allow setting a discount on the sales
If yes, if I don't say a mistake, the action of "activate" the option
"Allow setting a discount on the sales order lines" do only one thing :
Tick the checkbox 'Discout on lines' on users form − Technically, this
action set all users in the 'Technical Settings / Discount on lines'
So the only thing you must do is to put 'sale' module in 'depends'
statement on __openerp__.py and play with 'res.groups' in your module.
If the user is not in the 'Technical Settings / Discount on lines' group
(sale.group_discount_per_so_line), don't display feature of your module.
20, Avenue de la paix
Tel : +33 3 88 56 82 18
Fax : +33 9 70 63 35 46