diff --git a/custom_mrp_descarga/__manifest__.py b/custom_mrp_descarga/__manifest__.py index 8dfcc255..202eeb08 100644 --- a/custom_mrp_descarga/__manifest__.py +++ b/custom_mrp_descarga/__manifest__.py @@ -9,6 +9,8 @@ "author": "AvanzOSC", "website": "https://github.com/avanzosc/mrp-addons", "depends": [ + "analytic", + "project", "custom_mrp_line_cost", "custom_descarga", "custom_breeding_apps", @@ -37,6 +39,7 @@ "views/product_template_view.xml", "views/stock_move_line_view.xml", "views/killing_cost_view.xml", + "views/account_analytic_line_view.xml", "report/mrp_production_summary_xlsx.xml", "report/mrp_production_quartering_summary_xlsx.xml", ], diff --git a/custom_mrp_descarga/i18n/custom_mrp_descarga.pot b/custom_mrp_descarga/i18n/custom_mrp_descarga.pot index f34cb635..f80ba09c 100644 --- a/custom_mrp_descarga/i18n/custom_mrp_descarga.pot +++ b/custom_mrp_descarga/i18n/custom_mrp_descarga.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-22 09:12+0000\n" -"PO-Revision-Date: 2024-10-22 09:12+0000\n" +"POT-Creation-Date: 2024-10-29 11:09+0000\n" +"PO-Revision-Date: 2024-10-29 11:09+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -15,6 +15,17 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: custom_mrp_descarga +#: model:ir.model.fields,help:custom_mrp_descarga.field_account_analytic_line__production_state +msgid "" +" * Draft: The MO is not confirmed yet.\n" +" * Confirmed: The MO is confirmed, the stock rules and the reordering of the components are trigerred.\n" +" * In Progress: The production has started (on the MO or on the WO).\n" +" * To Close: The production is done, the MO has to be closed.\n" +" * Done: The MO is closed, the stock moves are posted. \n" +" * Cancelled: The MO has been cancelled, can't be confirmed anymore." +msgstr "" + #. module: custom_mrp_descarga #: code:addons/custom_mrp_descarga/report/mrp_production_summary_xlsx.py:0 #: code:addons/custom_mrp_descarga/report/mrp_production_summary_xlsx.py:0 @@ -32,12 +43,18 @@ msgstr "" msgid "Amount Duration" msgstr "" +#. module: custom_mrp_descarga +#: model:ir.actions.act_window,name:custom_mrp_descarga.action_classified_analytic +msgid "Analytic" +msgstr "" + #. module: custom_mrp_descarga #: model:ir.model,name:custom_mrp_descarga.model_account_analytic_line msgid "Analytic Line" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__asphyxiation_units #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__asphyxiation_units msgid "Asphyxiated" msgstr "" @@ -54,6 +71,7 @@ msgid "Average Price" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__average_weight #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__average_weight #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.mrp_production_form_view msgid "Average Weight" @@ -99,7 +117,9 @@ msgid "BoM Category" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__breeding_id #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__breeding_id +#: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.view_account_analytic_line_filter #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.view_mrp_production_filter msgid "Breeding" msgstr "" @@ -161,6 +181,7 @@ msgid "Classified" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__cost #: model:ir.model.fields,field_description:custom_mrp_descarga.field_stock_inventory_line__cost msgid "Cost" msgstr "" @@ -216,6 +237,7 @@ msgid "Demanding" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__descarga_order #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__descarga_order msgid "Descarga Order" msgstr "" @@ -238,6 +260,11 @@ msgstr "" msgid "Dest Kg" msgstr "" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__dif_total_amount +msgid "Dif. Total Amount" +msgstr "" + #. module: custom_mrp_descarga #: code:addons/custom_mrp_descarga/report/mrp_production_quartering_summary_xlsx.py:0 #: code:addons/custom_mrp_descarga/report/mrp_production_quartering_summary_xlsx.py:0 @@ -296,6 +323,7 @@ msgid "Download Product" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__download_unit #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__download_unit msgid "Download Unit" msgstr "" @@ -312,6 +340,11 @@ msgstr "" msgid "Entradas" msgstr "" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__entry_total_amount +msgid "Entry Total Amount" +msgstr "" + #. module: custom_mrp_descarga #: code:addons/custom_mrp_descarga/report/mrp_production_quartering_summary_xlsx.py:0 #: code:addons/custom_mrp_descarga/report/mrp_production_quartering_summary_xlsx.py:0 @@ -402,6 +435,11 @@ msgstr "" msgid "Incubator" msgstr "" +#. module: custom_mrp_descarga +#: model:ir.ui.menu,name:custom_mrp_descarga.menu_production_analytic +msgid "Informe analítico" +msgstr "" + #. module: custom_mrp_descarga #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.mrp_production_form_view msgid "Input Products" @@ -511,6 +549,12 @@ msgstr "" msgid "Lot/Serial" msgstr "" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__lot_producing_id +#: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.view_account_analytic_line_filter +msgid "Lot/Serial Number" +msgstr "" + #. module: custom_mrp_descarga #: model:ir.actions.act_window,name:custom_mrp_descarga.action_quartering_move_lines msgid "Líneas de despiece" @@ -600,6 +644,7 @@ msgid "Order" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__origin_qty #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__origin_qty msgid "Origin Qty" msgstr "" @@ -651,6 +696,11 @@ msgstr "" msgid "Produced Qty" msgstr "" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__production_product_id +msgid "Product" +msgstr "" + #. module: custom_mrp_descarga #: model:ir.actions.act_window,name:custom_mrp_descarga.action_classified_move_line #: model:ir.ui.menu,name:custom_mrp_descarga.menu_move_line_classified @@ -667,6 +717,11 @@ msgstr "" msgid "Product Template" msgstr "" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__production_product_uom_id +msgid "Product Unit of Measure" +msgstr "" + #. module: custom_mrp_descarga #: code:addons/custom_mrp_descarga/models/saca_line.py:0 #: code:addons/custom_mrp_descarga/models/saca_line.py:0 @@ -684,6 +739,8 @@ msgstr "" #. module: custom_mrp_descarga #: model:ir.model,name:custom_mrp_descarga.model_mrp_production +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__mrp_production_id +#: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.view_account_analytic_line_filter msgid "Production Order" msgstr "" @@ -700,11 +757,13 @@ msgid "Producto" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__purchase_price #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__purchase_price msgid "Purchase Amount" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__purchase_unit_price #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__purchase_unit_price msgid "Purchase Unit Price" msgstr "" @@ -755,6 +814,7 @@ msgid "Relaxed" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__remolque_id #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__remolque_id msgid "Remolque" msgstr "" @@ -790,6 +850,7 @@ msgid "Resumen de matanza" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__rto_percentage #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__rto_percentage #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.production_move_line_ids_tree_view #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.stock_move_line_classified_tree_view @@ -825,6 +886,7 @@ msgid "Salidas" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__seized_units #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__seized_units msgid "Seized" msgstr "" @@ -839,6 +901,11 @@ msgstr "" msgid "Staff" msgstr "" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__production_state +msgid "State" +msgstr "" + #. module: custom_mrp_descarga #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.mrp_production_tree_view msgid "Sum Total Unit" @@ -849,6 +916,11 @@ msgstr "" msgid "Task" msgstr "" +#. module: custom_mrp_descarga +#: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.view_account_analytic_line_filter +msgid "Task Name" +msgstr "" + #. module: custom_mrp_descarga #: code:addons/custom_mrp_descarga/models/saca_line.py:0 #: code:addons/custom_mrp_descarga/models/saca_line.py:0 @@ -875,6 +947,11 @@ msgstr "" msgid "Timesheet" msgstr "" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__task_name +msgid "Title" +msgstr "" + #. module: custom_mrp_descarga #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.view_mrp_production_filter msgid "Today" @@ -1009,6 +1086,7 @@ msgid "Unload Date" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__vehicle_id #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__vehicle_id msgid "Vehicle" msgstr "" diff --git a/custom_mrp_descarga/i18n/es.po b/custom_mrp_descarga/i18n/es.po index aedd073d..7f1424e3 100644 --- a/custom_mrp_descarga/i18n/es.po +++ b/custom_mrp_descarga/i18n/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-22 09:12+0000\n" -"PO-Revision-Date: 2024-10-22 09:12+0000\n" +"POT-Creation-Date: 2024-10-29 11:09+0000\n" +"PO-Revision-Date: 2024-10-29 11:09+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -15,6 +15,17 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: custom_mrp_descarga +#: model:ir.model.fields,help:custom_mrp_descarga.field_account_analytic_line__production_state +msgid "" +" * Draft: The MO is not confirmed yet.\n" +" * Confirmed: The MO is confirmed, the stock rules and the reordering of the components are trigerred.\n" +" * In Progress: The production has started (on the MO or on the WO).\n" +" * To Close: The production is done, the MO has to be closed.\n" +" * Done: The MO is closed, the stock moves are posted. \n" +" * Cancelled: The MO has been cancelled, can't be confirmed anymore." +msgstr "" + #. module: custom_mrp_descarga #: code:addons/custom_mrp_descarga/report/mrp_production_summary_xlsx.py:0 #: code:addons/custom_mrp_descarga/report/mrp_production_summary_xlsx.py:0 @@ -32,12 +43,18 @@ msgstr "Importe" msgid "Amount Duration" msgstr "Duración" +#. module: custom_mrp_descarga +#: model:ir.actions.act_window,name:custom_mrp_descarga.action_classified_analytic +msgid "Analytic" +msgstr "Analítica" + #. module: custom_mrp_descarga #: model:ir.model,name:custom_mrp_descarga.model_account_analytic_line msgid "Analytic Line" msgstr "Línea analítica" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__asphyxiation_units #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__asphyxiation_units msgid "Asphyxiated" msgstr "Asfixiados" @@ -54,6 +71,7 @@ msgid "Average Price" msgstr "Precio medio" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__average_weight #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__average_weight #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.mrp_production_form_view msgid "Average Weight" @@ -101,7 +119,9 @@ msgid "BoM Category" msgstr "Categoría LdM" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__breeding_id #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__breeding_id +#: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.view_account_analytic_line_filter #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.view_mrp_production_filter msgid "Breeding" msgstr "Crianza" @@ -163,6 +183,7 @@ msgid "Classified" msgstr "Clasificado" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__cost #: model:ir.model.fields,field_description:custom_mrp_descarga.field_stock_inventory_line__cost msgid "Cost" msgstr "Coste" @@ -218,6 +239,7 @@ msgid "Demanding" msgstr "Exigente" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__descarga_order #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__descarga_order msgid "Descarga Order" msgstr "Órden de descarga" @@ -240,6 +262,11 @@ msgstr "" msgid "Dest Kg" msgstr "Cantidad destino" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__dif_total_amount +msgid "Dif. Total Amount" +msgstr "Dif. Importe total" + #. module: custom_mrp_descarga #: code:addons/custom_mrp_descarga/report/mrp_production_quartering_summary_xlsx.py:0 #: code:addons/custom_mrp_descarga/report/mrp_production_quartering_summary_xlsx.py:0 @@ -298,6 +325,7 @@ msgid "Download Product" msgstr "Producto descarga" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__download_unit #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__download_unit msgid "Download Unit" msgstr "Unidades descargadas" @@ -314,6 +342,11 @@ msgstr "Vaciar nacedoras" msgid "Entradas" msgstr "" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__entry_total_amount +msgid "Entry Total Amount" +msgstr "Importe total entradas" + #. module: custom_mrp_descarga #: code:addons/custom_mrp_descarga/report/mrp_production_quartering_summary_xlsx.py:0 #: code:addons/custom_mrp_descarga/report/mrp_production_quartering_summary_xlsx.py:0 @@ -404,6 +437,11 @@ msgstr "" msgid "Incubator" msgstr "Incubadora" +#. module: custom_mrp_descarga +#: model:ir.ui.menu,name:custom_mrp_descarga.menu_production_analytic +msgid "Informe analítico" +msgstr "" + #. module: custom_mrp_descarga #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.mrp_production_form_view msgid "Input Products" @@ -513,6 +551,12 @@ msgstr "Lote" msgid "Lot/Serial" msgstr "Lote/Número de serie" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__lot_producing_id +#: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.view_account_analytic_line_filter +msgid "Lot/Serial Number" +msgstr "Lote/Nº de serie" + #. module: custom_mrp_descarga #: model:ir.actions.act_window,name:custom_mrp_descarga.action_quartering_move_lines msgid "Líneas de despiece" @@ -602,6 +646,7 @@ msgid "Order" msgstr "Órden" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__origin_qty #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__origin_qty msgid "Origin Qty" msgstr "Cantidad origen" @@ -653,6 +698,11 @@ msgstr "Kg producidos/hora" msgid "Produced Qty" msgstr "Cantidad producida" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__production_product_id +msgid "Product" +msgstr "Producto" + #. module: custom_mrp_descarga #: model:ir.actions.act_window,name:custom_mrp_descarga.action_classified_move_line #: model:ir.ui.menu,name:custom_mrp_descarga.menu_move_line_classified @@ -669,6 +719,11 @@ msgstr "Movimientos de Producto (Stock Move Line)" msgid "Product Template" msgstr "Plantilla de producto" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__production_product_uom_id +msgid "Product Unit of Measure" +msgstr "UdM de producto" + #. module: custom_mrp_descarga #: code:addons/custom_mrp_descarga/models/saca_line.py:0 #: code:addons/custom_mrp_descarga/models/saca_line.py:0 @@ -686,6 +741,8 @@ msgstr "Fecha de producción" #. module: custom_mrp_descarga #: model:ir.model,name:custom_mrp_descarga.model_mrp_production +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__mrp_production_id +#: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.view_account_analytic_line_filter msgid "Production Order" msgstr "Orden de producción" @@ -702,11 +759,13 @@ msgid "Producto" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__purchase_price #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__purchase_price msgid "Purchase Amount" msgstr "Importe de compra" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__purchase_unit_price #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__purchase_unit_price msgid "Purchase Unit Price" msgstr "Precio unitario" @@ -757,6 +816,7 @@ msgid "Relaxed" msgstr "Relajada" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__remolque_id #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__remolque_id msgid "Remolque" msgstr "" @@ -792,6 +852,7 @@ msgid "Resumen de matanza" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__rto_percentage #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__rto_percentage #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.production_move_line_ids_tree_view #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.stock_move_line_classified_tree_view @@ -827,6 +888,7 @@ msgid "Salidas" msgstr "" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__seized_units #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__seized_units msgid "Seized" msgstr "Decomisos" @@ -841,6 +903,11 @@ msgstr "Secuencia" msgid "Staff" msgstr "Personal" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__production_state +msgid "State" +msgstr "Estado" + #. module: custom_mrp_descarga #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.mrp_production_tree_view msgid "Sum Total Unit" @@ -851,6 +918,11 @@ msgstr "Suma total unidades" msgid "Task" msgstr "Tarea" +#. module: custom_mrp_descarga +#: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.view_account_analytic_line_filter +msgid "Task Name" +msgstr "Nombre de tarea" + #. module: custom_mrp_descarga #: code:addons/custom_mrp_descarga/models/saca_line.py:0 #: code:addons/custom_mrp_descarga/models/saca_line.py:0 @@ -877,6 +949,11 @@ msgstr "El producto del lote no coincide con el producto de la línea." msgid "Timesheet" msgstr "Tiempos" +#. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__task_name +msgid "Title" +msgstr "Descripción" + #. module: custom_mrp_descarga #: model_terms:ir.ui.view,arch_db:custom_mrp_descarga.view_mrp_production_filter msgid "Today" @@ -1011,6 +1088,7 @@ msgid "Unload Date" msgstr "Fecha descarga" #. module: custom_mrp_descarga +#: model:ir.model.fields,field_description:custom_mrp_descarga.field_account_analytic_line__vehicle_id #: model:ir.model.fields,field_description:custom_mrp_descarga.field_mrp_production__vehicle_id msgid "Vehicle" msgstr "Vehículo" diff --git a/custom_mrp_descarga/models/account_analytic_line.py b/custom_mrp_descarga/models/account_analytic_line.py index 9a1f458c..b3da96de 100644 --- a/custom_mrp_descarga/models/account_analytic_line.py +++ b/custom_mrp_descarga/models/account_analytic_line.py @@ -7,8 +7,98 @@ class AccountAnalyticLine(models.Model): _inherit = "account.analytic.line" production_id = fields.Many2one(string="Production", comodel_name="mrp.production") + mrp_production_id = fields.Many2one( + string="Production Order", + comodel_name="mrp.production", + ) unload_date = fields.Datetime( string="Unload Date", related="production_id.saca_line_id.unload_date", store=True, ) + task_name = fields.Char( + related="task_id.name", + store=True, + ) + descarga_order = fields.Char( + related="mrp_production_id.descarga_order", + store=True, + ) + breeding_id = fields.Many2one( + comodel_name="stock.picking.batch", + related="mrp_production_id.breeding_id", + store=True, + ) + vehicle_id = fields.Many2one( + comodel_name="fleet.vehicle", + related="mrp_production_id.vehicle_id", + store=True, + ) + remolque_id = fields.Many2one( + comodel_name="fleet.vehicle", + related="mrp_production_id.remolque_id", + store=True, + ) + production_product_id = fields.Many2one( + comodel_name="product.product", + related="mrp_production_id.product_id", + store=True, + ) + lot_producing_id = fields.Many2one( + comodel_name="stock.production.lot", + related="mrp_production_id.lot_producing_id", + store=True, + ) + average_weight = fields.Float( + related="mrp_production_id.average_weight", + store=True, + ) + download_unit = fields.Integer( + related="mrp_production_id.download_unit", + store=True, + ) + origin_qty = fields.Float( + related="mrp_production_id.origin_qty", + store=True, + ) + production_product_uom_id = fields.Many2one( + comodel_name="uom.uom", + related="mrp_production_id.product_uom_id", + store=True, + ) + rto_percentage = fields.Float( + related="mrp_production_id.rto_percentage", + store=True, + ) + purchase_unit_price = fields.Float( + related="mrp_production_id.purchase_unit_price", + store=True, + ) + asphyxiation_units = fields.Integer( + related="mrp_production_id.asphyxiation_units", + store=True, + ) + seized_units = fields.Integer( + related="mrp_production_id.seized_units", + store=True, + ) + purchase_price = fields.Float( + related="mrp_production_id.purchase_price", + store=True, + ) + cost = fields.Float( + related="mrp_production_id.cost", + store=True, + ) + entry_total_amount = fields.Float( + related="mrp_production_id.entry_total_amount", + store=True, + ) + dif_total_amount = fields.Float( + related="mrp_production_id.dif_total_amount", + store=True, + ) + production_state = fields.Selection( + related="mrp_production_id.state", + store=True, + ) diff --git a/custom_mrp_descarga/models/mrp_production.py b/custom_mrp_descarga/models/mrp_production.py index 78fcd395..99940a89 100644 --- a/custom_mrp_descarga/models/mrp_production.py +++ b/custom_mrp_descarga/models/mrp_production.py @@ -228,7 +228,9 @@ def _default_production_date(self): store=True, ) timesheet_ids = fields.One2many( - comodel_name="account.analytic.line", related="saca_line_id.timesheet_ids" + string="Timesheet", + comodel_name="account.analytic.line", + inverse_name="mrp_production_id", ) @api.depends("total_duration", "total_unit") diff --git a/custom_mrp_descarga/models/saca_line.py b/custom_mrp_descarga/models/saca_line.py index 3ddd26a2..e2b6a122 100644 --- a/custom_mrp_descarga/models/saca_line.py +++ b/custom_mrp_descarga/models/saca_line.py @@ -93,6 +93,9 @@ def action_next_stage(self): production._onchange_workorder_ids() production._check_production_lines() production._create_update_move_finished() + for analytic in self.timesheet_ids: + if not analytic.mrp_production_id: + analytic.mrp_production_id = production.id if self.production_ids: for line in self.production_ids: if not line.clasified_ids: diff --git a/custom_mrp_descarga/views/account_analytic_line_view.xml b/custom_mrp_descarga/views/account_analytic_line_view.xml new file mode 100644 index 00000000..6a854b75 --- /dev/null +++ b/custom_mrp_descarga/views/account_analytic_line_view.xml @@ -0,0 +1,84 @@ + + + + account.analytic.line + + + + + + + + + + + + + + account.analytic.line + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Analytic + account.analytic.line + ir.actions.act_window + tree + + + [('mrp_production_id', '!=', False)] + + + + +