From f9efd08ff5024e3a14a27fa4258685b4efeb4c83 Mon Sep 17 00:00:00 2001 From: santi Date: Wed, 28 Aug 2024 18:20:23 +0000 Subject: [PATCH] [MIG] product_sequence: Migration to 16.0 --- product_sequence/__manifest__.py | 2 +- product_sequence/models/product_category.py | 1 - product_sequence/models/product_product.py | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/product_sequence/__manifest__.py b/product_sequence/__manifest__.py index 3736a23..3a8c8e1 100644 --- a/product_sequence/__manifest__.py +++ b/product_sequence/__manifest__.py @@ -6,7 +6,7 @@ { 'name': 'Product Sequence', - 'version': '12.0.2.0.2', + 'version': "16.0.1.0.0", 'author': "Zikzakmedia SL,Sodexis,Odoo Community Association (OCA)", 'website': 'https://github.com/OCA/product-attribute', 'license': 'AGPL-3', diff --git a/product_sequence/models/product_category.py b/product_sequence/models/product_category.py index 817f5a7..3f80e31 100644 --- a/product_sequence/models/product_category.py +++ b/product_sequence/models/product_category.py @@ -36,7 +36,6 @@ class ProductCategory(models.Model): } return vals - @api.multi def write(self, vals): prefix = vals.get("code_prefix") if prefix: diff --git a/product_sequence/models/product_product.py b/product_sequence/models/product_product.py index 0c7db9c..a8797a6 100644 --- a/product_sequence/models/product_product.py +++ b/product_sequence/models/product_product.py @@ -13,7 +13,7 @@ class ProductProduct(models.Model): default_code = fields.Char( required=True, default='/', - track_visibility='onchange', + tracking=True, help="Set to '/' and save if you want a new internal reference " "to be proposed." ) @@ -35,7 +35,6 @@ class ProductProduct(models.Model): vals['default_code'] = sequence.next_by_id() return super().create(vals) - @api.multi def write(self, vals): """To assign a new internal reference, just write '/' on the field. Note this is up to the user, if the product category is changed, @@ -55,7 +54,6 @@ class ProductProduct(models.Model): return True return super().write(vals) - @api.multi def copy(self, default=None): if default is None: default = {}