mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[12.0][MIG] quality_control_issue
This commit is contained in:
@@ -74,7 +74,7 @@ class QualityControlIssue(models.Model):
|
||||
readonly=True, states={"new": [("readonly", False)]},
|
||||
digits=dp.get_precision("Product Unit of Measure"))
|
||||
product_uom = fields.Many2one(
|
||||
comodel_name="product.uom", string="Product Unit of Measure",
|
||||
comodel_name="uom.uom", string="Product Unit of Measure",
|
||||
default=_get_uom, required=True, readonly=True,
|
||||
states={"new": [("readonly", False)]})
|
||||
lot_id = fields.Many2one(
|
||||
|
||||
@@ -14,6 +14,7 @@ AVAILABLE_PRIORITIES = [
|
||||
|
||||
class QualityControlIssueStage(models.Model):
|
||||
_name = "qc.issue.stage"
|
||||
_description = "Quality Control Issue Stage"
|
||||
_rec_name = 'name'
|
||||
_order = "sequence, name, id"
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ class QcProblem(models.Model):
|
||||
_name = "qc.problem"
|
||||
_description = "Quality Control Problem Tracking"
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
_order = "priority desc, id desc"
|
||||
|
||||
def _get_default_stage_id(self):
|
||||
""" Gives default stage_id """
|
||||
@@ -56,7 +57,11 @@ class QcProblem(models.Model):
|
||||
string="Issues", compute=_compute_count, store=True)
|
||||
color = fields.Integer(string='Color Index')
|
||||
priority = fields.Selection(
|
||||
selection=AVAILABLE_PRIORITIES, string='Rating', index=True)
|
||||
selection=AVAILABLE_PRIORITIES,
|
||||
default="0",
|
||||
string="Rating",
|
||||
index=True,
|
||||
)
|
||||
stage_id = fields.Many2one(
|
||||
comodel_name="qc.stage", string='Stage',
|
||||
track_visibility='onchange',
|
||||
|
||||
@@ -14,6 +14,7 @@ AVAILABLE_PRIORITIES = [
|
||||
|
||||
class QualityControlStage(models.Model):
|
||||
_name = "qc.stage"
|
||||
_description = "Quality Control Stage"
|
||||
_rec_name = 'name'
|
||||
_order = "sequence, name, id"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user