[ADD] Room in_ine field

This commit is contained in:
Jose
2019-05-27 10:40:50 +02:00
parent 28647a5c96
commit fe19cb8fbe
5 changed files with 30 additions and 0 deletions

View File

@@ -20,3 +20,4 @@
#
##############################################################################
from . import wizard
from . import models

View File

@@ -31,6 +31,7 @@
'category': 'hotel/ine',
'data': [
'wizard/inewizard.xml',
'views/inherited_hotel_room_view.xml',
],
'demo': [
],

View File

@@ -0,0 +1 @@
from . import inherited_hotel_room

View File

@@ -0,0 +1,9 @@
# Copyright 2019 Jose Luis Algara <osotranquilo@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
class HotelRoom(models.Model):
_inherit = 'hotel.room'
in_ine = fields.Boolean('Included in the INE statistics', default=True)

View File

@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<odoo>
<record id="hotel_room_view_form" model="ir.ui.view">
<field name="model">hotel.room</field>
<field name="inherit_id" ref="hotel.hotel_room_view_form" />
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="I.N.E.">
<group>
<field name="in_ine" colspan="2"/>
</group>
</page>
</xpath>
</field>
</record>
</odoo>