← Back to team overview

openerp-community team 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 ?

Hello Mohamed,

I think to talk about the option "Allow setting a discount on the sales order lines".

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' (sale.group_discount_per_so_line) group.

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.

Regards,
--
Quentin THEURET

TeMPO Consulting
20, Avenue de la paix
67000 Strasbourg
France

http://www.tempo-consulting.fr
Tel : +33 3 88 56 82 18
Fax : +33 9 70 63 35 46


Follow ups

References