diff --git a/product_sale_price_from_pricelist/models/product_pricelist_item.py b/product_sale_price_from_pricelist/models/product_pricelist_item.py index ba2e9ad..22f1eee 100644 --- a/product_sale_price_from_pricelist/models/product_pricelist_item.py +++ b/product_sale_price_from_pricelist/models/product_pricelist_item.py @@ -2,7 +2,8 @@ # @author Santi NoreƱa () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo import fields, models +from odoo import fields +from odoo import models class ProductPricelistItem(models.Model): @@ -13,8 +14,8 @@ class ProductPricelistItem(models.Model): ondelete={"last_purchase_price": "set default"}, ) - def _compute_price(self, product, qty, uom, date, currency=None): - result = super()._compute_price(product, qty, uom, date, currency) + def _compute_price(self, product, quantity, uom, date, currency=None): + result = super()._compute_price(product, quantity, uom, date, currency) if self.compute_price == "formula" and self.base == "last_purchase_price": result = product.sudo().last_purchase_price_received return result diff --git a/website_sale_aplicoop/controllers/website_sale.py b/website_sale_aplicoop/controllers/website_sale.py index 19a0ce3..097ac7d 100644 --- a/website_sale_aplicoop/controllers/website_sale.py +++ b/website_sale_aplicoop/controllers/website_sale.py @@ -1624,7 +1624,7 @@ class AplicoopWebsiteSale(WebsiteSale): elif merge_action == "replace" and existing_draft_id and existing_drafts: # Replace: Delete old draft and create new one existing_drafts.unlink() - _logger.info("Deleted existing draft %d", existing_draft_id) + _logger.info("Deleted existing draft %s", existing_draft_id) # Create new draft with current items sale_order = request.env["sale.order"].create(