Make consumption quantity required

It is needed to compute the quantity to invoice.

issue10138
review341981002
This commit is contained in:
Cédric Krier
2021-04-11 18:33:47 +02:00
parent 7de8dead4c
commit 3b07aa17bb
3 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -869,7 +869,7 @@ class LineConsumption(ModelSQL, ModelView):
'sale.subscription.line', "Line", required=True, select=True,
ondelete='RESTRICT')
quantity = fields.Float(
"Quantity", digits=(16, Eval('unit_digits', 2)),
"Quantity", digits=(16, Eval('unit_digits', 2)), required=True,
depends=['unit_digits'])
unit_digits = fields.Function(
fields.Integer("Unit Digits"), 'on_change_with_unit_digits')
@@ -6,6 +6,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="line"/>
<label name="date"/>
<field name="date"/>
<label name="quantity"/>
<field name="quantity"/>
<label name="invoice_line"/>
<field name="invoice_line"/>
</form>
@@ -4,5 +4,6 @@ this repository contains the full copyright notices and license terms. -->
<tree>
<field name="line" expand="1"/>
<field name="date"/>
<field name="quantity"/>
<field name="invoice_line" expand="1"/>
</tree>