Add module mrp_workorder_lot_display

This commit is contained in:
Akim Juillerat
2023-11-22 21:15:13 +01:00
parent b701c3bb97
commit ac4c08490a
6 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1 @@
To auto generate

View File

View File

@@ -0,0 +1,21 @@
# Copyright 2023 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
{
"name": "MRP Workorder Lot Display",
"summary": "Display lot number on workorders kanban",
"version": "16.0.1.0.0",
"development_status": "Beta",
"category": "Manufacturing",
"website": "https://github.com/OCA/manufacture",
"author": "Camptocamp, Odoo Community Association (OCA)",
"maintainers": ["grindtildeath"],
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"mrp",
],
"data": [
"views/mrp_workorder.xml",
],
}

View File

@@ -0,0 +1 @@
- Akim Juillerat <akim.juillerat@camptocamp.com>

View File

@@ -0,0 +1,2 @@
This module displays the lot number on workorders kanban view
and adds a quick search option on the finished lot number.

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_mrp_production_workorder_form_view_filter" model="ir.ui.view">
<field name="name">mrp.production.work.order.select.inherit</field>
<field name="model">mrp.workorder</field>
<field
name="inherit_id"
ref="mrp.view_mrp_production_workorder_form_view_filter"
/>
<field name="arch" type="xml">
<field name="product_id" position="after">
<field name="finished_lot_id" />
</field>
</field>
</record>
<record id="view_mrp_production_work_order_search" model="ir.ui.view">
<field name="name">mrp.production.work.order.search.inherit</field>
<field name="model">mrp.workorder</field>
<field name="inherit_id" ref="mrp.view_mrp_production_work_order_search" />
<field name="arch" type="xml">
<field name="product_id" position="after">
<field name="finished_lot_id" />
</field>
</field>
</record>
<record id="workcenter_line_kanban" model="ir.ui.view">
<field name="name">mrp.production.work.order.kanban.inherit</field>
<field name="model">mrp.workorder</field>
<field name="inherit_id" ref="mrp.workcenter_line_kanban" />
<field name="arch" type="xml">
<field name="operation_id" position="after">
<field name="finished_lot_id" />
</field>
<xpath
expr="//h5[hasclass('oe_kanban_bottom_left')]//t[@t-out='record.product_id.value']"
position="after"
>
<t
t-if="record.product_id.tracking != 'none' and record.finished_lot_id.value"
> / <t t-out="record.finished_lot_id.value" /></t>
</xpath>
</field>
</record>
</odoo>