Přejít na obsah
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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
říj 23
2803
0
říj 23
1072
0
srp 23
1372
1
srp 25
182
1
čvn 25
662