|
@ -45,7 +45,8 @@ class ProductCategory(models.Model): |
|
|
_inherit = 'product.category' |
|
|
_inherit = 'product.category' |
|
|
|
|
|
|
|
|
image = fields.Binary(help='Show Image Category in Form View') |
|
|
image = fields.Binary(help='Show Image Category in Form View') |
|
|
image_medium = fields.Binary(help='Show image category button in POS', inverse='_save_image_medium') |
|
|
|
|
|
|
|
|
image_medium = fields.Binary(help='Show image category button in POS', |
|
|
|
|
|
inverse='_save_image_medium') |
|
|
available_in_pos = fields.Boolean( |
|
|
available_in_pos = fields.Boolean( |
|
|
string="Available in the Point of Sale", |
|
|
string="Available in the Point of Sale", |
|
|
default=True, |
|
|
default=True, |
|
@ -57,7 +58,7 @@ class ProductCategory(models.Model): |
|
|
def _save_image_medium(self): |
|
|
def _save_image_medium(self): |
|
|
for record in self: |
|
|
for record in self: |
|
|
if record.image: |
|
|
if record.image: |
|
|
temp = tools.image_get_resized_images(self.image) |
|
|
|
|
|
|
|
|
temp = tools.image_get_resized_images(record.image) |
|
|
record.image_medium = temp['image_medium'] |
|
|
record.image_medium = temp['image_medium'] |
|
|
else: |
|
|
else: |
|
|
record.image_medium = None |
|
|
record.image_medium = None |
|
|