[MIG] product_sequence: Migration to 16.0
This commit is contained in:
parent
5cd63e80ac
commit
f9efd08ff5
3 changed files with 2 additions and 5 deletions
|
@ -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',
|
||||
|
|
|
@ -36,7 +36,6 @@ class ProductCategory(models.Model):
|
|||
}
|
||||
return vals
|
||||
|
||||
@api.multi
|
||||
def write(self, vals):
|
||||
prefix = vals.get("code_prefix")
|
||||
if prefix:
|
||||
|
|
|
@ -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 = {}
|
||||
|
|
Loading…
Add table
Reference in a new issue