mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[IMP] mrp_workcenter_hierarchical : put back original behavior allowing to group by top level parent always filling the parent level
Add an option to allow the new behavior : leave parent level empty if the depth of workcenter parents is lower than the parent level number
This commit is contained in:
@@ -7,7 +7,7 @@ MRP Workcenter Hierarchical
|
|||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
!! source digest: sha256:1cd00ed22c8deb2a6216302ed170d2ebbcbc2664f42823cdb80953015bc57772
|
!! source digest: sha256:22cb1398c6641db8541bb53d56ebaec41fea1e8fe3efc39e9786cb19e6e4be01
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||||
@@ -29,7 +29,6 @@ MRP Workcenter Hierarchical
|
|||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
|
|
||||||
Allow to define a parent workcenter to a workcenter
|
Allow to define a parent workcenter to a workcenter
|
||||||
On workcenter list view, you can group by Parent level and see all workcenters belonging to a same group or subgroup depending on the level you choose to group.
|
|
||||||
|
|
||||||
**Table of contents**
|
**Table of contents**
|
||||||
|
|
||||||
@@ -49,8 +48,21 @@ Usage
|
|||||||
* Go to Manufacturing > Configuration > Work Centers
|
* Go to Manufacturing > Configuration > Work Centers
|
||||||
* Set parent field on workcenters
|
* Set parent field on workcenters
|
||||||
|
|
||||||
|
* Go to Manufacturing > Configuration > Settings
|
||||||
|
* Set the parent level empty configuration if needed.
|
||||||
|
|
||||||
|
Without setting this parameter, the parent levels are always set, never mind the depth
|
||||||
|
of the parent workcenters. The last parent level will contain the last parent and
|
||||||
|
the top parent workcenter, will appear it self in its parent level.
|
||||||
|
The idea is to be able to see group of workcenters :
|
||||||
|
|
||||||
../static/src/img/img1.png
|
../static/src/img/img1.png
|
||||||
|
|
||||||
|
With the parameter, the parent levels will be empty if the depth of the parent is
|
||||||
|
to small. (ie : a workcenter with 1 parent and 1 great parent will have parent level 1 and 2 set, but parent level 3 will be empty)
|
||||||
|
|
||||||
|
../static/src/img/img2.png
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
|
||||||
@@ -76,7 +88,7 @@ Akretion:
|
|||||||
|
|
||||||
* David BEAL <david.beal@akretion.com>
|
* David BEAL <david.beal@akretion.com>
|
||||||
* Sébastien BEAU <sebastien.beau@akretion.com>
|
* Sébastien BEAU <sebastien.beau@akretion.com>
|
||||||
* Florian da Costa <florian.dacosta@akretion.com>
|
* Thibault REY <thibault.rey@akretion.com>
|
||||||
|
|
||||||
Maintainers
|
Maintainers
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "MRP Workcenter Hierarchical",
|
"name": "MRP Workcenter Hierarchical",
|
||||||
"version": "16.0.1.0.1",
|
"version": "16.0.1.0.0",
|
||||||
"author": "Akretion,Odoo Community Association (OCA)",
|
"author": "Akretion,Odoo Community Association (OCA)",
|
||||||
"summary": "Organise Workcenters by section",
|
"summary": "Organise Workcenters by section",
|
||||||
"category": "Manufacturing",
|
"category": "Manufacturing",
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
"security/ir.model.access.csv",
|
"security/ir.model.access.csv",
|
||||||
"views/workcenter_view.xml",
|
"views/workcenter_view.xml",
|
||||||
"wizards/switch_workcenter.xml",
|
"wizards/switch_workcenter.xml",
|
||||||
|
"wizards/res_config_settings_views.xml",
|
||||||
],
|
],
|
||||||
"demo": [
|
"demo": [
|
||||||
"data/mrp_demo.xml",
|
"data/mrp_demo.xml",
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
from . import mrp_workcenter
|
from . import mrp_workcenter
|
||||||
|
from . import res_company
|
||||||
|
|||||||
@@ -45,33 +45,36 @@ class MrpWorkcenter(models.Model):
|
|||||||
ids = []
|
ids = []
|
||||||
return ids
|
return ids
|
||||||
|
|
||||||
@api.depends("parent_id.parent_id.parent_id.parent_id", "child_ids")
|
@api.depends(
|
||||||
|
"parent_id.parent_id.parent_id",
|
||||||
|
"child_ids",
|
||||||
|
"company_id.workcenter_parent_level_empty",
|
||||||
|
)
|
||||||
def _compute_parent_level(self):
|
def _compute_parent_level(self):
|
||||||
def get_next_level(parent_ids, workcenter):
|
def get_next_level(parent_ids, workcenter, exclude_ids):
|
||||||
return (
|
has_parent = bool(parent_ids)
|
||||||
|
parent_level_id = (
|
||||||
parent_ids
|
parent_ids
|
||||||
and parent_ids.pop(0)
|
and parent_ids.pop(0)
|
||||||
or (workcenter.child_ids and workcenter.id or workcenter.parent_id.id)
|
or (workcenter.child_ids and workcenter.id or workcenter.parent_id.id)
|
||||||
)
|
)
|
||||||
|
if exclude_ids and not has_parent:
|
||||||
|
exclude_ids.append(workcenter.parent_id.id)
|
||||||
|
return parent_level_id not in exclude_ids and parent_level_id or False
|
||||||
|
|
||||||
for workcenter in self:
|
for workcenter in self:
|
||||||
parent_ids = workcenter._get_parent_ids()
|
parent_ids = workcenter._get_parent_ids()
|
||||||
exclude_ids = [workcenter.id, workcenter.parent_id.id]
|
if workcenter.company_id.workcenter_parent_level_empty:
|
||||||
l_id = [False, False, False]
|
exclude_ids = [workcenter.id]
|
||||||
|
else:
|
||||||
|
exclude_ids = []
|
||||||
|
|
||||||
l_id[0] = get_next_level(parent_ids, workcenter)
|
workcenter.parent_level_1_id = get_next_level(
|
||||||
workcenter.parent_level_1_id = (
|
parent_ids, workcenter, exclude_ids
|
||||||
l_id[0] if l_id[0] not in exclude_ids else False
|
|
||||||
)
|
)
|
||||||
exclude_ids.append(l_id[0])
|
workcenter.parent_level_2_id = get_next_level(
|
||||||
|
parent_ids, workcenter, exclude_ids
|
||||||
l_id[1] = get_next_level(parent_ids, workcenter)
|
|
||||||
workcenter.parent_level_2_id = (
|
|
||||||
l_id[1] if l_id[1] not in exclude_ids else False
|
|
||||||
)
|
)
|
||||||
exclude_ids.append(l_id[1])
|
workcenter.parent_level_3_id = get_next_level(
|
||||||
|
parent_ids, workcenter, exclude_ids
|
||||||
l_id[2] = get_next_level(parent_ids, workcenter)
|
|
||||||
workcenter.parent_level_3_id = (
|
|
||||||
l_id[2] if l_id[2] not in exclude_ids else False
|
|
||||||
)
|
)
|
||||||
|
|||||||
9
mrp_workcenter_hierarchical/models/res_company.py
Normal file
9
mrp_workcenter_hierarchical/models/res_company.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class ResCompany(models.Model):
|
||||||
|
_inherit = "res.company"
|
||||||
|
|
||||||
|
workcenter_parent_level_empty = fields.Boolean()
|
||||||
@@ -2,4 +2,4 @@ Akretion:
|
|||||||
|
|
||||||
* David BEAL <david.beal@akretion.com>
|
* David BEAL <david.beal@akretion.com>
|
||||||
* Sébastien BEAU <sebastien.beau@akretion.com>
|
* Sébastien BEAU <sebastien.beau@akretion.com>
|
||||||
* Florian da Costa <florian.dacosta@akretion.com>
|
* Thibault REY <thibault.rey@akretion.com>
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
Allow to define a parent workcenter to a workcenter
|
Allow to define a parent workcenter to a workcenter
|
||||||
On workcenter list view, you can group by Parent level and see all workcenters belonging to a same group or subgroup depending on the level you choose to group.
|
|
||||||
|
|||||||
@@ -1,4 +1,17 @@
|
|||||||
* Go to Manufacturing > Configuration > Work Centers
|
* Go to Manufacturing > Configuration > Work Centers
|
||||||
* Set parent field on workcenters
|
* Set parent field on workcenters
|
||||||
|
|
||||||
|
* Go to Manufacturing > Configuration > Settings
|
||||||
|
* Set the parent level empty configuration if needed.
|
||||||
|
|
||||||
|
Without setting this parameter, the parent levels are always set, never mind the depth
|
||||||
|
of the parent workcenters. The last parent level will contain the last parent and
|
||||||
|
the top parent workcenter, will appear it self in its parent level.
|
||||||
|
The idea is to be able to see group of workcenters :
|
||||||
|
|
||||||
../static/src/img/img1.png
|
../static/src/img/img1.png
|
||||||
|
|
||||||
|
With the parameter, the parent levels will be empty if the depth of the parent is
|
||||||
|
to small. (ie : a workcenter with 1 parent and 1 great parent will have parent level 1 and 2 set, but parent level 3 will be empty)
|
||||||
|
|
||||||
|
../static/src/img/img2.png
|
||||||
|
|||||||
@@ -367,11 +367,10 @@ ul.auto-toc {
|
|||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
!! source digest: sha256:1cd00ed22c8deb2a6216302ed170d2ebbcbc2664f42823cdb80953015bc57772
|
!! source digest: sha256:22cb1398c6641db8541bb53d56ebaec41fea1e8fe3efc39e9786cb19e6e4be01
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/manufacture/tree/16.0/mrp_workcenter_hierarchical"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-mrp_workcenter_hierarchical"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/manufacture/tree/16.0/mrp_workcenter_hierarchical"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-mrp_workcenter_hierarchical"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||||
<p>Allow to define a parent workcenter to a workcenter
|
<p>Allow to define a parent workcenter to a workcenter</p>
|
||||||
On workcenter list view, you can group by Parent level and see all workcenters belonging to a same group or subgroup depending on the level you choose to group.</p>
|
|
||||||
<p><strong>Table of contents</strong></p>
|
<p><strong>Table of contents</strong></p>
|
||||||
<div class="contents local topic" id="contents">
|
<div class="contents local topic" id="contents">
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
@@ -403,9 +402,19 @@ On workcenter list view, you can group by Parent level and see all workcenters b
|
|||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Go to Manufacturing > Configuration > Work Centers</li>
|
<li>Go to Manufacturing > Configuration > Work Centers</li>
|
||||||
<li>Set parent field on workcenters</li>
|
<li>Set parent field on workcenters</li>
|
||||||
|
<li>Go to Manufacturing > Configuration > Settings</li>
|
||||||
|
<li>Set the parent level empty configuration if needed.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<p>Without setting this parameter, the parent levels are always set, never mind the depth
|
||||||
|
of the parent workcenters. The last parent level will contain the last parent and
|
||||||
|
the top parent workcenter, will appear it self in its parent level.
|
||||||
|
The idea is to be able to see group of workcenters :</p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
../static/src/img/img1.png</blockquote>
|
../static/src/img/img1.png</blockquote>
|
||||||
|
<p>With the parameter, the parent levels will be empty if the depth of the parent is
|
||||||
|
to small. (ie : a workcenter with 1 parent and 1 great parent will have parent level 1 and 2 set, but parent level 3 will be empty)</p>
|
||||||
|
<blockquote>
|
||||||
|
../static/src/img/img2.png</blockquote>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="bug-tracker">
|
<div class="section" id="bug-tracker">
|
||||||
@@ -430,7 +439,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>David BEAL <<a class="reference external" href="mailto:david.beal@akretion.com">david.beal@akretion.com</a>></li>
|
<li>David BEAL <<a class="reference external" href="mailto:david.beal@akretion.com">david.beal@akretion.com</a>></li>
|
||||||
<li>Sébastien BEAU <<a class="reference external" href="mailto:sebastien.beau@akretion.com">sebastien.beau@akretion.com</a>></li>
|
<li>Sébastien BEAU <<a class="reference external" href="mailto:sebastien.beau@akretion.com">sebastien.beau@akretion.com</a>></li>
|
||||||
<li>Florian da Costa <<a class="reference external" href="mailto:florian.dacosta@akretion.com">florian.dacosta@akretion.com</a>></li>
|
<li>Thibault REY <<a class="reference external" href="mailto:thibault.rey@akretion.com">thibault.rey@akretion.com</a>></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="maintainers">
|
<div class="section" id="maintainers">
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 93 KiB |
BIN
mrp_workcenter_hierarchical/static/src/img/img2.png
Normal file
BIN
mrp_workcenter_hierarchical/static/src/img/img2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
@@ -3,10 +3,10 @@
|
|||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import exceptions
|
from odoo import exceptions
|
||||||
from odoo.tests.common import SavepointCase
|
from odoo.tests.common import TransactionCase
|
||||||
|
|
||||||
|
|
||||||
class ComputeParentLevel(SavepointCase):
|
class ComputeParentLevel(TransactionCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super().setUpClass()
|
super().setUpClass()
|
||||||
@@ -23,9 +23,42 @@ class ComputeParentLevel(SavepointCase):
|
|||||||
assert workcenter.parent_level_2_id == self.workc_1234
|
assert workcenter.parent_level_2_id == self.workc_1234
|
||||||
assert workcenter.parent_level_1_id == self.workc_12345
|
assert workcenter.parent_level_1_id == self.workc_12345
|
||||||
|
|
||||||
|
def test_compute_hight_level_workcenter(self):
|
||||||
|
# test high level has parent_level fields set
|
||||||
|
self.assertEqual(self.workc_12345.parent_level_1_id, self.workc_12345)
|
||||||
|
self.assertEqual(self.workc_12345.parent_level_2_id, self.workc_12345)
|
||||||
|
self.assertEqual(self.workc_12345.parent_level_3_id, self.workc_12345)
|
||||||
|
|
||||||
|
self.assertEqual(self.workc_1234.parent_level_1_id, self.workc_12345)
|
||||||
|
self.assertEqual(self.workc_1234.parent_level_2_id, self.workc_1234)
|
||||||
|
self.assertEqual(self.workc_1234.parent_level_3_id, self.workc_1234)
|
||||||
|
|
||||||
|
self.workc_12345.company_id.workcenter_parent_level_empty = True
|
||||||
|
# test parent level of high parent is left empty if setting is set on company
|
||||||
|
# level
|
||||||
|
self.assertFalse(self.workc_12345.parent_level_1_id)
|
||||||
|
self.assertFalse(self.workc_12345.parent_level_2_id)
|
||||||
|
self.assertFalse(self.workc_12345.parent_level_2_id)
|
||||||
|
|
||||||
|
self.assertEqual(self.workc_1234.parent_level_1_id, self.workc_12345)
|
||||||
|
self.assertFalse(self.workc_1234.parent_level_2_id)
|
||||||
|
self.assertFalse(self.workc_1234.parent_level_3_id)
|
||||||
|
|
||||||
|
self.assertEqual(self.workc_123.parent_level_1_id, self.workc_12345)
|
||||||
|
self.assertEqual(self.workc_123.parent_level_2_id, self.workc_1234)
|
||||||
|
self.assertFalse(self.workc_123.parent_level_3_id)
|
||||||
|
|
||||||
def test_switch_workcenter(self):
|
def test_switch_workcenter(self):
|
||||||
# take a MO with an operation
|
# take a MO with an operation
|
||||||
mo = self.env.ref("mrp.mrp_production_3")
|
self.env["mrp.routing.workcenter"].with_context(active_test=False).search(
|
||||||
|
[]
|
||||||
|
).active = True
|
||||||
|
mo = self.env["mrp.production"].create(
|
||||||
|
{
|
||||||
|
"product_id": self.env.ref("mrp.product_product_computer_desk_head").id,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
mo.action_confirm()
|
||||||
mo2 = mo.copy()
|
mo2 = mo.copy()
|
||||||
mo2.action_confirm()
|
mo2.action_confirm()
|
||||||
wos = mo.workorder_ids + mo2.workorder_ids
|
wos = mo.workorder_ids + mo2.workorder_ids
|
||||||
@@ -33,13 +66,13 @@ class ComputeParentLevel(SavepointCase):
|
|||||||
ctx = {"active_model": "mrp.workorder", "active_ids": wos.ids}
|
ctx = {"active_model": "mrp.workorder", "active_ids": wos.ids}
|
||||||
# the default wworkcenter does not belong to any group
|
# the default wworkcenter does not belong to any group
|
||||||
with self.assertRaises(exceptions.UserError):
|
with self.assertRaises(exceptions.UserError):
|
||||||
self.env["switch.workcenter"].with_context(ctx).create({})
|
self.env["switch.workcenter"].with_context(**ctx).create({})
|
||||||
|
|
||||||
# set workcenter with group
|
# set workcenter with group
|
||||||
wos.write({"workcenter_id": self.workc_12345.id})
|
wos.write({"workcenter_id": self.workc_12345.id})
|
||||||
wizard = (
|
wizard = (
|
||||||
self.env["switch.workcenter"]
|
self.env["switch.workcenter"]
|
||||||
.with_context(ctx)
|
.with_context(**ctx)
|
||||||
.create({"workcenter_id": self.workc_123.id})
|
.create({"workcenter_id": self.workc_123.id})
|
||||||
)
|
)
|
||||||
# used in view
|
# used in view
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
from . import switch_workcenter
|
from . import switch_workcenter
|
||||||
|
from . import res_config_settings
|
||||||
|
|||||||
11
mrp_workcenter_hierarchical/wizards/res_config_settings.py
Normal file
11
mrp_workcenter_hierarchical/wizards/res_config_settings.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class ResConfigSettings(models.TransientModel):
|
||||||
|
_inherit = "res.config.settings"
|
||||||
|
|
||||||
|
workcenter_parent_level_empty = fields.Boolean(
|
||||||
|
related="company_id.workcenter_parent_level_empty", store=True, readonly=False
|
||||||
|
)
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<odoo>
|
||||||
|
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||||
|
<field name="model">res.config.settings</field>
|
||||||
|
<field name="inherit_id" ref="mrp.res_config_settings_view_form" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath
|
||||||
|
expr="//div[@id='workorder_settings_dependencies']"
|
||||||
|
position="after"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
id="workcenter_hierarchy"
|
||||||
|
class="row mt-2"
|
||||||
|
attrs="{'invisible': [('group_mrp_routings','=',False)]}"
|
||||||
|
>
|
||||||
|
<field
|
||||||
|
name="workcenter_parent_level_empty"
|
||||||
|
class="col flex-grow-0 ml16 mr0 pe-2"
|
||||||
|
/>
|
||||||
|
<div class="col ps-0">
|
||||||
|
<label for="workcenter_parent_level_empty" />
|
||||||
|
<div class="text-muted">
|
||||||
|
The parent level on workcenters will be empty if case of there are no parent/great parent or more.
|
||||||
|
On the contrary, by default, the parent level are always set, allowing a view by workorder grouped by top parent workcenter
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user