436 lines
25 KiB
XML
436 lines
25 KiB
XML
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<odoo>
|
||
|
<data>
|
||
|
|
||
|
<record id="product_category_form_view_inherit" model="ir.ui.view">
|
||
|
<field name="name">product.category.form</field>
|
||
|
<field name="model">product.category</field>
|
||
|
<field name="inherit_id" ref="product.product_category_form_view" />
|
||
|
<field name="arch" type="xml">
|
||
|
<group name="first" position="after">
|
||
|
<group string="Logistics">
|
||
|
<field name="route_ids" widget="many2many_tags"/>
|
||
|
<div colspan="2" attrs="{'invisible': [('parent_id', '=', False)]}">
|
||
|
The following routes will apply to the products in this category taking into account parent categories:
|
||
|
<field name="total_route_ids" nolabel="1" widget="many2many_tags"/>
|
||
|
</div>
|
||
|
<field name="removal_strategy_id" options="{'no_create': True}"/>
|
||
|
</group>
|
||
|
</group>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record model="ir.actions.act_window" id="product_open_orderpoint">
|
||
|
<field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
|
||
|
<field name="name">Reordering Rules</field>
|
||
|
<field name="res_model">stock.warehouse.orderpoint</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="view_stock_product_tree" model="ir.ui.view">
|
||
|
<field name="name">product.stock.tree.inherit</field>
|
||
|
<field name="model">product.product</field>
|
||
|
<field name="inherit_id" ref="product.product_product_tree_view"/>
|
||
|
<field name="arch" type="xml">
|
||
|
<tree position="attributes">
|
||
|
<attribute name="decoration-danger">virtual_available<0</attribute>
|
||
|
<attribute name="decoration-info">virtual_available>=0</attribute>
|
||
|
</tree>
|
||
|
<field name="price" position="after">
|
||
|
<field name="qty_available"/>
|
||
|
<field name="virtual_available"/>
|
||
|
</field>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="view_stock_product_template_tree" model="ir.ui.view">
|
||
|
<field name="name">product.template.stock.tree.inherit</field>
|
||
|
<field name="model">product.template</field>
|
||
|
<field name="inherit_id" ref="product.product_template_tree_view"/>
|
||
|
<field name="arch" type="xml">
|
||
|
<tree position="attributes">
|
||
|
<attribute name="decoration-danger">virtual_available<0</attribute>
|
||
|
<attribute name="decoration-info">virtual_available>=0</attribute>
|
||
|
</tree>
|
||
|
<field name="uom_id" position="before">
|
||
|
<field name="qty_available"/>
|
||
|
<field name="virtual_available"/>
|
||
|
</field>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
|
||
|
<record id="action_receive_move" model="ir.actions.act_window">
|
||
|
<field name="name">Receipts</field>
|
||
|
<field name="res_model">stock.move</field>
|
||
|
<field name="type">ir.actions.act_window</field>
|
||
|
<field name="view_type">form</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="domain" eval="[('picking_id.picking_type_id.code','=','incoming'), ('location_id.usage','!=','internal'), ('location_dest_id.usage', '=', 'internal')]"/>
|
||
|
<field name="view_id" ref="view_move_tree_receipt_picking"/>
|
||
|
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
|
||
|
<field name="help" type="html">
|
||
|
<p class="oe_view_nocontent_create">
|
||
|
Click to register a receipt for this product.
|
||
|
</p><p>
|
||
|
Here you will find the history of all receipts related to
|
||
|
this product, as well as all future receipts you are waiting
|
||
|
from your suppliers.
|
||
|
</p>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="action_deliver_move" model="ir.actions.act_window">
|
||
|
<field name="name">Deliveries</field>
|
||
|
<field name="res_model">stock.move</field>
|
||
|
<field name="type">ir.actions.act_window</field>
|
||
|
<field name="view_type">form</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="view_id" ref="view_move_tree_receipt_picking"/>
|
||
|
<field name="domain" eval="[('picking_type_id.code','=','outgoing'), ('location_id.usage','=','internal'), ('location_dest_id.usage', '!=', 'internal')]"/>
|
||
|
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
|
||
|
<field name="help" type="html">
|
||
|
<p class="oe_view_nocontent_create">
|
||
|
Click to add a delivery order for this product.
|
||
|
</p><p>
|
||
|
Here you will find the history of all past deliveries related to
|
||
|
this product, as well as all the products you must deliver to
|
||
|
customers.
|
||
|
</p>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Product Template -->
|
||
|
|
||
|
<record id="product_template_search_form_view_stock" model="ir.ui.view">
|
||
|
<field name="name">product.template.search.stock.form</field>
|
||
|
<field name="model">product.template</field>
|
||
|
<field name="inherit_id" ref="product.product_template_search_view"/>
|
||
|
<field name="arch" type="xml">
|
||
|
<field name="pricelist_id" position="after">
|
||
|
<separator/>
|
||
|
<field name="location_id" widget="selection" context="{'location': self}"/>
|
||
|
<field name="warehouse_id" widget="selection" context="{'warehouse': self}"/>
|
||
|
<separator/>
|
||
|
<filter name="real_stock_available" string="Available Products" domain="[('qty_available','>',0)]"/>
|
||
|
<filter name="real_stock_exhausted" string="Exhausted Stock" domain="[('qty_available','<=',0),('type','not in',('service', 'consu'))]"/>
|
||
|
<filter name="real_stock_negative" string="Negative Stock" domain="[('qty_available','<',0)]"/>
|
||
|
</field>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- view common to both template and product -->
|
||
|
<record id="view_template_property_form" model="ir.ui.view">
|
||
|
<field name="name">product.template.stock.property.form.inherit</field>
|
||
|
<field name="model">product.template</field>
|
||
|
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||
|
<field name="arch" type="xml">
|
||
|
<page name="general_information" position="after">
|
||
|
<page string="Inventory">
|
||
|
<group name="inventory">
|
||
|
<group>
|
||
|
<field name="route_ids" widget="many2many_checkboxes" attrs="{'invisible':[('type', 'in', ['service', 'digital'])]}"/>
|
||
|
<field name="route_from_categ_ids" widget="many2many_tags" readonly="1" attrs="{'invisible':[('route_from_categ_ids', '=', [])]}"/>
|
||
|
</group>
|
||
|
<group name="group_lots_and_weight">
|
||
|
<label for="weight" attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"/>
|
||
|
<div class="o_row" name="weight" attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}">
|
||
|
<field name="weight"/>
|
||
|
</div>
|
||
|
<field name="tracking" widget="radio" attrs="{'invisible':[('type', 'in', ['service', 'digital'])]}" groups="stock.group_production_lot"/>
|
||
|
<label for="volume" attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"/>
|
||
|
<div class="o_row" name="volume" attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}">
|
||
|
<field name="volume" string="Volume"/>
|
||
|
</div>
|
||
|
</group>
|
||
|
<group name="stock_property" groups="base.group_no_one">
|
||
|
<field name="property_stock_procurement" domain="[('usage','=','procurement')]"/>
|
||
|
<field name="property_stock_production" domain="[('usage','=','production')]"/>
|
||
|
<field name="property_stock_inventory" domain="[('usage','=','inventory')]"/>
|
||
|
</group>
|
||
|
</group>
|
||
|
</page>
|
||
|
</page>
|
||
|
<field name="description_sale" position="after">
|
||
|
<separator string="Description for Pickings" colspan="4"/>
|
||
|
<field name="description_picking" placeholder="Description for Pickings (Rack, Row and Case Information)" nolabel="1" colspan="4"/>
|
||
|
</field>
|
||
|
<group name="email_template_and_project" position="before">
|
||
|
<group name="sale_condition" string="Sale Conditions">
|
||
|
<label for="warranty" groups="stock.group_production_lot"/>
|
||
|
<div groups="stock.group_production_lot">
|
||
|
<field name="warranty" class="oe_inline"/> months
|
||
|
</div>
|
||
|
<label for="sale_delay"/>
|
||
|
<div>
|
||
|
<field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}" class="oe_inline" style="vertical-align:baseline"/> days
|
||
|
</div>
|
||
|
</group>
|
||
|
</group>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="product_template_view_form_procurement_button" model="ir.ui.view">
|
||
|
<field name="name">product.template.stock.stat.button.group</field>
|
||
|
<field name="model">product.template</field>
|
||
|
<field name="inherit_id" ref="procurement.product_template_view_form_procurement_button"/>
|
||
|
<field name="arch" type="xml">
|
||
|
<xpath expr="//button[@name='%(procurement.procurement_order_action_product_template_stat)d']" position="attributes">
|
||
|
<attribute name="groups">base.group_no_one,stock.group_adv_location</attribute>
|
||
|
</xpath>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="product_product_view_form_procurement_button" model="ir.ui.view">
|
||
|
<field name="name">product.product.stock.stat.button.group</field>
|
||
|
<field name="model">product.product</field>
|
||
|
<field name="inherit_id" ref="procurement.product_product_view_form_procurement_button"/>
|
||
|
<field name="arch" type="xml">
|
||
|
<xpath expr="//button[@name='%(procurement.procurement_order_action_product_product_stat)d']" position="attributes">
|
||
|
<attribute name="groups">base.group_no_one,stock.group_adv_location</attribute>
|
||
|
</xpath>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
|
||
|
<record model="ir.ui.view" id="product_template_kanban_stock_view">
|
||
|
<field name="name">Product Template Kanban Stock</field>
|
||
|
<field name="model">product.template</field>
|
||
|
<field name="inherit_id" ref="product.product_template_kanban_view"/>
|
||
|
<field name="arch" type="xml">
|
||
|
<field name="lst_price" position="after">
|
||
|
<field name="type"/>
|
||
|
</field>
|
||
|
<ul position="inside">
|
||
|
<li t-if="record.type.raw_value == 'product'">On hand: <field name="qty_available"/> <field name="uom_id"/></li>
|
||
|
</ul>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Product Variant -->
|
||
|
|
||
|
<record id="product_search_form_view_stock" model="ir.ui.view">
|
||
|
<field name="name">product.search.stock.form</field>
|
||
|
<field name="model">product.product</field>
|
||
|
<field name="inherit_id" ref="product.product_search_form_view"/>
|
||
|
<field name="arch" type="xml">
|
||
|
<field name="pricelist_id" position="before">
|
||
|
<field name="location_id" widget="selection" context="{'location': self}"/>
|
||
|
<field name="warehouse_id" widget="selection" context="{'warehouse': self}"/>
|
||
|
</field>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record model="ir.ui.view" id="product_kanban_stock_view">
|
||
|
<field name="name">Product Kanban Stock</field>
|
||
|
<field name="model">product.product</field>
|
||
|
<field name="inherit_id" ref="product.product_kanban_view"/>
|
||
|
<field name="arch" type="xml">
|
||
|
<field name="lst_price" position="after">
|
||
|
<field name="reception_count"/>
|
||
|
<field name="delivery_count"/>
|
||
|
</field>
|
||
|
<xpath expr="//div[@name='tags']" position="inside">
|
||
|
<a name="%(action_receive_move)d" type="action" t-if="record.reception_count.raw_value>1">
|
||
|
<t t-esc="record.reception_count.value"/> Receipts
|
||
|
</a>
|
||
|
<a name="%(action_receive_move)d" type="action" t-if="record.reception_count.raw_value==1">
|
||
|
<t t-esc="record.reception_count.value"/> Receipt
|
||
|
</a>
|
||
|
<a name="%(action_deliver_move)d" type="action" t-if="record.delivery_count.raw_value>1">
|
||
|
<t t-esc="record.delivery_count.value"/> Deliveries
|
||
|
</a>
|
||
|
<a name="%(action_deliver_move)d" type="action" t-if="record.delivery_count.raw_value==1">
|
||
|
<t t-esc="record.delivery_count.value"/> Delivery
|
||
|
</a>
|
||
|
</xpath>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="product_product_view_form_easy_inherit_stock" model="ir.ui.view">
|
||
|
<field name="name">product.product.view.form.easy.inherit.stock</field>
|
||
|
<field name="model">product.product</field>
|
||
|
<field name="inherit_id" ref="product.product_variant_easy_edit_view"/>
|
||
|
<field name="arch" type="xml">
|
||
|
<sheet position="before">
|
||
|
<header>
|
||
|
<button name="%(action_view_change_product_quantity)d" string="Update Qty On Hand" type="action" attrs="{'invisible': [('type', '!=', 'product')]}"/>
|
||
|
<button string="Procurement Request" name="%(stock.act_make_procurement)d" type="action" attrs="{'invisible': [('type', '!=', 'product')]}"/>
|
||
|
</header>
|
||
|
</sheet>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- view used for product.product only -->
|
||
|
<record model="ir.ui.view" id="product_form_view_procurement_button">
|
||
|
<field name="name">product.product.procurement</field>
|
||
|
<field name="model">product.product</field>
|
||
|
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||
|
<field name="arch" type="xml">
|
||
|
<data>
|
||
|
<header position="inside">
|
||
|
<button string="Update Qty On Hand"
|
||
|
type="action"
|
||
|
name="%(action_view_change_product_quantity)d"
|
||
|
attrs="{'invisible': [('type', '!=', 'product')]}"/>
|
||
|
<button string="Procurement Request"
|
||
|
type="action"
|
||
|
name="%(stock.act_make_procurement)d"
|
||
|
attrs="{'invisible': [('type', '!=', 'product')]}"/>
|
||
|
</header>
|
||
|
<div name="button_box" position="inside">
|
||
|
<button class="oe_stat_button"
|
||
|
name="%(product_open_quants)d"
|
||
|
icon="fa-building-o"
|
||
|
type="action" attrs="{'invisible':[('type', '!=', 'product')]}">
|
||
|
<field name="qty_available" widget="statinfo" string="On Hand"/>
|
||
|
</button>
|
||
|
<button type="action"
|
||
|
name="%(stock.action_stock_level_forecast_report_product)d"
|
||
|
attrs="{'invisible':[('type', '!=', 'product')]}"
|
||
|
class="oe_stat_button" icon="fa-building-o">
|
||
|
<div class="o_form_field o_stat_info">
|
||
|
<span class="o_stat_value"><field name="virtual_available" widget="statinfo" nolabel="1"/>
|
||
|
<span attrs="{'invisible':[('outgoing_qty', '=', 0),('incoming_qty','=',0)]}">
|
||
|
(-<field name="outgoing_qty" widget="statinfo" nolabel="1"/>
|
||
|
+<field name="incoming_qty" widget="statinfo" nolabel="1"/>)
|
||
|
</span>
|
||
|
</span>
|
||
|
<span class="o_stat_text">Forecasted</span>
|
||
|
</div>
|
||
|
</button>
|
||
|
<button string="Traceability"
|
||
|
type="action"
|
||
|
name= "%(act_product_stock_move_open)d"
|
||
|
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"
|
||
|
class="oe_stat_button" icon="fa-arrows-v"
|
||
|
groups="stock.group_stock_user"/>
|
||
|
<button type="action"
|
||
|
name="%(product_open_orderpoint)d"
|
||
|
attrs="{'invisible':['|',('type', '!=', 'product'),('nbr_reordering_rules', '==', 1)]}"
|
||
|
class="oe_stat_button" icon="fa-refresh">
|
||
|
<field name="nbr_reordering_rules" widget="statinfo"/>
|
||
|
</button>
|
||
|
<button name="%(product_open_orderpoint)d" type="action"
|
||
|
attrs="{'invisible':['|',('type', 'not in', ['product', 'consu']),('nbr_reordering_rules', '!=', 1)]}"
|
||
|
class="oe_stat_button" icon="fa-refresh">
|
||
|
<div class="o_form_field o_stat_info mr4">
|
||
|
<span class="o_stat_text">Min :</span>
|
||
|
<span class="o_stat_text">Max:</span>
|
||
|
</div>
|
||
|
<div class="o_form_field o_stat_info">
|
||
|
<span class="o_stat_value"><field name="reordering_min_qty"/></span>
|
||
|
<span class="o_stat_value"><field name="reordering_max_qty"/></span>
|
||
|
</div>
|
||
|
</button>
|
||
|
<button string="Routes" type="object"
|
||
|
name="action_view_routes"
|
||
|
attrs="{'invisible':[('type', '!=', 'product')]}"
|
||
|
class="oe_stat_button" icon="fa-cogs" groups="stock.group_adv_location"/>
|
||
|
</div>
|
||
|
</data>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- view used for product.template only -->
|
||
|
<record model="ir.ui.view" id="product_template_form_view_procurement_button">
|
||
|
<field name="name">product.template_procurement</field>
|
||
|
<field name="model">product.template</field>
|
||
|
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||
|
<field name="arch" type="xml">
|
||
|
<data>
|
||
|
<header position="inside" >
|
||
|
<button name="%(action_view_change_product_quantity)d" string="Update Qty On Hand" type="action" attrs="{'invisible': [('type', '!=', 'product')]}"/>
|
||
|
<button string="Procurement Request" name="%(stock.act_make_procurement)d" type="action" attrs="{'invisible': [('type', '!=', 'product')]}"/>
|
||
|
</header>
|
||
|
<div name="button_box" position="inside">
|
||
|
<button type="object"
|
||
|
name="action_open_quants"
|
||
|
attrs="{'invisible':[('type', '!=', 'product')]}"
|
||
|
class="oe_stat_button" icon="fa-building-o">
|
||
|
<field name="qty_available" widget="statinfo" string="On Hand"/>
|
||
|
</button>
|
||
|
<button type="action"
|
||
|
name="%(stock.action_stock_level_forecast_report_template)d"
|
||
|
attrs="{'invisible':[('type', '!=', 'product')]}"
|
||
|
class="oe_stat_button" icon="fa-building-o">
|
||
|
<div class="o_form_field o_stat_info">
|
||
|
<span class="o_stat_value"><field name="virtual_available" widget="integer"/>
|
||
|
<span attrs="{'invisible':[('outgoing_qty', '=', 0),('incoming_qty','=',0)]}" groups="base.group_no_one">
|
||
|
(-<field name="outgoing_qty" widget="integer"/>+<field name="incoming_qty" widget="integer"/>)
|
||
|
</span>
|
||
|
</span>
|
||
|
<span class="o_stat_text">Forecasted</span>
|
||
|
</div>
|
||
|
</button>
|
||
|
<button string="Traceability" type="object"
|
||
|
name= "action_view_stock_moves"
|
||
|
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"
|
||
|
class="oe_stat_button" icon="fa-arrows-v"
|
||
|
groups="stock.group_stock_user"/>
|
||
|
<button type="object"
|
||
|
name="action_view_orderpoints"
|
||
|
attrs="{'invisible':['|',('type', '!=', 'product'),('nbr_reordering_rules', '==', 1)]}"
|
||
|
class="oe_stat_button"
|
||
|
icon="fa-refresh">
|
||
|
<field name="nbr_reordering_rules" widget="statinfo"/>
|
||
|
</button>
|
||
|
<button type="object"
|
||
|
name="action_view_orderpoints"
|
||
|
attrs="{'invisible':['|',('type', '!=', 'product'),('nbr_reordering_rules', '!=', 1)]}"
|
||
|
class="oe_stat_button" icon="fa-refresh">
|
||
|
<div class="o_form_field o_stat_info mr4">
|
||
|
<span class="o_stat_text">Min:</span>
|
||
|
<span class="o_stat_text">Max:</span>
|
||
|
</div>
|
||
|
<div class="o_form_field o_stat_info">
|
||
|
<span class="o_stat_value"><field name="reordering_min_qty"/></span>
|
||
|
<span class="o_stat_value"><field name="reordering_max_qty"/></span>
|
||
|
</div>
|
||
|
</button>
|
||
|
<button string="Routes" type="object"
|
||
|
name="action_view_routes"
|
||
|
attrs="{'invisible':[('type', '!=', 'product')]}"
|
||
|
class="oe_stat_button" icon="fa-cogs"
|
||
|
groups="stock.group_adv_location"/>
|
||
|
</div>
|
||
|
|
||
|
<!-- change attrs of fields added in view_template_property_form
|
||
|
to restrict the display for templates -->
|
||
|
<xpath expr="//label[@for='weight']" position="attributes">
|
||
|
<attribute name="attrs">{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}</attribute>
|
||
|
</xpath>
|
||
|
<xpath expr="//div[@name='weight']" position="attributes">
|
||
|
<attribute name="attrs">{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}</attribute>
|
||
|
</xpath>
|
||
|
<xpath expr="//label[@for='volume']" position="attributes">
|
||
|
<attribute name="attrs">{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}</attribute>
|
||
|
</xpath>
|
||
|
<xpath expr="//div[@name='volume']" position="attributes">
|
||
|
<attribute name="attrs">{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}</attribute>
|
||
|
</xpath>
|
||
|
|
||
|
</data>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="product_template_action_product" model="ir.actions.act_window">
|
||
|
<field name="name">Products</field>
|
||
|
<field name="type">ir.actions.act_window</field>
|
||
|
<field name="res_model">product.template</field>
|
||
|
<field name="view_mode">kanban,tree,form</field>
|
||
|
<field name="view_type">form</field>
|
||
|
<field name="context">{"search_default_consumable": 1, 'default_type': 'product'}</field>
|
||
|
<field name="help" type="html">
|
||
|
<p class="oe_view_nocontent_create">
|
||
|
Click to define a new product.
|
||
|
</p>
|
||
|
</field>
|
||
|
</record>
|
||
|
<menuitem id="menu_product_variant_config_stock" name="Products" action="product_template_action_product"
|
||
|
parent="stock.menu_stock_inventory_control" sequence="1"/>
|
||
|
<menuitem id="product_product_menu" name="Product Variants" action="product.product_normal_action"
|
||
|
parent="menu_stock_inventory_control" sequence="2" groups="product.group_product_variant"/>
|
||
|
|
||
|
</data>
|
||
|
</odoo>
|