From 88548045c57f7a24bde0d0e16a07d75660bf4b6c Mon Sep 17 00:00:00 2001 From: yostashiro Date: Thu, 9 Jul 2026 08:21:33 +0000 Subject: [PATCH 01/13] [ADD] nif: master data and field extensions for Navi in Flow integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the Navi in Flow (ナビフロー) module, an all-in-one home for the product- and (later) partner-side master data and field extensions exchanged with the CIAS system. It provides a dedicated Navi in Flow app menu so configuration lives in one place instead of scattered under Inventory settings. Currently included: - equipment classification (機器分類) and sub-classification (機器分類サブ), seeded with HOT / Concentrator, CPAP, HIT and Other (Auxiliary Device) - manufacturer (メーカー) master - product flags is_equipment / is_consumable (mutually exclusive) and their many2one links, shown in a Navi in Flow tab on the product form Configuration is maintained by admins (base.group_system); all users have read access so the classifications/manufacturer render on products. task-6976 --- nif/README.rst | 114 +++++ nif/__init__.py | 1 + nif/__manifest__.py | 24 + .../product_equipment_classification_data.xml | 31 ++ nif/models/__init__.py | 4 + .../product_equipment_classification.py | 22 + .../product_equipment_classification_sub.py | 22 + nif/models/product_manufacturer.py | 22 + nif/models/product_template.py | 34 ++ nif/pyproject.toml | 3 + nif/readme/DESCRIPTION.md | 29 ++ nif/readme/USAGE.md | 14 + nif/security/ir.model.access.csv | 7 + nif/static/description/icon.png | Bin 0 -> 12148 bytes nif/static/description/index.html | 460 ++++++++++++++++++ nif/tests/__init__.py | 1 + .../test_product_equipment_classification.py | 64 +++ nif/views/nif_menus.xml | 16 + ...uct_equipment_classification_sub_views.xml | 72 +++ ...product_equipment_classification_views.xml | 69 +++ nif/views/product_manufacturer_views.xml | 69 +++ nif/views/product_template_views.xml | 52 ++ 22 files changed, 1130 insertions(+) create mode 100644 nif/README.rst create mode 100644 nif/__init__.py create mode 100644 nif/__manifest__.py create mode 100644 nif/data/product_equipment_classification_data.xml create mode 100644 nif/models/__init__.py create mode 100644 nif/models/product_equipment_classification.py create mode 100644 nif/models/product_equipment_classification_sub.py create mode 100644 nif/models/product_manufacturer.py create mode 100644 nif/models/product_template.py create mode 100644 nif/pyproject.toml create mode 100644 nif/readme/DESCRIPTION.md create mode 100644 nif/readme/USAGE.md create mode 100644 nif/security/ir.model.access.csv create mode 100644 nif/static/description/icon.png create mode 100644 nif/static/description/index.html create mode 100644 nif/tests/__init__.py create mode 100644 nif/tests/test_product_equipment_classification.py create mode 100644 nif/views/nif_menus.xml create mode 100644 nif/views/product_equipment_classification_sub_views.xml create mode 100644 nif/views/product_equipment_classification_views.xml create mode 100644 nif/views/product_manufacturer_views.xml create mode 100644 nif/views/product_template_views.xml diff --git a/nif/README.rst b/nif/README.rst new file mode 100644 index 0000000..33b8db7 --- /dev/null +++ b/nif/README.rst @@ -0,0 +1,114 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +============ +Navi in Flow +============ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:4fad83f057a677f06eac7c90c9ccb17ba9dd3c19772fdee590e3047e5e52a157 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-qrtl%2FOCJ Custom-lightgray.png?logo=github + :target: https://github.com/qrtl/OCJ Custom/tree/19.0/nif + :alt: qrtl/OCJ Custom + +|badge1| |badge2| |badge3| + +This module holds the product-side field extensions required by the +**Navi in Flow** (ナビフロー) integration, through which +product/equipment master data is exchanged with the CIAS system. + +It is intended as the single place to collect Navi in Flow related +fields on products as the integration grows. + +Each product can be flagged as **equipment** or **consumable** (the two +flags are mutually exclusive) and linked to a **Manufacturer** +(メーカー). + +When a product is flagged as equipment, it can additionally be given the +following two classification axes: + +- **Equipment Classification** (機器分類) — the primary classification + of a device, used as an important input for the Navi in Flow logic. +- **Equipment Sub-Classification** (機器分類サブ) — used to classify + auxiliary devices. + +The manufacturer and each classification axis are backed by dedicated, +user-maintainable models (``product.manufacturer``, +``product.equipment.classification`` and +``product.equipment.classification.sub``) holding a name and an optional +code (a numeric code is preferred for integration with external +systems). Each product can be linked to one manufacturer, one +classification and one sub-classification. + +The module ships the models and the configuration UI but no predefined +records, so the taxonomy can be tailored to each deployment (for example +through a company-specific data module or the external integration). + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To maintain the available classifications: + +1. Go to *Inventory > Configuration > Equipment Classifications* (or + *Equipment Sub-Classifications*). +2. Create the entries with a name and, preferably, a numeric code. + +To classify a product: + +1. Open a product. +2. In the *General Information* tab, select the **Equipment + Classification** and **Equipment Sub-Classification**. + +Products can be searched and filtered by either classification from the +product list view. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Quartile + +Maintainers +----------- + +.. |maintainer-yostashiro| image:: https://github.com/yostashiro.png?size=40px + :target: https://github.com/yostashiro + :alt: yostashiro + +Current maintainer: + +|maintainer-yostashiro| + +This module is part of the `qrtl/OCJ Custom `_ project on GitHub. + +You are welcome to contribute. diff --git a/nif/__init__.py b/nif/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/nif/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/nif/__manifest__.py b/nif/__manifest__.py new file mode 100644 index 0000000..a70e2d9 --- /dev/null +++ b/nif/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). +{ + "name": "Navi in Flow", + "version": "19.0.1.0.0", + "category": "Inventory/Inventory", + "website": "https://www.quartile.co", + "author": "Quartile", + "maintainers": ["yostashiro"], + "license": "LGPL-3", + "summary": "Master data and field extensions for the Navi in Flow integration", + "installable": True, + "application": True, + "depends": ["stock"], + "data": [ + "security/ir.model.access.csv", + "data/product_equipment_classification_data.xml", + "views/nif_menus.xml", + "views/product_equipment_classification_views.xml", + "views/product_equipment_classification_sub_views.xml", + "views/product_manufacturer_views.xml", + "views/product_template_views.xml", + ], +} diff --git a/nif/data/product_equipment_classification_data.xml b/nif/data/product_equipment_classification_data.xml new file mode 100644 index 0000000..97ed5d6 --- /dev/null +++ b/nif/data/product_equipment_classification_data.xml @@ -0,0 +1,31 @@ + + + + HOT / Concentrator + 10 + + + CPAP + 20 + + + HIT + 30 + + + Other (Auxiliary Device) + 40 + + diff --git a/nif/models/__init__.py b/nif/models/__init__.py new file mode 100644 index 0000000..649bc11 --- /dev/null +++ b/nif/models/__init__.py @@ -0,0 +1,4 @@ +from . import product_equipment_classification +from . import product_equipment_classification_sub +from . import product_manufacturer +from . import product_template diff --git a/nif/models/product_equipment_classification.py b/nif/models/product_equipment_classification.py new file mode 100644 index 0000000..9657215 --- /dev/null +++ b/nif/models/product_equipment_classification.py @@ -0,0 +1,22 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class ProductEquipmentClassification(models.Model): + _name = "product.equipment.classification" + _description = "Product Equipment Classification" + _order = "sequence, code, id" + + name = fields.Char(required=True, translate=True) + code = fields.Char( + help="External code used for integration. A numeric code is preferred." + ) + sequence = fields.Integer(default=10) + active = fields.Boolean(default=True) + + _code_uniq = models.Constraint( + "unique(code)", + "The code of an equipment classification must be unique.", + ) diff --git a/nif/models/product_equipment_classification_sub.py b/nif/models/product_equipment_classification_sub.py new file mode 100644 index 0000000..c580d22 --- /dev/null +++ b/nif/models/product_equipment_classification_sub.py @@ -0,0 +1,22 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class ProductEquipmentClassificationSub(models.Model): + _name = "product.equipment.classification.sub" + _description = "Product Equipment Sub-Classification" + _order = "sequence, code, id" + + name = fields.Char(required=True, translate=True) + code = fields.Char( + help="External code used for integration. A numeric code is preferred." + ) + sequence = fields.Integer(default=10) + active = fields.Boolean(default=True) + + _code_uniq = models.Constraint( + "unique(code)", + "The code of an equipment sub-classification must be unique.", + ) diff --git a/nif/models/product_manufacturer.py b/nif/models/product_manufacturer.py new file mode 100644 index 0000000..54f73ff --- /dev/null +++ b/nif/models/product_manufacturer.py @@ -0,0 +1,22 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class ProductManufacturer(models.Model): + _name = "product.manufacturer" + _description = "Product Manufacturer" + _order = "sequence, code, id" + + name = fields.Char(required=True, translate=True) + code = fields.Char( + help="External code used for integration. A numeric code is preferred." + ) + sequence = fields.Integer(default=10) + active = fields.Boolean(default=True) + + _code_uniq = models.Constraint( + "unique(code)", + "The code of a manufacturer must be unique.", + ) diff --git a/nif/models/product_template.py b/nif/models/product_template.py new file mode 100644 index 0000000..b707e3c --- /dev/null +++ b/nif/models/product_template.py @@ -0,0 +1,34 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from odoo import api, fields, models +from odoo.exceptions import ValidationError + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + is_equipment = fields.Boolean() + is_consumable = fields.Boolean() + manufacturer_id = fields.Many2one( + comodel_name="product.manufacturer", + string="Manufacturer", + ) + equipment_classification_id = fields.Many2one( + comodel_name="product.equipment.classification", + string="Equipment Classification", + ) + equipment_classification_sub_id = fields.Many2one( + comodel_name="product.equipment.classification.sub", + string="Equipment Sub-Classification", + ) + + @api.constrains("is_equipment", "is_consumable") + def _check_equipment_consumable_exclusive(self): + for product in self: + if product.is_equipment and product.is_consumable: + raise ValidationError( + self.env._( + "A product cannot be flagged as both equipment and consumable." + ) + ) diff --git a/nif/pyproject.toml b/nif/pyproject.toml new file mode 100644 index 0000000..4231d0c --- /dev/null +++ b/nif/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/nif/readme/DESCRIPTION.md b/nif/readme/DESCRIPTION.md new file mode 100644 index 0000000..56562f2 --- /dev/null +++ b/nif/readme/DESCRIPTION.md @@ -0,0 +1,29 @@ +This module holds the product-side field extensions required by the **Navi in +Flow** (ナビフロー) integration, through which product/equipment master data is +exchanged with the CIAS system. + +It is intended as the single place to collect Navi in Flow related fields on +products as the integration grows. + +Each product can be flagged as **equipment** or **consumable** (the two flags +are mutually exclusive) and linked to a **Manufacturer** (メーカー). + +When a product is flagged as equipment, it can additionally be given the +following two classification axes: + +- **Equipment Classification** (機器分類) — the primary classification of a + device, used as an important input for the Navi in Flow logic. +- **Equipment Sub-Classification** (機器分類サブ) — used to classify auxiliary + devices. + +The manufacturer and each classification axis are backed by dedicated, +user-maintainable models (`product.manufacturer`, +`product.equipment.classification` and +`product.equipment.classification.sub`) holding a name and an optional code +(a numeric code is preferred for integration with external systems). Each +product can be linked to one manufacturer, one classification and one +sub-classification. + +The module ships the models and the configuration UI but no predefined +records, so the taxonomy can be tailored to each deployment (for example +through a company-specific data module or the external integration). diff --git a/nif/readme/USAGE.md b/nif/readme/USAGE.md new file mode 100644 index 0000000..c7975f0 --- /dev/null +++ b/nif/readme/USAGE.md @@ -0,0 +1,14 @@ +To maintain the available classifications: + +1. Go to *Inventory > Configuration > Equipment Classifications* (or + *Equipment Sub-Classifications*). +2. Create the entries with a name and, preferably, a numeric code. + +To classify a product: + +1. Open a product. +2. In the *General Information* tab, select the **Equipment Classification** and + **Equipment Sub-Classification**. + +Products can be searched and filtered by either classification from the product list +view. diff --git a/nif/security/ir.model.access.csv b/nif/security/ir.model.access.csv new file mode 100644 index 0000000..e7804d4 --- /dev/null +++ b/nif/security/ir.model.access.csv @@ -0,0 +1,7 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_equipment_classification_user,product.equipment.classification user,model_product_equipment_classification,base.group_user,1,0,0,0 +access_product_equipment_classification_admin,product.equipment.classification admin,model_product_equipment_classification,base.group_system,1,1,1,1 +access_product_equipment_classification_sub_user,product.equipment.classification.sub user,model_product_equipment_classification_sub,base.group_user,1,0,0,0 +access_product_equipment_classification_sub_admin,product.equipment.classification.sub admin,model_product_equipment_classification_sub,base.group_system,1,1,1,1 +access_product_manufacturer_user,product.manufacturer user,model_product_manufacturer,base.group_user,1,0,0,0 +access_product_manufacturer_admin,product.manufacturer admin,model_product_manufacturer,base.group_system,1,1,1,1 diff --git a/nif/static/description/icon.png b/nif/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..5fbca9dd9f7a5bb8bdb36880d48c647a837f5ac7 GIT binary patch literal 12148 zcmX9^WmsEH(@xMJ#oeXFiWYZ=;_fajEmDfROL2-7cehfYSaElP7I%l@Zpn9^_xq76 zo3nH6*|}$S=HARis;kPsLMKB9fk3Ym-pgo$Kww}920>7OFJtGjk020-u!4-FwrAE! zyH~P_PWA!(;nd|+-(|02tX%nZpbP>}2tyg|28iypGWz|Rq4@fv=+m8c&avAa9?RTy z-J#7@kzdl%S@oBO)_xh;S{*4veCr%sh;$k)4o&Fyq7onI;?vX9_KJ}X8d~{l-W4Ca zfWJ$1Z7p|yTlW8*t*v`u%t^?9GpKbg1~+g2tKaU1|NhvH0`p^kT1(PNn-)WPxFyJ&?h=tj_P9fUbicXwp-`Uz4EpRsyaNA0X zrb=(L>ou$m5pTA<+QZq1V>6=2&i-Q09&n)jQ=)8yjFVgf_pm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>MQij{ai$#)&bYCJd1|ufXp<5glc0uHv>C82zEQ6aibzgEF{_oX z37wC76SIuo*Iu)KLdHX9<`gEyYJxnTCrzqTuI}`cQe4g?0l)GFxwiz|inLG`*!nx> zE^f>MfF>sRJ9)-mcJqcpLOu77HR4RbOxKrb=8&0QZ%R=rDA!lc&9ehYyxje!zL9@Q zTkK}Tx=?>{J-LQqL>t4#MGQohvOHOG!2tyWjw1>~-Cl@(86`fq0fctA-?-!*)FX@L zZ1xE%2~mPtP1G!S`6*h@d%s#=xw#Lxx`wWt-=LbP(Q={IwSY#;W6-2%GclOt`0YF_ycF)Gg@jk%L&Rgkxy0T( za8dG`R^Y9?XPJ|8N_wt90Ei}>F-%18RzRXFS)tFtUUk1{iw~Vd@(jz*ScG9OHY&i z-lQwjgEWx%bh{Fb;Tsx4I2!Fe8>FTqF19q@ejEA53K7COwn+v||K4yKeSPF6+cLW6 zfPXMM^tt5^8cZ8WN|br??rB%ZV}%n@rCRENX=D<|p>Y1d}|ZVI!;H({KXB&=jYw zaYGPg#J25wR%|3B*gOUY2`6;8N1ZkJ$PUseeUFIeP;dopybDm1mxnahYTjVW0{zm6 zkmGssMyz+(Afb-bZ>MhrL=kscXW8UFA*R2_3FgXUcls?+Cvl%e51pb(ga`!U;vi1E zaY0`VyF{_fk!;4Gzmr(ia`i7Sg + + + + +README.rst + + + +
+ + + +Odoo Community Association + + +
+ + diff --git a/nif/tests/__init__.py b/nif/tests/__init__.py new file mode 100644 index 0000000..37311b6 --- /dev/null +++ b/nif/tests/__init__.py @@ -0,0 +1 @@ +from . import test_product_equipment_classification diff --git a/nif/tests/test_product_equipment_classification.py b/nif/tests/test_product_equipment_classification.py new file mode 100644 index 0000000..467b727 --- /dev/null +++ b/nif/tests/test_product_equipment_classification.py @@ -0,0 +1,64 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from psycopg2 import IntegrityError + +from odoo.exceptions import ValidationError +from odoo.tests.common import TransactionCase +from odoo.tools import mute_logger + + +class TestProductEquipmentClassification(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.classification = cls.env["product.equipment.classification"].create( + {"name": "Ventilator", "code": "100"} + ) + cls.classification_sub = cls.env["product.equipment.classification.sub"].create( + {"name": "Humidifier", "code": "200"} + ) + cls.manufacturer = cls.env["product.manufacturer"].create( + {"name": "Acme Medical", "code": "300"} + ) + cls.product = cls.env["product.template"].create({"name": "Test Device"}) + + def test_assign_classifications(self): + self.product.write( + { + "manufacturer_id": self.manufacturer.id, + "equipment_classification_id": self.classification.id, + "equipment_classification_sub_id": self.classification_sub.id, + } + ) + self.assertEqual(self.product.manufacturer_id, self.manufacturer) + self.assertEqual(self.product.equipment_classification_id, self.classification) + self.assertEqual( + self.product.equipment_classification_sub_id, self.classification_sub + ) + + def test_equipment_consumable_mutually_exclusive(self): + self.product.is_equipment = True + with self.assertRaises(ValidationError): + self.product.is_consumable = True + + @mute_logger("odoo.sql_db") + def test_classification_code_unique(self): + with self.assertRaises(IntegrityError): + self.env["product.equipment.classification"].create( + {"name": "Duplicate", "code": "100"} + ) + + @mute_logger("odoo.sql_db") + def test_classification_sub_code_unique(self): + with self.assertRaises(IntegrityError): + self.env["product.equipment.classification.sub"].create( + {"name": "Duplicate", "code": "200"} + ) + + @mute_logger("odoo.sql_db") + def test_manufacturer_code_unique(self): + with self.assertRaises(IntegrityError): + self.env["product.manufacturer"].create( + {"name": "Duplicate", "code": "300"} + ) diff --git a/nif/views/nif_menus.xml b/nif/views/nif_menus.xml new file mode 100644 index 0000000..85165a9 --- /dev/null +++ b/nif/views/nif_menus.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/nif/views/product_equipment_classification_sub_views.xml b/nif/views/product_equipment_classification_sub_views.xml new file mode 100644 index 0000000..76319f1 --- /dev/null +++ b/nif/views/product_equipment_classification_sub_views.xml @@ -0,0 +1,72 @@ + + + + product.equipment.classification.sub.list + product.equipment.classification.sub + + + + + + + + + + + product.equipment.classification.sub.form + product.equipment.classification.sub + +
+ + + + + + + + + + + +
+
+
+ + + product.equipment.classification.sub.search + product.equipment.classification.sub + + + + + + + + + + + + Equipment Sub-Classifications + product.equipment.classification.sub + list,form + + + +
diff --git a/nif/views/product_equipment_classification_views.xml b/nif/views/product_equipment_classification_views.xml new file mode 100644 index 0000000..c24ae64 --- /dev/null +++ b/nif/views/product_equipment_classification_views.xml @@ -0,0 +1,69 @@ + + + + product.equipment.classification.list + product.equipment.classification + + + + + + + + + + + product.equipment.classification.form + product.equipment.classification + +
+ + + + + + + + + + + +
+
+
+ + + product.equipment.classification.search + product.equipment.classification + + + + + + + + + + + + Equipment Classifications + product.equipment.classification + list,form + + + +
diff --git a/nif/views/product_manufacturer_views.xml b/nif/views/product_manufacturer_views.xml new file mode 100644 index 0000000..235f220 --- /dev/null +++ b/nif/views/product_manufacturer_views.xml @@ -0,0 +1,69 @@ + + + + product.manufacturer.list + product.manufacturer + + + + + + + + + + + product.manufacturer.form + product.manufacturer + +
+ + + + + + + + + + + +
+
+
+ + + product.manufacturer.search + product.manufacturer + + + + + + + + + + + + Manufacturers + product.manufacturer + list,form + + + +
diff --git a/nif/views/product_template_views.xml b/nif/views/product_template_views.xml new file mode 100644 index 0000000..23903a2 --- /dev/null +++ b/nif/views/product_template_views.xml @@ -0,0 +1,52 @@ + + + + product.template.form.nif + product.template + + + + + + + + + + + + + + + + + + + + + + + + product.template.search.nif + product.template + + + + + + + + + + From 097e838b5ba558fbb760c3786a7e4bbabd436b3e Mon Sep 17 00:00:00 2001 From: yostashiro Date: Thu, 9 Jul 2026 08:21:33 +0000 Subject: [PATCH 02/13] [IMP] nif: Add translations --- nif/i18n/ja.po | 230 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 nif/i18n/ja.po diff --git a/nif/i18n/ja.po b/nif/i18n/ja.po new file mode 100644 index 0000000..7fc61bb --- /dev/null +++ b/nif/i18n/ja.po @@ -0,0 +1,230 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * nif +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-07-09 05:04+0000\n" +"PO-Revision-Date: 2026-07-09 05:04+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: nif +#. odoo-python +#: code:addons/nif/models/product_template.py:0 +msgid "A product cannot be flagged as both equipment and consumable." +msgstr "プロダクトを機器と消耗品の両方に設定することはできません。" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__active +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__active +#: model:ir.model.fields,field_description:nif.field_product_manufacturer__active +msgid "Active" +msgstr "有効" + +#. module: nif +#: model_terms:ir.ui.view,arch_db:nif.product_equipment_classification_sub_view_form +#: model_terms:ir.ui.view,arch_db:nif.product_equipment_classification_sub_view_search +#: model_terms:ir.ui.view,arch_db:nif.product_equipment_classification_view_form +#: model_terms:ir.ui.view,arch_db:nif.product_equipment_classification_view_search +#: model_terms:ir.ui.view,arch_db:nif.product_manufacturer_view_form +#: model_terms:ir.ui.view,arch_db:nif.product_manufacturer_view_search +msgid "Archived" +msgstr "アーカイブ済" + +#. module: nif +#: model:product.equipment.classification,name:nif.product_equipment_classification_cpap +msgid "CPAP" +msgstr "CPAP" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__code +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__code +#: model:ir.model.fields,field_description:nif.field_product_manufacturer__code +msgid "Code" +msgstr "コード" + +#. module: nif +#: model:ir.ui.menu,name:nif.menu_nif_config +msgid "Configuration" +msgstr "設定" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__create_uid +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__create_uid +#: model:ir.model.fields,field_description:nif.field_product_manufacturer__create_uid +msgid "Created by" +msgstr "作成者" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__create_date +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__create_date +#: model:ir.model.fields,field_description:nif.field_product_manufacturer__create_date +msgid "Created on" +msgstr "作成日" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__display_name +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__display_name +#: model:ir.model.fields,field_description:nif.field_product_manufacturer__display_name +#: model:ir.model.fields,field_description:nif.field_product_template__display_name +msgid "Display Name" +msgstr "表示名" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_product__equipment_classification_id +#: model:ir.model.fields,field_description:nif.field_product_template__equipment_classification_id +#: model_terms:ir.ui.view,arch_db:nif.product_template_view_form +msgid "Equipment Classification" +msgstr "機器分類" + +#. module: nif +#: model:ir.actions.act_window,name:nif.product_equipment_classification_action +#: model:ir.ui.menu,name:nif.product_equipment_classification_menu +msgid "Equipment Classifications" +msgstr "機器分類" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_product__equipment_classification_sub_id +#: model:ir.model.fields,field_description:nif.field_product_template__equipment_classification_sub_id +msgid "Equipment Sub-Classification" +msgstr "機器分類サブ" + +#. module: nif +#: model:ir.actions.act_window,name:nif.product_equipment_classification_sub_action +#: model:ir.ui.menu,name:nif.product_equipment_classification_sub_menu +msgid "Equipment Sub-Classifications" +msgstr "機器分類サブ" + +#. module: nif +#: model:ir.model.fields,help:nif.field_product_equipment_classification__code +#: model:ir.model.fields,help:nif.field_product_equipment_classification_sub__code +#: model:ir.model.fields,help:nif.field_product_manufacturer__code +msgid "External code used for integration. A numeric code is preferred." +msgstr "連携に使用する外部コード。数値コードが推奨されます。" + +#. module: nif +#: model:product.equipment.classification,name:nif.product_equipment_classification_hit +msgid "HIT" +msgstr "HIT" + +#. module: nif +#: model:product.equipment.classification,name:nif.product_equipment_classification_hot +msgid "HOT / Concentrator" +msgstr "HOT/濃縮器" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__id +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__id +#: model:ir.model.fields,field_description:nif.field_product_manufacturer__id +#: model:ir.model.fields,field_description:nif.field_product_template__id +msgid "ID" +msgstr "ID" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_product__is_consumable +#: model:ir.model.fields,field_description:nif.field_product_template__is_consumable +msgid "Is Consumable" +msgstr "消耗品" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_product__is_equipment +#: model:ir.model.fields,field_description:nif.field_product_template__is_equipment +msgid "Is Equipment" +msgstr "機器" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__write_uid +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__write_uid +#: model:ir.model.fields,field_description:nif.field_product_manufacturer__write_uid +msgid "Last Updated by" +msgstr "最終更新者" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__write_date +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__write_date +#: model:ir.model.fields,field_description:nif.field_product_manufacturer__write_date +msgid "Last Updated on" +msgstr "最終更新日" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_product__manufacturer_id +#: model:ir.model.fields,field_description:nif.field_product_template__manufacturer_id +msgid "Manufacturer" +msgstr "メーカー" + +#. module: nif +#: model:ir.actions.act_window,name:nif.product_manufacturer_action +#: model:ir.ui.menu,name:nif.product_manufacturer_menu +msgid "Manufacturers" +msgstr "メーカー" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__name +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__name +#: model:ir.model.fields,field_description:nif.field_product_manufacturer__name +msgid "Name" +msgstr "名称" + +#. module: nif +#: model_terms:ir.ui.view,arch_db:nif.product_template_view_form +msgid "Navi in Flow" +msgstr "Navi in Flow" + +#. module: nif +#: model:product.equipment.classification,name:nif.product_equipment_classification_other_aux +msgid "Other (Auxiliary Device)" +msgstr "その他(副装置)" + +#. module: nif +#: model:ir.model,name:nif.model_product_template +msgid "Product" +msgstr "プロダクト" + +#. module: nif +#: model:ir.model,name:nif.model_product_equipment_classification +msgid "Product Equipment Classification" +msgstr "機器分類" + +#. module: nif +#: model:ir.model,name:nif.model_product_equipment_classification_sub +msgid "Product Equipment Sub-Classification" +msgstr "機器分類サブ" + +#. module: nif +#: model:ir.model,name:nif.model_product_manufacturer +msgid "Product Manufacturer" +msgstr "メーカー" + +#. module: nif +#: model_terms:ir.ui.view,arch_db:nif.product_template_view_form +msgid "Product Type" +msgstr "プロダクトタイプ" + +#. module: nif +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__sequence +#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__sequence +#: model:ir.model.fields,field_description:nif.field_product_manufacturer__sequence +msgid "Sequence" +msgstr "シーケンス" + +#. module: nif +#: model:ir.model.constraint,message:nif.constraint_product_manufacturer_code_uniq +msgid "The code of a manufacturer must be unique." +msgstr "メーカーのコードは一意である必要があります。" + +#. module: nif +#: model:ir.model.constraint,message:nif.constraint_product_equipment_classification_code_uniq +msgid "The code of an equipment classification must be unique." +msgstr "機器分類のコードは一意である必要があります。" + +#. module: nif +#: model:ir.model.constraint,message:nif.constraint_product_equipment_classification_sub_code_uniq +msgid "The code of an equipment sub-classification must be unique." +msgstr "機器分類サブのコードは一意である必要があります。" From 73ec9baee60c3f8e715dc6357b189893f65aac34 Mon Sep 17 00:00:00 2001 From: yostashiro Date: Mon, 13 Jul 2026 07:38:50 +0000 Subject: [PATCH 03/13] [REF] product_classification: rename from nif and generalize scope The module was scoped and named after a single consumer (Navi in Flow), but the product master data it holds (classification, manufacturer) has value independent of that integration, and new fields (e.g. consumable classification) are not necessarily interfaced with Navi in Flow. Rename it to product_classification and reframe it as product classification master data, with Navi in Flow as one consumer: - replace the mutually-exclusive is_equipment/is_consumable booleans with a single product_kind selection - add a product.consumable.classification taxonomy and the consumable_classification_id field, parallel to the equipment axis - move configuration menus under Inventory > Configuration > Products (drop the standalone app menu) - present the fields on a "Classification" product tab (was "Navi in Flow"), with equipment/consumable groups shown per product_kind - record Navi-in-Flow usage in the help text of the fields that feed the integration, so their purpose stays traceable --- nif/README.rst | 114 ------- nif/i18n/ja.po | 230 -------------- nif/models/product_template.py | 34 --- nif/readme/DESCRIPTION.md | 29 -- nif/readme/USAGE.md | 14 - nif/tests/__init__.py | 1 - nif/views/nif_menus.xml | 16 - product_classification/README.rst | 113 +++++++ {nif => product_classification}/__init__.py | 0 .../__manifest__.py | 8 +- .../product_equipment_classification_data.xml | 0 product_classification/i18n/ja.po | 288 ++++++++++++++++++ .../models/__init__.py | 1 + .../product_consumable_classification.py | 22 ++ .../product_equipment_classification.py | 0 .../product_equipment_classification_sub.py | 0 .../models/product_manufacturer.py | 0 .../models/product_template.py | 39 +++ .../pyproject.toml | 0 product_classification/readme/DESCRIPTION.md | 26 ++ product_classification/readme/USAGE.md | 16 + .../security/ir.model.access.csv | 2 + .../static/description/icon.png | Bin .../static/description/index.html | 113 ++++--- product_classification/tests/__init__.py | 1 + .../tests/test_product_classification.py | 32 +- ...roduct_consumable_classification_views.xml | 69 +++++ ...uct_equipment_classification_sub_views.xml | 2 +- ...product_equipment_classification_views.xml | 2 +- .../views/product_manufacturer_views.xml | 4 +- .../views/product_template_views.xml | 25 +- 31 files changed, 681 insertions(+), 520 deletions(-) delete mode 100644 nif/README.rst delete mode 100644 nif/i18n/ja.po delete mode 100644 nif/models/product_template.py delete mode 100644 nif/readme/DESCRIPTION.md delete mode 100644 nif/readme/USAGE.md delete mode 100644 nif/tests/__init__.py delete mode 100644 nif/views/nif_menus.xml create mode 100644 product_classification/README.rst rename {nif => product_classification}/__init__.py (100%) rename {nif => product_classification}/__manifest__.py (76%) rename {nif => product_classification}/data/product_equipment_classification_data.xml (100%) create mode 100644 product_classification/i18n/ja.po rename {nif => product_classification}/models/__init__.py (77%) create mode 100644 product_classification/models/product_consumable_classification.py rename {nif => product_classification}/models/product_equipment_classification.py (100%) rename {nif => product_classification}/models/product_equipment_classification_sub.py (100%) rename {nif => product_classification}/models/product_manufacturer.py (100%) create mode 100644 product_classification/models/product_template.py rename {nif => product_classification}/pyproject.toml (100%) create mode 100644 product_classification/readme/DESCRIPTION.md create mode 100644 product_classification/readme/USAGE.md rename {nif => product_classification}/security/ir.model.access.csv (75%) rename {nif => product_classification}/static/description/icon.png (100%) rename {nif => product_classification}/static/description/index.html (68%) create mode 100644 product_classification/tests/__init__.py rename nif/tests/test_product_equipment_classification.py => product_classification/tests/test_product_classification.py (66%) create mode 100644 product_classification/views/product_consumable_classification_views.xml rename {nif => product_classification}/views/product_equipment_classification_sub_views.xml (98%) rename {nif => product_classification}/views/product_equipment_classification_views.xml (98%) rename {nif => product_classification}/views/product_manufacturer_views.xml (96%) rename {nif => product_classification}/views/product_template_views.xml (69%) diff --git a/nif/README.rst b/nif/README.rst deleted file mode 100644 index 33b8db7..0000000 --- a/nif/README.rst +++ /dev/null @@ -1,114 +0,0 @@ -.. image:: https://odoo-community.org/readme-banner-image - :target: https://odoo-community.org/get-involved?utm_source=readme - :alt: Odoo Community Association - -============ -Navi in Flow -============ - -.. - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! This file is generated by oca-gen-addon-readme !! - !! changes will be overwritten. !! - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:4fad83f057a677f06eac7c90c9ccb17ba9dd3c19772fdee590e3047e5e52a157 - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png - :target: https://odoo-community.org/page/development-status - :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png - :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html - :alt: License: LGPL-3 -.. |badge3| image:: https://img.shields.io/badge/github-qrtl%2FOCJ Custom-lightgray.png?logo=github - :target: https://github.com/qrtl/OCJ Custom/tree/19.0/nif - :alt: qrtl/OCJ Custom - -|badge1| |badge2| |badge3| - -This module holds the product-side field extensions required by the -**Navi in Flow** (ナビフロー) integration, through which -product/equipment master data is exchanged with the CIAS system. - -It is intended as the single place to collect Navi in Flow related -fields on products as the integration grows. - -Each product can be flagged as **equipment** or **consumable** (the two -flags are mutually exclusive) and linked to a **Manufacturer** -(メーカー). - -When a product is flagged as equipment, it can additionally be given the -following two classification axes: - -- **Equipment Classification** (機器分類) — the primary classification - of a device, used as an important input for the Navi in Flow logic. -- **Equipment Sub-Classification** (機器分類サブ) — used to classify - auxiliary devices. - -The manufacturer and each classification axis are backed by dedicated, -user-maintainable models (``product.manufacturer``, -``product.equipment.classification`` and -``product.equipment.classification.sub``) holding a name and an optional -code (a numeric code is preferred for integration with external -systems). Each product can be linked to one manufacturer, one -classification and one sub-classification. - -The module ships the models and the configuration UI but no predefined -records, so the taxonomy can be tailored to each deployment (for example -through a company-specific data module or the external integration). - -**Table of contents** - -.. contents:: - :local: - -Usage -===== - -To maintain the available classifications: - -1. Go to *Inventory > Configuration > Equipment Classifications* (or - *Equipment Sub-Classifications*). -2. Create the entries with a name and, preferably, a numeric code. - -To classify a product: - -1. Open a product. -2. In the *General Information* tab, select the **Equipment - Classification** and **Equipment Sub-Classification**. - -Products can be searched and filtered by either classification from the -product list view. - -Bug Tracker -=========== - -Bugs are tracked on `GitHub Issues `_. -In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. - -Do not contact contributors directly about support or help with technical issues. - -Credits -======= - -Authors -------- - -* Quartile - -Maintainers ------------ - -.. |maintainer-yostashiro| image:: https://github.com/yostashiro.png?size=40px - :target: https://github.com/yostashiro - :alt: yostashiro - -Current maintainer: - -|maintainer-yostashiro| - -This module is part of the `qrtl/OCJ Custom `_ project on GitHub. - -You are welcome to contribute. diff --git a/nif/i18n/ja.po b/nif/i18n/ja.po deleted file mode 100644 index 7fc61bb..0000000 --- a/nif/i18n/ja.po +++ /dev/null @@ -1,230 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * nif -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 19.0+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-07-09 05:04+0000\n" -"PO-Revision-Date: 2026-07-09 05:04+0000\n" -"Last-Translator: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: nif -#. odoo-python -#: code:addons/nif/models/product_template.py:0 -msgid "A product cannot be flagged as both equipment and consumable." -msgstr "プロダクトを機器と消耗品の両方に設定することはできません。" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__active -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__active -#: model:ir.model.fields,field_description:nif.field_product_manufacturer__active -msgid "Active" -msgstr "有効" - -#. module: nif -#: model_terms:ir.ui.view,arch_db:nif.product_equipment_classification_sub_view_form -#: model_terms:ir.ui.view,arch_db:nif.product_equipment_classification_sub_view_search -#: model_terms:ir.ui.view,arch_db:nif.product_equipment_classification_view_form -#: model_terms:ir.ui.view,arch_db:nif.product_equipment_classification_view_search -#: model_terms:ir.ui.view,arch_db:nif.product_manufacturer_view_form -#: model_terms:ir.ui.view,arch_db:nif.product_manufacturer_view_search -msgid "Archived" -msgstr "アーカイブ済" - -#. module: nif -#: model:product.equipment.classification,name:nif.product_equipment_classification_cpap -msgid "CPAP" -msgstr "CPAP" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__code -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__code -#: model:ir.model.fields,field_description:nif.field_product_manufacturer__code -msgid "Code" -msgstr "コード" - -#. module: nif -#: model:ir.ui.menu,name:nif.menu_nif_config -msgid "Configuration" -msgstr "設定" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__create_uid -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__create_uid -#: model:ir.model.fields,field_description:nif.field_product_manufacturer__create_uid -msgid "Created by" -msgstr "作成者" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__create_date -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__create_date -#: model:ir.model.fields,field_description:nif.field_product_manufacturer__create_date -msgid "Created on" -msgstr "作成日" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__display_name -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__display_name -#: model:ir.model.fields,field_description:nif.field_product_manufacturer__display_name -#: model:ir.model.fields,field_description:nif.field_product_template__display_name -msgid "Display Name" -msgstr "表示名" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_product__equipment_classification_id -#: model:ir.model.fields,field_description:nif.field_product_template__equipment_classification_id -#: model_terms:ir.ui.view,arch_db:nif.product_template_view_form -msgid "Equipment Classification" -msgstr "機器分類" - -#. module: nif -#: model:ir.actions.act_window,name:nif.product_equipment_classification_action -#: model:ir.ui.menu,name:nif.product_equipment_classification_menu -msgid "Equipment Classifications" -msgstr "機器分類" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_product__equipment_classification_sub_id -#: model:ir.model.fields,field_description:nif.field_product_template__equipment_classification_sub_id -msgid "Equipment Sub-Classification" -msgstr "機器分類サブ" - -#. module: nif -#: model:ir.actions.act_window,name:nif.product_equipment_classification_sub_action -#: model:ir.ui.menu,name:nif.product_equipment_classification_sub_menu -msgid "Equipment Sub-Classifications" -msgstr "機器分類サブ" - -#. module: nif -#: model:ir.model.fields,help:nif.field_product_equipment_classification__code -#: model:ir.model.fields,help:nif.field_product_equipment_classification_sub__code -#: model:ir.model.fields,help:nif.field_product_manufacturer__code -msgid "External code used for integration. A numeric code is preferred." -msgstr "連携に使用する外部コード。数値コードが推奨されます。" - -#. module: nif -#: model:product.equipment.classification,name:nif.product_equipment_classification_hit -msgid "HIT" -msgstr "HIT" - -#. module: nif -#: model:product.equipment.classification,name:nif.product_equipment_classification_hot -msgid "HOT / Concentrator" -msgstr "HOT/濃縮器" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__id -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__id -#: model:ir.model.fields,field_description:nif.field_product_manufacturer__id -#: model:ir.model.fields,field_description:nif.field_product_template__id -msgid "ID" -msgstr "ID" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_product__is_consumable -#: model:ir.model.fields,field_description:nif.field_product_template__is_consumable -msgid "Is Consumable" -msgstr "消耗品" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_product__is_equipment -#: model:ir.model.fields,field_description:nif.field_product_template__is_equipment -msgid "Is Equipment" -msgstr "機器" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__write_uid -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__write_uid -#: model:ir.model.fields,field_description:nif.field_product_manufacturer__write_uid -msgid "Last Updated by" -msgstr "最終更新者" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__write_date -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__write_date -#: model:ir.model.fields,field_description:nif.field_product_manufacturer__write_date -msgid "Last Updated on" -msgstr "最終更新日" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_product__manufacturer_id -#: model:ir.model.fields,field_description:nif.field_product_template__manufacturer_id -msgid "Manufacturer" -msgstr "メーカー" - -#. module: nif -#: model:ir.actions.act_window,name:nif.product_manufacturer_action -#: model:ir.ui.menu,name:nif.product_manufacturer_menu -msgid "Manufacturers" -msgstr "メーカー" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__name -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__name -#: model:ir.model.fields,field_description:nif.field_product_manufacturer__name -msgid "Name" -msgstr "名称" - -#. module: nif -#: model_terms:ir.ui.view,arch_db:nif.product_template_view_form -msgid "Navi in Flow" -msgstr "Navi in Flow" - -#. module: nif -#: model:product.equipment.classification,name:nif.product_equipment_classification_other_aux -msgid "Other (Auxiliary Device)" -msgstr "その他(副装置)" - -#. module: nif -#: model:ir.model,name:nif.model_product_template -msgid "Product" -msgstr "プロダクト" - -#. module: nif -#: model:ir.model,name:nif.model_product_equipment_classification -msgid "Product Equipment Classification" -msgstr "機器分類" - -#. module: nif -#: model:ir.model,name:nif.model_product_equipment_classification_sub -msgid "Product Equipment Sub-Classification" -msgstr "機器分類サブ" - -#. module: nif -#: model:ir.model,name:nif.model_product_manufacturer -msgid "Product Manufacturer" -msgstr "メーカー" - -#. module: nif -#: model_terms:ir.ui.view,arch_db:nif.product_template_view_form -msgid "Product Type" -msgstr "プロダクトタイプ" - -#. module: nif -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification__sequence -#: model:ir.model.fields,field_description:nif.field_product_equipment_classification_sub__sequence -#: model:ir.model.fields,field_description:nif.field_product_manufacturer__sequence -msgid "Sequence" -msgstr "シーケンス" - -#. module: nif -#: model:ir.model.constraint,message:nif.constraint_product_manufacturer_code_uniq -msgid "The code of a manufacturer must be unique." -msgstr "メーカーのコードは一意である必要があります。" - -#. module: nif -#: model:ir.model.constraint,message:nif.constraint_product_equipment_classification_code_uniq -msgid "The code of an equipment classification must be unique." -msgstr "機器分類のコードは一意である必要があります。" - -#. module: nif -#: model:ir.model.constraint,message:nif.constraint_product_equipment_classification_sub_code_uniq -msgid "The code of an equipment sub-classification must be unique." -msgstr "機器分類サブのコードは一意である必要があります。" diff --git a/nif/models/product_template.py b/nif/models/product_template.py deleted file mode 100644 index b707e3c..0000000 --- a/nif/models/product_template.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2026 Quartile (https://www.quartile.co) -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). - -from odoo import api, fields, models -from odoo.exceptions import ValidationError - - -class ProductTemplate(models.Model): - _inherit = "product.template" - - is_equipment = fields.Boolean() - is_consumable = fields.Boolean() - manufacturer_id = fields.Many2one( - comodel_name="product.manufacturer", - string="Manufacturer", - ) - equipment_classification_id = fields.Many2one( - comodel_name="product.equipment.classification", - string="Equipment Classification", - ) - equipment_classification_sub_id = fields.Many2one( - comodel_name="product.equipment.classification.sub", - string="Equipment Sub-Classification", - ) - - @api.constrains("is_equipment", "is_consumable") - def _check_equipment_consumable_exclusive(self): - for product in self: - if product.is_equipment and product.is_consumable: - raise ValidationError( - self.env._( - "A product cannot be flagged as both equipment and consumable." - ) - ) diff --git a/nif/readme/DESCRIPTION.md b/nif/readme/DESCRIPTION.md deleted file mode 100644 index 56562f2..0000000 --- a/nif/readme/DESCRIPTION.md +++ /dev/null @@ -1,29 +0,0 @@ -This module holds the product-side field extensions required by the **Navi in -Flow** (ナビフロー) integration, through which product/equipment master data is -exchanged with the CIAS system. - -It is intended as the single place to collect Navi in Flow related fields on -products as the integration grows. - -Each product can be flagged as **equipment** or **consumable** (the two flags -are mutually exclusive) and linked to a **Manufacturer** (メーカー). - -When a product is flagged as equipment, it can additionally be given the -following two classification axes: - -- **Equipment Classification** (機器分類) — the primary classification of a - device, used as an important input for the Navi in Flow logic. -- **Equipment Sub-Classification** (機器分類サブ) — used to classify auxiliary - devices. - -The manufacturer and each classification axis are backed by dedicated, -user-maintainable models (`product.manufacturer`, -`product.equipment.classification` and -`product.equipment.classification.sub`) holding a name and an optional code -(a numeric code is preferred for integration with external systems). Each -product can be linked to one manufacturer, one classification and one -sub-classification. - -The module ships the models and the configuration UI but no predefined -records, so the taxonomy can be tailored to each deployment (for example -through a company-specific data module or the external integration). diff --git a/nif/readme/USAGE.md b/nif/readme/USAGE.md deleted file mode 100644 index c7975f0..0000000 --- a/nif/readme/USAGE.md +++ /dev/null @@ -1,14 +0,0 @@ -To maintain the available classifications: - -1. Go to *Inventory > Configuration > Equipment Classifications* (or - *Equipment Sub-Classifications*). -2. Create the entries with a name and, preferably, a numeric code. - -To classify a product: - -1. Open a product. -2. In the *General Information* tab, select the **Equipment Classification** and - **Equipment Sub-Classification**. - -Products can be searched and filtered by either classification from the product list -view. diff --git a/nif/tests/__init__.py b/nif/tests/__init__.py deleted file mode 100644 index 37311b6..0000000 --- a/nif/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import test_product_equipment_classification diff --git a/nif/views/nif_menus.xml b/nif/views/nif_menus.xml deleted file mode 100644 index 85165a9..0000000 --- a/nif/views/nif_menus.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - diff --git a/product_classification/README.rst b/product_classification/README.rst new file mode 100644 index 0000000..2bb82a0 --- /dev/null +++ b/product_classification/README.rst @@ -0,0 +1,113 @@ +====================== +Product Classification +====================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:996dc09f7baa2c4801baea97c2f73e2b8203244c11d563527f1cb1bca83ab24b + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-qrtl%2Focj--custom-lightgray.png?logo=github + :target: https://github.com/qrtl/ocj-custom/tree/19.0/product_classification + :alt: qrtl/ocj-custom + +|badge1| |badge2| |badge3| + +This module adds classification master data to products so that +equipment and consumables can be categorized consistently. + +Each product can be flagged as **equipment** or **consumable** (*Product +Kind*) and linked to a **Manufacturer** (メーカー). Depending on the +kind, it can then be given a classification: + +- **Equipment Classification** (機器分類) — the primary classification + of a device, with an **Equipment Sub-Classification** (機器分類サブ) + for auxiliary devices. +- **Consumable Classification** — the classification of a consumable + product. + +The manufacturer and each classification axis are backed by dedicated, +user-maintainable models (``product.manufacturer``, +``product.equipment.classification``, +``product.equipment.classification.sub`` and +``product.consumable.classification``) holding a name and an optional +code (a numeric code is preferred for integration with external +systems). + +Several of these fields feed the **Navi in Flow** (ナビフロー) +integration, which exchanges product/equipment master data with the CIAS +system; the fields concerned say so in their help text so their purpose +stays clear over time. + +The module ships the models and the configuration UI but only a small +set of sample equipment classifications, so the taxonomy can be tailored +to each deployment (for example through a company-specific data module +or the external integration). + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To maintain the available classifications: + +1. Go to *Inventory > Configuration > Products* and open *Equipment + Classifications*, *Equipment Sub-Classifications*, *Consumable + Classifications* or *Manufacturers*. +2. Create the entries with a name and, preferably, a numeric code. + +To classify a product: + +1. Open a product and go to the *Classification* tab. +2. Set the **Product Kind** (equipment or consumable), the + **Manufacturer** and the relevant classification. The equipment or + consumable classification fields appear according to the selected + kind. + +Products can be searched and filtered by manufacturer and classification +from the product list view. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Quartile + +Maintainers +----------- + +.. |maintainer-yostashiro| image:: https://github.com/yostashiro.png?size=40px + :target: https://github.com/yostashiro + :alt: yostashiro + +Current maintainer: + +|maintainer-yostashiro| + +This module is part of the `qrtl/ocj-custom `_ project on GitHub. + +You are welcome to contribute. diff --git a/nif/__init__.py b/product_classification/__init__.py similarity index 100% rename from nif/__init__.py rename to product_classification/__init__.py diff --git a/nif/__manifest__.py b/product_classification/__manifest__.py similarity index 76% rename from nif/__manifest__.py rename to product_classification/__manifest__.py index a70e2d9..53171f6 100644 --- a/nif/__manifest__.py +++ b/product_classification/__manifest__.py @@ -1,23 +1,23 @@ # Copyright 2026 Quartile (https://www.quartile.co) # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). { - "name": "Navi in Flow", + "name": "Product Classification", "version": "19.0.1.0.0", "category": "Inventory/Inventory", "website": "https://www.quartile.co", "author": "Quartile", "maintainers": ["yostashiro"], "license": "LGPL-3", - "summary": "Master data and field extensions for the Navi in Flow integration", + "summary": "Classify products (equipment / consumable) with manufacturer " + "and classification master data", "installable": True, - "application": True, "depends": ["stock"], "data": [ "security/ir.model.access.csv", "data/product_equipment_classification_data.xml", - "views/nif_menus.xml", "views/product_equipment_classification_views.xml", "views/product_equipment_classification_sub_views.xml", + "views/product_consumable_classification_views.xml", "views/product_manufacturer_views.xml", "views/product_template_views.xml", ], diff --git a/nif/data/product_equipment_classification_data.xml b/product_classification/data/product_equipment_classification_data.xml similarity index 100% rename from nif/data/product_equipment_classification_data.xml rename to product_classification/data/product_equipment_classification_data.xml diff --git a/product_classification/i18n/ja.po b/product_classification/i18n/ja.po new file mode 100644 index 0000000..68d904b --- /dev/null +++ b/product_classification/i18n/ja.po @@ -0,0 +1,288 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_classification +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0+e\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__active +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__active +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__active +#: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__active +msgid "Active" +msgstr "有効" + +#. module: product_classification +#: model_terms:ir.ui.view,arch_db:product_classification.product_consumable_classification_view_form +#: model_terms:ir.ui.view,arch_db:product_classification.product_consumable_classification_view_search +#: model_terms:ir.ui.view,arch_db:product_classification.product_equipment_classification_sub_view_form +#: model_terms:ir.ui.view,arch_db:product_classification.product_equipment_classification_sub_view_search +#: model_terms:ir.ui.view,arch_db:product_classification.product_equipment_classification_view_form +#: model_terms:ir.ui.view,arch_db:product_classification.product_equipment_classification_view_search +#: model_terms:ir.ui.view,arch_db:product_classification.product_manufacturer_view_form +#: model_terms:ir.ui.view,arch_db:product_classification.product_manufacturer_view_search +msgid "Archived" +msgstr "アーカイブ済" + +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_cpap +msgid "CPAP" +msgstr "CPAP" + +#. module: product_classification +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_form +msgid "Classification" +msgstr "分類" + +#. module: product_classification +#: model:ir.model.fields,help:product_classification.field_product_product__consumable_classification_id +#: model:ir.model.fields,help:product_classification.field_product_template__consumable_classification_id +msgid "Classification of a consumable product." +msgstr "消耗品の分類。" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__code +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__code +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__code +#: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__code +msgid "Code" +msgstr "コード" + +#. module: product_classification +#: model:ir.model.fields.selection,name:product_classification.selection__product_template__product_kind__consumable +msgid "Consumable" +msgstr "消耗品" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_product__consumable_classification_id +#: model:ir.model.fields,field_description:product_classification.field_product_template__consumable_classification_id +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_form +msgid "Consumable Classification" +msgstr "消耗品分類" + +#. module: product_classification +#: model:ir.actions.act_window,name:product_classification.product_consumable_classification_action +#: model:ir.ui.menu,name:product_classification.product_consumable_classification_menu +msgid "Consumable Classifications" +msgstr "消耗品分類" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__create_uid +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__create_uid +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__create_uid +#: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__create_uid +msgid "Created by" +msgstr "作成者" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__create_date +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__create_date +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__create_date +#: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__create_date +msgid "Created on" +msgstr "作成日" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__display_name +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__display_name +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__display_name +#: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__display_name +#: model:ir.model.fields,field_description:product_classification.field_product_template__display_name +msgid "Display Name" +msgstr "表示名" + +#. module: product_classification +#: model:ir.model.fields.selection,name:product_classification.selection__product_template__product_kind__equipment +msgid "Equipment" +msgstr "機器" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_product__equipment_classification_id +#: model:ir.model.fields,field_description:product_classification.field_product_template__equipment_classification_id +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_form +msgid "Equipment Classification" +msgstr "機器分類" + +#. module: product_classification +#: model:ir.actions.act_window,name:product_classification.product_equipment_classification_action +#: model:ir.ui.menu,name:product_classification.product_equipment_classification_menu +msgid "Equipment Classifications" +msgstr "機器分類" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_product__equipment_classification_sub_id +#: model:ir.model.fields,field_description:product_classification.field_product_template__equipment_classification_sub_id +msgid "Equipment Sub-Classification" +msgstr "機器分類サブ" + +#. module: product_classification +#: model:ir.actions.act_window,name:product_classification.product_equipment_classification_sub_action +#: model:ir.ui.menu,name:product_classification.product_equipment_classification_sub_menu +msgid "Equipment Sub-Classifications" +msgstr "機器分類サブ" + +#. module: product_classification +#: model:ir.model.fields,help:product_classification.field_product_consumable_classification__code +#: model:ir.model.fields,help:product_classification.field_product_equipment_classification__code +#: model:ir.model.fields,help:product_classification.field_product_equipment_classification_sub__code +#: model:ir.model.fields,help:product_classification.field_product_manufacturer__code +msgid "External code used for integration. A numeric code is preferred." +msgstr "連携に使用する外部コード。数値コードが推奨されます。" + +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_hit +msgid "HIT" +msgstr "HIT" + +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_hot +msgid "HOT / Concentrator" +msgstr "HOT/濃縮器" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__id +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__id +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__id +#: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__id +#: model:ir.model.fields,field_description:product_classification.field_product_template__id +msgid "ID" +msgstr "ID" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__write_uid +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__write_uid +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__write_uid +#: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__write_uid +msgid "Last Updated by" +msgstr "最終更新者" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__write_date +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__write_date +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__write_date +#: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__write_date +msgid "Last Updated on" +msgstr "最終更新日" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_product__manufacturer_id +#: model:ir.model.fields,field_description:product_classification.field_product_template__manufacturer_id +msgid "Manufacturer" +msgstr "メーカー" + +#. module: product_classification +#: model:ir.model.fields,help:product_classification.field_product_product__manufacturer_id +#: model:ir.model.fields,help:product_classification.field_product_template__manufacturer_id +msgid "Manufacturer of the product. Used in the Navi in Flow integration." +msgstr "プロダクトのメーカー。ナビフロー連携で使用されます。" + +#. module: product_classification +#: model:ir.actions.act_window,name:product_classification.product_manufacturer_action +#: model:ir.ui.menu,name:product_classification.product_manufacturer_menu +msgid "Manufacturers" +msgstr "メーカー" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__name +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__name +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__name +#: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__name +msgid "Name" +msgstr "名称" + +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_other_aux +msgid "Other (Auxiliary Device)" +msgstr "その他(副装置)" + +#. module: product_classification +#: model:ir.model.fields,help:product_classification.field_product_product__equipment_classification_id +#: model:ir.model.fields,help:product_classification.field_product_template__equipment_classification_id +msgid "" +"Primary classification of an equipment product. Used in the Navi in Flow " +"integration." +msgstr "機器プロダクトの主分類。ナビフロー連携で使用されます。" + +#. module: product_classification +#: model:ir.model,name:product_classification.model_product_template +msgid "Product" +msgstr "プロダクト" + +#. module: product_classification +#: model:ir.model,name:product_classification.model_product_consumable_classification +msgid "Product Consumable Classification" +msgstr "消耗品分類" + +#. module: product_classification +#: model:ir.model,name:product_classification.model_product_equipment_classification +msgid "Product Equipment Classification" +msgstr "機器分類" + +#. module: product_classification +#: model:ir.model,name:product_classification.model_product_equipment_classification_sub +msgid "Product Equipment Sub-Classification" +msgstr "機器分類サブ" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_product__product_kind +#: model:ir.model.fields,field_description:product_classification.field_product_template__product_kind +msgid "Product Kind" +msgstr "プロダクト種別" + +#. module: product_classification +#: model:ir.model,name:product_classification.model_product_manufacturer +msgid "Product Manufacturer" +msgstr "メーカー" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__sequence +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__sequence +#: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__sequence +#: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__sequence +msgid "Sequence" +msgstr "シーケンス" + +#. module: product_classification +#: model:ir.model.fields,help:product_classification.field_product_product__equipment_classification_sub_id +#: model:ir.model.fields,help:product_classification.field_product_template__equipment_classification_sub_id +msgid "" +"Sub-classification for auxiliary equipment. Used in the Navi in Flow " +"integration." +msgstr "補助機器のサブ分類。ナビフロー連携で使用されます。" + +#. module: product_classification +#: model:ir.model.constraint,message:product_classification.constraint_product_consumable_classification_code_uniq +msgid "The code of a consumable classification must be unique." +msgstr "消耗品分類のコードは一意である必要があります。" + +#. module: product_classification +#: model:ir.model.constraint,message:product_classification.constraint_product_manufacturer_code_uniq +msgid "The code of a manufacturer must be unique." +msgstr "メーカーのコードは一意である必要があります。" + +#. module: product_classification +#: model:ir.model.constraint,message:product_classification.constraint_product_equipment_classification_code_uniq +msgid "The code of an equipment classification must be unique." +msgstr "機器分類のコードは一意である必要があります。" + +#. module: product_classification +#: model:ir.model.constraint,message:product_classification.constraint_product_equipment_classification_sub_code_uniq +msgid "The code of an equipment sub-classification must be unique." +msgstr "機器分類サブのコードは一意である必要があります。" + +#. module: product_classification +#: model:ir.model.fields,help:product_classification.field_product_product__product_kind +#: model:ir.model.fields,help:product_classification.field_product_template__product_kind +msgid "" +"Whether the product is an equipment or a consumable. Used in the Navi in " +"Flow integration." +msgstr "プロダクトが機器か消耗品か。ナビフロー連携で使用されます。" diff --git a/nif/models/__init__.py b/product_classification/models/__init__.py similarity index 77% rename from nif/models/__init__.py rename to product_classification/models/__init__.py index 649bc11..3c7a8b1 100644 --- a/nif/models/__init__.py +++ b/product_classification/models/__init__.py @@ -1,4 +1,5 @@ from . import product_equipment_classification from . import product_equipment_classification_sub +from . import product_consumable_classification from . import product_manufacturer from . import product_template diff --git a/product_classification/models/product_consumable_classification.py b/product_classification/models/product_consumable_classification.py new file mode 100644 index 0000000..414a4bb --- /dev/null +++ b/product_classification/models/product_consumable_classification.py @@ -0,0 +1,22 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class ProductConsumableClassification(models.Model): + _name = "product.consumable.classification" + _description = "Product Consumable Classification" + _order = "sequence, code, id" + + name = fields.Char(required=True, translate=True) + code = fields.Char( + help="External code used for integration. A numeric code is preferred." + ) + sequence = fields.Integer(default=10) + active = fields.Boolean(default=True) + + _code_uniq = models.Constraint( + "unique(code)", + "The code of a consumable classification must be unique.", + ) diff --git a/nif/models/product_equipment_classification.py b/product_classification/models/product_equipment_classification.py similarity index 100% rename from nif/models/product_equipment_classification.py rename to product_classification/models/product_equipment_classification.py diff --git a/nif/models/product_equipment_classification_sub.py b/product_classification/models/product_equipment_classification_sub.py similarity index 100% rename from nif/models/product_equipment_classification_sub.py rename to product_classification/models/product_equipment_classification_sub.py diff --git a/nif/models/product_manufacturer.py b/product_classification/models/product_manufacturer.py similarity index 100% rename from nif/models/product_manufacturer.py rename to product_classification/models/product_manufacturer.py diff --git a/product_classification/models/product_template.py b/product_classification/models/product_template.py new file mode 100644 index 0000000..37e97a1 --- /dev/null +++ b/product_classification/models/product_template.py @@ -0,0 +1,39 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + product_kind = fields.Selection( + selection=[ + ("equipment", "Equipment"), + ("consumable", "Consumable"), + ], + help="Whether the product is an equipment or a consumable. " + "Used in the Navi in Flow integration.", + ) + manufacturer_id = fields.Many2one( + comodel_name="product.manufacturer", + string="Manufacturer", + help="Manufacturer of the product. Used in the Navi in Flow integration.", + ) + equipment_classification_id = fields.Many2one( + comodel_name="product.equipment.classification", + string="Equipment Classification", + help="Primary classification of an equipment product. " + "Used in the Navi in Flow integration.", + ) + equipment_classification_sub_id = fields.Many2one( + comodel_name="product.equipment.classification.sub", + string="Equipment Sub-Classification", + help="Sub-classification for auxiliary equipment. " + "Used in the Navi in Flow integration.", + ) + consumable_classification_id = fields.Many2one( + comodel_name="product.consumable.classification", + string="Consumable Classification", + help="Classification of a consumable product.", + ) diff --git a/nif/pyproject.toml b/product_classification/pyproject.toml similarity index 100% rename from nif/pyproject.toml rename to product_classification/pyproject.toml diff --git a/product_classification/readme/DESCRIPTION.md b/product_classification/readme/DESCRIPTION.md new file mode 100644 index 0000000..3867470 --- /dev/null +++ b/product_classification/readme/DESCRIPTION.md @@ -0,0 +1,26 @@ +This module adds classification master data to products so that equipment and +consumables can be categorized consistently. + +Each product can be flagged as **equipment** or **consumable** (*Product Kind*) +and linked to a **Manufacturer** (メーカー). Depending on the kind, it can then +be given a classification: + +- **Equipment Classification** (機器分類) — the primary classification of a + device, with an **Equipment Sub-Classification** (機器分類サブ) for auxiliary + devices. +- **Consumable Classification** — the classification of a consumable product. + +The manufacturer and each classification axis are backed by dedicated, +user-maintainable models (`product.manufacturer`, +`product.equipment.classification`, `product.equipment.classification.sub` and +`product.consumable.classification`) holding a name and an optional code (a +numeric code is preferred for integration with external systems). + +Several of these fields feed the **Navi in Flow** (ナビフロー) integration, which +exchanges product/equipment master data with the CIAS system; the fields +concerned say so in their help text so their purpose stays clear over time. + +The module ships the models and the configuration UI but only a small set of +sample equipment classifications, so the taxonomy can be tailored to each +deployment (for example through a company-specific data module or the external +integration). diff --git a/product_classification/readme/USAGE.md b/product_classification/readme/USAGE.md new file mode 100644 index 0000000..871a6da --- /dev/null +++ b/product_classification/readme/USAGE.md @@ -0,0 +1,16 @@ +To maintain the available classifications: + +1. Go to *Inventory > Configuration > Products* and open *Equipment + Classifications*, *Equipment Sub-Classifications*, *Consumable + Classifications* or *Manufacturers*. +2. Create the entries with a name and, preferably, a numeric code. + +To classify a product: + +1. Open a product and go to the *Classification* tab. +2. Set the **Product Kind** (equipment or consumable), the **Manufacturer** and + the relevant classification. The equipment or consumable classification + fields appear according to the selected kind. + +Products can be searched and filtered by manufacturer and classification from +the product list view. diff --git a/nif/security/ir.model.access.csv b/product_classification/security/ir.model.access.csv similarity index 75% rename from nif/security/ir.model.access.csv rename to product_classification/security/ir.model.access.csv index e7804d4..1d1730a 100644 --- a/nif/security/ir.model.access.csv +++ b/product_classification/security/ir.model.access.csv @@ -3,5 +3,7 @@ access_product_equipment_classification_user,product.equipment.classification us access_product_equipment_classification_admin,product.equipment.classification admin,model_product_equipment_classification,base.group_system,1,1,1,1 access_product_equipment_classification_sub_user,product.equipment.classification.sub user,model_product_equipment_classification_sub,base.group_user,1,0,0,0 access_product_equipment_classification_sub_admin,product.equipment.classification.sub admin,model_product_equipment_classification_sub,base.group_system,1,1,1,1 +access_product_consumable_classification_user,product.consumable.classification user,model_product_consumable_classification,base.group_user,1,0,0,0 +access_product_consumable_classification_admin,product.consumable.classification admin,model_product_consumable_classification,base.group_system,1,1,1,1 access_product_manufacturer_user,product.manufacturer user,model_product_manufacturer,base.group_user,1,0,0,0 access_product_manufacturer_admin,product.manufacturer admin,model_product_manufacturer,base.group_system,1,1,1,1 diff --git a/nif/static/description/icon.png b/product_classification/static/description/icon.png similarity index 100% rename from nif/static/description/icon.png rename to product_classification/static/description/icon.png diff --git a/nif/static/description/index.html b/product_classification/static/description/index.html similarity index 68% rename from nif/static/description/index.html rename to product_classification/static/description/index.html index e47a79c..19b8c61 100644 --- a/nif/static/description/index.html +++ b/product_classification/static/description/index.html @@ -2,19 +2,18 @@ - -README.rst + +Product Classification -
+
+

Product Classification

- - -Odoo Community Association - - -
diff --git a/product_classification/tests/__init__.py b/product_classification/tests/__init__.py new file mode 100644 index 0000000..aac08e9 --- /dev/null +++ b/product_classification/tests/__init__.py @@ -0,0 +1 @@ +from . import test_product_classification diff --git a/nif/tests/test_product_equipment_classification.py b/product_classification/tests/test_product_classification.py similarity index 66% rename from nif/tests/test_product_equipment_classification.py rename to product_classification/tests/test_product_classification.py index 467b727..55380f7 100644 --- a/nif/tests/test_product_equipment_classification.py +++ b/product_classification/tests/test_product_classification.py @@ -3,12 +3,11 @@ from psycopg2 import IntegrityError -from odoo.exceptions import ValidationError from odoo.tests.common import TransactionCase from odoo.tools import mute_logger -class TestProductEquipmentClassification(TransactionCase): +class TestProductClassification(TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() @@ -18,29 +17,41 @@ def setUpClass(cls): cls.classification_sub = cls.env["product.equipment.classification.sub"].create( {"name": "Humidifier", "code": "200"} ) + cls.consumable_classification = cls.env[ + "product.consumable.classification" + ].create({"name": "Mask", "code": "400"}) cls.manufacturer = cls.env["product.manufacturer"].create( {"name": "Acme Medical", "code": "300"} ) cls.product = cls.env["product.template"].create({"name": "Test Device"}) - def test_assign_classifications(self): + def test_assign_equipment_classifications(self): self.product.write( { + "product_kind": "equipment", "manufacturer_id": self.manufacturer.id, "equipment_classification_id": self.classification.id, "equipment_classification_sub_id": self.classification_sub.id, } ) + self.assertEqual(self.product.product_kind, "equipment") self.assertEqual(self.product.manufacturer_id, self.manufacturer) self.assertEqual(self.product.equipment_classification_id, self.classification) self.assertEqual( self.product.equipment_classification_sub_id, self.classification_sub ) - def test_equipment_consumable_mutually_exclusive(self): - self.product.is_equipment = True - with self.assertRaises(ValidationError): - self.product.is_consumable = True + def test_assign_consumable_classification(self): + self.product.write( + { + "product_kind": "consumable", + "consumable_classification_id": self.consumable_classification.id, + } + ) + self.assertEqual(self.product.product_kind, "consumable") + self.assertEqual( + self.product.consumable_classification_id, self.consumable_classification + ) @mute_logger("odoo.sql_db") def test_classification_code_unique(self): @@ -56,6 +67,13 @@ def test_classification_sub_code_unique(self): {"name": "Duplicate", "code": "200"} ) + @mute_logger("odoo.sql_db") + def test_consumable_classification_code_unique(self): + with self.assertRaises(IntegrityError): + self.env["product.consumable.classification"].create( + {"name": "Duplicate", "code": "400"} + ) + @mute_logger("odoo.sql_db") def test_manufacturer_code_unique(self): with self.assertRaises(IntegrityError): diff --git a/product_classification/views/product_consumable_classification_views.xml b/product_classification/views/product_consumable_classification_views.xml new file mode 100644 index 0000000..1acf6ed --- /dev/null +++ b/product_classification/views/product_consumable_classification_views.xml @@ -0,0 +1,69 @@ + + + + product.consumable.classification.list + product.consumable.classification + + + + + + + + + + + product.consumable.classification.form + product.consumable.classification + +
+ + + + + + + + + + + +
+
+
+ + + product.consumable.classification.search + product.consumable.classification + + + + + + + + + + + + Consumable Classifications + product.consumable.classification + list,form + + + +
diff --git a/nif/views/product_equipment_classification_sub_views.xml b/product_classification/views/product_equipment_classification_sub_views.xml similarity index 98% rename from nif/views/product_equipment_classification_sub_views.xml rename to product_classification/views/product_equipment_classification_sub_views.xml index 76319f1..be81b42 100644 --- a/nif/views/product_equipment_classification_sub_views.xml +++ b/product_classification/views/product_equipment_classification_sub_views.xml @@ -66,7 +66,7 @@ diff --git a/nif/views/product_equipment_classification_views.xml b/product_classification/views/product_equipment_classification_views.xml similarity index 98% rename from nif/views/product_equipment_classification_views.xml rename to product_classification/views/product_equipment_classification_views.xml index c24ae64..3fc9a39 100644 --- a/nif/views/product_equipment_classification_views.xml +++ b/product_classification/views/product_equipment_classification_views.xml @@ -63,7 +63,7 @@ diff --git a/nif/views/product_manufacturer_views.xml b/product_classification/views/product_manufacturer_views.xml similarity index 96% rename from nif/views/product_manufacturer_views.xml rename to product_classification/views/product_manufacturer_views.xml index 235f220..9c490d0 100644 --- a/nif/views/product_manufacturer_views.xml +++ b/product_classification/views/product_manufacturer_views.xml @@ -63,7 +63,7 @@ diff --git a/nif/views/product_template_views.xml b/product_classification/views/product_template_views.xml similarity index 69% rename from nif/views/product_template_views.xml rename to product_classification/views/product_template_views.xml index 23903a2..55c709e 100644 --- a/nif/views/product_template_views.xml +++ b/product_classification/views/product_template_views.xml @@ -1,20 +1,23 @@ - product.template.form.nif + product.template.form.classification product.template - + - - - + + + - + @@ -38,7 +44,7 @@ - product.template.search.nif + product.template.search.classification product.template @@ -46,6 +52,7 @@ + From 86b8b994c6c663001f672999f4cbff34c5cf865b Mon Sep 17 00:00:00 2001 From: yostashiro Date: Mon, 13 Jul 2026 09:11:32 +0000 Subject: [PATCH 04/13] [IMP] product_classification: add accessory product kind MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an "accessory" (付属品) value to product_kind, between equipment and consumable. Accessories share the equipment classification taxonomy, so the Equipment Classification group on the product form is shown for both equipment and accessory kinds. --- product_classification/i18n/ja.po | 23 +++++++++++-------- .../models/product_template.py | 9 ++++---- .../tests/test_product_classification.py | 10 ++++++++ .../views/product_template_views.xml | 2 +- 4 files changed, 30 insertions(+), 14 deletions(-) diff --git a/product_classification/i18n/ja.po b/product_classification/i18n/ja.po index 68d904b..7983415 100644 --- a/product_classification/i18n/ja.po +++ b/product_classification/i18n/ja.po @@ -13,6 +13,11 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: product_classification +#: model:ir.model.fields.selection,name:product_classification.selection__product_template__product_kind__accessory +msgid "Accessory" +msgstr "付属品" + #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__active #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__active @@ -208,9 +213,9 @@ msgstr "その他(副装置)" #: model:ir.model.fields,help:product_classification.field_product_product__equipment_classification_id #: model:ir.model.fields,help:product_classification.field_product_template__equipment_classification_id msgid "" -"Primary classification of an equipment product. Used in the Navi in Flow " -"integration." -msgstr "機器プロダクトの主分類。ナビフロー連携で使用されます。" +"Primary classification of an equipment or accessory product. Used in the " +"Navi in Flow integration." +msgstr "機器または付属品プロダクトの主分類。ナビフロー連携で使用されます。" #. module: product_classification #: model:ir.model,name:product_classification.model_product_template @@ -255,9 +260,9 @@ msgstr "シーケンス" #: model:ir.model.fields,help:product_classification.field_product_product__equipment_classification_sub_id #: model:ir.model.fields,help:product_classification.field_product_template__equipment_classification_sub_id msgid "" -"Sub-classification for auxiliary equipment. Used in the Navi in Flow " -"integration." -msgstr "補助機器のサブ分類。ナビフロー連携で使用されます。" +"Sub-classification for auxiliary equipment or accessories. Used in the Navi " +"in Flow integration." +msgstr "補助機器または付属品のサブ分類。ナビフロー連携で使用されます。" #. module: product_classification #: model:ir.model.constraint,message:product_classification.constraint_product_consumable_classification_code_uniq @@ -283,6 +288,6 @@ msgstr "機器分類サブのコードは一意である必要があります。 #: model:ir.model.fields,help:product_classification.field_product_product__product_kind #: model:ir.model.fields,help:product_classification.field_product_template__product_kind msgid "" -"Whether the product is an equipment or a consumable. Used in the Navi in " -"Flow integration." -msgstr "プロダクトが機器か消耗品か。ナビフロー連携で使用されます。" +"Whether the product is an equipment, an accessory or a consumable. Used in " +"the Navi in Flow integration." +msgstr "プロダクトが機器・付属品・消耗品のいずれか。ナビフロー連携で使用されます。" diff --git a/product_classification/models/product_template.py b/product_classification/models/product_template.py index 37e97a1..f14afef 100644 --- a/product_classification/models/product_template.py +++ b/product_classification/models/product_template.py @@ -10,10 +10,11 @@ class ProductTemplate(models.Model): product_kind = fields.Selection( selection=[ ("equipment", "Equipment"), + ("accessory", "Accessory"), ("consumable", "Consumable"), ], - help="Whether the product is an equipment or a consumable. " - "Used in the Navi in Flow integration.", + help="Whether the product is an equipment, an accessory or a " + "consumable. Used in the Navi in Flow integration.", ) manufacturer_id = fields.Many2one( comodel_name="product.manufacturer", @@ -23,13 +24,13 @@ class ProductTemplate(models.Model): equipment_classification_id = fields.Many2one( comodel_name="product.equipment.classification", string="Equipment Classification", - help="Primary classification of an equipment product. " + help="Primary classification of an equipment or accessory product. " "Used in the Navi in Flow integration.", ) equipment_classification_sub_id = fields.Many2one( comodel_name="product.equipment.classification.sub", string="Equipment Sub-Classification", - help="Sub-classification for auxiliary equipment. " + help="Sub-classification for auxiliary equipment or accessories. " "Used in the Navi in Flow integration.", ) consumable_classification_id = fields.Many2one( diff --git a/product_classification/tests/test_product_classification.py b/product_classification/tests/test_product_classification.py index 55380f7..0a9bce1 100644 --- a/product_classification/tests/test_product_classification.py +++ b/product_classification/tests/test_product_classification.py @@ -41,6 +41,16 @@ def test_assign_equipment_classifications(self): self.product.equipment_classification_sub_id, self.classification_sub ) + def test_assign_accessory_classification(self): + self.product.write( + { + "product_kind": "accessory", + "equipment_classification_id": self.classification.id, + } + ) + self.assertEqual(self.product.product_kind, "accessory") + self.assertEqual(self.product.equipment_classification_id, self.classification) + def test_assign_consumable_classification(self): self.product.write( { diff --git a/product_classification/views/product_template_views.xml b/product_classification/views/product_template_views.xml index 55c709e..d992526 100644 --- a/product_classification/views/product_template_views.xml +++ b/product_classification/views/product_template_views.xml @@ -17,7 +17,7 @@ Date: Tue, 14 Jul 2026 10:29:59 +0000 Subject: [PATCH 05/13] fixup! --- product_classification/README.rst | 56 +++++++-------- product_classification/readme/CONFIGURE.md | 11 +++ product_classification/readme/DESCRIPTION.md | 30 +++----- product_classification/readme/USAGE.md | 7 -- .../static/description/index.html | 69 +++++++++---------- 5 files changed, 78 insertions(+), 95 deletions(-) create mode 100644 product_classification/readme/CONFIGURE.md diff --git a/product_classification/README.rst b/product_classification/README.rst index 2bb82a0..eba6b88 100644 --- a/product_classification/README.rst +++ b/product_classification/README.rst @@ -7,7 +7,7 @@ Product Classification !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:996dc09f7baa2c4801baea97c2f73e2b8203244c11d563527f1cb1bca83ab24b + !! source digest: sha256:e8ded931b142bf8f53598f2f9c4b26667a87b7caf8e3d10196d1220ebea7e063 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -22,44 +22,35 @@ Product Classification |badge1| |badge2| |badge3| -This module adds classification master data to products so that -equipment and consumables can be categorized consistently. +This module adds classification master data to products so equipment and +consumables can be categorized consistently. Each product can be flagged as **equipment** or **consumable** (*Product -Kind*) and linked to a **Manufacturer** (メーカー). Depending on the -kind, it can then be given a classification: - -- **Equipment Classification** (機器分類) — the primary classification - of a device, with an **Equipment Sub-Classification** (機器分類サブ) - for auxiliary devices. -- **Consumable Classification** — the classification of a consumable - product. - -The manufacturer and each classification axis are backed by dedicated, -user-maintainable models (``product.manufacturer``, -``product.equipment.classification``, -``product.equipment.classification.sub`` and -``product.consumable.classification``) holding a name and an optional -code (a numeric code is preferred for integration with external -systems). - -Several of these fields feed the **Navi in Flow** (ナビフロー) -integration, which exchanges product/equipment master data with the CIAS -system; the fields concerned say so in their help text so their purpose -stays clear over time. - -The module ships the models and the configuration UI but only a small -set of sample equipment classifications, so the taxonomy can be tailored -to each deployment (for example through a company-specific data module -or the external integration). +Kind*) and linked to a **Manufacturer** (メーカー), then given a +classification: + +- **Equipment Classification** (機器分類), with an **Equipment + Sub-Classification** (機器分類サブ) for auxiliary devices. +- **Consumable Classification** for consumable products. + +Each axis is backed by a dedicated, user-maintainable model holding a +name and an optional code (a numeric code is preferred for integration +with external systems). Several fields feed the **Navi in Flow** +(ナビフロー) integration, which exchanges product/equipment master data +with the CIAS system. **Table of contents** .. contents:: :local: -Usage -===== +Configuration +============= + +The module ships the classification models and configuration UI with +only a small set of sample equipment classifications, so the taxonomy +can be tailored to each deployment (for example through a +company-specific data module or the external integration). To maintain the available classifications: @@ -68,6 +59,9 @@ To maintain the available classifications: Classifications* or *Manufacturers*. 2. Create the entries with a name and, preferably, a numeric code. +Usage +===== + To classify a product: 1. Open a product and go to the *Classification* tab. diff --git a/product_classification/readme/CONFIGURE.md b/product_classification/readme/CONFIGURE.md new file mode 100644 index 0000000..9f514d2 --- /dev/null +++ b/product_classification/readme/CONFIGURE.md @@ -0,0 +1,11 @@ +The module ships the classification models and configuration UI with only a +small set of sample equipment classifications, so the taxonomy can be tailored +to each deployment (for example through a company-specific data module or the +external integration). + +To maintain the available classifications: + +1. Go to *Inventory > Configuration > Products* and open *Equipment + Classifications*, *Equipment Sub-Classifications*, *Consumable + Classifications* or *Manufacturers*. +2. Create the entries with a name and, preferably, a numeric code. diff --git a/product_classification/readme/DESCRIPTION.md b/product_classification/readme/DESCRIPTION.md index 3867470..aa601de 100644 --- a/product_classification/readme/DESCRIPTION.md +++ b/product_classification/readme/DESCRIPTION.md @@ -1,26 +1,14 @@ -This module adds classification master data to products so that equipment and +This module adds classification master data to products so equipment and consumables can be categorized consistently. Each product can be flagged as **equipment** or **consumable** (*Product Kind*) -and linked to a **Manufacturer** (メーカー). Depending on the kind, it can then -be given a classification: +and linked to a **Manufacturer** (メーカー), then given a classification: -- **Equipment Classification** (機器分類) — the primary classification of a - device, with an **Equipment Sub-Classification** (機器分類サブ) for auxiliary - devices. -- **Consumable Classification** — the classification of a consumable product. +- **Equipment Classification** (機器分類), with an **Equipment + Sub-Classification** (機器分類サブ) for auxiliary devices. +- **Consumable Classification** for consumable products. -The manufacturer and each classification axis are backed by dedicated, -user-maintainable models (`product.manufacturer`, -`product.equipment.classification`, `product.equipment.classification.sub` and -`product.consumable.classification`) holding a name and an optional code (a -numeric code is preferred for integration with external systems). - -Several of these fields feed the **Navi in Flow** (ナビフロー) integration, which -exchanges product/equipment master data with the CIAS system; the fields -concerned say so in their help text so their purpose stays clear over time. - -The module ships the models and the configuration UI but only a small set of -sample equipment classifications, so the taxonomy can be tailored to each -deployment (for example through a company-specific data module or the external -integration). +Each axis is backed by a dedicated, user-maintainable model holding a name and +an optional code (a numeric code is preferred for integration with external +systems). Several fields feed the **Navi in Flow** (ナビフロー) integration, +which exchanges product/equipment master data with the CIAS system. diff --git a/product_classification/readme/USAGE.md b/product_classification/readme/USAGE.md index 871a6da..915be79 100644 --- a/product_classification/readme/USAGE.md +++ b/product_classification/readme/USAGE.md @@ -1,10 +1,3 @@ -To maintain the available classifications: - -1. Go to *Inventory > Configuration > Products* and open *Equipment - Classifications*, *Equipment Sub-Classifications*, *Consumable - Classifications* or *Manufacturers*. -2. Create the entries with a name and, preferably, a numeric code. - To classify a product: 1. Open a product and go to the *Classification* tab. diff --git a/product_classification/static/description/index.html b/product_classification/static/description/index.html index 19b8c61..ae36297 100644 --- a/product_classification/static/description/index.html +++ b/product_classification/static/description/index.html @@ -1,3 +1,4 @@ + @@ -366,50 +367,43 @@

Product Classification

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:996dc09f7baa2c4801baea97c2f73e2b8203244c11d563527f1cb1bca83ab24b +!! source digest: sha256:e8ded931b142bf8f53598f2f9c4b26667a87b7caf8e3d10196d1220ebea7e063 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 qrtl/ocj-custom

-

This module adds classification master data to products so that -equipment and consumables can be categorized consistently.

+

This module adds classification master data to products so equipment and +consumables can be categorized consistently.

Each product can be flagged as equipment or consumable (Product -Kind) and linked to a Manufacturer (メーカー). Depending on the -kind, it can then be given a classification:

+Kind) and linked to a Manufacturer (メーカー), then given a +classification:

    -
  • Equipment Classification (機器分類) — the primary classification -of a device, with an Equipment Sub-Classification (機器分類サブ) -for auxiliary devices.
  • -
  • Consumable Classification — the classification of a consumable -product.
  • +
  • Equipment Classification (機器分類), with an Equipment +Sub-Classification (機器分類サブ) for auxiliary devices.
  • +
  • Consumable Classification for consumable products.
