-
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.
- Loading branch information
1 parent
3f1a180
commit cf7f2f1
Showing
19 changed files
with
170 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", | ||
"product", | ||
# OCA | ||
"product_label", | ||
], | ||
"data": [ | ||
"views/view_mrp_bom.xml", | ||
], | ||
"installable": 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,10 @@ | ||
* Go to "Setting > Technical > Parameters > Labels" | ||
|
||
.. figure:: ../static/description/product_label_kanban.png | ||
|
||
* Edit or create a Label | ||
|
||
.. figure:: ../static/description/product_label_form.png | ||
|
||
If "Display on Reports" is checked, label will be displayed on reports | ||
by other glue modules, available in the same repository: ``product_label_account``, ``product_label_sale``, ... |
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,3 @@ | ||
* Julien WESTE | ||
* Sylvain LE GAL (https://www.twitter.com/legalsylvain) | ||
* 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,2 @@ | ||
This module extends the functionality of Product module to support labels | ||
on products. |
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,5 @@ | ||
* Go to your product form | ||
|
||
.. figure:: ../static/description/product_template_form.png | ||
|
||
* Set one or many labels and save. |
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 labels in BoMs : link BoM labels with Product labels, and permits to see labels on bom lines products. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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, | ||
) |
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,3 @@ | ||
|
||
|
||
git+https://github.com/grap/grap-odoo-business@refs/pull/159/head#subdirectory=setup/product_label |