Skip to content

Commit

Permalink
[16.0][ADD] mrp_bom_line_bom_state: BoM state in BoMs components.
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredoavanzosc authored and anajuaristi committed Feb 28, 2025
1 parent 2c34f93 commit 3065886
Show file tree
Hide file tree
Showing 13 changed files with 231 additions and 0 deletions.
28 changes: 28 additions & 0 deletions mrp_bom_line_bom_state/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

======================
Mrp bom line bom state
======================

* BoM state in BoMs components.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/avanzosc/mrp-addons/issues>`_. In case of trouble,
please check there if your issue has already been reported. If you spotted
it first, help us smash it by providing detailed and welcomed feedback.

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

Credits
=======

Contributors
------------

* Ana Juaristi <anajuaristi@avanzosc.es>
* Alfredo de la Fuente <alfredodelafuente@avanzosc.es>
1 change: 1 addition & 0 deletions mrp_bom_line_bom_state/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions mrp_bom_line_bom_state/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2025 Alfredo de la Fuente - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Mrp BoM Line BoM State",
"version": "16.0.1.0.0",
"category": "Manufacturing/Manufacturing",
"license": "AGPL-3",
"author": "AvanzOSC",
"website": "https://github.com/avanzosc/mrp-addons",
"depends": ["mrp_bom_version", "mrp_bom_component_menu"],
"data": [
"views/mrp_bom_line_view.xml",
],
"installable": True,
"auto_install": True,
}
27 changes: 27 additions & 0 deletions mrp_bom_line_bom_state/i18n/ca_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_line_bom_state
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-26 11:58+0000\n"
"PO-Revision-Date: 2025-02-26 11:58+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_line_bom_state
#: model:ir.model,name:mrp_bom_line_bom_state.model_mrp_bom_line
msgid "Bill of Material Line"
msgstr "Línia de Llista de Materials"

#. module: mrp_bom_line_bom_state
#: model:ir.model.fields,field_description:mrp_bom_line_bom_state.field_mrp_bom_line__bom_state
#: model_terms:ir.ui.view,arch_db:mrp_bom_line_bom_state.mrp_bom_line_view_filter
msgid "BoM Status"
msgstr ""
27 changes: 27 additions & 0 deletions mrp_bom_line_bom_state/i18n/en_US.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_line_bom_state
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-26 11:58+0000\n"
"PO-Revision-Date: 2025-02-26 11:58+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_line_bom_state
#: model:ir.model,name:mrp_bom_line_bom_state.model_mrp_bom_line
msgid "Bill of Material Line"
msgstr ""

#. module: mrp_bom_line_bom_state
#: model:ir.model.fields,field_description:mrp_bom_line_bom_state.field_mrp_bom_line__bom_state
#: model_terms:ir.ui.view,arch_db:mrp_bom_line_bom_state.mrp_bom_line_view_filter
msgid "BoM Status"
msgstr ""
27 changes: 27 additions & 0 deletions mrp_bom_line_bom_state/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_line_bom_state
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-26 11:59+0000\n"
"PO-Revision-Date: 2025-02-26 11:59+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_line_bom_state
#: model:ir.model,name:mrp_bom_line_bom_state.model_mrp_bom_line
msgid "Bill of Material Line"
msgstr "Línea de lista de materiales"

#. module: mrp_bom_line_bom_state
#: model:ir.model.fields,field_description:mrp_bom_line_bom_state.field_mrp_bom_line__bom_state
#: model_terms:ir.ui.view,arch_db:mrp_bom_line_bom_state.mrp_bom_line_view_filter
msgid "BoM Status"
msgstr "Estado LdM"
27 changes: 27 additions & 0 deletions mrp_bom_line_bom_state/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_line_bom_state
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-26 11:59+0000\n"
"PO-Revision-Date: 2025-02-26 11:59+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_line_bom_state
#: model:ir.model,name:mrp_bom_line_bom_state.model_mrp_bom_line
msgid "Bill of Material Line"
msgstr "Ligne de nomenclature"

#. module: mrp_bom_line_bom_state
#: model:ir.model.fields,field_description:mrp_bom_line_bom_state.field_mrp_bom_line__bom_state
#: model_terms:ir.ui.view,arch_db:mrp_bom_line_bom_state.mrp_bom_line_view_filter
msgid "BoM Status"
msgstr ""
27 changes: 27 additions & 0 deletions mrp_bom_line_bom_state/i18n/mrp_bom_line_bom_state.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_line_bom_state
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-26 11:58+0000\n"
"PO-Revision-Date: 2025-02-26 11:58+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_line_bom_state
#: model:ir.model,name:mrp_bom_line_bom_state.model_mrp_bom_line
msgid "Bill of Material Line"
msgstr ""

#. module: mrp_bom_line_bom_state
#: model:ir.model.fields,field_description:mrp_bom_line_bom_state.field_mrp_bom_line__bom_state
#: model_terms:ir.ui.view,arch_db:mrp_bom_line_bom_state.mrp_bom_line_view_filter
msgid "BoM Status"
msgstr ""
1 change: 1 addition & 0 deletions mrp_bom_line_bom_state/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import mrp_bom_line
11 changes: 11 additions & 0 deletions mrp_bom_line_bom_state/models/mrp_bom_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2025 Alfredo de la Fuente - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models


class MrpBomLine(models.Model):
_inherit = "mrp.bom.line"

bom_state = fields.Selection(
string="BoM Status", related="bom_id.state", store=True
)
32 changes: 32 additions & 0 deletions mrp_bom_line_bom_state/views/mrp_bom_line_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="mrp_bom_line_tree_view" model="ir.ui.view">
<field name="model">mrp.bom.line</field>
<field name="inherit_id" ref="mrp_bom_component_menu.mrp_bom_line_tree_view" />
<field name="arch" type="xml">
<field name="operation_id" position="after">
<field name="bom_state" optional="show" />
</field>
</field>
</record>

<record id="mrp_bom_line_view_filter" model="ir.ui.view">
<field name="model">mrp.bom.line</field>
<field
name="inherit_id"
ref="mrp_bom_component_menu.mrp_bom_line_view_filter"
/>
<field name="arch" type="xml">
<field name="product_id" position="after">
<field name="bom_state" />
</field>
<filter name="product" position="after">
<filter
name="bom-state"
string="BoM Status"
context="{'group_by':'bom_state'}"
/>
</filter>
</field>
</record>
</odoo>
6 changes: 6 additions & 0 deletions setup/mrp_bom_line_bom_state/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 3065886

Please sign in to comment.