Files
tryton/modules/sale/product.xml
T
Maxime Richez 5a97280814 Always compute product quantities for sales with children
with_childs is set to True by default only when one location is in the context.
But for the product list in sales, we want to have the quantities with children
also if more than one warehouse is selected.

Closes #12377
2023-07-07 16:20:56 +02:00

63 lines
2.7 KiB
XML

<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="template_view_form">
<field name="model">product.template</field>
<field name="inherit" ref="product.template_view_form"/>
<field name="name">template_form</field>
</record>
<record model="ir.ui.view" id="template_view_tree">
<field name="model">product.template</field>
<field name="inherit" ref="product.template_view_tree"/>
<field name="name">template_tree</field>
</record>
<record model="ir.ui.view" id="product_view_list_sale_line">
<field name="model">product.product</field>
<field name="type">tree</field>
<field name="priority" eval="20"/>
<field name="name">product_list_sale_line</field>
</record>
<record model="ir.action.act_window" id="act_product">
<field name="name">Products</field>
<field name="res_model">product.product</field>
<field name="domain" eval="[('salable', '=', True)]" pyson="1"/>
<field name="context_model">product.sale.context</field>
<field
name="context"
eval="{'stock_skip_warehouse': True, 'with_childs': True}"
pyson="1"/>
</record>
<record model="ir.action.act_window.view" id="act_product_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="product_view_list_sale_line"/>
<field name="act_window" ref="act_product"/>
</record>
<record model="ir.action.act_window.view" id="act_product_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="product.product_view_form"/>
<field name="act_window" ref="act_product"/>
</record>
<menuitem
parent="menu_sale"
action="act_product"
sequence="50"
id="menu_product"/>
<record model="ir.ui.view" id="product_sale_context_view_form">
<field name="model">product.sale.context</field>
<field name="type">form</field>
<field name="name">product_sale_context_form</field>
</record>
<record model="ir.ui.view" id="product_configuration_view_form">
<field name="model">product.configuration</field>
<field name="inherit" ref="product.product_configuration_view_form"/>
<field name="name">product_configuration_form</field>
</record>
</data>
</tryton>