Files
Odoo-Modules/fusion_inventory_sync/views/product_views.xml
2026-02-22 01:22:18 -05:00

50 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Add remote stock columns to product list view -->
<record id="view_product_template_list_inherit_sync" model="ir.ui.view">
<field name="name">product.template.list.sync</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//list" position="inside">
<field name="remote_qty_available" string="Remote Stock" optional="show"
decoration-danger="remote_qty_available == 0 and has_remote_mapping"
decoration-success="remote_qty_available > 0"/>
<field name="has_remote_mapping" column_invisible="1"/>
</xpath>
</field>
</record>
<!-- Add remote stock info to product form view -->
<record id="view_product_template_form_inherit_sync" model="ir.ui.view">
<field name="name">product.template.form.sync</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="Remote Inventory" name="remote_inventory"
invisible="not has_remote_mapping">
<group>
<group string="Remote Stock Levels">
<field name="remote_qty_available"/>
<field name="remote_qty_forecast"/>
</group>
</group>
<field name="sync_mapping_ids" readonly="1">
<list>
<field name="config_id"/>
<field name="remote_product_name"/>
<field name="remote_default_code"/>
<field name="remote_qty_available"/>
<field name="remote_qty_forecast"/>
<field name="last_stock_sync"/>
</list>
</field>
</page>
</xpath>
</field>
</record>
</odoo>