Repository
OCA/manufacture · module folder · Try on Runboat
Module version
1.0.0
Category
Quality Control
Folder size
3.85 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/manufacture
Last tracking update
2026-08-07 09:06:24
Authors
Odoo Community Association (OCA), AvanzOSC, Tecnativa
Maintainers
Odoo Community Association (OCA), AvanzOSC, Tecnativa
Committers
Weblate, OCA-git-bot, oca-ci, Hotdgo9
Odoo dependencies
odoo/odoo:
- web
- bus
- uom
Python dependencies
None
System dependencies
None
Required by
None
Description
This module provides a generic infrastructure for quality tests. The
idea is that it can be later reused for doing quality inspections on
production lots or any other area of the company.

Code Analysis

Views touched (16)
XML IDNameModelTypeStatus
product_category_qc_form_view product.category.qc product.category form Inherits product.product_category_form_view
product_template_form_view product.template.common.qc product.template form Inherits product.product_template_form_view
qc_inspection_form_view qc.inspection.form qc.inspection form New
qc_inspection_kanban_view qc.inspection.kanban qc.inspection kanban New
qc_inspection_line_kanban_view qc.inspection.line.kanban qc.inspection.line kanban New
qc_inspection_line_search_view qc.inspection.line.search qc.inspection.line search New
qc_inspection_line_tree_view qc.inspection.line.list qc.inspection.line list New
qc_inspection_search_view qc.inspection.search qc.inspection search New
qc_inspection_tree_view qc.inspection.list qc.inspection list New
qc_test_category_tree_view qc.test.category.list qc.test.category list New
qc_test_form_view qc.test.form qc.test form New
qc_test_question_form_view qc.test.question.form qc.test.question form New
qc_test_tree_view qc.test.list qc.test list New
qc_trigger_form_view qc.trigger.form qc.trigger form New
qc_trigger_tree_view qc.trigger.list qc.trigger list New
view_qc_test_set_test_form qc.inspection.set.test.form qc.inspection.set.test form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (15)

New fields (1)
  • qc_triggers One2many → qc.trigger.product_category_line
    comodel_name='qc.trigger.product_category_line' inverse_name='product_category' string='Quality control triggers'
Public methods (0)

No public methods.

New fields (1)
  • qc_triggers One2many → qc.trigger.product_line
    comodel_name='qc.trigger.product_line' inverse_name='product' string='Quality control triggers'
Public methods (0)

No public methods.

New fields (1)
  • qc_triggers One2many → qc.trigger.product_template_line
    comodel_name='qc.trigger.product_template_line' inverse_name='product_template' string='Quality control triggers'
Public methods (0)

No public methods.

New fields (15)
  • auto_generated Boolean
    copy=False help='If an inspection is auto-generated, it can be canceled but not removed.' string='Auto-generated'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> string='Company'
  • date Datetime
    copy=False default=fields.Datetime.now required=True string='Plan Date'
  • date_done Datetime
    readonly=True args: 'Completion Date'
  • external_notes Text
  • inspection_lines One2many → qc.inspection.line
    comodel_name='qc.inspection.line' inverse_name='inspection_id'
  • internal_notes Text
    string='Internal notes'
  • name Char
    copy=False default='/' required=True string='Inspection number'
  • object_id Reference
    ondelete='set null' selection='object_selection_values' string='Reference'
  • product_id Many2one → product.product
    comodel_name='product.product' compute='_compute_product_id' help='Product associated with the inspection' store=True
  • qty Float
    default=1.0 string='Quantity'
  • state Selection
    default='draft' tracking=True args: [('plan', 'Plan'), ('draft', 'Draft'), ('ready', 'Ready'), ('waiting', 'Waiting supervisor approval'), ('success', 'Quality success'), ('failed', 'Quality failed'), ('canceled', 'Canceled')]
  • success Boolean
    compute='_compute_success' help='This field will be marked if all tests have succeeded.' store=True
  • test Many2one → qc.test
    comodel_name='qc.test'
  • user Many2one → res.users
    comodel_name='res.users' default=<expr> string='Responsible' tracking=True
Public methods (9)
  • action_approve(self)
  • action_cancel(self)
  • action_confirm(self)
  • action_draft(self)
  • action_todo(self)
  • create(self, vals_list)
    @api.model_create_multi
  • object_selection_values(self)
    Overridable method for adding more object models to an inspection. :return: A list with the selection's possible values.
  • set_test(self, trigger_line, force_fill=False)
  • write(self, vals)

