I am using Odoo 17
I have created a custom action button in "product.template" that when clicked triggers the "action_update_prices" method inside "sale.order" on all subscriptions that has the product attached in sale order line. Here is the code for it:
I have encountered one problem tho. Whenever i create invoice on a sale.order and then trigger the "action_update_prices" method again it sets all prices in the pricelist to 0 which means the unit price is set to 0 aswell.
I have tried to look through all models to see if i could find the code that handles this logic but i can't seem to find it.
What I want is basically just to make the "action_update_prices" method ignore the sale order having invoices or not so it has to work the same way as when the sale order has no invoices created
Hope it makes sense
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
1
Odpowiedz
1442
Widoki
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
1
wrz 24
|
1065 | ||
Merge Same Item in Sale Order Line
Rozwiązane
|
|
2
sty 24
|
5499 | |
|
0
cze 23
|
2075 | ||
|
1
gru 22
|
3432 | ||
|
0
kwi 22
|
2622 |