[Fix] stock: Upstream Traceability should open the view with parent_field = move_hist...
authorsbh (Open ERP) <sbh@tinyerp.com>
Wed, 1 Sep 2010 12:22:53 +0000 (17:52 +0530)
committersbh (Open ERP) <sbh@tinyerp.com>
Wed, 1 Sep 2010 12:22:53 +0000 (17:52 +0530)
bzr revid: sbh@tinyerp.com-20100901122253-7yaj8alqv3tuk3z6

addons/stock/wizard/stock_traceability.py
addons/stock/wizard/stock_traceability_view.xml

index 063c094..d1d799c 100644 (file)
@@ -47,7 +47,7 @@ class action_traceability(osv.osv_memory):
         view_id = cr.fetchone()[0]
         value = {
             'domain': "[('id','in',["+','.join(map(str, ids))+"])]",
-            'name': ((type1=='move_history_ids') and 'Upstream Traceability') or 'Downstream Traceability',
+            'name': ((type1=='move_history_ids') and 'Donwstream Traceability') or 'Upstream Traceability',
             'view_type': 'tree',
             'res_model': 'stock.move',
             'field_parent': type1,
index 47f244b..fc08f78 100644 (file)
@@ -65,7 +65,7 @@
                         <separator string="" colspan="4" />
                         <button icon='gtk-cancel' special="cancel"
                             string="Cancel" />
-                        <button name="action_traceability" string="Upstream traceability" type="object" context="{'type': '', 'field': 'prodlot_id'}"/>
+                        <button name="action_traceability" string="Upstream traceability" type="object" context="{'type': 'move_history_ids2', 'field': 'prodlot_id'}"/>
                     </form>
                 </field>
             </record>
@@ -90,7 +90,7 @@
                         <separator string="" colspan="4" />
                         <button icon='gtk-cancel' special="cancel"
                             string="Cancel" />
-                        <button name="action_traceability" string="Downstream traceability" type="object" context="{'type': 'move_history_ids2', 'field': 'prodlot_id'}"/>
+                        <button name="action_traceability" string="Downstream traceability" type="object" context="{'type': '', 'field': 'prodlot_id'}"/>
                     </form>
                 </field>
             </record>