Browse Source

Merge PR #1770 into 12.0

Signed-off-by LoisRForgeFlow
12.0-mig-module_prototyper_last
OCA-git-bot 5 years ago
parent
commit
d17b8b829a
  1. 5
      base_conditional_image/models/abstract_image.py
  2. 1
      base_conditional_image/models/image.py
  3. 3
      database_cleanup/tests/test_database_cleanup.py

5
base_conditional_image/models/abstract_image.py

@ -7,17 +7,18 @@ from odoo.tools.safe_eval import safe_eval
class AbstractConditionalImage(models.AbstractModel): class AbstractConditionalImage(models.AbstractModel):
_name = 'abstract.conditional.image' _name = 'abstract.conditional.image'
_description = 'Abstract image'
image = fields.Binary( image = fields.Binary(
compute='_compute_image', string="Image", compute='_compute_image', string="Image",
store=False, readonly=True store=False, readonly=True
) )
image_medium = fields.Binary( image_medium = fields.Binary(
compute='_compute_image', string="Image",
compute='_compute_image', string="Medium-sized image",
store=False, readonly=True store=False, readonly=True
) )
image_small = fields.Binary( image_small = fields.Binary(
compute='_compute_image', string="Image",
compute='_compute_image', string="Small-sized image",
store=False, readonly=True store=False, readonly=True
) )

1
base_conditional_image/models/image.py

@ -7,6 +7,7 @@ from odoo.exceptions import ValidationError
class Image(models.Model): class Image(models.Model):
_name = 'image' _name = 'image'
_description = 'Image'
name = fields.Char('Name', required=True) name = fields.Char('Name', required=True)
model_name = fields.Char('Model Name', required=True) model_name = fields.Char('Model Name', required=True)

3
database_cleanup/tests/test_database_cleanup.py

@ -95,7 +95,8 @@ class TestDatabaseCleanup(TransactionCase):
# reference to it # reference to it
original_registry = Registry.registries[self.env.cr.dbname] original_registry = Registry.registries[self.env.cr.dbname]
config.options['test_enable'] = False config.options['test_enable'] = False
purge_modules.purge_all()
with mute_logger('odoo.modules.graph', 'odoo.modules.loading'):
purge_modules.purge_all()
config.options['test_enable'] = True config.options['test_enable'] = True
# must be removed by the wizard # must be removed by the wizard
self.assertFalse(self.env['ir.module.module'].search([ self.assertFalse(self.env['ir.module.module'].search([

Loading…
Cancel
Save