Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] sale_loyalty_order_line_link: Migration to 17.0 #247

Open
wants to merge 23 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
beb0458
[ADD] sale_coupon_order_line_link: New module
chienandalu Jul 23, 2021
fd6a229
[IMP] sale_coupon_order_line_link: link sale lines to rewards
chienandalu Sep 14, 2021
8080614
[IMP] sale_coupon_order_line_link: link on reward lines to origin lines
chienandalu Oct 20, 2021
86e1fa0
[IMP] sale_coupon_order_line_link: view applied promotions
chienandalu Mar 30, 2022
a44b081
[IMP] : black, isort, prettier
ilyasProgrammer May 6, 2022
e366781
[MIG] sale_coupon_order_line_link: Migration to 14.0
ilyasProgrammer May 6, 2022
6d532e3
Added translation using Weblate (Italian)
francesco-ooops May 31, 2022
c7de6da
[IMP] sale_coupon_order_line_link: hook method for extra discounts
chienandalu May 31, 2022
2933c80
[FIX] sale_coupon_order_line_link: missing links
chienandalu Oct 28, 2022
6fa2ec3
[MIG] sale_coupon_order_line_link: Migration to 15.0
chienandalu Jan 18, 2023
ae45f06
Translated using Weblate (Italian)
francesco-ooops Feb 16, 2023
140dfd7
[MIG] sale_coupon_order_line_link: Renamed to sale_loyalty_order_line…
pilarvargas-tecnativa Sep 18, 2023
ef8dd8c
[UPD] Update sale_loyalty_order_line_link.pot
Sep 29, 2023
012b652
[BOT] post-merge updates
OCA-git-bot Sep 29, 2023
807c8df
[FIX] sale_loyalty_order_line_link: Fix to avoid recursion error and …
pilarvargas-tecnativa Oct 4, 2023
28de528
[BOT] post-merge updates
OCA-git-bot Oct 6, 2023
cc404f8
Added translation using Weblate (Spanish)
Ivorra78 Nov 11, 2023
410c3b5
Translated using Weblate (Spanish)
Ivorra78 Nov 11, 2023
5b73887
Translated using Weblate (Italian)
mymage Dec 6, 2023
a33c526
[FIX] sale_loyalty_order_line_link: Fix SQL query of migration script.
pilarvargas-tecnativa Jul 10, 2024
91ff01d
Translated using Weblate (Italian)
mymage Jul 18, 2024
4c3c923
[IMP] sale_loyalty_order_line_link: pre-commit auto fixes
HeliconiaSolutions Jan 23, 2025
e2f97ba
[MIG] sale_loyalty_order_line_link: Migration to 17.0
HeliconiaSolutions Jan 23, 2025
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
2 changes: 2 additions & 0 deletions sale_loyalty_order_line_link/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ Contributors

- Ilyas

- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)

Maintainers
-----------

Expand Down
2 changes: 1 addition & 1 deletion sale_loyalty_order_line_link/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Link loyalty programs to order lines",
"summary": "Adds a link between loyalty programs and their generated order lines"
"for easing tracking",
"version": "16.0.1.0.1",
"version": "17.0.1.0.0",
"development_status": "Production/Stable",
"category": "Sale",
"website": "https://github.com/OCA/sale-promotion",
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions sale_loyalty_order_line_link/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
- Pilar Vargas
- [Ooops404](https://www.ooops404.com):
- Ilyas
- \[Heliconia Solutions Pvt. Ltd.\](<https://www.heliconia.io>)
Copy link

@rousseldenis rousseldenis Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HeliconiaSolutions Same as in antoher PR. Add individual contributor under this.

1 change: 1 addition & 0 deletions sale_loyalty_order_line_link/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<li>Ilyas</li>
</ul>
</li>
<li>[Heliconia Solutions Pvt. Ltd.](<a class="reference external" href="https://www.heliconia.io">https://www.heliconia.io</a>)</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,27 @@ def test_03_coupon_order_line_link_product(self):
self.assertTrue(line_c.reward_line_ids)
self.assertEqual(line_a.reward_generated_line_ids, reward_line)
self.assertFalse(line_b.reward_generated_line_ids)

def test_04_select_additional_fields(self):
# Call the _select_additional_fields method
sale_report = self.env["sale.report"]
fields = sale_report._select_additional_fields()

# Assert that the loyalty_program_id field is included
self.assertIn(
"l.loyalty_program_id",
fields.values(),
"The 'loyalty_program_id' field is not added to the select statement.",
)

def test_05_group_by_sale(self):
# Call the _group_by_sale method
sale_report = self.env["sale.report"]
group_by_fields = sale_report._group_by_sale()

# Assert that 'l.loyalty_program_id' is included in the GROUP BY clause
self.assertIn(
"l.loyalty_program_id",
group_by_fields,
"The 'loyalty_program_id' field is not included in the GROUP BY clause.",
)
4 changes: 2 additions & 2 deletions sale_loyalty_order_line_link/views/sale_order_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath expr="//page[@name='other_information']" position="inside">
<group attrs="{'invisible': [('applied_coupon_ids', '=', [])]}">
<group invisible="applied_coupon_ids == []">
<group name="promo_info" string="Promotions">
<field
name="applied_coupon_ids"
readonly="True"
attrs="{'invisible': [('applied_coupon_ids', '=', [])]}"
invisible="applied_coupon_ids == []"
widget="many2many_tags"
/>
</group>
Expand Down
Loading