mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[16.0][ADD] mrp_bom_tag
This commit is contained in:
86
mrp_bom_tag/README.rst
Normal file
86
mrp_bom_tag/README.rst
Normal file
@@ -0,0 +1,86 @@
|
||||
===========
|
||||
MRP BoM Tag
|
||||
===========
|
||||
|
||||
..
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:0bca0e075cd29504169d6c72f2f73a188e232c599003af33fc6feb99adee60de
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |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-AGPL--3-blue.png
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/manufacture/tree/16.0/mrp_bom_tag
|
||||
:alt: OCA/manufacture
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-mrp_bom_tag
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=16.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
Add Tags in Bill Of Materials in order to find them easily with tag as keywords.
|
||||
|
||||
.. figure:: https://raw.githubusercontent.com/OCA/manufacture/16.0/mrp_bom_tag/static/description/bom_with_tag.png
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
In Configuration / BoM Tags, user can configure its tags and parent's tags.
|
||||
|
||||
.. figure:: https://raw.githubusercontent.com/OCA/manufacture/16.0/mrp_bom_tag/static/description/bom_tag_configuration.png
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/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 <https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_bom_tag%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
|
||||
* GRAP
|
||||
*
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Quentin Dupont (quentin.dupont@grap.coop)
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
.. image:: https://odoo-community.org/logo.png
|
||||
:alt: Odoo Community Association
|
||||
:target: https://odoo-community.org
|
||||
|
||||
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/16.0/mrp_bom_tag>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
1
mrp_bom_tag/__init__.py
Normal file
1
mrp_bom_tag/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import models
|
||||
24
mrp_bom_tag/__manifest__.py
Normal file
24
mrp_bom_tag/__manifest__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
|
||||
# @author: Quentin Dupont (quentin.dupont@grap.coop)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
{
|
||||
"name": "MRP BoM Tag",
|
||||
"summary": "Add tags on your BoM to find it easily",
|
||||
"version": "16.0.1.0.0",
|
||||
"category": "Manufacture",
|
||||
"author": "GRAP, , Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/manufacture",
|
||||
"license": "AGPL-3",
|
||||
"depends": [
|
||||
"mrp",
|
||||
],
|
||||
"demo": ["demo/mrp_bom_tag.xml"],
|
||||
"data": [
|
||||
"security/ir_rule.xml",
|
||||
"security/ir.model.access.csv",
|
||||
"views/view_mrp_bom.xml",
|
||||
"views/view_mrp_bom_tag.xml",
|
||||
],
|
||||
"installable": True,
|
||||
}
|
||||
29
mrp_bom_tag/demo/mrp_bom_tag.xml
Normal file
29
mrp_bom_tag/demo/mrp_bom_tag.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
|
||||
@author: Quentin DUPONT (quentin.dupont@grap.coop)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record model="mrp.bom.tag" id="demo_bom_tag_parent">
|
||||
<field name="name">Handmade</field>
|
||||
<field name="color">2</field>
|
||||
</record>
|
||||
|
||||
<record model="mrp.bom.tag" id="demo_bom_tag">
|
||||
<field name="name">Furniture</field>
|
||||
<field name="color">9</field>
|
||||
<field name="parent_id" ref="mrp_bom_tag.demo_bom_tag_parent" />
|
||||
<field
|
||||
name="bom_ids"
|
||||
eval="[(4, ref('mrp.mrp_bom_manufacture')),(4, ref('mrp.mrp_bom_desk'))]"
|
||||
/>
|
||||
</record>
|
||||
|
||||
<record model="mrp.bom.tag" id="demo_bom_tag_2">
|
||||
<field name="name">Other</field>
|
||||
<field name="color">1</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
140
mrp_bom_tag/i18n/fr.po
Normal file
140
mrp_bom_tag/i18n/fr.po
Normal file
@@ -0,0 +1,140 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * mrp_bom_tag
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-10-14 14:06+0000\n"
|
||||
"PO-Revision-Date: 2022-10-14 14:06+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: mrp_bom_tag
|
||||
#: model:ir.model,name:mrp_bom_tag.model_mrp_bom_tag
|
||||
msgid "Bill Of Material Tag"
|
||||
msgstr "Tag de nomenclature"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.actions.act_window,name:mrp_bom_tag.action_bom_tag_2_mrp_bom
|
||||
#: model:ir.model,name:mrp_bom_tag.model_mrp_bom
|
||||
msgid "Bill of Material"
|
||||
msgstr "Nomenclature"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model_terms:ir.ui.view,arch_db:mrp_bom_tag.view_bom_tag_form
|
||||
msgid "Bills of Material"
|
||||
msgstr "Fiche technique"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__bom_qty
|
||||
msgid "BoM Quantity"
|
||||
msgstr "Quantité de fiches techniques"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.actions.act_window,name:mrp_bom_tag.action_bom_tag
|
||||
#: model:ir.ui.menu,name:mrp_bom_tag.menu_bom_tag
|
||||
msgid "BoM Tags"
|
||||
msgstr "Tags de fiches techniques"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__bom_ids
|
||||
msgid "Bom"
|
||||
msgstr "Fiche technique"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__child_id
|
||||
msgid "Child Categories"
|
||||
msgstr "Catégories Enfants"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__color
|
||||
msgid "Color Index"
|
||||
msgstr "Couleur"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__company_id
|
||||
msgid "Company"
|
||||
msgstr "Société"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__complete_name
|
||||
msgid "Complete Name"
|
||||
msgstr "Nom Complet"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Créé par"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__create_date
|
||||
msgid "Created on"
|
||||
msgstr "Créé le"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nom affiché"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Dernière Modification le"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Dernière mise à jour par"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Dernière mise à jour le"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__name
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,help:mrp_bom_tag.field_mrp_bom_tag__bom_qty
|
||||
msgid "Number of BoMs under this BoM tag (not considering children categories)"
|
||||
msgstr "Nombre de Nomenclatures sous ce tag (ne compte pas les catégories enfants)"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__parent_id
|
||||
msgid "Parent BoM Tag"
|
||||
msgstr "Catégorie Tag parent"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom_tag__parent_path
|
||||
msgid "Parent Path"
|
||||
msgstr "Chemin parent"
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tag.field_mrp_bom__bom_tag_ids
|
||||
#: model_terms:ir.ui.view,arch_db:mrp_bom_tag.view_bom_tag_search
|
||||
msgid "Tags"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: model_terms:ir.ui.view,arch_db:mrp_bom_tag.view_mrp_bom_form
|
||||
msgid "Tags 🎨"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tag
|
||||
#: code:addons/mrp_bom_tag/models/mrp_bom_tag.py:66
|
||||
#, python-format
|
||||
msgid "You cannot create recursive bom tags."
|
||||
msgstr "Vous ne pouvez pas créer de catégories de tag récursives."
|
||||
2
mrp_bom_tag/models/__init__.py
Normal file
2
mrp_bom_tag/models/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import mrp_bom
|
||||
from . import mrp_bom_tag
|
||||
15
mrp_bom_tag/models/mrp_bom.py
Normal file
15
mrp_bom_tag/models/mrp_bom.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
|
||||
# @author: Quentin DUPONT (quentin.dupont@grap.coop)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class MrpBom(models.Model):
|
||||
_inherit = "mrp.bom"
|
||||
|
||||
bom_tag_ids = fields.Many2many(
|
||||
string="Tags",
|
||||
comodel_name="mrp.bom.tag",
|
||||
help="Choose or create your tags for your BoM and set its color.",
|
||||
)
|
||||
78
mrp_bom_tag/models/mrp_bom_tag.py
Normal file
78
mrp_bom_tag/models/mrp_bom_tag.py
Normal file
@@ -0,0 +1,78 @@
|
||||
# Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
|
||||
# @author: Quentin DUPONT (quentin.dupont@grap.coop)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from random import randint
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class MrpBomTag(models.Model):
|
||||
_name = "mrp.bom.tag"
|
||||
_description = "Bill Of Material Tag"
|
||||
_parent_name = "parent_id"
|
||||
_parent_store = True
|
||||
_order = "complete_name"
|
||||
|
||||
def _default_color(self):
|
||||
return randint(1, 11)
|
||||
|
||||
# Column Section
|
||||
company_id = fields.Many2one(
|
||||
comodel_name="res.company",
|
||||
string="Company",
|
||||
default=lambda s: s._default_company_id(),
|
||||
)
|
||||
|
||||
name = fields.Char(required=True)
|
||||
color = fields.Integer(default=lambda self: self._default_color())
|
||||
complete_name = fields.Char(
|
||||
compute="_compute_complete_name", store=True, recursive=True
|
||||
)
|
||||
|
||||
parent_id = fields.Many2one(
|
||||
"mrp.bom.tag", "Parent BoM Tag", index=True, ondelete="cascade"
|
||||
)
|
||||
parent_path = fields.Char(index=True, unaccent=False)
|
||||
child_id = fields.One2many("mrp.bom.tag", "parent_id", "Child Categories")
|
||||
|
||||
bom_ids = fields.Many2many(
|
||||
comodel_name="mrp.bom",
|
||||
)
|
||||
|
||||
bom_qty = fields.Integer(
|
||||
"BoM Quantity",
|
||||
compute="_compute_bom_qty",
|
||||
help="Number of BoMs under this BoM tag (not considering children categories)",
|
||||
)
|
||||
|
||||
@api.depends("name", "parent_id.complete_name")
|
||||
def _compute_complete_name(self):
|
||||
for bom_tag in self:
|
||||
if bom_tag.parent_id:
|
||||
bom_tag.complete_name = "%s / %s" % (
|
||||
bom_tag.parent_id.complete_name,
|
||||
bom_tag.name,
|
||||
)
|
||||
else:
|
||||
bom_tag.complete_name = bom_tag.name
|
||||
|
||||
@api.depends("bom_ids")
|
||||
def _compute_bom_qty(self):
|
||||
for bom_tag in self:
|
||||
bom_tag.bom_qty = len(bom_tag.bom_ids)
|
||||
|
||||
# Model Section
|
||||
@api.model
|
||||
def _default_company_id(self):
|
||||
return self.env.company.id
|
||||
|
||||
# Name Section
|
||||
def name_get(self):
|
||||
result = []
|
||||
for record in self:
|
||||
if self.env.context.get("display_complete_name", False):
|
||||
result.append((record.id, record.complete_name))
|
||||
else:
|
||||
result.append((record.id, record.name))
|
||||
return result
|
||||
3
mrp_bom_tag/readme/CONFIGURE.rst
Normal file
3
mrp_bom_tag/readme/CONFIGURE.rst
Normal file
@@ -0,0 +1,3 @@
|
||||
In Configuration / BoM Tags, user can configure its tags and parent's tags.
|
||||
|
||||
.. figure:: ../static/description/bom_tag_configuration.png
|
||||
1
mrp_bom_tag/readme/CONTRIBUTORS.rst
Normal file
1
mrp_bom_tag/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1 @@
|
||||
* Quentin Dupont (quentin.dupont@grap.coop)
|
||||
3
mrp_bom_tag/readme/DESCRIPTION.rst
Normal file
3
mrp_bom_tag/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1,3 @@
|
||||
Add Tags in Bill Of Materials in order to find them easily with tag as keywords.
|
||||
|
||||
.. figure:: ../static/description/bom_with_tag.png
|
||||
3
mrp_bom_tag/security/ir.model.access.csv
Normal file
3
mrp_bom_tag/security/ir.model.access.csv
Normal file
@@ -0,0 +1,3 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_mrp_bom_tag,Bill Of Material Tag All,model_mrp_bom_tag,base.group_user,1,0,0,0
|
||||
access_mrp_bom_tag_manager,Bill Of Material Tag Manager,model_mrp_bom_tag,mrp.group_mrp_manager,1,1,1,1
|
||||
|
23
mrp_bom_tag/security/ir_rule.xml
Normal file
23
mrp_bom_tag/security/ir_rule.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
|
||||
@author: Quentin DUPONT
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="rule_bom_tag" model="ir.rule">
|
||||
<field name="name">Bill Of Material Tag Rule</field>
|
||||
<field name="model_id" ref="model_mrp_bom_tag" />
|
||||
<field name="global" eval="True" />
|
||||
<field name="domain_force">
|
||||
[
|
||||
'|',
|
||||
('company_id','=',False),
|
||||
('company_id', 'in', company_ids)
|
||||
]
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
BIN
mrp_bom_tag/static/description/bom_tag_configuration.png
Normal file
BIN
mrp_bom_tag/static/description/bom_tag_configuration.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
BIN
mrp_bom_tag/static/description/bom_with_tag.png
Normal file
BIN
mrp_bom_tag/static/description/bom_with_tag.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
433
mrp_bom_tag/static/description/index.html
Normal file
433
mrp_bom_tag/static/description/index.html
Normal file
@@ -0,0 +1,433 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
||||
<title>MRP BoM Tag</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="mrp-bom-tag">
|
||||
<h1 class="title">MRP BoM Tag</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:0bca0e075cd29504169d6c72f2f73a188e232c599003af33fc6feb99adee60de
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<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_bom_tag"><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_bom_tag"><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>Add Tags in Bill Of Materials in order to find them easily with tag as keywords.</p>
|
||||
<div class="figure">
|
||||
<img alt="https://raw.githubusercontent.com/OCA/manufacture/16.0/mrp_bom_tag/static/description/bom_with_tag.png" src="https://raw.githubusercontent.com/OCA/manufacture/16.0/mrp_bom_tag/static/description/bom_with_tag.png" />
|
||||
</div>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
|
||||
<p>In Configuration / BoM Tags, user can configure its tags and parent’s tags.</p>
|
||||
<div class="figure">
|
||||
<img alt="https://raw.githubusercontent.com/OCA/manufacture/16.0/mrp_bom_tag/static/description/bom_tag_configuration.png" src="https://raw.githubusercontent.com/OCA/manufacture/16.0/mrp_bom_tag/static/description/bom_tag_configuration.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/manufacture/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_bom_tag%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>GRAP</li>
|
||||
<li></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Quentin Dupont (<a class="reference external" href="mailto:quentin.dupont@grap.coop">quentin.dupont@grap.coop</a>)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture/tree/16.0/mrp_bom_tag">OCA/manufacture</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
mrp_bom_tag/tests/__init__.py
Normal file
1
mrp_bom_tag/tests/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import test_bom_tag
|
||||
39
mrp_bom_tag/tests/test_bom_tag.py
Normal file
39
mrp_bom_tag/tests/test_bom_tag.py
Normal file
@@ -0,0 +1,39 @@
|
||||
# Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
|
||||
# @author: Quentin DUPONT (quentin.dupont@grap.coop)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
class TestBomTag(TransactionCase):
|
||||
def setUp(self):
|
||||
super(TestBomTag, self).setUp()
|
||||
self.bomtag = self.env.ref("mrp_bom_tag.demo_bom_tag")
|
||||
self.bomtag2 = self.env.ref("mrp_bom_tag.demo_bom_tag_2")
|
||||
self.bomtagparent = self.env.ref("mrp_bom_tag.demo_bom_tag_parent")
|
||||
self.bom_desk = self.env.ref("mrp.mrp_bom_manufacture")
|
||||
|
||||
def test_01_bom_qty(self):
|
||||
self.assertEqual(
|
||||
self.bomtag2.bom_qty,
|
||||
0,
|
||||
)
|
||||
self.bom_desk.write(
|
||||
{
|
||||
"bom_tag_ids": [
|
||||
(6, 0, [self.bomtag2.id]),
|
||||
]
|
||||
}
|
||||
)
|
||||
self.assertEqual(
|
||||
self.bomtag2.bom_qty,
|
||||
1,
|
||||
)
|
||||
|
||||
def test_02_name_get(self):
|
||||
name_get_simple = self.bomtag.name_get()
|
||||
name_get_complete = self.bomtag.with_context(
|
||||
display_complete_name=True
|
||||
).name_get()
|
||||
self.assertEqual(name_get_simple[0][1], "Furniture")
|
||||
self.assertEqual(name_get_complete[0][1], "Handmade / Furniture")
|
||||
60
mrp_bom_tag/views/view_mrp_bom.xml
Normal file
60
mrp_bom_tag/views/view_mrp_bom.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
|
||||
@author: Quentin DUPONT (quentin.dupont@grap.coop)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<!-- ************************************************************ -->
|
||||
<!-- MRP Bill of Materials - Form -->
|
||||
<!-- ************************************************************ -->
|
||||
|
||||
<record id="view_mrp_bom_form" model="ir.ui.view">
|
||||
<field name="model">mrp.bom</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_bom_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='code']" position="after">
|
||||
<field
|
||||
name="bom_tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color', 'no_quick_create': True}"
|
||||
context="{'display_complete_name': True}"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ************************************************************ -->
|
||||
<!-- MRP Bill of Materials - Tree -->
|
||||
<!-- ************************************************************ -->
|
||||
|
||||
<record id="view_mrp_bom_tree" model="ir.ui.view">
|
||||
<field name="model">mrp.bom</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_bom_tree_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='product_id']" position="after">
|
||||
<field
|
||||
name="bom_tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ************************************************************ -->
|
||||
<!-- MRP Bill of Materials - Search -->
|
||||
<!-- ************************************************************ -->
|
||||
|
||||
<record id="view_mrp_bom_search" model="ir.ui.view">
|
||||
<field name="model">mrp.bom</field>
|
||||
<field name="inherit_id" ref="mrp.view_mrp_bom_filter" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='product_tmpl_id']" position="after">
|
||||
<field name="bom_tag_ids" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
98
mrp_bom_tag/views/view_mrp_bom_tag.xml
Normal file
98
mrp_bom_tag/views/view_mrp_bom_tag.xml
Normal file
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
|
||||
@author: Quentin DUPONT (quentin.dupont@grap.coop)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="action_bom_tag_2_mrp_bom" model="ir.actions.act_window">
|
||||
<field name="name">Bill of Material</field>
|
||||
<field name="res_model">mrp.bom</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('bom_tag_ids', '=', active_id)]</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bom_tag_form" model="ir.ui.view">
|
||||
<field name="model">mrp.bom.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="BoM Tag">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
type="action"
|
||||
icon="fa-list"
|
||||
name="%(action_bom_tag_2_mrp_bom)d"
|
||||
>
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field
|
||||
name="bom_qty"
|
||||
widget="statinfo"
|
||||
nolabel="1"
|
||||
/></span>
|
||||
<span class="o_stat_text">Bills of Material</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<div class="oe_edit_only">
|
||||
<label for="name" />
|
||||
</div>
|
||||
<h1>
|
||||
<field name="name" />
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="color" widget="color_picker" />
|
||||
<field name="parent_id" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bom_tag_tree" model="ir.ui.view">
|
||||
<field name="model">mrp.bom.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="complete_name" />
|
||||
<field name="name" />
|
||||
<field name="bom_qty" />
|
||||
<field name="color" widget="color_picker" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_bom_tag" model="ir.actions.act_window">
|
||||
<field name="name">BoM Tags</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.bom.tag</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="menu_bom_tag"
|
||||
parent="mrp.menu_mrp_configuration"
|
||||
sequence="10"
|
||||
action="action_bom_tag"
|
||||
/>
|
||||
|
||||
<!-- ************************************************************ -->
|
||||
<!-- MRP Bill of Materials Tags - Search -->
|
||||
<!-- ************************************************************ -->
|
||||
|
||||
<record id="view_bom_tag_search" model="ir.ui.view">
|
||||
<field name="model">mrp.bom.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Tags">
|
||||
<field name="complete_name" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
1
setup/mrp_bom_tag/odoo/addons/mrp_bom_tag
Symbolic link
1
setup/mrp_bom_tag/odoo/addons/mrp_bom_tag
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../mrp_bom_tag
|
||||
6
setup/mrp_bom_tag/setup.py
Normal file
6
setup/mrp_bom_tag/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
Reference in New Issue
Block a user