-

The manufacturer and each classification axis are backed by dedicated, -user-maintainable models (product.manufacturer, -product.equipment.classification, -product.equipment.classification.sub and -product.consumable.classification) holding a name and an optional -code (a numeric code is preferred for integration with external -systems).

-

Several of these fields feed the Navi in Flow (ナビフロー) -integration, which exchanges product/equipment master data with the CIAS -system; the fields concerned say so in their help text so their purpose -stays clear over time.

-

The module ships the models and the configuration UI but only a small -set of sample equipment classifications, so the taxonomy can be tailored -to each deployment (for example through a company-specific data module -or the external integration).

+

Each axis is backed by a dedicated, user-maintainable model holding a +name and an optional code (a numeric code is preferred for integration +with external systems). Several fields feed the Navi in Flow +(ナビフロー) integration, which exchanges product/equipment master data +with the CIAS system.

Table of contents

-
-

Usage

+
+

Configuration

+

The module ships the classification models and configuration UI with +only a small set of sample equipment classifications, so the taxonomy +can be tailored to each deployment (for example through a +company-specific data module or the external integration).

To maintain the available classifications:

  1. Go to Inventory > Configuration > Products and open Equipment @@ -417,6 +411,9 @@

    Usage

    Classifications
    or Manufacturers.
  2. Create the entries with a name and, preferably, a numeric code.
