Merge lp:~acsone-openerp/stock-logistic-warehouse/some-fixes-lga into lp:~numerigraphe-team/stock-logistic-warehouse/7.0-inventory-hierarchical

Proposed by Laetitia Gangloff (Acsone)
Status: Merged
Merge reported by: Lionel Sausin - Initiatives/Numérigraphe
Merged at revision: not available
Proposed branch: lp:~acsone-openerp/stock-logistic-warehouse/some-fixes-lga
Merge into: lp:~numerigraphe-team/stock-logistic-warehouse/7.0-inventory-hierarchical
Diff against target: 51 lines (+13/-11)
2 files modified
stock_inventory_hierarchical/hierarchical_inventory_view.xml (+11/-10)
stock_inventory_hierarchical_location/tests/inventory_hierarchical_location_test.yml (+2/-1)
To merge this branch: bzr merge lp:~acsone-openerp/stock-logistic-warehouse/some-fixes-lga
Reviewer Review Type Date Requested Status
Numérigraphe Pending
Review via email: mp+227680@code.launchpad.net

Description of the change

Hello,

with your last version there is a problem in the view (use of an action before the declaration). And a test failing.

In case of hierarchical and exhaustive inventory, it is correct to have only one location when test the missing location. Missing location ignore location of sub inventories.

To post a comment you must log in.
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

Marking merges because I've included it in the github PR here: https://github.com/OCA/stock-logistics-warehouse/pull/17.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'stock_inventory_hierarchical/hierarchical_inventory_view.xml'
--- stock_inventory_hierarchical/hierarchical_inventory_view.xml 2014-07-01 11:13:51 +0000
+++ stock_inventory_hierarchical/hierarchical_inventory_view.xml 2014-07-22 08:15:56 +0000
@@ -37,6 +37,17 @@
37 <field name="context">{'full':'1', 'search_default_main_inventories':1}</field>37 <field name="context">{'full':'1', 'search_default_main_inventories':1}</field>
38 </record>38 </record>
3939
40 <!-- Open the children of the current Inventory in a distinct list
41 to let users work in a normal window instead of a popup -->
42 <act_window id="action_view_sub_inventory"
43 name="View Sub-inventories"
44 res_model="stock.inventory"
45 src_model="stock.inventory"
46 view_mode="tree,form"
47 view_type="form"
48 domain="[('parent_id', 'child_of', active_id),('id', '!=', active_id)]"
49 context="{'full':1, 'search_default_main_inventories':0}"/>
50
40 <record model="ir.ui.view" id="stock_inventory_hierarchical_form_view">51 <record model="ir.ui.view" id="stock_inventory_hierarchical_form_view">
41 <field name="name">hierarchical.inventory.form</field>52 <field name="name">hierarchical.inventory.form</field>
42 <field name="model">stock.inventory</field>53 <field name="model">stock.inventory</field>
@@ -70,15 +81,5 @@
70 </field>81 </field>
71 </record>82 </record>
7283
73 <!-- Open the children of the current Inventory in a distinct list
74 to let users work in a normal window instead of a popup -->
75 <act_window id="action_view_sub_inventory"
76 name="View Sub-inventories"
77 res_model="stock.inventory"
78 src_model="stock.inventory"
79 view_mode="tree,form"
80 view_type="form"
81 domain="[('parent_id', 'child_of', active_id),('id', '!=', active_id)]"
82 context="{'full':1, 'search_default_main_inventories':0}"/>
83 </data>84 </data>
84</openerp>85</openerp>
8586
=== modified file 'stock_inventory_hierarchical_location/tests/inventory_hierarchical_location_test.yml'
--- stock_inventory_hierarchical_location/tests/inventory_hierarchical_location_test.yml 2014-06-12 16:40:46 +0000
+++ stock_inventory_hierarchical_location/tests/inventory_hierarchical_location_test.yml 2014-07-22 08:15:56 +0000
@@ -24,7 +24,8 @@
24-24-
25 !python {model: stock.inventory}: |25 !python {model: stock.inventory}: |
26 missing_loc_ids = self.get_missing_locations(cr, uid, [ref('parent_inventory')], context=context)26 missing_loc_ids = self.get_missing_locations(cr, uid, [ref('parent_inventory')], context=context)
27 assert len(missing_loc_ids)==3, "get_missing_locations did not return any ID."27 # missing locations give only location that are not included in sub-inventories
28 assert len(missing_loc_ids)==1, "get_missing_locations did not return any ID."
2829
29-30-
30 I will fill the inventory and check that the function get_missing_locations return no locations.31 I will fill the inventory and check that the function get_missing_locations return no locations.

Subscribers

People subscribed via source and target branches