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 945b678
Show file tree
Hide file tree
Showing 2 changed files with 20 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 @@ -27,10 +27,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 945b678

Please sign in to comment.