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
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Inscribirse| Publicaciones relacionadas | Respuestas | Vistas | Actividad | |
|---|---|---|---|---|
|
2
sept 25
|
3283 | |||
|
1
mar 24
|
3503 | |||
|
2
jun 24
|
5027 | |||
|
|
1
feb 24
|
3274 | ||
|
1
feb 24
|
3386 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.