-
-
Notifications
You must be signed in to change notification settings - Fork 112
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 LoisRForgeFlow
- Loading branch information
Showing
16 changed files
with
927 additions
and
0 deletions.
There are no files selected for viewing
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,90 @@ | ||
====================================================== | ||
Export Flattened BOM to Excel with subcontracting cost | ||
====================================================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:ce824c566458496dd9c71832c49fb97583bbadf8e152fa2a417c54047eb794e4 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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--reporting-lightgray.png?logo=github | ||
:target: https://github.com/OCA/manufacture-reporting/tree/14.0/mrp_flattened_bom_xlsx_subcontracting_cost | ||
:alt: OCA/manufacture-reporting | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/manufacture-reporting-14-0/manufacture-reporting-14-0-mrp_flattened_bom_xlsx_subcontracting_cost | ||
: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-reporting&target_branch=14.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module extends the report of the Export Flattened BOM to | ||
Excel module with a new tab showing the subcontracting cost. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
#. Go to 'Manufacturing / Products / Bill of Materials' | ||
|
||
#. Select a BOM or more BOMS | ||
|
||
*(Could be interesting to modify quantities of these BOMs)* | ||
|
||
#. Go to 'Print / Export Flattened BOM to Excel'. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture-reporting/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-reporting/issues/new?body=module:%20mrp_flattened_bom_xlsx_subcontracting_cost%0Aversion:%2014.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 | ||
~~~~~~~ | ||
|
||
* ForgeFlow | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Bernat Puig Font <[email protected]> | ||
|
||
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-reporting <https://github.com/OCA/manufacture-reporting/tree/14.0/mrp_flattened_bom_xlsx_subcontracting_cost>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
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 models | ||
from . import report |
13 changes: 13 additions & 0 deletions
13
mrp_flattened_bom_xlsx_subcontracting_cost/__manifest__.py
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,13 @@ | ||
# Copyright 2022 ForgeFlow S.L. (http://www.forgeflow.com) | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
"name": "Export Flattened BOM to Excel with subcontracting cost", | ||
"version": "16.0.1.0.0", | ||
"category": "Manufacturing", | ||
"author": "ForgeFlow, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/manufacture-reporting", | ||
"license": "AGPL-3", | ||
"depends": ["mrp_flattened_bom_xlsx_direct_materials_cost", "mrp_subcontracting"], | ||
"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,118 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * mrp_flattened_bom_xlsx_subcontracting_cost | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2023-05-17 12:34+0000\n" | ||
"Last-Translator: mymage <[email protected]>\n" | ||
"Language-Team: none\n" | ||
"Language: it\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 4.14.1\n" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: model:ir.model,name:mrp_flattened_bom_xlsx_subcontracting_cost.model_mrp_bom | ||
msgid "Bill of Material" | ||
msgstr "Distinta base" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Currency" | ||
msgstr "Valuta" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_mrp_bom__display_name | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_report_mrp_flattened_bom_xlsx_flattened_bom_xlsx__display_name | ||
msgid "Display Name" | ||
msgstr "Nome visualizzato" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: model:ir.model,name:mrp_flattened_bom_xlsx_subcontracting_cost.model_report_mrp_flattened_bom_xlsx_flattened_bom_xlsx | ||
msgid "Flattened BOM XLSX" | ||
msgstr "XLSX distinta base tecnica" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_mrp_bom__id | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_report_mrp_flattened_bom_xlsx_flattened_bom_xlsx__id | ||
msgid "ID" | ||
msgstr "ID" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Internal Reference" | ||
msgstr "Riferimento interno" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_mrp_bom____last_update | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_report_mrp_flattened_bom_xlsx_flattened_bom_xlsx____last_update | ||
msgid "Last Modified on" | ||
msgstr "Ultima modifica il" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Level" | ||
msgstr "Livello" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Main BOM" | ||
msgstr "DiBa principale" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Partner Name" | ||
msgstr "Nome partner" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Product Name" | ||
msgstr "Nome prodotto" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Quantity" | ||
msgstr "Quantità" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Subcontracted BOM" | ||
msgstr "DiBa subappaltato" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_mrp_bom__subcontracting_cost | ||
#, python-format | ||
msgid "Subcontracting Cost" | ||
msgstr "Costo subappalto" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Subcontracting Costs" | ||
msgstr "Costi subappalto" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Subcontracting Unit Cost" | ||
msgstr "Costo unitario subappalto" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Unit of Measure" | ||
msgstr "Unità di misura" |
115 changes: 115 additions & 0 deletions
115
...lattened_bom_xlsx_subcontracting_cost/i18n/mrp_flattened_bom_xlsx_subcontracting_cost.pot
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,115 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * mrp_flattened_bom_xlsx_subcontracting_cost | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \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_flattened_bom_xlsx_subcontracting_cost | ||
#: model:ir.model,name:mrp_flattened_bom_xlsx_subcontracting_cost.model_mrp_bom | ||
msgid "Bill of Material" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Currency" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_mrp_bom__display_name | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_report_mrp_flattened_bom_xlsx_flattened_bom_xlsx__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: model:ir.model,name:mrp_flattened_bom_xlsx_subcontracting_cost.model_report_mrp_flattened_bom_xlsx_flattened_bom_xlsx | ||
msgid "Flattened BOM XLSX" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_mrp_bom__id | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_report_mrp_flattened_bom_xlsx_flattened_bom_xlsx__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Internal Reference" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_mrp_bom____last_update | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_report_mrp_flattened_bom_xlsx_flattened_bom_xlsx____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Level" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Main BOM" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Partner Name" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Product Name" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Quantity" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Subcontracted BOM" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#: model:ir.model.fields,field_description:mrp_flattened_bom_xlsx_subcontracting_cost.field_mrp_bom__subcontracting_cost | ||
#, python-format | ||
msgid "Subcontracting Cost" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Subcontracting Costs" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Subcontracting Unit Cost" | ||
msgstr "" | ||
|
||
#. module: mrp_flattened_bom_xlsx_subcontracting_cost | ||
#: code:addons/mrp_flattened_bom_xlsx_subcontracting_cost/report/flattened_bom_xlsx.py:0 | ||
#, python-format | ||
msgid "Unit of Measure" | ||
msgstr "" |
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 mrp_bom |
28 changes: 28 additions & 0 deletions
28
mrp_flattened_bom_xlsx_subcontracting_cost/models/mrp_bom.py
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,28 @@ | ||
# Copyright 2022 ForgeFlow S.L. | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class MrpBom(models.Model): | ||
_inherit = "mrp.bom" | ||
|
||
subcontracting_cost = fields.Float( | ||
compute="_compute_subcontracting_cost", | ||
digits="Product Price", | ||
) | ||
|
||
def _compute_subcontracting_cost(self): | ||
supplier_info_obj = self.env["product.supplierinfo"] | ||
for bom in self: | ||
if bom.type == "subcontract" and bom.subcontractor_ids: | ||
supplier_info = supplier_info_obj.search( | ||
[ | ||
("partner_id", "=", bom.subcontractor_ids[0].id), | ||
("product_tmpl_id", "=", bom.product_tmpl_id.id), | ||
], | ||
limit=1, | ||
) | ||
bom.subcontracting_cost = supplier_info.price | ||
else: | ||
bom.subcontracting_cost = 0.0 |
1 change: 1 addition & 0 deletions
1
mrp_flattened_bom_xlsx_subcontracting_cost/readme/CONTRIBUTORS.rst
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 @@ | ||
* Bernat Puig Font <[email protected]> |
2 changes: 2 additions & 0 deletions
2
mrp_flattened_bom_xlsx_subcontracting_cost/readme/DESCRIPTION.rst
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 report of the Export Flattened BOM to | ||
Excel module with a new tab showing the subcontracting cost. |
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,9 @@ | ||
To use this module, you need to: | ||
|
||
#. Go to 'Manufacturing / Products / Bill of Materials' | ||
|
||
#. Select a BOM or more BOMS | ||
|
||
*(Could be interesting to modify quantities of these BOMs)* | ||
|
||
#. Go to 'Print / Export Flattened BOM to Excel'. |
2 changes: 2 additions & 0 deletions
2
mrp_flattened_bom_xlsx_subcontracting_cost/report/__init__.py
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 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
from . import flattened_bom_xlsx |
Oops, something went wrong.