Add active field on extra
As the sale extra lines can not be deleted once linked to a sale line, there should be a way to deactivate a sale extra. issue4649 review8031002
This commit is contained in:
@@ -55,6 +55,7 @@ class SaleExtra(ModelSQL, ModelView, MatchMixin):
|
||||
__name__ = 'sale.extra'
|
||||
|
||||
name = fields.Char('Name', translate=True, required=True)
|
||||
active = fields.Boolean('Active')
|
||||
price_list = fields.Many2One('product.price_list', 'Price List',
|
||||
required=True, ondelete='CASCADE')
|
||||
sale_amount = fields.Numeric('Sale Amount',
|
||||
|
||||
@@ -4,8 +4,11 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<form string="Extra">
|
||||
<label name="name"/>
|
||||
<field name="name"/>
|
||||
<label name="active"/>
|
||||
<field name="active"/>
|
||||
<label name="price_list"/>
|
||||
<field name="price_list"/>
|
||||
<newline/>
|
||||
<label name="sale_amount"/>
|
||||
<field name="sale_amount"/>
|
||||
<field name="lines" colspan="4"
|
||||
|
||||
@@ -5,4 +5,5 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="price_list"/>
|
||||
<field name="name"/>
|
||||
<field name="sale_amount"/>
|
||||
<field name="active" tree_invisible="1"/>
|
||||
</tree>
|
||||
|
||||
Reference in New Issue
Block a user