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
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati| Post correlati | Risposte | Visualizzazioni | Attività | |
|---|---|---|---|---|
|
2
set 25
|
3288 | |||
|
1
mar 24
|
3507 | |||
|
2
giu 24
|
5029 | |||
|
|
1
feb 24
|
3281 | ||
|
1
feb 24
|
3389 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.