コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1654 ビュー

hello,

I want to place the sales order reference in the footer in the pos receipt, if the order comes from sales but when I put this code the receipt appears blank,

please help!!

this is my code:





js file:

odoo.define('custom_pos_receipt.receipt', function (require) {

'use strict';

const models = require('point_of_sale.models');

models.load_fields('res.partner', 'is_student');


const super_order_receipt_model = models.OrderReceipt.prototype;

models.OrderReceipt = models.OrderReceipt.extend({

get saleOrderData() {

const saleOrder = this.props.order.get_sale_order_origin();

if (saleOrder) {

return {

so_reference: saleOrder.name,

user_name: saleOrder.user_id && saleOrder.user_id[1],

};

}

return {};

},

get export_for_printing() {

const json = super_order_receipt_model.export_for_printing;

const saleOrderData = this.saleOrderData;

return Object.assign({}, json, { sale_order_origin_data: saleOrderData });

},

});

});

アバター
破棄
著作者 最善の回答

this is my xml file 

From:


アバター
破棄
関連投稿 返信 ビュー 活動
1
11月 20
3490
0
12月 21
2690
3
4月 25
1494
1
12月 24
2357
1
11月 24
2443