Skip to content

[16.0][ADD] pos_partner_alternative_pricelist_load_background#1244

Merged
OCA-git-bot merged 2 commits intoOCA:16.0from
camptocamp:16.0-add-pos_partner_alternative_pricelist_load_background
Mar 23, 2026
Merged

[16.0][ADD] pos_partner_alternative_pricelist_load_background#1244
OCA-git-bot merged 2 commits intoOCA:16.0from
camptocamp:16.0-add-pos_partner_alternative_pricelist_load_background

Conversation

@santostelmo
Copy link
Copy Markdown

@santostelmo santostelmo commented Sep 25, 2024

Depends #1243

@santostelmo santostelmo marked this pull request as draft September 25, 2024 12:45
@santostelmo santostelmo force-pushed the 16.0-add-pos_partner_alternative_pricelist_load_background branch 4 times, most recently from 70c4ca9 to f5fd741 Compare October 1, 2024 07:38
@santostelmo santostelmo marked this pull request as ready for review October 1, 2024 09:51
@santostelmo santostelmo force-pushed the 16.0-add-pos_partner_alternative_pricelist_load_background branch from f5fd741 to 6b53176 Compare January 28, 2025 10:15
Copy link
Copy Markdown

@simahawk simahawk left a comment

Choose a reason for hiding this comment

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

LG overall

pricelists = super().get_pos_ui_partner_pricelist_background(
pricelist_id, product_ids
)
# By design we do not calculate alternative prices on base pricelits
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why not a kw arg instead? It would be more explicit.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@simahawk could you confirm that you want this kind of update :

`
def get_pos_ui_partner_pricelist_background(
self, pricelist_id, product_ids, base_pricelist=False
):
pricelists = super().get_pos_ui_partner_pricelist_background(
pricelist_id, product_ids
)

    # By design we do not calculate alternative prices on base pricelist
    if base_pricelist:
        return pricelists

    pricelist_rec = self.env["product.pricelist"].browse(pricelist_id)
    alternative_pricelists = []

    for alt_pricelist_rec in pricelist_rec.alternative_pricelist_ids:
        alternative_pricelists += self.get_pos_ui_partner_pricelist_background(
            alt_pricelist_rec.id,
            product_ids,
            base_pricelist=True,
        )

    if alternative_pricelists:
        return pricelists + alternative_pricelists

    return pricelists

`

cc @santostelmo

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

otherwise i've fix error on test-requirements and that seems to be mergeable !

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 1, 2025

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 1, 2025
@github-actions github-actions bot closed this Jul 6, 2025
@gurneyalex gurneyalex reopened this Mar 3, 2026
@cyrilmanuel cyrilmanuel force-pushed the 16.0-add-pos_partner_alternative_pricelist_load_background branch from 6b53176 to 079a2d8 Compare March 5, 2026 10:11
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 8, 2026
@cyrilmanuel
Copy link
Copy Markdown

@OCA/pos-maintainers someone can merge this PR please ?

@gurneyalex
Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-1244-by-gurneyalex-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit e61476a into OCA:16.0 Mar 23, 2026
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 93aa428. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants