[MIG] pos_reprint: migration to new api
This commit is contained in:
committed by
Jérome Maes
parent
38ef0adb93
commit
65040e4be9
@@ -24,5 +24,4 @@ Allow cashier to reprint receipts
|
||||
],
|
||||
'installable': True,
|
||||
'website': 'https://www.odoo.com/page/point-of-sale',
|
||||
'auto_install': False,
|
||||
}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import pos_config
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import openerp
|
||||
from openerp.osv import fields, osv
|
||||
from odoo import fields, models
|
||||
|
||||
class pos_config(osv.osv):
|
||||
_inherit = 'pos.config'
|
||||
_columns = {
|
||||
'iface_reprint': fields.boolean('Receipt Reprinting', help="This allows you to reprint a previously printed receipt."),
|
||||
}
|
||||
_defaults = {
|
||||
'iface_reprint': False,
|
||||
}
|
||||
|
||||
class PosConfig(models.Model):
|
||||
_inherit = 'pos.config'
|
||||
|
||||
iface_reprint = fields.Boolean(
|
||||
string='Receipt Reprinting', help="This allows you to reprint a previously printed receipt.")
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="view_pos_config_form">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_pos_config_form" model="ir.ui.view" >
|
||||
<field name="name">pos.config.form.view</field>
|
||||
<field name="model">pos.config</field>
|
||||
<field name="inherit_id" ref="point_of_sale.view_pos_config_form" />
|
||||
@@ -12,6 +10,4 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<odoo>
|
||||
<template id="assets" inherit_id="point_of_sale.assets">
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript" src="/pos_reprint/static/src/js/reprint.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user