[FIX] Incorrect migration of some paths from Launchpad to GitHub
authorPedro M. Baeza <pedro.baeza@gmail.com>
Sun, 10 Aug 2014 10:16:44 +0000 (12:16 +0200)
committerPedro M. Baeza <pedro.baeza@gmail.com>
Sun, 10 Aug 2014 10:16:44 +0000 (12:16 +0200)
addons/mrp/test/multicompany.yml [new file with mode: 0644]
addons/stock/migrations/7.0.1.1.1/pre-rename_sequence_code.py [new file with mode: 0644]
addons/stock/test/multicompany.yml [new file with mode: 0644]
addonsmrp/test/multicompany.yml [deleted file]
addonsstock/migrations/7.0.1.1.1/pre-rename_sequence_code.py [deleted file]
addonsstock/test/multicompany.yml [deleted file]

diff --git a/addons/mrp/test/multicompany.yml b/addons/mrp/test/multicompany.yml
new file mode 100644 (file)
index 0000000..7ed9cf8
--- /dev/null
@@ -0,0 +1,20 @@
+-
+  Set the current user as multicompany user
+-
+  !context
+    uid: 'stock.multicompany_user'
+
+-
+  check no error on getting default mrp.production values in multicompany setting
+-
+  !python {model: mrp.production}: |
+    location_obj = self.pool.get('stock.location')
+    fields = ['location_src_id', 'location_dest_id']
+    defaults = self.default_get(cr, uid, ['location_id', 'location_dest_id', 'type'], context)
+    log('got defaults: %s', defaults)
+    for field in fields:
+        if defaults.get(field):
+            try:
+                location_obj.check_access_rule(cr, uid, [defaults[field]], 'read', context)
+            except Exception, exc:
+                assert False, "unreadable location %s: %s" % (field, exc)
diff --git a/addons/stock/migrations/7.0.1.1.1/pre-rename_sequence_code.py b/addons/stock/migrations/7.0.1.1.1/pre-rename_sequence_code.py
new file mode 100644 (file)
index 0000000..1831865
--- /dev/null
@@ -0,0 +1,11 @@
+__name__ = ("update internal picking sequence code and sequence")
+
+def migrate(cr, version):
+    old_type = 'stock.picking'
+    new_type = 'stock.picking.internal'
+    cr.execute ("UPDATE ir_sequence_type SET code=%(newtype)s WHERE code=%(oldtype)s",
+                {'newtype': new_type,
+                 'oldtype': old_type})
+    cr.execute ("UPDATE ir_sequence SET code=%(newtype)s WHERE code=%(oldtype)s",
+                {'newtype': new_type,
+                 'oldtype': old_type})
diff --git a/addons/stock/test/multicompany.yml b/addons/stock/test/multicompany.yml
new file mode 100644 (file)
index 0000000..2c0353a
--- /dev/null
@@ -0,0 +1,68 @@
+
+-
+  Set the current user as multicompany user
+-
+  !context
+    uid: 'stock.multicompany_user'
+
+-
+  check no error on getting default stock.move values in multicompany setting
+-
+  !python {model: stock.move}: |
+    location_obj = self.pool.get('stock.location')
+    fields = ['location_id', 'location_dest_id']
+    for type in ('in', 'internal', 'out'):
+        context['picking_type'] = type
+        defaults = self.default_get(cr, uid, ['location_id', 'location_dest_id', 'type'], context)
+        log('type: %s got defaults: %s', type, defaults)
+        for field in fields:
+            if defaults.get(field):
+                try:
+                    location_obj.check_access_rule(cr, uid, [defaults[field]], 'read', context)
+                except Exception, exc:
+                    assert False, "unreadable location %s: %s" % (field, exc)
+        assert defaults['type'] == type, "wrong move type"
+
+-
+  check onchange_move_type does not return unreadable in multicompany setting
+-
+  !python {model: stock.move}: |
+    location_obj = self.pool.get('stock.location')
+    fields = ['location_id', 'location_dest_id']
+    for type in ('in', 'internal', 'out'):
+        result = self.onchange_move_type(cr, uid, [], type, context)['value']
+        log('type: %s got: %s', type, result)
+        for field in fields:
+            if result.get(field):
+                try:
+                    location_obj.check_access_rule(cr, uid, [result[field]], 'read', context)
+                except Exception, exc:
+                    assert False, "unreadable location %s: %s" % (field, exc)
+
+-
+  check default location readability for stock_fill_inventory in multicompany setting
+-
+  !python {model: stock.fill.inventory}: |
+    location_obj = self.pool.get('stock.location')
+    defaults = self.default_get(cr, uid, ['location_id'], context)
+    log('got defaults: %s', defaults)
+    if defaults.get('location_id'):
+        try:
+            location_obj.check_access_rule(cr, uid, [defaults['location_id']], 'read', context)
+        except Exception, exc:
+            assert False, "unreadable source location: %s" % exc
+
+-
+  check default locations for warehouse in multicompany setting
+-
+  !python {model: stock.warehouse}: |
+    location_obj = self.pool.get('stock.location')
+    fields = ['lot_input_id', 'lot_stock_id', 'lot_output_id']
+    defaults = self.default_get(cr, uid, fields, context)
+    log('got defaults: %s', defaults)
+    for field in fields:
+        if defaults.get(field):
+            try:
+                location_obj.check_access_rule(cr, uid, [defaults[field]], 'read', context)
+            except Exception, exc:
+                assert False, "unreadable default %s: %s" % (field, exc)
diff --git a/addonsmrp/test/multicompany.yml b/addonsmrp/test/multicompany.yml
deleted file mode 100644 (file)
index 7ed9cf8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
--
-  Set the current user as multicompany user
--
-  !context
-    uid: 'stock.multicompany_user'
-
--
-  check no error on getting default mrp.production values in multicompany setting
--
-  !python {model: mrp.production}: |
-    location_obj = self.pool.get('stock.location')
-    fields = ['location_src_id', 'location_dest_id']
-    defaults = self.default_get(cr, uid, ['location_id', 'location_dest_id', 'type'], context)
-    log('got defaults: %s', defaults)
-    for field in fields:
-        if defaults.get(field):
-            try:
-                location_obj.check_access_rule(cr, uid, [defaults[field]], 'read', context)
-            except Exception, exc:
-                assert False, "unreadable location %s: %s" % (field, exc)
diff --git a/addonsstock/migrations/7.0.1.1.1/pre-rename_sequence_code.py b/addonsstock/migrations/7.0.1.1.1/pre-rename_sequence_code.py
deleted file mode 100644 (file)
index 1831865..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-__name__ = ("update internal picking sequence code and sequence")
-
-def migrate(cr, version):
-    old_type = 'stock.picking'
-    new_type = 'stock.picking.internal'
-    cr.execute ("UPDATE ir_sequence_type SET code=%(newtype)s WHERE code=%(oldtype)s",
-                {'newtype': new_type,
-                 'oldtype': old_type})
-    cr.execute ("UPDATE ir_sequence SET code=%(newtype)s WHERE code=%(oldtype)s",
-                {'newtype': new_type,
-                 'oldtype': old_type})
diff --git a/addonsstock/test/multicompany.yml b/addonsstock/test/multicompany.yml
deleted file mode 100644 (file)
index 2c0353a..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-
--
-  Set the current user as multicompany user
--
-  !context
-    uid: 'stock.multicompany_user'
-
--
-  check no error on getting default stock.move values in multicompany setting
--
-  !python {model: stock.move}: |
-    location_obj = self.pool.get('stock.location')
-    fields = ['location_id', 'location_dest_id']
-    for type in ('in', 'internal', 'out'):
-        context['picking_type'] = type
-        defaults = self.default_get(cr, uid, ['location_id', 'location_dest_id', 'type'], context)
-        log('type: %s got defaults: %s', type, defaults)
-        for field in fields:
-            if defaults.get(field):
-                try:
-                    location_obj.check_access_rule(cr, uid, [defaults[field]], 'read', context)
-                except Exception, exc:
-                    assert False, "unreadable location %s: %s" % (field, exc)
-        assert defaults['type'] == type, "wrong move type"
-
--
-  check onchange_move_type does not return unreadable in multicompany setting
--
-  !python {model: stock.move}: |
-    location_obj = self.pool.get('stock.location')
-    fields = ['location_id', 'location_dest_id']
-    for type in ('in', 'internal', 'out'):
-        result = self.onchange_move_type(cr, uid, [], type, context)['value']
-        log('type: %s got: %s', type, result)
-        for field in fields:
-            if result.get(field):
-                try:
-                    location_obj.check_access_rule(cr, uid, [result[field]], 'read', context)
-                except Exception, exc:
-                    assert False, "unreadable location %s: %s" % (field, exc)
-
--
-  check default location readability for stock_fill_inventory in multicompany setting
--
-  !python {model: stock.fill.inventory}: |
-    location_obj = self.pool.get('stock.location')
-    defaults = self.default_get(cr, uid, ['location_id'], context)
-    log('got defaults: %s', defaults)
-    if defaults.get('location_id'):
-        try:
-            location_obj.check_access_rule(cr, uid, [defaults['location_id']], 'read', context)
-        except Exception, exc:
-            assert False, "unreadable source location: %s" % exc
-
--
-  check default locations for warehouse in multicompany setting
--
-  !python {model: stock.warehouse}: |
-    location_obj = self.pool.get('stock.location')
-    fields = ['lot_input_id', 'lot_stock_id', 'lot_output_id']
-    defaults = self.default_get(cr, uid, fields, context)
-    log('got defaults: %s', defaults)
-    for field in fields:
-        if defaults.get(field):
-            try:
-                location_obj.check_access_rule(cr, uid, [defaults[field]], 'read', context)
-            except Exception, exc:
-                assert False, "unreadable default %s: %s" % (field, exc)