changeset 1f6f7178e184 in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=1f6f7178e184
description:
        Add move relate on product

        issue9411
        review291951002
diffstat:

 CHANGELOG |   1 +
 move.xml  |  35 +++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 0 deletions(-)

diffs (52 lines):

diff -r f0a63b0aef91 -r 1f6f7178e184 CHANGELOG
--- a/CHANGELOG Wed Aug 12 14:28:23 2020 +0200
+++ b/CHANGELOG Wed Aug 12 14:33:14 2020 +0200
@@ -1,3 +1,4 @@
+* Add a relate from product to its moves
 * Factorize the cost price of move for cost computation
 * Fill grouping values when assigning move
 * Use a single assign wizard for all shipments
diff -r f0a63b0aef91 -r 1f6f7178e184 move.xml
--- a/move.xml  Wed Aug 12 14:28:23 2020 +0200
+++ b/move.xml  Wed Aug 12 14:33:14 2020 +0200
@@ -136,5 +136,40 @@
             <field name="model" search="[('model', '=', 'stock.move')]"/>
         </record>
 
+        <record model="ir.action.act_window" id="act_product_moves">
+            <field name="name">Stock Moves</field>
+            <field name="res_model">stock.move</field>
+            <field
+                name="domain"
+                eval="[If(Eval('active_ids', []) == [Eval('active_id')], 
(If(Eval('active_model') == 'product.template', 'product.template', 'product'), 
'=', Eval('active_id', -1)), (If(Eval('active_model') == 'product.template', 
'product.template', 'product'), 'in', Eval('active_ids', [])))]"
+                pyson="1"/>
+            <field name="order" eval="[('effective_date', 'DESC NULLS 
FIRST')]" pyson="1"/>
+        </record>
+        <record model="ir.action.act_window.view" id="act_product_moves_view1">
+            <field name="sequence" eval="10"/>
+            <field name="view" ref="move_view_tree"/>
+            <field name="act_window" ref="act_product_moves"/>
+        </record>
+        <record model="ir.action.act_window.view" id="act_product_moves_view2">
+            <field name="sequence" eval="20"/>
+            <field name="view" ref="move_view_form"/>
+            <field name="act_window" ref="act_product_moves"/>
+        </record>
+
+        <record model="ir.action.keyword" id="act_product_moves_keyword1">
+            <field name="keyword">form_relate</field>
+            <field name="model">product.product,-1</field>
+            <field name="action" ref="act_product_moves"/>
+        </record>
+        <record model="ir.action.keyword" id="act_product_moves_keyword2">
+            <field name="keyword">form_relate</field>
+            <field name="model">product.template,-1</field>
+            <field name="action" ref="act_product_moves"/>
+        </record>
+        <record model="ir.action-res.group" id="act_product_moves-group_stock">
+            <field name="action" ref="act_product_moves"/>
+            <field name="group" ref="group_stock"/>
+        </record>
+
     </data>
 </tryton>

Reply via email to