mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
quality_control_*: Make use of qty field
Making it a regular field, you can put any manual quantity in inspections
This commit is contained in:
committed by
lreficent
parent
38f40c80d4
commit
7b73721879
@@ -6,7 +6,7 @@
|
||||
|
||||
{
|
||||
"name": "Quality control",
|
||||
"version": "8.0.1.0.0",
|
||||
"version": "8.0.1.1.0",
|
||||
"category": "Quality control",
|
||||
"license": "AGPL-3",
|
||||
"author": "OdooMRP team, "
|
||||
|
||||
@@ -28,11 +28,6 @@ class QcInspection(models.Model):
|
||||
else:
|
||||
self.product = False
|
||||
|
||||
@api.one
|
||||
@api.depends('object_id')
|
||||
def _get_qty(self):
|
||||
self.qty = 1.0
|
||||
|
||||
name = fields.Char(
|
||||
string='Inspection number', required=True, default='/', select=True,
|
||||
readonly=True, states={'draft': [('readonly', False)]}, copy=False)
|
||||
@@ -46,7 +41,7 @@ class QcInspection(models.Model):
|
||||
product = fields.Many2one(
|
||||
comodel_name="product.product", compute="_get_product", store=True,
|
||||
help="Product associated with the inspection")
|
||||
qty = fields.Float(string="Quantity", compute="_get_qty", store=True)
|
||||
qty = fields.Float(string="Quantity", default=1.0)
|
||||
test = fields.Many2one(
|
||||
comodel_name='qc.test', string='Test', readonly=True, select=True)
|
||||
inspection_lines = fields.One2many(
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
<field name="test" />
|
||||
<field name="user" />
|
||||
<field name="object_id" />
|
||||
<field name="qty" />
|
||||
<field name="product" />
|
||||
</group>
|
||||
<group>
|
||||
@@ -112,6 +113,7 @@
|
||||
<field name="name" />
|
||||
<field name="user" />
|
||||
<field name="test" />
|
||||
<field name="qty" />
|
||||
<field name="product" />
|
||||
<field name="success" />
|
||||
<field name="state" />
|
||||
|
||||
Reference in New Issue
Block a user