From df57833872952991beb9ab3e15b92580b711d1f5 Mon Sep 17 00:00:00 2001 From: Quentin Dupont Date: Fri, 2 Feb 2024 10:37:06 +0100 Subject: [PATCH] [IMP] mrp_bom_widget_section_and_note_one2many: apply pre-commit auto fixes --- .../__manifest__.py | 3 +- .../models/mrp_bom_line.py | 15 +-- .../views/view_mrp_bom.xml | 92 +++++++++++++++---- .../mrp_bom_widget_section_and_note_one2many | 1 + .../setup.py | 6 ++ 5 files changed, 89 insertions(+), 28 deletions(-) create mode 120000 setup/mrp_bom_widget_section_and_note_one2many/odoo/addons/mrp_bom_widget_section_and_note_one2many create mode 100644 setup/mrp_bom_widget_section_and_note_one2many/setup.py diff --git a/mrp_bom_widget_section_and_note_one2many/__manifest__.py b/mrp_bom_widget_section_and_note_one2many/__manifest__.py index 6cb367bf7..0c87c39f4 100644 --- a/mrp_bom_widget_section_and_note_one2many/__manifest__.py +++ b/mrp_bom_widget_section_and_note_one2many/__manifest__.py @@ -8,8 +8,7 @@ "summary": "Add section and note in Bills of Materials", "version": "12.0.1.1.0", "category": "Manufacturing/Manufacturing", - "author": "GRAP," - "Odoo Community Association (OCA)", + "author": "GRAP," "Odoo Community Association (OCA)", "website": "https://github.com/OCA/manufacture", "license": "AGPL-3", "depends": [ diff --git a/mrp_bom_widget_section_and_note_one2many/models/mrp_bom_line.py b/mrp_bom_widget_section_and_note_one2many/models/mrp_bom_line.py index bba6370fe..df851ed5b 100644 --- a/mrp_bom_widget_section_and_note_one2many/models/mrp_bom_line.py +++ b/mrp_bom_widget_section_and_note_one2many/models/mrp_bom_line.py @@ -22,12 +22,15 @@ class MrpBomLine(models.Model): ) _sql_constraints = [ - ('bom_required_fields', + ( + "bom_required_fields", "CHECK(display_type IS NOT NULL OR" "(product_id IS NOT NULL AND product_qty IS NOT NULL))", - "Missing required fields on bom line."), - ('non_bom_null_fields', - "CHECK(display_type IS NULL OR" - "(product_id IS NULL AND product_qty = 1))", - "Forbidden values on note and section bom line"), + "Missing required fields on bom line.", + ), + ( + "non_bom_null_fields", + "CHECK(display_type IS NULL OR" "(product_id IS NULL AND product_qty = 1))", + "Forbidden values on note and section bom line", + ), ] diff --git a/mrp_bom_widget_section_and_note_one2many/views/view_mrp_bom.xml b/mrp_bom_widget_section_and_note_one2many/views/view_mrp_bom.xml index 757e97a8b..7477436d2 100644 --- a/mrp_bom_widget_section_and_note_one2many/views/view_mrp_bom.xml +++ b/mrp_bom_widget_section_and_note_one2many/views/view_mrp_bom.xml @@ -1,4 +1,4 @@ - + - + - - - + + + - - - - - -