Skip to Content
Menu
This question has been flagged

Hello, I would like to get the invoice generated from the validate button in point of sale and get some values from it like the name field and others that I've created to print it on the receipt.

I have already extended the method that print the values to the receipt, here is the code:

js file:

odoo.define('inka_l10n_pe_pos.pos', function (require) {
"use strict";

const { Order } = require('point_of_sale.models');
const Registries = require('point_of_sale.Registries');

const Inkal10nPos = (Order) => class Inkal10nPos extends Order {

export_for_printing() {
const result = super.export_for_printing(
...arguments);
// How can I get the invoice generated ?
// I want to replace the attribute access_key from the invoice in '233333333333'
result.access_key = '233333333333';
return result;
}
}
Registries.Model.extend(Order, Inkal10nPos);

});

And the xml: 







Clave de acceso:

div>
div>
xpath>
t>
Avatar
Discard
Related Posts Replies Views Activity
1
Oct 23
2769
0
Oct 23
1026
0
Aug 23
1336
1
Jun 25
495
1
May 24
1138