Skip to Content
Menu
You need to be registered to interact with the community.
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
okt. 23
2715
0
okt. 23
986
0
avg. 23
1292
1
jun. 25
333
1
maj 24
1084