跳至內容
選單
此問題已被標幟
1 回覆
1625 瀏覽次數

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
3465
0
12月 21
2664
3
4月 25
1484
1
12月 24
2322
1
11月 24
2407