Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Okt 23
2816
0
Okt 23
1082
0
Agu 23
1384
1
Agu 25
269
1
Jun 25
745