12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- # -*- coding: utf-8 -*-
- ##############################################################################
- #
- # OpenERP, Open Source Management Solution
- # Copyright (C) 2016 ePillars Systems (<http://epillars.com>).
- #
- # This program is free software: you can redistribute it and/or modify
- # it under the terms of the GNU Affero General Public License as
- # published by the Free Software Foundation, either version 3 of the
- # License, or (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU Affero General Public License for more details.
- #
- # You should have received a copy of the GNU Affero General Public License
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
- #
- ##############################################################################
- from openerp.osv import fields, osv
- class pos_config(osv.osv):
- _inherit="pos.config"
-
- _columns={
- 'multi_currency_enable':fields.boolean('Enable Multi-Currency',
- help='Select this to enable Multi-currency options in POS'),
- 'display_conversion':fields.boolean('Display Conversion on POS',
- help='Check this to display the conversion factor on the POS terminal'),
- 'fetch_master':fields.boolean('Fetch Currency Master',
- help='Check this if you would like to fetch all conversion factors and currencies from the master table'),
- 'currency_lines':fields.one2many('pos.currency.line','pos_config_id','POS Currency Lines'),
- }
-
- _defaults={
- 'multi_currency_enable':True,
- 'display_conversion':True,
- 'fetch_master':True,
- }
-
- class pos_currency_line(osv.osv):
- _name="pos.currency.line"
- _description="POS Currency Lines"
-
- _columns={
- 'pos_config_id':fields.many2one('pos.config','POS Config'),
- 'currency_id':fields.many2one('res.currency','Currency'),
- 'rate_silent':fields.float('Conversion Factor', digits=(12,6)),
- }
|