跳至內容
選單
此問題已被標幟
2693 瀏覽次數

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>
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
10月 23
2752
0
10月 23
1021
0
8月 23
1327
1
6月 25
438
1
5月 24
1126