Skip to content

Commit

Permalink
[IMP] point_of_sale: pos_order_line_note module (OCA/V12) introduced …
Browse files Browse the repository at this point in the history
…'note' field on 'pos.order.line' model, that is now native. (named, 'customer_note')
  • Loading branch information
legalsylvain committed Oct 9, 2024
1 parent 9af4744 commit 839b22c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions openupgrade_scripts/apriori.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"mrp_subcontracting_resupply_link": "mrp_subcontracting_purchase",
# OCA/pos
"pos_invoicing": "point_of_sale",
"pos_order_line_note": "point_of_sale",
"pos_order_mgmt": "point_of_sale",
"pos_order_return": "point_of_sale",
"pos_sale_order_load": "pos_sale",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,29 @@ def merge_pos_order_return_module(env):
)


def merge_pos_order_line_module(env):
"""
The OCA/pos_order_line_note module (V12) is now merged into point_of_sale. We can hook into
the new core functionality just renaming the proper field.
"""
if openupgrade.column_exists(env.cr, "pos_order_line", "note"):
openupgrade.rename_fields(
env,
[
(
"pos.order.line",
"pos_order_line",
"note",
"customer_note",
),
],
)


@openupgrade.migrate()
def migrate(env, version):
merge_pos_order_return_module(env)
merge_pos_order_line_module(env)
openupgrade.rename_fields(
env,
[
Expand Down

0 comments on commit 839b22c

Please sign in to comment.