Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1100 มุมมอง

I am using Odoo 17.

I have added a button in the product.template model:


When clicked it triggers the "action_update_prices" method on all subscriptions with the product i have updated the price for so instead of going through all the subscriptions one at a time and updating the price i can just update it from the product itself. 


Everything is working as intended.

BUT. I discovered that if i create an invoice and then updates the price again it sets the price to 0 for ALL products in the sale.order.line. This is the default functionality standard to Odoo.


I don't want this functionality. Instead i want it to ignore if it has invoices and just keep the original functionality, so if i update the sales price on the product it should update the price on the sale.order.line on every subscription having that product

I hope it makes sense and there is a solution to add this feature.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello Victor,


I think in that case you need to review the method which one is triggering  and you can inherit the method based on your conditions.


FYI: If you changes into odoo stranded method kindly review all the impact.


thanks.

อวตาร
ละทิ้ง
ผู้เขียน

That's basically the problem here. I don't know which method is being triggered, so I also don't know which method I should inherit. I was hoping for an answer that could tell me which method is causing the scenario I mentioned.

ผู้เขียน

Hello?

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ย. 24
1459
Merge Same Item in Sale Order Line แก้ไขแล้ว
2
ม.ค. 24
5515
0
มิ.ย. 23
2094
1
ธ.ค. 22
3445
0
เม.ย. 22
2634