Vo Minh Thu (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-server/trunk-for-caribou-jam into 
lp:openobject-server.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-for-caribou-jam/+merge/118926
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-for-caribou-jam/+merge/118926
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/trunk-for-caribou-jam.
=== modified file 'openerp/modules/loading.py'
--- openerp/modules/loading.py	2012-06-11 12:27:58 +0000
+++ openerp/modules/loading.py	2012-08-09 11:22:25 +0000
@@ -119,6 +119,10 @@
                 elif ext == '.sql':
                     process_sql_file(cr, fp)
                 elif ext == '.yml':
+                    #NOTE: noupdate is False id test_enable and demo.yml is loading
+                    #     Must prevent demo yaml demo record form test yaml rollback.
+                    if tools.config.options['test_enable'] and kind in ('demo', 'demo_xml'):
+                        noupdate = False
                     tools.convert_yaml_import(cr, module_name, fp, idref, mode, noupdate, report)
                 else:
                     tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)

=== modified file 'openerp/tests/test_ir_sequence.py'
--- openerp/tests/test_ir_sequence.py	2012-06-20 11:51:42 +0000
+++ openerp/tests/test_ir_sequence.py	2012-08-09 11:22:25 +0000
@@ -66,6 +66,15 @@
         cr0.close()
         cr1.close()
 
+    def test_ir_sequence_unlink(self):
+        cr = cursor()
+        ids = registry('ir.sequence').search(cr, ADMIN_USER_ID,[('code', '=', 'test_sequence_type')], {})
+        registry('ir.sequence').unlink(cr, ADMIN_USER_ID, ids, {})
+        ids = registry('ir.sequence.type').search(cr, ADMIN_USER_ID,[('code', '=', 'test_sequence_type')], {})
+        registry('ir.sequence.type').unlink(cr, ADMIN_USER_ID, ids, {})
+        cr.commit()
+        cr.close()
+
 class test_ir_sequence_no_gap(unittest2.TestCase):
     """ Copy of the previous tests for a 'No gap' sequence. """
 
@@ -105,6 +114,15 @@
         cr0.close()
         cr1.close()
 
+    def test_ir_sequence_no_gap_unlink(self):
+        cr = cursor()
+        ids = registry('ir.sequence').search(cr, ADMIN_USER_ID, [('code', '=', 'test_sequence_type_2')], {})
+        registry('ir.sequence').unlink(cr, ADMIN_USER_ID, ids, {})
+        ids = registry('ir.sequence.type').search(cr, ADMIN_USER_ID, [('code', '=', 'test_sequence_type_2')], {})
+        registry('ir.sequence.type').unlink(cr, ADMIN_USER_ID, ids, {})
+        cr.commit()
+        cr.close()
+
 class test_ir_sequence_change_implementation(unittest2.TestCase):
     """ Create sequence objects and change their ``implementation`` field. """
 
@@ -143,6 +161,9 @@
         ids = registry('ir.sequence').search(cr, ADMIN_USER_ID,
             [('code', 'in', ['test_sequence_type_3', 'test_sequence_type_4'])], {})
         registry('ir.sequence').unlink(cr, ADMIN_USER_ID, ids, {})
+        ids = registry('ir.sequence.type').search(cr, ADMIN_USER_ID,
+            [('code', 'in', ['test_sequence_type_3', 'test_sequence_type_4'])], {})
+        registry('ir.sequence.type').unlink(cr, ADMIN_USER_ID, ids, {})
         cr.commit()
         cr.close()
 
@@ -184,7 +205,15 @@
         assert all(str(x) == f() for x in xrange(1,1000))
         cr.commit()
         cr.close()
-        
+
+    def test_ir_sequence_unlink(self):
+        cr = cursor()
+        ids = registry('ir.sequence').search(cr, ADMIN_USER_ID, [('code', 'in', ['test_sequence_type_5', 'test_sequence_type_6'])], {})
+        registry('ir.sequence').unlink(cr, ADMIN_USER_ID, ids, {})
+        ids = registry('ir.sequence.type').search(cr, ADMIN_USER_ID, [('code', 'in', ['test_sequence_type_5', 'test_sequence_type_6'])], {})
+        registry('ir.sequence.type').unlink(cr, ADMIN_USER_ID, ids, {})
+        cr.commit()
+        cr.close()
 
 
 if __name__ == '__main__':

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to