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
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up| Related Posts | Replies | Views | Activity | |
|---|---|---|---|---|
|
2
Sep 25
|
3277 | |||
|
1
Mar 24
|
3491 | |||
|
2
Jun 24
|
5021 | |||
|
|
1
Feb 24
|
3262 | ||
|
1
Feb 24
|
3385 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.