[IMP]GOLEM Resource : if avaibility 24/7, no need to see avaibility info on reservation

This commit is contained in:
Fabien BOURGEOIS 2018-03-10 07:53:04 +01:00
parent 7f19960a43
commit ac9b1fa4e0
2 changed files with 8 additions and 3 deletions

View File

@ -47,6 +47,7 @@ class GolemResourceReservation(models.Model):
states={'draft': [('readonly', False)]})
resource_avaibility_start = fields.Date(related='resource_id.avaibility_start')
resource_avaibility_stop = fields.Date(related='resource_id.avaibility_stop')
resource_avaibility_24_7 = fields.Boolean(related='resource_id.availibility_24_7')
resource_timetable_ids = fields.One2many(related='resource_id.timetable_ids')
note = fields.Text(help='Notes, optional subject for the reservation, reason')

View File

@ -74,9 +74,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<group string="Resource">
<field name="id" invisible="1" />
<field name="resource_id" options="{'no_create': True}" />
<field name="resource_avaibility_start" readonly="1" />
<field name="resource_avaibility_stop" readonly="1" />
<field name="resource_timetable_ids" readonly="1" />
<field name="resource_avaibility_24_7" readonly="1" />
<field name="resource_avaibility_start" readonly="1"
attrs="{'invisible': [('resource_avaibility_24_7', '=', True)]}" />
<field name="resource_avaibility_stop" readonly="1"
attrs="{'invisible': [('resource_avaibility_24_7', '=', True)]}" />
<field name="resource_timetable_ids" readonly="1"
attrs="{'invisible': [('resource_avaibility_24_7', '=', True)]}" />
</group>
<group string="Reservation">
<group>