mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
This UOM should be convertable (in the same category) as the normal stock UOM for the product. Example: If you want to sell 'units' of 50lbs then you should make a "50lbs" UOM in the Weight category and use that as the sale and purchase UOM, then your "Catch Weight UOM" can be the stock "lb(s)" UOM.
62 lines
3.7 KiB
XML
62 lines
3.7 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<record id="view_production_lot_form_inherit" model="ir.ui.view">
|
|
<field name="name">stock.production.lot.form.inherit</field>
|
|
<field name="model">stock.production.lot</field>
|
|
<field name="inherit_id" ref="stock.view_production_lot_form" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='product_id']" position="after">
|
|
<field name="catch_weight_ratio"/>
|
|
<field name="catch_weight"/>
|
|
<field name="catch_weight_uom_id" readonly="1"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<!--<record id="view_move_line_form_inherit" model="ir.ui.view">-->
|
|
<!--<field name="name">stock.move.line.form.inherit</field>-->
|
|
<!--<field name="model">stock.move.line</field>-->
|
|
<!--<field name="inherit_id" ref="stock.view_move_line_form" />-->
|
|
<!--<field name="arch" type="xml">-->
|
|
<!--<xpath expr="//field[@name='lot_name']" position="after">-->
|
|
<!--<field name="lot_catch_weight_ratio" readonly="1"/>-->
|
|
<!--</xpath>-->
|
|
<!--</field>-->
|
|
<!--</record>-->
|
|
<record id="view_stock_move_operations_inherit" model="ir.ui.view">
|
|
<field name="name">stock.move.operations.form.inherit</field>
|
|
<field name="model">stock.move</field>
|
|
<field name="inherit_id" ref="stock.view_stock_move_operations"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='location_dest_id']" position="after">
|
|
<field name="product_catch_weight_uom_id" invisible="1"/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='move_line_ids']" position="attributes">
|
|
<attribute name="context">{'tree_view_ref': 'stock.view_stock_move_line_operation_tree', 'default_product_uom_id': product_uom, 'default_picking_id': picking_id, 'default_move_id': id, 'default_product_id': product_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_catch_weight_uom_id': product_catch_weight_uom_id}</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<record id="view_stock_move_line_operation_tree_inherit" model="ir.ui.view">
|
|
<field name="name">stock.move.line.operations.tree.inherit</field>
|
|
<field name="model">stock.move.line</field>
|
|
<field name="inherit_id" ref="stock.view_stock_move_line_operation_tree" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='lot_name']" position="after">
|
|
<field name="catch_weight" invisible="not context.get('show_lots_text') or not context.get('show_catch_weight')"/>
|
|
<field name="catch_weight_uom_id" invisible="not context.get('show_lots_text') or not context.get('show_catch_weight')"/>
|
|
<field name="lot_catch_weight" invisible="not context.get('show_lots_m2o') or not context.get('show_catch_weight')" readonly="1"/>
|
|
<field name="lot_catch_weight_uom_id" invisible="not context.get('show_lots_m2o') or not context.get('show_catch_weight')" readonly="1"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<record id="product_template_form_view_inherit" model="ir.ui.view">
|
|
<field name="name">product.template.common.form.inherit</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="product.product_template_form_view" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='uom_po_id']" position="after">
|
|
<field name="catch_weight_uom_id" attrs="{'invisible': [('tracking', '!=', 'serial')]}" help="Leave empty to not use catch weight."/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo> |