I need to check that , the pos order is returned or not using js
var order = this.env.pos.get_order();
console.log(order.is_return_order)
this is not working , i get undefined , how i fix this
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I need to check that , the pos order is returned or not using js
var order = this.env.pos.get_order();
console.log(order.is_return_order)
this is not working , i get undefined , how i fix this
Hi,
To check the pos order is returned or not, you need to loop through the orderliness and make sure the orderlines have the refund_order_line_id ,
var order = this.env.pos.get_order();
const orderLines = order.get_orderlines();
if (order) {
orderLines.forEach(orderLine => {
// Check if the order line has a refunded_orderline_id
if (orderLine.refunded_orderline_id ) {
//Add your code here
}}
Hope it helps
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ść | |
|---|---|---|---|---|
|
Missing Record on Closing POS Session
Rozwiązane
|
2
wrz 25
|
3276 | ||
|
1
mar 24
|
3490 | |||
|
2
cze 24
|
5018 | |||
|
|
1
lut 24
|
3260 | ||
|
1
lut 24
|
3384 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.