Skip to content

Commit

Permalink
Merge PR #325 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Jan 13, 2020
2 parents f1c9e7c + e07ba8c commit b71075c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions website_sale_secondary_unit/migrations/12.0.1.0.0/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2020 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openupgradelib import openupgrade


_field_renames = [
('product.secondary.unit', 'product_secondary_unit',
'website_published', 'is_published'),
]


@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_fields(env, _field_renames)
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class ProductSecondaryUnit(models.Model):
_inherit = ['product.secondary.unit', 'website.published.mixin']
_name = 'product.secondary.unit'

website_published = fields.Boolean(default=True)
is_published = fields.Boolean(default=True)

0 comments on commit b71075c

Please sign in to comment.