# -*- coding: utf-8 -*- ################################################################################# # # Copyright (c) 2016-Present Webkul Software Pvt. Ltd. () # See LICENSE file for full copyright and licensing details. # License URL : # ################################################################################# from odoo import api, fields, models, _ class ReceiptDesign(models.Model): _name = "receipt.design" _rec_name = "name" name = fields.Char(string="Name") receipt_design = fields.Text(string='Description', required=True) @api.model def _create_receipt_design_1(self): record_data = {} record_data['name'] = "Receipt Design 1" record_data['receipt_design'] = """

Logo

Tel:


Receipt :

Date :

Client :

Served by


Product Qty Unit Price Amount
% Discount

Subtotal :

TOTAL :

Discounts

Total Taxes :



CHANGE

""" record_id = self.create(record_data) pos_config_id = self.env.ref('point_of_sale.pos_config_main') if record_id and pos_config_id: pos_config_id.use_custom_receipt = True pos_config_id.receipt_design_id = record_id.id @api.model def _create_receipt_design_2(self): record_data = {} record_data['name'] = "Receipt Design 2" record_data['receipt_design'] = """



Phone:
User:


% discount


Subtotal

TOTAL



CHANGE

Discounts
Total Taxes
""" self.create(record_data) @api.model def _create_receipt_design_3(self): record_data = {} record_data['name'] = "Receipt Design 3" record_data['receipt_design'] = """

Phone:
User :

Date :
Order :

Cashier :


Product Qty Amount
% discount


Subtotal :

TOTAL :



CHANGE :

Discounts :
Total Taxes :
""" self.create(record_data) @api.model def _create_receipt_design_4(self): record_data = {} record_data['name'] = "Receipt Design 4" record_data['receipt_design'] = """


Phone:
User:


% discount

Subtotal:
Discount:
Total:


Change:

""" self.create(record_data)