From f286dde8cae1ba2ddc44b384daea9513b924518a Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Thu, 3 Mar 2016 16:22:10 +0100 Subject: [PATCH] Tenames and typos. --- base_multi_image/models/image.py | 10 +++++----- base_multi_image/models/owner.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/base_multi_image/models/image.py b/base_multi_image/models/image.py index 5ba11544e..23053a060 100644 --- a/base_multi_image/models/image.py +++ b/base_multi_image/models/image.py @@ -14,7 +14,7 @@ from openerp import tools _logger = logging.getLogger(__name__) -class ImageABC(models.Model): +class Image(models.Model): _name = "base_multi_image.image" _sql_constraints = [ ('uniq_name_owner', 'UNIQUE(owner_id, owner_model, name)', @@ -139,7 +139,7 @@ class ImageABC(models.Model): _('The image filestore cannot be created, %s') % e) @api.model - def _make_pretty(self, name): + def _make_name_pretty(self, name): return name.replace('_', ' ').capitalize() @api.onchange('url') @@ -147,20 +147,20 @@ class ImageABC(models.Model): if self.url: filename = self.url.split('/')[-1] self.name, self.extension = os.path.splitext(filename) - self.name = self._make_pretty(self.name) + self.name = self._make_name_pretty(self.name) @api.onchange('path') def _onchange_path(self): if self.path: self.name, self.extension = os.path.splitext(os.path.basename( self.path)) - self.name = self._make_pretty(self.name) + self.name = self._make_name_pretty(self.name) @api.onchange('filename') def _onchange_filename(self): if self.filename: self.name, self.extension = os.path.splitext(self.filename) - self.name = self._make_pretty(self.name) + self.name = self._make_name_pretty(self.name) @api.constrains('storage', 'url') def _check_url(self): diff --git a/base_multi_image/models/owner.py b/base_multi_image/models/owner.py index 1d6f74416..883eb6d4d 100644 --- a/base_multi_image/models/owner.py +++ b/base_multi_image/models/owner.py @@ -35,7 +35,7 @@ class Owner(models.AbstractModel): @api.multi @api.depends('image_ids') def _get_multi_image(self): - """Get a the main image for this object. + """Get the main image for this object. This is provided as a compatibility layer for submodels that already had one image per record.