[16.0][ADD] pos_partner_alternative_pricelist_load_background#1244
Conversation
70c4ca9 to
f5fd741
Compare
f5fd741 to
6b53176
Compare
| pricelists = super().get_pos_ui_partner_pricelist_background( | ||
| pricelist_id, product_ids | ||
| ) | ||
| # By design we do not calculate alternative prices on base pricelits |
There was a problem hiding this comment.
why not a kw arg instead? It would be more explicit.
There was a problem hiding this comment.
@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
There was a problem hiding this comment.
otherwise i've fix error on test-requirements and that seems to be mergeable !
|
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. |
6b53176 to
079a2d8
Compare
|
@OCA/pos-maintainers someone can merge this PR please ? |
|
/ocabot merge nobump |
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at 93aa428. Thanks a lot for contributing to OCA. ❤️ |
Depends #1243