Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---Fields in module 'product_visible_discount'---
product_visible_discount / product.pricelist / discount_policy (selection) : NEW selection_keys: ['with_discount', 'without_discount']
product_visible_discount / product.pricelist / visible_discount (boolean) : DEL

# as the default is `with_discount`, we set `without_discount` for pricelists where the former flag is unset

---XML records in module 'product_visible_discount'---
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(cr, version):
cr.execute(
"update product_pricelist set discount_policy='without_discount' "
"where not visible_discount"
)
2 changes: 1 addition & 1 deletion openerp/openupgrade/doc/source/modules80-90.rst
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ Status :
+-----------------------------------+-----------------------------------+
|product_uos | |
+-----------------------------------+-----------------------------------+
|product_visible_discount | |
|product_visible_discount | Done |
+-----------------------------------+-----------------------------------+
|project | Done |
+-----------------------------------+-----------------------------------+
Expand Down