mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] scrap_reason_code: define product categories allowed for each code
Also redefine reason code form view a bit.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<!-- Copyright 2019 Open Source Integrators
|
||||
Copyright 2023 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<!-- Scrap Reason Code Type -->
|
||||
@@ -7,15 +8,22 @@
|
||||
<field name="model">scrap.reason.code</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reason Code">
|
||||
<group>
|
||||
<field name="name" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="description" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="location_id" />
|
||||
</group>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1><field name="name" nolabel="1" /></h1>
|
||||
</div>
|
||||
<group>
|
||||
<field name="description" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="location_id" />
|
||||
<field
|
||||
name="product_category_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -27,6 +35,7 @@
|
||||
<field name="name" />
|
||||
<field name="description" />
|
||||
<field name="location_id" />
|
||||
<field name="product_category_ids" widget="many2many_tags" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<!-- Copyright 2019 Open Source Integrators
|
||||
Copyright 2023 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="stock_scrap_form_reason_code" model="ir.ui.view">
|
||||
@@ -8,6 +9,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group/group" position='inside'>
|
||||
<field name="reason_code_id" />
|
||||
<field name="allowed_reason_code_ids" invisible="1" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -18,6 +20,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='product_uom_id']" position='after'>
|
||||
<field name="reason_code_id" />
|
||||
<field name="allowed_reason_code_ids" invisible="1" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -28,6 +31,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group/group" position='inside'>
|
||||
<field name="reason_code_id" />
|
||||
<field name="allowed_reason_code_ids" invisible="1" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user