Skip to content

Commit

Permalink
[ADD] mrp_bom_import_line_layer_and_designator
Browse files Browse the repository at this point in the history
  • Loading branch information
unaiberis authored and anajuaristi committed Sep 13, 2024
1 parent 14ec7f0 commit 142a003
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 0 deletions.
77 changes: 77 additions & 0 deletions mrp_bom_import_line_layer_and_designator/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg
:target: https://opensource.org/licenses/LGPL-3.0
:alt: License: LGPL-3

=====================================================
MRP BoM Import with Layer and Designator Enhancements
=====================================================

Overview
========

The **MRP BoM Import with Layer and Designator** module extends the functionality of the Bill of Materials (BoM) import process in Odoo. It adds support for additional fields like *Layer* and *Designator* when importing BoM lines, making the import process more flexible and aligned with manufacturing requirements involving complex electronic components and layered structures.

Features
========

- **BoM Import Enhancements**:

- Adds two new fields, *Layer* and *Designator*, to the BoM import process.

- The *Layer* field allows users to specify the production layer for each imported component.

- The *Designator* field is used to assign component designators during the import process.

Usage
=====

Once the module is installed:

- Go to the **Manufacturing** module in Odoo.

- When importing a Bill of Materials (BoM), two new fields, *Layer* and *Designator*, will be available in the import lines interface.

- These fields allow you to better categorize and organize your BoM components based on specific production or assembly needs.

Configuration
=============

1. **Install the Module**:

- Ensure that the dependent modules `mrp_bom_import` and `mrp_bom_line_layer_and_designator` are installed and configured correctly.

2. **BoM Import Process**:

- Customize the BoM import template to include the new fields *Layer* and *Designator* if needed.

Testing
=======

Test the following scenarios:

- **BoM Import**:

- Import a BoM with various components and ensure the *Layer* and *Designator* fields are correctly processed.

- Verify that the imported components are displayed with their respective *Layer* and *Designator* in the BoM lines.

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

For bugs and issues, please visit `GitHub Issues <https://github.com/avanzosc/project-addons/issues>`_ to report or track issues.

Credits
=======

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

* Unai Beristain <[email protected]>

* Ana Juaristi <[email protected]>

Please contact contributors for module-specific questions, but direct support requests should be made through the official channels.

License
=======
This project is licensed under the LGPL-3 License. For more details, please refer to the LICENSE file or visit <https://opensource.org/licenses/LGPL-3.0>.
1 change: 1 addition & 0 deletions mrp_bom_import_line_layer_and_designator/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions mrp_bom_import_line_layer_and_designator/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "MRP BoM Import with Layer and Designator",
"version": "16.0.1.0.0",
"author": "Avanzosc",
"summary": "Add layer and designator fields to BoM import lines.",
"website": "https://github.com/avanzosc/mrp-addons",
"license": "LGPL-3",
"depends": [
"mrp_bom_import",
"mrp_bom_line_layer_and_designator",
],
"data": [
"views/mrp_bom_import_view.xml",
],
"installable": True,
"application": False,
}
31 changes: 31 additions & 0 deletions mrp_bom_import_line_layer_and_designator/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_import_line_layer_and_designator
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-13 11:12+0000\n"
"PO-Revision-Date: 2024-09-13 11:12+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_import_line_layer_and_designator
#: model:ir.model.fields,field_description:mrp_bom_import_line_layer_and_designator.field_mrp_bom_line_import__designator
msgid "Designator"
msgstr "Designador"

#. module: mrp_bom_import_line_layer_and_designator
#: model:ir.model,name:mrp_bom_import_line_layer_and_designator.model_mrp_bom_line_import
msgid "Import BoM lines"
msgstr "Importar lineas BoM"

#. module: mrp_bom_import_line_layer_and_designator
#: model:ir.model.fields,field_description:mrp_bom_import_line_layer_and_designator.field_mrp_bom_line_import__layer
msgid "Layer"
msgstr "Capa"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import mrp_bom_line_import
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from odoo import fields, models


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

layer = fields.Char(
comodel_name="mrp.bom.line",
related="bom_line_id.layer",
)
designator = fields.Char(
comodel_name="mrp.bom.line",
related="bom_line_id.designator",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="mrp_bom_line_component_import_view_tree" model="ir.ui.view">
<field name="name">mrp.bom.line.import.form.inherit</field>
<field name="model">mrp.bom.line.import</field>
<field
name="inherit_id"
ref="mrp_bom_import.mrp_bom_line_component_import_view_tree"
/>
<field name="arch" type="xml">
<xpath expr="//tree" position="inside">
<field name="layer" optional="show" />
<field name="designator" optional="show" />
</xpath>
</field>
</record>
</odoo>
6 changes: 6 additions & 0 deletions setup/mrp_bom_import_line_layer_and_designator/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 142a003

Please sign in to comment.