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!
Registrar-se| Related Posts | Respostes | Vistes | Activitat | |
|---|---|---|---|---|
|
2
de set. 25
|
3276 | |||
|
1
de març 24
|
3490 | |||
|
2
de juny 24
|
5018 | |||
|
|
1
de febr. 24
|
3260 | ||
|
1
de febr. 24
|
3384 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.