[FIX] base_import_module: fix test sql import
The test tries to import data from an sql file. The problem is that it is trying to import partners, but when the test is ran with the l10n_co localization, one of the required field is not filled. We just change the model to import to avoid the issue with the missing required field. Linked to runbot error 32740, 32742, 32745, 32738 closes odoo/odoo#145708 Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
This commit is contained in:
@@ -42,7 +42,7 @@ class TestImportModule(odoo.tests.TransactionCase):
|
||||
b'"id","name"\n' \
|
||||
b'bar,bar'
|
||||
),
|
||||
('foo/data.sql', b"INSERT INTO res_partner (active, name) VALUES (true, 'baz');"),
|
||||
('foo/data.sql', b"INSERT INTO res_currency (name, symbol, active) VALUES ('New Currency', 'NCU', TRUE);"),
|
||||
('foo/static/css/style.css', b".foo{color: black;}"),
|
||||
('foo/static/js/foo.js', b"console.log('foo')"),
|
||||
('bar/__manifest__.py', b"{'data': ['data.xml']}"),
|
||||
@@ -60,7 +60,7 @@ class TestImportModule(odoo.tests.TransactionCase):
|
||||
self.assertEqual(self.env.ref('foo.foo').name, 'foo')
|
||||
self.assertEqual(self.env.ref('foo.bar')._name, 'res.partner')
|
||||
self.assertEqual(self.env.ref('foo.bar').name, 'bar')
|
||||
self.assertEqual(self.env['res.partner'].search_count([('name', '=', 'baz')]), 1)
|
||||
self.assertEqual(self.env['res.currency'].search_count([('symbol', '=', 'NCU')]), 1)
|
||||
|
||||
self.assertEqual(self.env.ref('bar.foo')._name, 'res.country')
|
||||
self.assertEqual(self.env.ref('bar.foo').name, 'foo')
|
||||
|
||||
Reference in New Issue
Block a user