New fields (16)
  • inspection_id Many2one → qc.inspection
    comodel_name='qc.inspection' ondelete='cascade' string='Inspection'
  • max_value Float
    digits='Quality Control' help='Maximum valid value for a quantitative question.' string='Max'
  • min_value Float
    digits='Quality Control' help='Minimum valid value for a quantitative question.' string='Min'
  • name Char
    string='Question'
  • notes Text
  • possible_ql_values Many2many → qc.test.question.value
    comodel_name='qc.test.question.value' string='Answers'
  • product_id Many2one → product.product
    comodel_name='product.product' related='inspection_id.product_id' store=True
  • qualitative_value Many2one → qc.test.question.value
    comodel_name='qc.test.question.value' domain="[('id', 'in', possible_ql_values)]" help='Value of the result for a qualitative question.' string='Qualitative value'
  • quantitative_value Float
    digits='Quality Control' help='Value of the result for a quantitative question.' string='Quantitative value'
  • question_type Selection
    args: [('qualitative', 'Qualitative'), ('quantitative', 'Quantitative')]
  • success Boolean
    compute='_compute_quality_test_check' store=True string='Success?'
  • test_line Many2one → qc.test.question
    comodel_name='qc.test.question' string='Test question'
  • test_uom_category Many2one → uom.uom
    comodel_name='uom.uom' compute='_compute_test_uom_category' help="Root unit of the test UoM's family. Used to constrain the inspection UoM choice to units in the same measurement family. In Odoo 19, uom.category was removed in favor of a self-referential uom.uom tree via relative_uom_id; the root unit now serves as the implicit category." store=True string='Test UoM Reference'
  • test_uom_id Many2one → uom.uom
    comodel_name='uom.uom' help='UoM for minimum and maximum values for a quantitative question.' string='Test UoM'
  • uom_id Many2one → uom.uom
    comodel_name='uom.uom' domain="[('id', 'child_of', test_uom_category)]" help='UoM of the inspection value for a quantitative question.' string='UoM'
  • valid_values Char
    compute='_compute_valid_values' store=True string='Valid values'
Public methods (0)

No public methods.

New fields (1)
  • test Many2one → qc.test
    comodel_name='qc.test'
Public methods (1)
  • action_create_test(self)

New fields (6)
  • active Boolean
    default=True
  • category Many2one → qc.test.category
    comodel_name='qc.test.category'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr>
  • fill_correct_values Boolean
    string='Pre-fill with correct values'
  • name Char
    required=True translate=True
  • test_lines One2many → qc.test.question
    comodel_name='qc.test.question' copy=True inverse_name='test' string='Questions'
Public methods (0)

No public methods.

New fields (5)
  • active Boolean
    default=True help='This field allows you to hide the category without removing it.'
  • child_ids One2many → qc.test.category
    comodel_name='qc.test.category' inverse_name='parent_id' string='Child categories'
  • complete_name Char
    compute='_compute_get_complete_name' string='Full name'
  • name Char
    required=True translate=True
  • parent_id Many2one → qc.test.category
    comodel_name='qc.test.category' string='Parent category'
Public methods (0)

No public methods.

New fields (9)
  • max_value Float
    digits='Quality Control' string='Max'
  • min_value Float
    digits='Quality Control' string='Min'
  • name Char
    required=True translate=True
  • notes Text
  • ql_values One2many → qc.test.question.value
    comodel_name='qc.test.question.value' copy=True inverse_name='test_line' string='Qualitative values'
  • sequence Integer
    default='10' required=True
  • test Many2one → qc.test
    comodel_name='qc.test'
  • type Selection
    required=True args: [('qualitative', 'Qualitative'), ('quantitative', 'Quantitative')]
  • uom_id Many2one → uom.uom
    comodel_name='uom.uom' string='Uom'
Public methods (0)

No public methods.

New fields (3)
  • name Char
    required=True translate=True
  • ok Boolean
    help='When this field is marked, the answer is considered correct.' string='Correct answer?'
  • test_line Many2one → qc.test.question
    comodel_name='qc.test.question' string='Test question'
Public methods (0)

No public methods.

New fields (4)
  • active Boolean
    default=True
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> string='Company'
  • name Char
    required=True translate=True
  • partner_selectable Boolean
    default=False help='This technical field is to allow to filter by partner in triggers' string='Selectable by partner'
Public methods (0)

No public methods.

New fields (5)
  • partners Many2many → res.partner
    comodel_name='res.partner' domain="[('parent_id', '=', False)]" help='If filled, the test will only be created when the action is done for one of the specified partners. If empty, the test will always be created.'
  • test Many2one → qc.test
    comodel_name='qc.test' required=True
  • timing Selection
    default='after' help='* Before: An executable inspection is generated before the record related to the trigger is completed (e.g. when picking is confirmed).\n* After: An executable inspection is generated when the record related to the trigger is completed (e.g. when picking is done).\n* Plan Ahead: A non-executable inspection is generated before the record related to the trigger is completed (e.g. when picking is confirmed), and the inspection becomes executable when the record related to the trigger is completed (e.g. when picking is done).' selection=[('before', 'Before'), ('after', 'After'), ('plan_ahead', 'Plan Ahead')]
  • trigger Many2one → qc.trigger
    comodel_name='qc.trigger' required=True
  • user Many2one → res.users
    comodel_name='res.users' default=<expr> string='Responsible' tracking=True
Public methods (1)
  • get_trigger_line_for_product(self, trigger, timings, product, partner=False)
    Overridable method for getting trigger_line associated to a product. Each inherited model will complete this module to make the search by product, template or category. :param trigger: Trigger instance. :param product: Product instance. :return: Set of trigger_lines that matches to the given product and trigger.

New fields (1)
  • product_category Many2one → product.category
    comodel_name='product.category'
Public methods (1)
  • get_trigger_line_for_product(self, trigger, timings, product, partner=False)

New fields (1)
  • product Many2one → product.product
    comodel_name='product.product'
Public methods (1)
  • get_trigger_line_for_product(self, trigger, timings, product, partner=False)

New fields (1)
  • product_template Many2one → product.template
    comodel_name='product.template'
Public methods (1)
  • get_trigger_line_for_product(self, trigger, timings, product, partner=False)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…