Merge branch '11.0' of https://github.com/hootel/hootel into 11.0

This commit is contained in:
Pablo
2019-05-10 13:09:49 +02:00
3 changed files with 5 additions and 10 deletions

View File

@@ -240,13 +240,7 @@ class HotelReservation(models.Model):
company_id = fields.Many2one(related='folio_id.company_id', string='Company', store=True, readonly=True)
reservation_line_ids = fields.One2many('hotel.reservation.line',
'reservation_id',
readonly=True, required=True,
states={
'draft': [('readonly', False)],
'sent': [('readonly', False)],
'confirm': [('readonly', False)],
'booking': [('readonly', False)],
})
required=True)
service_ids = fields.One2many('hotel.service', 'ser_room_line')
pricelist_id = fields.Many2one('product.pricelist',

View File

@@ -294,7 +294,7 @@
type="action" icon="fa-bolt"/>
<field name="reservation_line_ids" nolabel="1">
<tree create="false" delete="false" editable="bottom">
<field name="date" />
<field name="date" readonly="1" force_save="1"/>
<field name="price" />
<field name="discount" />
<field name="cancel_discount"

View File

@@ -44,8 +44,9 @@
<xpath expr="//field[@name='checkout']" position="attributes">
<attribute name="attrs">{'readonly': [('is_from_ota','=',True),('able_to_modify_channel','=',False)]}</attribute>
</xpath>
<xpath expr="//field[@name='reservation_line_ids']" position="attributes">
<attribute name="attrs">{'readonly': [('is_from_ota','=',True),('able_to_modify_channel','=',False)]}</attribute>
<xpath expr="//notebook/page[@name='days']/field[@name='reservation_line_ids']/tree/field[@name='price']" position="attributes">
<attribute name="attrs">{'readonly': [('parent.is_from_ota','=',True),('parent.able_to_modify_channel','=',False)]}</attribute>
<attribute name="force_save">True</attribute>
</xpath>
</field>
</record>