Files
odoo-usability/hr_holidays_lunch_voucher/purchase_config_settings.py
Alexis de Lattre f34a731d95 Add related_sudo where it may be needed
PEP8 fix
2018-07-09 10:41:53 +02:00

16 lines
591 B
Python

# -*- coding: utf-8 -*-
# © 2017 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class PurchaseConfigSettings(models.TransientModel):
_inherit = 'purchase.config.settings'
lunch_voucher_product_id = fields.Many2one(
related='company_id.lunch_voucher_product_id', related_sudo=True)
lunch_voucher_employer_price = fields.Monetary(
related='company_id.lunch_voucher_employer_price',
currency_field='company_currency_id', related_sudo=True)