+
+
+

Usage

To classify a product:

  1. Open a product and go to the Classification tab.
  2. @@ -429,7 +426,7 @@

    Usage

    from the product list view.

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -437,15 +434,15 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • Quartile
-

Maintainers

+

Maintainers

Current maintainer:

yostashiro

This module is part of the qrtl/ocj-custom project on GitHub.

From 858505f9f3d2bcc154ebd9388bce28fe39fb5df0 Mon Sep 17 00:00:00 2001 From: yostashiro Date: Tue, 14 Jul 2026 10:41:17 +0000 Subject: [PATCH 06/13] fixup! --- product_classification/static/description/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/product_classification/static/description/index.html b/product_classification/static/description/index.html index ae36297..19f4576 100644 --- a/product_classification/static/description/index.html +++ b/product_classification/static/description/index.html @@ -1,4 +1,3 @@ - From b44fdf6c5b886a1536680ef3cb6d8dcaab2d3425 Mon Sep 17 00:00:00 2001 From: yostashiro Date: Tue, 14 Jul 2026 10:50:21 +0000 Subject: [PATCH 07/13] fixup! --- .../views/product_template_views.xml | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/product_classification/views/product_template_views.xml b/product_classification/views/product_template_views.xml index d992526..46c760b 100644 --- a/product_classification/views/product_template_views.xml +++ b/product_classification/views/product_template_views.xml @@ -11,29 +11,24 @@ - - - + From 939bf1d4b383fc2207d0f7881720c358fff49978 Mon Sep 17 00:00:00 2001 From: yostashiro Date: Tue, 14 Jul 2026 13:07:03 +0000 Subject: [PATCH 08/13] fixup! --- .../product_equipment_classification_data.xml | 100 +++++++++++++++++- product_classification/i18n/ja.po | 57 +++++++++- 2 files changed, 152 insertions(+), 5 deletions(-) diff --git a/product_classification/data/product_equipment_classification_data.xml b/product_classification/data/product_equipment_classification_data.xml index 97ed5d6..bb286e3 100644 --- a/product_classification/data/product_equipment_classification_data.xml +++ b/product_classification/data/product_equipment_classification_data.xml @@ -1,31 +1,123 @@ HOT / Concentrator + 1 10 + + HOT / Liquid Oxygen + 2 + 20 + + + HOT / Cylinder + 3 + 30 + + + MV / In-hospital & Home + 5 + 40 + CPAP - 20 + 7 + 50 + + + ASV + 10 + 51 HIT - 30 + 8 + 60 + + + Pulse Oximeter + 21 + 70 + + + PCA Pump + 22 + 80 + + + Ultrasonic Bone Healing Device + 23 + 90 + + + Cough Assist Device + 24 + 100 + + + High-Flow Therapy + 25 + 110 + + + Other Medical Equipment + 9 + 120 Other (Auxiliary Device) - 40 + 90 + 130 + + + Portable Oxygen + 20 + 140 diff --git a/product_classification/i18n/ja.po b/product_classification/i18n/ja.po index 7983415..6c73cbb 100644 --- a/product_classification/i18n/ja.po +++ b/product_classification/i18n/ja.po @@ -13,6 +13,11 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_asv +msgid "ASV" +msgstr "ASV" + #. module: product_classification #: model:ir.model.fields.selection,name:product_classification.selection__product_template__product_kind__accessory msgid "Accessory" @@ -80,6 +85,11 @@ msgstr "消耗品分類" msgid "Consumable Classifications" msgstr "消耗品分類" +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_cough_assist +msgid "Cough Assist Device" +msgstr "排痰補助装置" + #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__create_uid #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__create_uid @@ -149,10 +159,25 @@ msgid "HIT" msgstr "HIT" #. module: product_classification -#: model:product.equipment.classification,name:product_classification.product_equipment_classification_hot +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_hot_concentrator msgid "HOT / Concentrator" msgstr "HOT/濃縮器" +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_hot_cylinder +msgid "HOT / Cylinder" +msgstr "HOT/ボンベ" + +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_hot_liquid_oxygen +msgid "HOT / Liquid Oxygen" +msgstr "HOT/液体酸素" + +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_high_flow_therapy +msgid "High-Flow Therapy" +msgstr "ハイフローセラピー" + #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__id #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__id @@ -178,6 +203,11 @@ msgstr "最終更新者" msgid "Last Updated on" msgstr "最終更新日" +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_mv +msgid "MV / In-hospital & Home" +msgstr "MV/院内・在宅" + #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_product__manufacturer_id #: model:ir.model.fields,field_description:product_classification.field_product_template__manufacturer_id @@ -209,6 +239,21 @@ msgstr "名称" msgid "Other (Auxiliary Device)" msgstr "その他(副装置)" +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_other_medical +msgid "Other Medical Equipment" +msgstr "その他医療機器" + +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_pca_pump +msgid "PCA Pump" +msgstr "PCAポンプ" + +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_portable_oxygen +msgid "Portable Oxygen" +msgstr "携帯酸素" + #. module: product_classification #: model:ir.model.fields,help:product_classification.field_product_product__equipment_classification_id #: model:ir.model.fields,help:product_classification.field_product_template__equipment_classification_id @@ -248,6 +293,11 @@ msgstr "プロダクト種別" msgid "Product Manufacturer" msgstr "メーカー" +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_pulse_oximeter +msgid "Pulse Oximeter" +msgstr "パルスオキシメータ" + #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__sequence #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__sequence @@ -284,6 +334,11 @@ msgstr "機器分類のコードは一意である必要があります。" msgid "The code of an equipment sub-classification must be unique." msgstr "機器分類サブのコードは一意である必要があります。" +#. module: product_classification +#: model:product.equipment.classification,name:product_classification.product_equipment_classification_ultrasonic_bone_healing +msgid "Ultrasonic Bone Healing Device" +msgstr "超音波骨折治療器" + #. module: product_classification #: model:ir.model.fields,help:product_classification.field_product_product__product_kind #: model:ir.model.fields,help:product_classification.field_product_template__product_kind From d8609253aef16811f9349b363009c344d8c81a73 Mon Sep 17 00:00:00 2001 From: yostashiro Date: Tue, 14 Jul 2026 14:12:57 +0000 Subject: [PATCH 09/13] fixup! --- product_classification/i18n/ja.po | 8 ++++ .../views/product_template_views.xml | 45 ++++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/product_classification/i18n/ja.po b/product_classification/i18n/ja.po index 6c73cbb..b422f59 100644 --- a/product_classification/i18n/ja.po +++ b/product_classification/i18n/ja.po @@ -20,6 +20,7 @@ msgstr "ASV" #. module: product_classification #: model:ir.model.fields.selection,name:product_classification.selection__product_template__product_kind__accessory +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search msgid "Accessory" msgstr "付属品" @@ -69,6 +70,7 @@ msgstr "コード" #. module: product_classification #: model:ir.model.fields.selection,name:product_classification.selection__product_template__product_kind__consumable +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search msgid "Consumable" msgstr "消耗品" @@ -76,6 +78,7 @@ msgstr "消耗品" #: model:ir.model.fields,field_description:product_classification.field_product_product__consumable_classification_id #: model:ir.model.fields,field_description:product_classification.field_product_template__consumable_classification_id #: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_form +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search msgid "Consumable Classification" msgstr "消耗品分類" @@ -117,6 +120,7 @@ msgstr "表示名" #. module: product_classification #: model:ir.model.fields.selection,name:product_classification.selection__product_template__product_kind__equipment +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search msgid "Equipment" msgstr "機器" @@ -124,6 +128,7 @@ msgstr "機器" #: model:ir.model.fields,field_description:product_classification.field_product_product__equipment_classification_id #: model:ir.model.fields,field_description:product_classification.field_product_template__equipment_classification_id #: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_form +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search msgid "Equipment Classification" msgstr "機器分類" @@ -136,6 +141,7 @@ msgstr "機器分類" #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_product__equipment_classification_sub_id #: model:ir.model.fields,field_description:product_classification.field_product_template__equipment_classification_sub_id +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search msgid "Equipment Sub-Classification" msgstr "機器分類サブ" @@ -211,6 +217,7 @@ msgstr "MV/院内・在宅" #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_product__manufacturer_id #: model:ir.model.fields,field_description:product_classification.field_product_template__manufacturer_id +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search msgid "Manufacturer" msgstr "メーカー" @@ -285,6 +292,7 @@ msgstr "機器分類サブ" #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_product__product_kind #: model:ir.model.fields,field_description:product_classification.field_product_template__product_kind +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search msgid "Product Kind" msgstr "プロダクト種別" diff --git a/product_classification/views/product_template_views.xml b/product_classification/views/product_template_views.xml index 46c760b..ae24a71 100644 --- a/product_classification/views/product_template_views.xml +++ b/product_classification/views/product_template_views.xml @@ -44,11 +44,54 @@ - + + + + + + + + + + + + From 245edcb2423d0ecc2940087c90f1cc344b9883dc Mon Sep 17 00:00:00 2001 From: Morita Shinnosuke Date: Wed, 29 Jul 2026 09:53:32 +0000 Subject: [PATCH 10/13] [IMP] product_classification: add middle and minor product categories --- product_classification/README.rst | 30 +++++---- product_classification/__manifest__.py | 2 + product_classification/models/__init__.py | 2 + .../models/product_middle_category.py | 22 +++++++ .../models/product_minor_category.py | 22 +++++++ .../models/product_template.py | 10 +++ product_classification/readme/CONFIGURE.md | 3 +- product_classification/readme/DESCRIPTION.md | 3 + .../security/ir.model.access.csv | 4 ++ .../static/description/index.html | 62 +++++++++++-------- .../views/product_middle_category_views.xml | 27 ++++++++ .../views/product_minor_category_views.xml | 27 ++++++++ .../views/product_template_views.xml | 16 +++++ 13 files changed, 192 insertions(+), 38 deletions(-) create mode 100644 product_classification/models/product_middle_category.py create mode 100644 product_classification/models/product_minor_category.py create mode 100644 product_classification/views/product_middle_category_views.xml create mode 100644 product_classification/views/product_minor_category_views.xml diff --git a/product_classification/README.rst b/product_classification/README.rst index eba6b88..1cbebde 100644 --- a/product_classification/README.rst +++ b/product_classification/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ====================== Product Classification ====================== @@ -13,12 +17,12 @@ Product Classification .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 -.. |badge3| image:: https://img.shields.io/badge/github-qrtl%2Focj--custom-lightgray.png?logo=github - :target: https://github.com/qrtl/ocj-custom/tree/19.0/product_classification - :alt: qrtl/ocj-custom +.. |badge3| image:: https://img.shields.io/badge/github-qrtl%2FOCJ Custom-lightgray.png?logo=github + :target: https://github.com/qrtl/OCJ Custom/tree/19.0/product_classification + :alt: qrtl/OCJ Custom |badge1| |badge2| |badge3| @@ -29,9 +33,12 @@ Each product can be flagged as **equipment** or **consumable** (*Product Kind*) and linked to a **Manufacturer** (メーカー), then given a classification: -- **Equipment Classification** (機器分類), with an **Equipment - Sub-Classification** (機器分類サブ) for auxiliary devices. -- **Consumable Classification** for consumable products. +- **Equipment Classification** (機器分類), with an **Equipment + Sub-Classification** (機器分類サブ) for auxiliary devices. +- **Consumable Classification** for consumable products. + +Products can also be given a **Middle Category** (中分類) and a **Minor +Category** (小分類). Each axis is backed by a dedicated, user-maintainable model holding a name and an optional code (a numeric code is preferred for integration @@ -56,7 +63,8 @@ To maintain the available classifications: 1. Go to *Inventory > Configuration > Products* and open *Equipment Classifications*, *Equipment Sub-Classifications*, *Consumable - Classifications* or *Manufacturers*. + Classifications*, *Middle Categories*, *Minor Categories* or + *Manufacturers*. 2. Create the entries with a name and, preferably, a numeric code. Usage @@ -76,10 +84,10 @@ from the product list view. Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -102,6 +110,6 @@ Current maintainer: |maintainer-yostashiro| -This module is part of the `qrtl/ocj-custom `_ project on GitHub. +This module is part of the `qrtl/OCJ Custom `_ project on GitHub. You are welcome to contribute. diff --git a/product_classification/__manifest__.py b/product_classification/__manifest__.py index 53171f6..d891008 100644 --- a/product_classification/__manifest__.py +++ b/product_classification/__manifest__.py @@ -18,6 +18,8 @@ "views/product_equipment_classification_views.xml", "views/product_equipment_classification_sub_views.xml", "views/product_consumable_classification_views.xml", + "views/product_middle_category_views.xml", + "views/product_minor_category_views.xml", "views/product_manufacturer_views.xml", "views/product_template_views.xml", ], diff --git a/product_classification/models/__init__.py b/product_classification/models/__init__.py index 3c7a8b1..83983b8 100644 --- a/product_classification/models/__init__.py +++ b/product_classification/models/__init__.py @@ -1,5 +1,7 @@ from . import product_equipment_classification from . import product_equipment_classification_sub from . import product_consumable_classification +from . import product_middle_category +from . import product_minor_category from . import product_manufacturer from . import product_template diff --git a/product_classification/models/product_middle_category.py b/product_classification/models/product_middle_category.py new file mode 100644 index 0000000..cf78d98 --- /dev/null +++ b/product_classification/models/product_middle_category.py @@ -0,0 +1,22 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class ProductMiddleCategory(models.Model): + _name = "product.middle.category" + _description = "Product Middle Category" + _order = "sequence, code, id" + + name = fields.Char(required=True, translate=True) + code = fields.Char( + help="External code used for integration. A numeric code is preferred." + ) + sequence = fields.Integer(default=10) + active = fields.Boolean(default=True) + + _code_uniq = models.Constraint( + "unique(code)", + "The code of a middle category must be unique.", + ) diff --git a/product_classification/models/product_minor_category.py b/product_classification/models/product_minor_category.py new file mode 100644 index 0000000..0805599 --- /dev/null +++ b/product_classification/models/product_minor_category.py @@ -0,0 +1,22 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class ProductMinorCategory(models.Model): + _name = "product.minor.category" + _description = "Product Minor Category" + _order = "sequence, code, id" + + name = fields.Char(required=True, translate=True) + code = fields.Char( + help="External code used for integration. A numeric code is preferred." + ) + sequence = fields.Integer(default=10) + active = fields.Boolean(default=True) + + _code_uniq = models.Constraint( + "unique(code)", + "The code of a minor category must be unique.", + ) diff --git a/product_classification/models/product_template.py b/product_classification/models/product_template.py index f14afef..e18a694 100644 --- a/product_classification/models/product_template.py +++ b/product_classification/models/product_template.py @@ -38,3 +38,13 @@ class ProductTemplate(models.Model): string="Consumable Classification", help="Classification of a consumable product.", ) + middle_category_id = fields.Many2one( + comodel_name="product.middle.category", + string="Middle Category", + help="Middle-level product category. Used in the Navi in Flow integration.", + ) + minor_category_id = fields.Many2one( + comodel_name="product.minor.category", + string="Minor Category", + help="Minor-level product category. Used in the Navi in Flow integration.", + ) diff --git a/product_classification/readme/CONFIGURE.md b/product_classification/readme/CONFIGURE.md index 9f514d2..d633bde 100644 --- a/product_classification/readme/CONFIGURE.md +++ b/product_classification/readme/CONFIGURE.md @@ -7,5 +7,6 @@ To maintain the available classifications: 1. Go to *Inventory > Configuration > Products* and open *Equipment Classifications*, *Equipment Sub-Classifications*, *Consumable - Classifications* or *Manufacturers*. + Classifications*, *Middle Categories*, *Minor Categories* or + *Manufacturers*. 2. Create the entries with a name and, preferably, a numeric code. diff --git a/product_classification/readme/DESCRIPTION.md b/product_classification/readme/DESCRIPTION.md index aa601de..b40748e 100644 --- a/product_classification/readme/DESCRIPTION.md +++ b/product_classification/readme/DESCRIPTION.md @@ -8,6 +8,9 @@ and linked to a **Manufacturer** (メーカー), then given a classification: Sub-Classification** (機器分類サブ) for auxiliary devices. - **Consumable Classification** for consumable products. +Products can also be given a **Middle Category** (中分類) and a **Minor +Category** (小分類). + Each axis is backed by a dedicated, user-maintainable model holding a name and an optional code (a numeric code is preferred for integration with external systems). Several fields feed the **Navi in Flow** (ナビフロー) integration, diff --git a/product_classification/security/ir.model.access.csv b/product_classification/security/ir.model.access.csv index 1d1730a..426fc92 100644 --- a/product_classification/security/ir.model.access.csv +++ b/product_classification/security/ir.model.access.csv @@ -5,5 +5,9 @@ access_product_equipment_classification_sub_user,product.equipment.classificatio access_product_equipment_classification_sub_admin,product.equipment.classification.sub admin,model_product_equipment_classification_sub,base.group_system,1,1,1,1 access_product_consumable_classification_user,product.consumable.classification user,model_product_consumable_classification,base.group_user,1,0,0,0 access_product_consumable_classification_admin,product.consumable.classification admin,model_product_consumable_classification,base.group_system,1,1,1,1 +access_product_middle_category_user,product.middle.category user,model_product_middle_category,base.group_user,1,0,0,0 +access_product_middle_category_admin,product.middle.category admin,model_product_middle_category,base.group_system,1,1,1,1 +access_product_minor_category_user,product.minor.category user,model_product_minor_category,base.group_user,1,0,0,0 +access_product_minor_category_admin,product.minor.category admin,model_product_minor_category,base.group_system,1,1,1,1 access_product_manufacturer_user,product.manufacturer user,model_product_manufacturer,base.group_user,1,0,0,0 access_product_manufacturer_admin,product.manufacturer admin,model_product_manufacturer,base.group_system,1,1,1,1 diff --git a/product_classification/static/description/index.html b/product_classification/static/description/index.html index 19f4576..d2c2c3f 100644 --- a/product_classification/static/description/index.html +++ b/product_classification/static/description/index.html @@ -2,18 +2,19 @@ - -Product Classification + +README.rst -
-

