trytond-patches/issue8844.diff

72 lines
3.1 KiB
Diff

# HG changeset patch
# User Cédric Krier <cedric.krier@b2ck.com>
Index: product.xml
===================================================================
--- a/trytond/trytond/modules/stock/product.xml
+++ b/trytond/trytond/modules/stock/product.xml
@@ -40,6 +40,13 @@
<field name="name">location_quantity_tree</field>
</record>
+ <record model="ir.ui.view" id="location_quantity_view_form">
+ <field name="model">stock.location</field>
+ <field name="type">form</field>
+ <field name="priority" eval="20"/>
+ <field name="name">location_quantity_form</field>
+ </record>
+
<record model="ir.ui.view" id="location_quantity_view_list">
<field name="model">stock.location</field>
<field name="type">tree</field>
@@ -55,11 +62,17 @@
eval="If(Eval('active_model') == 'product.template', {'product_template': Eval('active_id')}, {'product': Eval('active_id')})"/>
<field name="context_model">product.by_location.context</field>
</record>
- <record model="ir.action.act_window.view" id="act_location_quantity_tree_view">
+ <record model="ir.action.act_window.view" id="act_location_quantity_tree_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="location_quantity_view_tree"/>
<field name="act_window" ref="act_location_quantity_tree"/>
</record>
+ <record model="ir.action.act_window.view" id="act_location_quantity_tree_view2">
+ <field name="sequence" eval="20"/>
+ <field name="view" ref="location_quantity_view_form"/>
+ <field name="act_window" ref="act_location_quantity_tree"/>
+ </record>
+
<record model="ir.action.keyword"
id="act_location_quantity_tree_keyword1">
<field name="keyword">form_relate</field>
Index: view/location_quantity_form.xml
===================================================================
new file mode 100644
--- /dev/null
+++ b/trytond/trytond/modules/stock/view/location_quantity_form.xml
@@ -0,0 +1,14 @@
+<?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. -->
+<form col="6">
+ <label name="name"/>
+ <field name="name" colspan="5"/>
+ <label name="quantity"/>
+ <field name="quantity"/>
+ <label name="forecast_quantity"/>
+ <field name="forecast_quantity"/>
+ <label name="cost_value"/>
+ <field name="cost_value"/>
+ <field name="childs" colspan="6" view_ids="stock.location_quantity_view_list,stock.location_quantity_view_form"/>
+</form>
Index: view/location_quantity_tree.xml
===================================================================
--- a/trytond/trytond/modules/stock/view/location_quantity_tree.xml
+++ b/trytond/trytond/modules/stock/view/location_quantity_tree.xml
@@ -6,6 +6,4 @@
<field name="quantity"/>
<field name="forecast_quantity"/>
<field name="cost_value"/>
- <field name="parent" tree_invisible="1"/>
- <field name="childs" tree_invisible="1"/>
</tree>