Is there a way to fallback to a Pricelist only in the case where the sales price is set to 0?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- Müşteri İlişkileri Yönetimi
- e-Commerce
- Muhasebe
- Envanter
- PoS
- Project
- MRP
Bu soru işaretlendi
3
Cevaplar
702
Görünümler
Well, as a matter of fact, Norma just recently created a post here, outlining how to utilize multiple price lists in a single Quotation. I would be wondering if this approach could not get adopted to your needs: https://www.odoo.com/forum/1/278106 (leave your Kudos there, I'm but the mail man)
The correct way to do this in Odoo17 is simply this (in sale order line model)
def _get_pricelist_price(self):
"""Compute the price given by the pricelist for the given line information.
:return: the product sales price in the order currency (without taxes)
:rtype: float
"""
self.ensure_one()
self.product_id.ensure_one()
if self.product_id.lst_price is False or self.product_id.lst_price == 0:
return super()._get_pricelist_price()
else:
return self.product_id.lst_price
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye Olİlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
---|---|---|---|---|
|
1
Mar 15
|
3663 | ||
|
1
Ara 22
|
4117 | ||
|
3
Eyl 25
|
317 | ||
|
3
Ağu 25
|
416 | ||
How to merge companies
Çözüldü
|
|
4
Ağu 25
|
1567 |