add field allow pricing manual

This commit is contained in:
wilson gomez 2021-10-27 14:24:48 -05:00
parent 294afae0e0
commit 14057cdee6
2 changed files with 9 additions and 3 deletions

View File

@ -127,7 +127,7 @@ class Sale(metaclass=PoolMeta):
'currency': ctx['currency'],
}
price_list_id = None
price_list = args.get('price_list')
price_list = args.get('price_list', None)
if price_list:
price_list_id = price_list['id']
context['price_list'] = price_list_id
@ -300,6 +300,7 @@ class AppSaleOrder(ModelSQL, ModelView):
company = fields.Many2One('company.company', 'Company', required=True)
allow_discount = fields.Boolean('Allow Discount')
allow_manual_pricing = fields.Boolean('Allow Manual Pricing', help='Allow manual pricing to user')
@classmethod
def __setup__(cls):

View File

@ -4,6 +4,11 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
<form>
<label name="company"/>
<field name="company" widget="selection"/>
<label name="allow_discount"/>
<field name="allow_discount" />
<group id="checkbox" colspan="2">
<label name="allow_discount"/>
<field name="allow_discount" xexpand="0" width="25"/>
<label name="allow_manual_pricing"/>
<field name="allow_manual_pricing" xexpand="0" width="25"/>
</group>
</form>