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:
Cédric Krier
2015-03-19 11:58:29 +01:00
parent 8c1a7e7894
commit bf59bf5cdd
3 changed files with 5 additions and 0 deletions
+1
View File
@@ -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',
+3
View File
@@ -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"
+1
View File
@@ -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>