From 398019b237271ec4d36752aed3f827f50ca59555 Mon Sep 17 00:00:00 2001 From: Unai Beristain Date: Thu, 19 Sep 2024 12:48:58 +0200 Subject: [PATCH] [IMP] mrp_bom_import --- mrp_bom_import/i18n/en_US.po | 562 ++++++++++++++++++++++++ mrp_bom_import/models/mrp_bom_import.py | 9 +- 2 files changed, 570 insertions(+), 1 deletion(-) create mode 100644 mrp_bom_import/i18n/en_US.po diff --git a/mrp_bom_import/i18n/en_US.po b/mrp_bom_import/i18n/en_US.po new file mode 100644 index 00000000..431dadc8 --- /dev/null +++ b/mrp_bom_import/i18n/en_US.po @@ -0,0 +1,562 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_import +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-09-17 14:53+0000\n" +"PO-Revision-Date: 2024-09-17 14:53+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 +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "BoM Ref: this will fill BoM Reference" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "Parent Code: this will fill Parent Product Code" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "Parent Name: this will fill Parent Product Name" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "Parent Qty: this will fill Parent Product Quantity" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "" +"Product Code: this will fill Component Product Code" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "" +"Product Name: this will fill Component Product Name" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "Quantity: this will fill Component Quantity" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "BoMs" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__message_needaction +msgid "Action Needed" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__activity_ids +msgid "Activities" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__activity_exception_decoration +msgid "Activity Exception Decoration" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__activity_state +msgid "Activity State" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__activity_type_icon +msgid "Activity Type Icon" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__message_attachment_count +msgid "Attachment Count" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__bom_id +msgid "BoM" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__bom_line_import_ids +msgid "BoM Component Lines" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__bom_import_id +#: model:ir.ui.menu,name:mrp_bom_import.menu_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "BoM Import" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__bom_line_id +msgid "BoM Line" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "BoM Lines" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__bom_name +msgid "BoM Name" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.bom_import_line_view_search +msgid "BoM Product" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__bom_ref +msgid "BoM Ref" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__bom_code +msgid "BoM code" +msgstr "" + +#. module: mrp_bom_import +#. odoo-python +#: code:addons/mrp_bom_import/models/mrp_bom_import.py:0 +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +#, python-format +msgid "Component Import Lines" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__create_uid +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__create_uid +msgid "Created by" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__create_date +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__create_date +msgid "Created on" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__display_name +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__display_name +msgid "Display Name" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.bom_import_line_view_search +msgid "Done" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields.selection,name:mrp_bom_import.selection__mrp_bom_import__state__error +#: model:ir.model.fields.selection,name:mrp_bom_import.selection__mrp_bom_line_import__state__error +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.bom_import_line_view_search +msgid "Error" +msgstr "" + +#. module: mrp_bom_import +#. odoo-python +#: code:addons/mrp_bom_import/models/mrp_bom_import.py:0 +#, python-format +msgid "Error: BoM product not found." +msgstr "" + +#. module: mrp_bom_import +#. odoo-python +#: code:addons/mrp_bom_import/models/mrp_bom_import.py:0 +#, python-format +msgid "Error: More than one BoM product found." +msgstr "" + +#. module: mrp_bom_import +#. odoo-python +#: code:addons/mrp_bom_import/models/mrp_bom_import.py:0 +#, python-format +msgid "Error: More than one product found." +msgstr "" + +#. module: mrp_bom_import +#. odoo-python +#: code:addons/mrp_bom_import/models/mrp_bom_import.py:0 +#, python-format +msgid "Error: Product and BOM product are the same" +msgstr "" + +#. module: mrp_bom_import +#. odoo-python +#: code:addons/mrp_bom_import/models/mrp_bom_import.py:0 +#, python-format +msgid "Error: Product not found." +msgstr "" + +#. module: mrp_bom_import +#. odoo-python +#: code:addons/mrp_bom_import/models/mrp_bom_import.py:0 +#, python-format +msgid "Error: Quantity cannot be 0." +msgstr "" + +#. module: mrp_bom_import +#. odoo-python +#: code:addons/mrp_bom_import/models/mrp_bom_import.py:0 +#, python-format +msgid "Error: There is another line with the same parent product errors." +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__data +msgid "File" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__file_date +msgid "File Import Date" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__filename +msgid "Filename" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__message_follower_ids +msgid "Followers" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__message_partner_ids +msgid "Followers (Partners)" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,help:mrp_bom_import.field_mrp_bom_import__activity_type_icon +msgid "Font awesome icon e.g. fa-tasks" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.bom_import_line_view_search +msgid "Group By" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__has_message +msgid "Has Message" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "Help" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "Help with Excel column names" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__id +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__id +msgid "ID" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__activity_exception_icon +msgid "Icon" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,help:mrp_bom_import.field_mrp_bom_import__activity_exception_icon +msgid "Icon to indicate an exception activity." +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,help:mrp_bom_import.field_mrp_bom_import__message_needaction +msgid "If checked, new messages require your attention." +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,help:mrp_bom_import.field_mrp_bom_import__message_has_error +msgid "If checked, some messages have a delivery error." +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "Import" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model,name:mrp_bom_import.model_mrp_bom_import +msgid "Import BoM from excel file" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model,name:mrp_bom_import.model_mrp_bom_line_import +msgid "Import BoM lines" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__name +msgid "Import name" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__message_is_follower +msgid "Is Follower" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import____last_update +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__write_uid +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__write_date +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__write_date +msgid "Last Updated on" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "Lines" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "Log" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__log_info +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__log_info +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.bom_import_line_view_search +msgid "Log Info" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.actions.act_window,name:mrp_bom_import.mrp_bom_import_act +#: model:ir.ui.menu,name:mrp_bom_import.mrp_bom_import +msgid "MRP BoM Import" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.actions.act_window,name:mrp_bom_import.mrp_bom_line_action +msgid "MRP BoM Lines" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__message_main_attachment_id +msgid "Main Attachment" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_product_product__map_number +msgid "Map Number" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__message_has_error +msgid "Message Delivery error" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__message_ids +msgid "Messages" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__my_activity_date_deadline +msgid "My Activity Deadline" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__activity_calendar_event_id +msgid "Next Activity Calendar Event" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__activity_date_deadline +msgid "Next Activity Deadline" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__activity_summary +msgid "Next Activity Summary" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__activity_type_id +msgid "Next Activity Type" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__message_needaction_counter +msgid "Number of Actions" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__message_has_error_counter +msgid "Number of errors" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,help:mrp_bom_import.field_mrp_bom_import__message_needaction_counter +msgid "Number of messages requiring action" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,help:mrp_bom_import.field_mrp_bom_import__message_has_error_counter +msgid "Number of messages with delivery error" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__parent_product_bom_count +msgid "Parent Bom Qty" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__bom_product_id +msgid "Parent Product" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__parent_qty +msgid "Parent Quantity" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.bom_import_line_view_search +msgid "Pending" +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "Process" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields.selection,name:mrp_bom_import.selection__mrp_bom_import__state__done +#: model:ir.model.fields.selection,name:mrp_bom_import.selection__mrp_bom_line_import__state__done +msgid "Processed" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__product_id +msgid "Product" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__product_found_by_code +msgid "Product Found By Code" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model,name:mrp_bom_import.model_product_product +msgid "Product Variant" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__product_ref +msgid "Product code" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__product_name +msgid "Product name" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__quantity +msgid "Quantity" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__activity_user_id +msgid "Responsible User" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__state +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_line_import__state +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.bom_import_line_view_search +msgid "Status" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,help:mrp_bom_import.field_mrp_bom_import__activity_state +msgid "" +"Status based on activities\n" +"Overdue: Due date is already passed\n" +"Today: Activity date is today\n" +"Planned: Future activities." +msgstr "" + +#. module: mrp_bom_import +#. odoo-python +#: code:addons/mrp_bom_import/models/mrp_bom_import.py:0 +#, python-format +msgid "This is not a valid file." +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields.selection,name:mrp_bom_import.selection__mrp_bom_import__state__2validate +#: model:ir.model.fields.selection,name:mrp_bom_import.selection__mrp_bom_line_import__state__2validate +msgid "To validate" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__bom_count +msgid "Total BoMs" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,help:mrp_bom_import.field_mrp_bom_import__activity_exception_decoration +msgid "Type of the exception activity on record." +msgstr "" + +#. module: mrp_bom_import +#: model_terms:ir.ui.view,arch_db:mrp_bom_import.mrp_bom_import_view_form +msgid "Validate" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields.selection,name:mrp_bom_import.selection__mrp_bom_import__state__pass +#: model:ir.model.fields.selection,name:mrp_bom_import.selection__mrp_bom_line_import__state__pass +msgid "Validated" +msgstr "" + +#. module: mrp_bom_import +#: model:ir.model.fields,field_description:mrp_bom_import.field_mrp_bom_import__website_message_ids +msgid "Website Messages" +msgstr "" + + +#. module: mrp_bom_import +#: model:ir.model.fields,help:mrp_bom_import.field_mrp_bom_import__website_message_ids +msgid "Website communication history" +msgstr "" + diff --git a/mrp_bom_import/models/mrp_bom_import.py b/mrp_bom_import/models/mrp_bom_import.py index 06bf83ef..6f9da5a1 100644 --- a/mrp_bom_import/models/mrp_bom_import.py +++ b/mrp_bom_import/models/mrp_bom_import.py @@ -377,10 +377,17 @@ def action_validate_lines(self): def _create_bom(self): self.ensure_one() + + bom_ref = self.bom_ref + if not bom_ref: + bom_ref = self.bom_product_id.default_code or self.bom_product_id.name + if self.bom_count: + bom_ref = f"{bom_ref}-{self.bom_count + 1}" + bom = self.env["mrp.bom"].create( { "product_tmpl_id": self.bom_product_id.product_tmpl_id.id, - "code": self.bom_ref, + "code": bom_ref, "product_qty": self.parent_qty, "product_uom_id": self.bom_product_id.uom_id.id, }