Port hr_holidays_lunch_voucher and hr_holidays_lunch_voucher_natixis to v10

This commit is contained in:
Alexis de Lattre
2017-12-04 15:01:04 +01:00
parent 06a1d182e5
commit f9951890b5
25 changed files with 107 additions and 99 deletions

View File

@@ -3,8 +3,7 @@
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, fields
import openerp.addons.decimal_precision as dp
from odoo import models, fields
class ResCompany(models.Model):
@@ -13,8 +12,8 @@ class ResCompany(models.Model):
lunch_voucher_product_id = fields.Many2one(
'product.product', string='Lunch Voucher Product',
ondelete='restrict')
lunch_voucher_employer_price = fields.Float(
'Lunch Voucher Employer Price', digits=dp.get_precision('Account'))
lunch_voucher_employer_price = fields.Monetary(
'Lunch Voucher Employer Price', currency_field='currency_id')
# Add constrain to check that lunch_voucher_employer_price is between
# 50% and 60% of the price of lunch_voucher_product_id for France