Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
1
account_invoice_pricelist_sale/models/__init__.py
Normal file
1
account_invoice_pricelist_sale/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import sale_order
|
||||
15
account_invoice_pricelist_sale/models/sale_order.py
Normal file
15
account_invoice_pricelist_sale/models/sale_order.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# © 2017 Therp BV <http://therp.nl>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
from odoo import models
|
||||
|
||||
|
||||
class SaleOrder(models.Model):
|
||||
_inherit = "sale.order"
|
||||
|
||||
def _prepare_invoice(self):
|
||||
"""Pricelist_id is set on invoice."""
|
||||
self.ensure_one()
|
||||
val = super()._prepare_invoice()
|
||||
if self.pricelist_id:
|
||||
val.update({"pricelist_id": self.pricelist_id.id})
|
||||
return val
|
||||
Reference in New Issue
Block a user