Port hr_holidays_lunch_voucher and hr_holidays_lunch_voucher_natixis to v10
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import company
|
||||
from . import purchase_config_settings
|
||||
from . import wizard
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['hr_holidays_lunch_voucher'],
|
||||
'data': [
|
||||
'company_view.xml',
|
||||
'purchase_config_settings_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
}
|
||||
@@ -3,7 +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
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class ResCompany(models.Model):
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class PurchaseConfigSettings(models.TransientModel):
|
||||
_inherit = 'purchase.config.settings'
|
||||
|
||||
lunch_voucher_natixis_customer_code = fields.Char(
|
||||
related='company_id.lunch_voucher_natixis_customer_code')
|
||||
lunch_voucher_natixis_delivery_code = fields.Char(
|
||||
related='company_id.lunch_voucher_natixis_delivery_code')
|
||||
@@ -5,14 +5,13 @@
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="view_company_form" model="ir.ui.view">
|
||||
<field name="name">natixis.lunch_voucher.company.form</field>
|
||||
<field name="model">res.company</field>
|
||||
<field name="inherit_id" ref="hr_holidays_lunch_voucher.view_company_form"/>
|
||||
<record id="view_purchase_configuration" model="ir.ui.view">
|
||||
<field name="name">natixis.lunch_voucher.purchase.config.settings.form</field>
|
||||
<field name="model">purchase.config.settings</field>
|
||||
<field name="inherit_id" ref="hr_holidays_lunch_voucher.view_purchase_configuration"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="lunch_voucher" position="inside">
|
||||
<field name="lunch_voucher_natixis_customer_code"/>
|
||||
@@ -22,5 +21,4 @@
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
@@ -3,15 +3,14 @@
|
||||
# @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, api, _
|
||||
from openerp.exceptions import Warning as UserError
|
||||
from openerp.tools import float_is_zero
|
||||
from odoo import models, fields, _
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.tools import float_is_zero
|
||||
|
||||
|
||||
class LunchVoucherPurchase(models.TransientModel):
|
||||
_inherit = 'lunch.voucher.purchase'
|
||||
|
||||
@api.multi
|
||||
def run(self):
|
||||
self.ensure_one()
|
||||
action = super(LunchVoucherPurchase, self).run()
|
||||
|
||||
Reference in New Issue
Block a user