Skip to content

Commit

Permalink
Merge PR OCA#913 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by rousseldenis
  • Loading branch information
OCA-git-bot committed Jul 11, 2024
2 parents 140fc3f + f817581 commit 285cdbe
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def migrate(cr, version):
FROM
procurement_group
WHERE
stock_picking.group_id = procurement_group.id
stock_picking.state NOT IN ('done', 'cancel')
AND stock_picking.group_id = procurement_group.id
"""
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2024 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
"""
Initialize default value when adding field instead updating every record.
"""

field_spec = [
(
"release_policy",
"stock.picking",
False,
"char",
"varchar",
"stock_available_to_promise_release",
"direct",
)
]

openupgrade.add_fields(env, field_spec=field_spec)

0 comments on commit 285cdbe

Please sign in to comment.