mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD] Room in_ine field
This commit is contained in:
@@ -20,3 +20,4 @@
|
||||
#
|
||||
##############################################################################
|
||||
from . import wizard
|
||||
from . import models
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
'category': 'hotel/ine',
|
||||
'data': [
|
||||
'wizard/inewizard.xml',
|
||||
'views/inherited_hotel_room_view.xml',
|
||||
],
|
||||
'demo': [
|
||||
],
|
||||
|
||||
1
hotel_ine/models/__init__.py
Normal file
1
hotel_ine/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import inherited_hotel_room
|
||||
9
hotel_ine/models/inherited_hotel_room.py
Normal file
9
hotel_ine/models/inherited_hotel_room.py
Normal 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)
|
||||
18
hotel_ine/views/inherited_hotel_room_view.xml
Normal file
18
hotel_ine/views/inherited_hotel_room_view.xml
Normal 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>
|
||||
Reference in New Issue
Block a user