Product Classification

+
+ + +Odoo Community Association + +
+

Product Classification

-

Beta License: LGPL-3 qrtl/ocj-custom

+

Beta License: LGPL-3 qrtl/OCJ Custom

This module adds classification master data to products so equipment and consumables can be categorized consistently.

Each product can be flagged as equipment or consumable (Product @@ -379,6 +385,8 @@

Product Classification

Sub-Classification (機器分類サブ) for auxiliary devices.
  • Consumable Classification for consumable products.
  • +

    Products can also be given a Middle Category (中分類) and a Minor +Category (小分類).

    Each axis is backed by a dedicated, user-maintainable model holding a name and an optional code (a numeric code is preferred for integration with external systems). Several fields feed the Navi in Flow @@ -387,18 +395,18 @@

    Product Classification

    Table of contents

    -

    Configuration

    +

    Configuration

    The module ships the classification models and configuration UI with only a small set of sample equipment classifications, so the taxonomy can be tailored to each deployment (for example through a @@ -407,12 +415,13 @@

    Configuration

    1. Go to Inventory > Configuration > Products and open Equipment Classifications, Equipment Sub-Classifications, Consumable -Classifications or Manufacturers.
    2. +Classifications
      , Middle Categories, Minor Categories or +Manufacturers.
    3. Create the entries with a name and, preferably, a numeric code.
    -

    Usage

    +

    Usage

    To classify a product:

    1. Open a product and go to the Classification tab.
    2. @@ -425,29 +434,30 @@

      Usage

      from the product list view.

    -

    Bug Tracker

    -

    Bugs are tracked on GitHub Issues. +

    Bug Tracker

    +

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Quartile
    -

    Maintainers

    +

    Maintainers

    Current maintainer:

    -

    yostashiro

    -

    This module is part of the qrtl/ocj-custom project on GitHub.

    +

    yostashiro

    +

    This module is part of the qrtl/OCJ Custom project on GitHub.

    You are welcome to contribute.

    +
    diff --git a/product_classification/views/product_middle_category_views.xml b/product_classification/views/product_middle_category_views.xml new file mode 100644 index 0000000..f097c8a --- /dev/null +++ b/product_classification/views/product_middle_category_views.xml @@ -0,0 +1,27 @@ + + + + product.middle.category.list + product.middle.category + + + + + + + + + + + Middle Categories + product.middle.category + list + + + + diff --git a/product_classification/views/product_minor_category_views.xml b/product_classification/views/product_minor_category_views.xml new file mode 100644 index 0000000..de9c97e --- /dev/null +++ b/product_classification/views/product_minor_category_views.xml @@ -0,0 +1,27 @@ + + + + product.minor.category.list + product.minor.category + + + + + + + + + + + Minor Categories + product.minor.category + list + + + + diff --git a/product_classification/views/product_template_views.xml b/product_classification/views/product_template_views.xml index ae24a71..347021e 100644 --- a/product_classification/views/product_template_views.xml +++ b/product_classification/views/product_template_views.xml @@ -5,6 +5,10 @@ product.template + + + + @@ -47,6 +51,8 @@ + + + + Date: Wed, 29 Jul 2026 09:53:32 +0000 Subject: [PATCH 11/13] [IMP] product_classification: Add translations --- product_classification/i18n/ja.po | 84 ++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/product_classification/i18n/ja.po b/product_classification/i18n/ja.po index b422f59..a98b206 100644 --- a/product_classification/i18n/ja.po +++ b/product_classification/i18n/ja.po @@ -6,6 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 19.0+e\n" "Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-07-29 09:38+0000\n" +"PO-Revision-Date: 2026-07-29 09:38+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -29,6 +31,8 @@ msgstr "付属品" #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__active #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__active #: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__active +#: model:ir.model.fields,field_description:product_classification.field_product_middle_category__active +#: model:ir.model.fields,field_description:product_classification.field_product_minor_category__active msgid "Active" msgstr "有効" @@ -65,6 +69,8 @@ msgstr "消耗品の分類。" #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__code #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__code #: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__code +#: model:ir.model.fields,field_description:product_classification.field_product_middle_category__code +#: model:ir.model.fields,field_description:product_classification.field_product_minor_category__code msgid "Code" msgstr "コード" @@ -77,7 +83,6 @@ msgstr "消耗品" #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_product__consumable_classification_id #: model:ir.model.fields,field_description:product_classification.field_product_template__consumable_classification_id -#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_form #: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search msgid "Consumable Classification" msgstr "消耗品分類" @@ -98,6 +103,8 @@ msgstr "排痰補助装置" #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__create_uid #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__create_uid #: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__create_uid +#: model:ir.model.fields,field_description:product_classification.field_product_middle_category__create_uid +#: model:ir.model.fields,field_description:product_classification.field_product_minor_category__create_uid msgid "Created by" msgstr "作成者" @@ -106,6 +113,8 @@ msgstr "作成者" #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__create_date #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__create_date #: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__create_date +#: model:ir.model.fields,field_description:product_classification.field_product_middle_category__create_date +#: model:ir.model.fields,field_description:product_classification.field_product_minor_category__create_date msgid "Created on" msgstr "作成日" @@ -114,6 +123,8 @@ msgstr "作成日" #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__display_name #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__display_name #: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__display_name +#: model:ir.model.fields,field_description:product_classification.field_product_middle_category__display_name +#: model:ir.model.fields,field_description:product_classification.field_product_minor_category__display_name #: model:ir.model.fields,field_description:product_classification.field_product_template__display_name msgid "Display Name" msgstr "表示名" @@ -127,7 +138,6 @@ msgstr "機器" #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_product__equipment_classification_id #: model:ir.model.fields,field_description:product_classification.field_product_template__equipment_classification_id -#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_form #: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search msgid "Equipment Classification" msgstr "機器分類" @@ -156,6 +166,8 @@ msgstr "機器分類サブ" #: model:ir.model.fields,help:product_classification.field_product_equipment_classification__code #: model:ir.model.fields,help:product_classification.field_product_equipment_classification_sub__code #: model:ir.model.fields,help:product_classification.field_product_manufacturer__code +#: model:ir.model.fields,help:product_classification.field_product_middle_category__code +#: model:ir.model.fields,help:product_classification.field_product_minor_category__code msgid "External code used for integration. A numeric code is preferred." msgstr "連携に使用する外部コード。数値コードが推奨されます。" @@ -189,6 +201,8 @@ msgstr "ハイフローセラピー" #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__id #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__id #: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__id +#: model:ir.model.fields,field_description:product_classification.field_product_middle_category__id +#: model:ir.model.fields,field_description:product_classification.field_product_minor_category__id #: model:ir.model.fields,field_description:product_classification.field_product_template__id msgid "ID" msgstr "ID" @@ -198,6 +212,8 @@ msgstr "ID" #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__write_uid #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__write_uid #: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__write_uid +#: model:ir.model.fields,field_description:product_classification.field_product_middle_category__write_uid +#: model:ir.model.fields,field_description:product_classification.field_product_minor_category__write_uid msgid "Last Updated by" msgstr "最終更新者" @@ -206,6 +222,8 @@ msgstr "最終更新者" #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__write_date #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__write_date #: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__write_date +#: model:ir.model.fields,field_description:product_classification.field_product_middle_category__write_date +#: model:ir.model.fields,field_description:product_classification.field_product_minor_category__write_date msgid "Last Updated on" msgstr "最終更新日" @@ -233,11 +251,51 @@ msgstr "プロダクトのメーカー。ナビフロー連携で使用されま msgid "Manufacturers" msgstr "メーカー" +#. module: product_classification +#: model:ir.actions.act_window,name:product_classification.product_middle_category_action +#: model:ir.ui.menu,name:product_classification.product_middle_category_menu +msgid "Middle Categories" +msgstr "中分類" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_product__middle_category_id +#: model:ir.model.fields,field_description:product_classification.field_product_template__middle_category_id +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search +msgid "Middle Category" +msgstr "中分類" + +#. module: product_classification +#: model:ir.model.fields,help:product_classification.field_product_product__middle_category_id +#: model:ir.model.fields,help:product_classification.field_product_template__middle_category_id +msgid "Middle-level product category. Used in the Navi in Flow integration." +msgstr "プロダクトの中分類。ナビフロー連携で使用されます。" + +#. module: product_classification +#: model:ir.actions.act_window,name:product_classification.product_minor_category_action +#: model:ir.ui.menu,name:product_classification.product_minor_category_menu +msgid "Minor Categories" +msgstr "小分類" + +#. module: product_classification +#: model:ir.model.fields,field_description:product_classification.field_product_product__minor_category_id +#: model:ir.model.fields,field_description:product_classification.field_product_template__minor_category_id +#: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search +msgid "Minor Category" +msgstr "小分類" + +#. module: product_classification +#: model:ir.model.fields,help:product_classification.field_product_product__minor_category_id +#: model:ir.model.fields,help:product_classification.field_product_template__minor_category_id +msgid "Minor-level product category. Used in the Navi in Flow integration." +msgstr "プロダクトの小分類。ナビフロー連携で使用されます。" + #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__name #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__name #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__name #: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__name +#: model:ir.model.fields,field_description:product_classification.field_product_middle_category__name +#: model:ir.model.fields,field_description:product_classification.field_product_minor_category__name msgid "Name" msgstr "名称" @@ -301,6 +359,16 @@ msgstr "プロダクト種別" msgid "Product Manufacturer" msgstr "メーカー" +#. module: product_classification +#: model:ir.model,name:product_classification.model_product_middle_category +msgid "Product Middle Category" +msgstr "中分類" + +#. module: product_classification +#: model:ir.model,name:product_classification.model_product_minor_category +msgid "Product Minor Category" +msgstr "小分類" + #. module: product_classification #: model:product.equipment.classification,name:product_classification.product_equipment_classification_pulse_oximeter msgid "Pulse Oximeter" @@ -311,6 +379,8 @@ msgstr "パルスオキシメータ" #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__sequence #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification_sub__sequence #: model:ir.model.fields,field_description:product_classification.field_product_manufacturer__sequence +#: model:ir.model.fields,field_description:product_classification.field_product_middle_category__sequence +#: model:ir.model.fields,field_description:product_classification.field_product_minor_category__sequence msgid "Sequence" msgstr "シーケンス" @@ -332,6 +402,16 @@ msgstr "消耗品分類のコードは一意である必要があります。" msgid "The code of a manufacturer must be unique." msgstr "メーカーのコードは一意である必要があります。" +#. module: product_classification +#: model:ir.model.constraint,message:product_classification.constraint_product_middle_category_code_uniq +msgid "The code of a middle category must be unique." +msgstr "中分類のコードは一意である必要があります。" + +#. module: product_classification +#: model:ir.model.constraint,message:product_classification.constraint_product_minor_category_code_uniq +msgid "The code of a minor category must be unique." +msgstr "小分類のコードは一意である必要があります。" + #. module: product_classification #: model:ir.model.constraint,message:product_classification.constraint_product_equipment_classification_code_uniq msgid "The code of an equipment classification must be unique." From 327bf465be5581bad37a1847e1f7dfa54d6ec16f Mon Sep 17 00:00:00 2001 From: Morita Shinnosuke Date: Fri, 31 Jul 2026 05:15:03 +0000 Subject: [PATCH 12/13] [IMP] product_classification: add middle/minor category master data - Add middle and minor product category seed records (moved in from ocj_config so all classification master data lives with the module that defines the models). - Drop the Navi in Flow reference from the middle/minor category field help: these categories are maintained in Odoo and not exchanged with NaviFlow. - Add Japanese translations for the new records. --- product_classification/__manifest__.py | 2 + .../data/product_middle_category_data.xml | 42 ++++++++ .../data/product_minor_category_data.xml | 47 +++++++++ product_classification/i18n/ja.po | 95 ++++++++++++++++++- .../models/product_template.py | 4 +- 5 files changed, 184 insertions(+), 6 deletions(-) create mode 100644 product_classification/data/product_middle_category_data.xml create mode 100644 product_classification/data/product_minor_category_data.xml diff --git a/product_classification/__manifest__.py b/product_classification/__manifest__.py index d891008..7771696 100644 --- a/product_classification/__manifest__.py +++ b/product_classification/__manifest__.py @@ -15,6 +15,8 @@ "data": [ "security/ir.model.access.csv", "data/product_equipment_classification_data.xml", + "data/product_middle_category_data.xml", + "data/product_minor_category_data.xml", "views/product_equipment_classification_views.xml", "views/product_equipment_classification_sub_views.xml", "views/product_consumable_classification_views.xml", diff --git a/product_classification/data/product_middle_category_data.xml b/product_classification/data/product_middle_category_data.xml new file mode 100644 index 0000000..b97f26f --- /dev/null +++ b/product_classification/data/product_middle_category_data.xml @@ -0,0 +1,42 @@ + + + + Own Use + + + + Teijin Use + + + + Non-Teijin + + + + HOT + + + + CPAP + + + + ASV + + + + NIP + + + + HFT + + + + IMV + + + + Medical Gas + + diff --git a/product_classification/data/product_minor_category_data.xml b/product_classification/data/product_minor_category_data.xml new file mode 100644 index 0000000..f18c478 --- /dev/null +++ b/product_classification/data/product_minor_category_data.xml @@ -0,0 +1,47 @@ + + + + Travel Support + + + + Examination + + + + Patient Care Outsourcing + + + + Disposal Cost + + + + Mask / Cushion / Headgear + + + + Tube + + + + HumidAir / Filter + + + + Cannula / Cylinder Accessories + + + + Liquid Oxygen / Cylinder + + diff --git a/product_classification/i18n/ja.po b/product_classification/i18n/ja.po index a98b206..8c795e9 100644 --- a/product_classification/i18n/ja.po +++ b/product_classification/i18n/ja.po @@ -17,6 +17,7 @@ msgstr "" #. module: product_classification #: model:product.equipment.classification,name:product_classification.product_equipment_classification_asv +#: model:product.middle.category,name:product_classification.product_middle_category_asv msgid "ASV" msgstr "ASV" @@ -50,9 +51,15 @@ msgstr "アーカイブ済" #. module: product_classification #: model:product.equipment.classification,name:product_classification.product_equipment_classification_cpap +#: model:product.middle.category,name:product_classification.product_middle_category_cpap msgid "CPAP" msgstr "CPAP" +#. module: product_classification +#: model:product.minor.category,name:product_classification.product_minor_category_cannula_cylinder_accessories +msgid "Cannula / Cylinder Accessories" +msgstr "カニューラ・ボンベ付属品" + #. module: product_classification #: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_form msgid "Classification" @@ -129,6 +136,11 @@ msgstr "作成日" msgid "Display Name" msgstr "表示名" +#. module: product_classification +#: model:product.minor.category,name:product_classification.product_minor_category_disposal_cost +msgid "Disposal Cost" +msgstr "廃棄費用" + #. module: product_classification #: model:ir.model.fields.selection,name:product_classification.selection__product_template__product_kind__equipment #: model_terms:ir.ui.view,arch_db:product_classification.product_template_view_search @@ -161,6 +173,11 @@ msgstr "機器分類サブ" msgid "Equipment Sub-Classifications" msgstr "機器分類サブ" +#. module: product_classification +#: model:product.minor.category,name:product_classification.product_minor_category_examination +msgid "Examination" +msgstr "検査系" + #. module: product_classification #: model:ir.model.fields,help:product_classification.field_product_consumable_classification__code #: model:ir.model.fields,help:product_classification.field_product_equipment_classification__code @@ -171,11 +188,21 @@ msgstr "機器分類サブ" msgid "External code used for integration. A numeric code is preferred." msgstr "連携に使用する外部コード。数値コードが推奨されます。" +#. module: product_classification +#: model:product.middle.category,name:product_classification.product_middle_category_hft +msgid "HFT" +msgstr "HFT" + #. module: product_classification #: model:product.equipment.classification,name:product_classification.product_equipment_classification_hit msgid "HIT" msgstr "HIT" +#. module: product_classification +#: model:product.middle.category,name:product_classification.product_middle_category_hot +msgid "HOT" +msgstr "HOT" + #. module: product_classification #: model:product.equipment.classification,name:product_classification.product_equipment_classification_hot_concentrator msgid "HOT / Concentrator" @@ -196,6 +223,11 @@ msgstr "HOT/液体酸素" msgid "High-Flow Therapy" msgstr "ハイフローセラピー" +#. module: product_classification +#: model:product.minor.category,name:product_classification.product_minor_category_humidair_filter +msgid "HumidAir / Filter" +msgstr "HumidAir・フィルタ" + #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__id #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__id @@ -207,6 +239,11 @@ msgstr "ハイフローセラピー" msgid "ID" msgstr "ID" +#. module: product_classification +#: model:product.middle.category,name:product_classification.product_middle_category_imv +msgid "IMV" +msgstr "IMV" + #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__write_uid #: model:ir.model.fields,field_description:product_classification.field_product_equipment_classification__write_uid @@ -227,6 +264,11 @@ msgstr "最終更新者" msgid "Last Updated on" msgstr "最終更新日" +#. module: product_classification +#: model:product.minor.category,name:product_classification.product_minor_category_liquid_oxygen_cylinder +msgid "Liquid Oxygen / Cylinder" +msgstr "液化酸素・ボンベ" + #. module: product_classification #: model:product.equipment.classification,name:product_classification.product_equipment_classification_mv msgid "MV / In-hospital & Home" @@ -251,6 +293,16 @@ msgstr "プロダクトのメーカー。ナビフロー連携で使用されま msgid "Manufacturers" msgstr "メーカー" +#. module: product_classification +#: model:product.minor.category,name:product_classification.product_minor_category_mask_cushion_headgear +msgid "Mask / Cushion / Headgear" +msgstr "マスク・クッション・ヘッドギア" + +#. module: product_classification +#: model:product.middle.category,name:product_classification.product_middle_category_medical_gas +msgid "Medical Gas" +msgstr "メドガス" + #. module: product_classification #: model:ir.actions.act_window,name:product_classification.product_middle_category_action #: model:ir.ui.menu,name:product_classification.product_middle_category_menu @@ -267,8 +319,8 @@ msgstr "中分類" #. module: product_classification #: model:ir.model.fields,help:product_classification.field_product_product__middle_category_id #: model:ir.model.fields,help:product_classification.field_product_template__middle_category_id -msgid "Middle-level product category. Used in the Navi in Flow integration." -msgstr "プロダクトの中分類。ナビフロー連携で使用されます。" +msgid "Middle-level product category." +msgstr "プロダクトの中分類。" #. module: product_classification #: model:ir.actions.act_window,name:product_classification.product_minor_category_action @@ -286,8 +338,13 @@ msgstr "小分類" #. module: product_classification #: model:ir.model.fields,help:product_classification.field_product_product__minor_category_id #: model:ir.model.fields,help:product_classification.field_product_template__minor_category_id -msgid "Minor-level product category. Used in the Navi in Flow integration." -msgstr "プロダクトの小分類。ナビフロー連携で使用されます。" +msgid "Minor-level product category." +msgstr "プロダクトの小分類。" + +#. module: product_classification +#: model:product.middle.category,name:product_classification.product_middle_category_nip +msgid "NIP" +msgstr "NIP" #. module: product_classification #: model:ir.model.fields,field_description:product_classification.field_product_consumable_classification__name @@ -299,6 +356,11 @@ msgstr "プロダクトの小分類。ナビフロー連携で使用されます msgid "Name" msgstr "名称" +#. module: product_classification +#: model:product.middle.category,name:product_classification.product_middle_category_non_teijin +msgid "Non-Teijin" +msgstr "帝人以外" + #. module: product_classification #: model:product.equipment.classification,name:product_classification.product_equipment_classification_other_aux msgid "Other (Auxiliary Device)" @@ -309,11 +371,21 @@ msgstr "その他(副装置)" msgid "Other Medical Equipment" msgstr "その他医療機器" +#. module: product_classification +#: model:product.middle.category,name:product_classification.product_middle_category_own_use +msgid "Own Use" +msgstr "自社用" + #. module: product_classification #: model:product.equipment.classification,name:product_classification.product_equipment_classification_pca_pump msgid "PCA Pump" msgstr "PCAポンプ" +#. module: product_classification +#: model:product.minor.category,name:product_classification.product_minor_category_patient_care +msgid "Patient Care Outsourcing" +msgstr "患者ケア業務委託" + #. module: product_classification #: model:product.equipment.classification,name:product_classification.product_equipment_classification_portable_oxygen msgid "Portable Oxygen" @@ -392,6 +464,11 @@ msgid "" "in Flow integration." msgstr "補助機器または付属品のサブ分類。ナビフロー連携で使用されます。" +#. module: product_classification +#: model:product.middle.category,name:product_classification.product_middle_category_teijin_use +msgid "Teijin Use" +msgstr "帝人用" + #. module: product_classification #: model:ir.model.constraint,message:product_classification.constraint_product_consumable_classification_code_uniq msgid "The code of a consumable classification must be unique." @@ -422,6 +499,16 @@ msgstr "機器分類のコードは一意である必要があります。" msgid "The code of an equipment sub-classification must be unique." msgstr "機器分類サブのコードは一意である必要があります。" +#. module: product_classification +#: model:product.minor.category,name:product_classification.product_minor_category_travel_support +msgid "Travel Support" +msgstr "旅行対応" + +#. module: product_classification +#: model:product.minor.category,name:product_classification.product_minor_category_tube +msgid "Tube" +msgstr "チューブ" + #. module: product_classification #: model:product.equipment.classification,name:product_classification.product_equipment_classification_ultrasonic_bone_healing msgid "Ultrasonic Bone Healing Device" diff --git a/product_classification/models/product_template.py b/product_classification/models/product_template.py index e18a694..9fd26a9 100644 --- a/product_classification/models/product_template.py +++ b/product_classification/models/product_template.py @@ -41,10 +41,10 @@ class ProductTemplate(models.Model): middle_category_id = fields.Many2one( comodel_name="product.middle.category", string="Middle Category", - help="Middle-level product category. Used in the Navi in Flow integration.", + help="Middle-level product category.", ) minor_category_id = fields.Many2one( comodel_name="product.minor.category", string="Minor Category", - help="Minor-level product category. Used in the Navi in Flow integration.", + help="Minor-level product category.", ) From 46894206c47916c4ef7eb0a3328c5342b0a0dced Mon Sep 17 00:00:00 2001 From: Morita Shinnosuke Date: Fri, 31 Jul 2026 05:15:53 +0000 Subject: [PATCH 13/13] [IMP] product_classification: move middle/minor category fields into the Classification page Per review: keep the middle/minor category fields inside the Classification notebook page alongside the other classification fields, instead of placing them next to categ_id on the general form. --- .../views/product_template_views.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/product_classification/views/product_template_views.xml b/product_classification/views/product_template_views.xml index 347021e..66895c2 100644 --- a/product_classification/views/product_template_views.xml +++ b/product_classification/views/product_template_views.xml @@ -5,10 +5,6 @@ product.template - - - - @@ -29,6 +25,14 @@ invisible="product_kind != 'consumable'" options="{'no_quick_create': True}" /> + +