[MIG] product_sequence: Migration to 16.0

This commit is contained in:
santi 2024-08-28 18:20:23 +00:00
parent 5cd63e80ac
commit f9efd08ff5
3 changed files with 2 additions and 5 deletions

View file

@ -6,7 +6,7 @@
{ {
'name': 'Product Sequence', 'name': 'Product Sequence',
'version': '12.0.2.0.2', 'version': "16.0.1.0.0",
'author': "Zikzakmedia SL,Sodexis,Odoo Community Association (OCA)", 'author': "Zikzakmedia SL,Sodexis,Odoo Community Association (OCA)",
'website': 'https://github.com/OCA/product-attribute', 'website': 'https://github.com/OCA/product-attribute',
'license': 'AGPL-3', 'license': 'AGPL-3',

View file

@ -36,7 +36,6 @@ class ProductCategory(models.Model):
} }
return vals return vals
@api.multi
def write(self, vals): def write(self, vals):
prefix = vals.get("code_prefix") prefix = vals.get("code_prefix")
if prefix: if prefix:

View file

@ -13,7 +13,7 @@ class ProductProduct(models.Model):
default_code = fields.Char( default_code = fields.Char(
required=True, required=True,
default='/', default='/',
track_visibility='onchange', tracking=True,
help="Set to '/' and save if you want a new internal reference " help="Set to '/' and save if you want a new internal reference "
"to be proposed." "to be proposed."
) )
@ -35,7 +35,6 @@ class ProductProduct(models.Model):
vals['default_code'] = sequence.next_by_id() vals['default_code'] = sequence.next_by_id()
return super().create(vals) return super().create(vals)
@api.multi
def write(self, vals): def write(self, vals):
"""To assign a new internal reference, just write '/' on the field. """To assign a new internal reference, just write '/' on the field.
Note this is up to the user, if the product category is changed, Note this is up to the user, if the product category is changed,
@ -55,7 +54,6 @@ class ProductProduct(models.Model):
return True return True
return super().write(vals) return super().write(vals)
@api.multi
def copy(self, default=None): def copy(self, default=None):
if default is None: if default is None:
default = {} default = {}