Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1566 Zobrazení

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 });

},

});

});

Avatar
Zrušit
Autor Nejlepší odpověď

this is my xml file 

From:


Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
lis 20
3380
0
pro 21
2566
3
dub 25
1415
1
pro 24
2215
1
lis 24
2311