-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by legalsylvain
- Loading branch information
Showing
12 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright (C) 2024 - Today: GRAP (http://www.grap.coop) | ||
# @author: Quentin DUPONT ([email protected]) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Product Labels MRP", | ||
"summary": "Adds labels in MRP BoMs", | ||
"version": "16.0.1.0.0", | ||
"category": "Product", | ||
"author": "GRAP", | ||
"maintainers": ["quentinDupont"], | ||
"developpment_status": "Production/Stable", | ||
"website": "https://github.com/grap/grap-odoo-business", | ||
"license": "AGPL-3", | ||
"depends": [ | ||
"mrp", | ||
# GRAP | ||
"product_label", | ||
], | ||
"data": [ | ||
"views/view_mrp_bom.xml", | ||
], | ||
"installable": True, | ||
"auto-install": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * product_label_mrp | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-07-11 14:19+0000\n" | ||
"PO-Revision-Date: 2024-07-11 14:19+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: product_label_mrp | ||
#: model:ir.model,name:product_label_mrp.model_mrp_bom | ||
msgid "Bill of Material" | ||
msgstr "Nomenclature" | ||
|
||
#. module: product_label_mrp | ||
#: model:ir.model,name:product_label_mrp.model_mrp_bom_line | ||
msgid "Bill of Material Line" | ||
msgstr "Ligne de nomenclature" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import mrp_bom | ||
from . import mrp_bom_line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (C) 2024 - Today: GRAP (http://www.grap.coop) | ||
# @author: Quentin DUPONT ([email protected]) | ||
# 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" | ||
|
||
product_label_ids = fields.Many2many( | ||
string="Product labels", | ||
related="product_tmpl_id.label_ids", | ||
readonly=False, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (C) 2024 - Today: GRAP (http://www.grap.coop) | ||
# @author: Quentin DUPONT ([email protected]) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class MrpBomLine(models.Model): | ||
_inherit = "mrp.bom.line" | ||
|
||
product_label_ids = fields.Many2many( | ||
comodel_name="product.label", | ||
related="product_id.label_ids", | ||
string="Labels on product", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Quentin DUPONT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Adds related products labels on MRP BoMs and BoMs lines. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (C) 2022 - Today: GRAP (http://www.grap.coop) | ||
@author: Quentin DUPONT ([email protected]) | ||
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"> | ||
<!-- BoM --> | ||
<xpath expr="//field[@name='product_id']" position="after"> | ||
<field name="product_label_ids" widget="many2many_tags"/> | ||
</xpath> | ||
<!-- BoM Lines --> | ||
<xpath expr="//field[@name='bom_line_ids']/tree/field[@name='product_qty']" position="after"> | ||
<field name="product_label_ids" widget="many2many_tags"/> | ||
</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_qty']" position="before"> | ||
<field name="product_label_ids" widget="many2many_tags"/> | ||
</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="product_label_ids"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../product_label_mrp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) |