-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shopinvader_sale_configurator_option: fix price computation with pric…
…elist without discount
- Loading branch information
1 parent
8616c05
commit f4e27c8
Showing
3 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from . import product_product | ||
from . import shopinvader_variant | ||
from . import sale_order_line | ||
from . import product_pricelist |
18 changes: 18 additions & 0 deletions
18
shopinvader_sale_configurator_option/models/product_pricelist.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2022 Akretion (https://www.akretion.com). | ||
# @author Sébastien BEAU <[email protected]> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import models | ||
|
||
|
||
class ProductPricelist(models.Model): | ||
_inherit = "product.pricelist" | ||
|
||
def get_product_price_rule( | ||
self, product, quantity, partner, date=False, uom_id=False | ||
): | ||
# The following line will convert NewId with origin to normal record | ||
product = self.env["product.product"].browse(product.ids) | ||
return super().get_product_price_rule( | ||
product, quantity, partner, date=date, uom_id=uom_id | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters