Skip to content

Commit

Permalink
[14.0][IMP] custom_mrp_descarga: Add field lot average cost in move l…
Browse files Browse the repository at this point in the history
…ines.
  • Loading branch information
Tu Nombre authored and anajuaristi committed Sep 12, 2024
1 parent 9e32da3 commit 17f8b43
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
5 changes: 3 additions & 2 deletions custom_mrp_descarga/i18n/custom_mrp_descarga.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-27 13:12+0000\n"
"PO-Revision-Date: 2024-08-27 13:12+0000\n"
"POT-Creation-Date: 2024-09-11 12:55+0000\n"
"PO-Revision-Date: 2024-09-11 12:55+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -48,6 +48,7 @@ msgid "Assign Serials"
msgstr ""

#. module: custom_mrp_descarga
#: model:ir.model.fields,field_description:custom_mrp_descarga.field_stock_move_line__average_price
#: model:ir.model.fields,field_description:custom_mrp_descarga.field_stock_production_lot__average_price
msgid "Average Price"
msgstr ""
Expand Down
5 changes: 3 additions & 2 deletions custom_mrp_descarga/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-27 13:13+0000\n"
"PO-Revision-Date: 2024-08-27 13:13+0000\n"
"POT-Creation-Date: 2024-09-11 12:55+0000\n"
"PO-Revision-Date: 2024-09-11 12:55+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -48,6 +48,7 @@ msgid "Assign Serials"
msgstr "Asignar Lotes"

#. module: custom_mrp_descarga
#: model:ir.model.fields,field_description:custom_mrp_descarga.field_stock_move_line__average_price
#: model:ir.model.fields,field_description:custom_mrp_descarga.field_stock_production_lot__average_price
msgid "Average Price"
msgstr "Precio medio"
Expand Down
1 change: 1 addition & 0 deletions custom_mrp_descarga/models/stock_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class StockMoveLine(models.Model):
qty_done = fields.Float(
digits="Weight Decimal Precision",
)
average_price = fields.Float(string="Average Price", related="lot_id.average_price")

@api.depends("production_id")
def _compute_sequence(self):
Expand Down
3 changes: 3 additions & 0 deletions custom_mrp_descarga/views/mrp_production_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,9 @@
<field name="consume_qty" optional="show" />
<field name="produced_qty" optional="show" />
<field name="qty_difference" optional="show" />
<field name="entry_total_amount" optional="show" />
<field name="output_total_amount" optional="show" />
<field name="dif_total_amount" optional="show" />
<field name="average_cost" optional="show" />
<field
name="state"
Expand Down
3 changes: 3 additions & 0 deletions custom_mrp_descarga/views/stock_move_line_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
<field name="production_id" />
<field name="product_id" />
<field name="lot_id" />
<field name="average_price" optional="show" />
<field name="location_id" optional="hide" />
<field name="location_dest_id" optional="hide" />
<field name="pallet" />
Expand All @@ -180,6 +181,8 @@
<field name="performance" optional="show" />
<field name="standard_price" />
<field name="amount" />
<field name="operation_id" optional="show" />
<field name="month_cost" optional="show" />
<field name="company_id" optional="hide" />
</tree>
</field>
Expand Down

0 comments on commit 17f8b43

Please sign in to comment.