Ajout du champs de la disponiblité total sur la resource
This commit is contained in:
parent
b895de05ba
commit
5163b7535c
@ -49,6 +49,8 @@ class GolemResource(models.Model):
|
|||||||
reservation_ids = fields.One2many('golem.resource.reservation', 'resource_id',
|
reservation_ids = fields.One2many('golem.resource.reservation', 'resource_id',
|
||||||
string='Reservations')
|
string='Reservations')
|
||||||
|
|
||||||
|
availibility_24_7 = fields.Boolean(string='24/7 availibility')
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def active_toggle(self):
|
def active_toggle(self):
|
||||||
""" Toggles active boolean """
|
""" Toggles active boolean """
|
||||||
|
@ -64,13 +64,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<group string="Availibility configuration">
|
<group string="Availibility configuration">
|
||||||
<group colspan="2">
|
<group colspan="2">
|
||||||
<field name="id" invisible="1"/>
|
<field name="id" invisible="1"/>
|
||||||
|
<field name="availibility_24_7"/>
|
||||||
<field name="avaibility_start" />
|
<field name="avaibility_start" />
|
||||||
<field name="avaibility_stop" />
|
<field name="avaibility_stop" />
|
||||||
</group>
|
</group>
|
||||||
<p attrs="{'invisible': [('id', '!=', False)]}">
|
<p attrs="{'invisible': ['|',
|
||||||
|
('id', '!=', False),
|
||||||
|
('availibility_24_7', '=', True)]}">
|
||||||
Please save the resource before fixing the timetable availibility"
|
Please save the resource before fixing the timetable availibility"
|
||||||
</p>
|
</p>
|
||||||
<group colspan="2">
|
<group colspan="2" attrs="{'invisible': [('availibility_24_7', '=', True)]}">
|
||||||
<field name="timetable_ids"
|
<field name="timetable_ids"
|
||||||
context="{'default_resource_id': active_id}"
|
context="{'default_resource_id': active_id}"
|
||||||
attrs="{'readonly': [('id', '=', False)]}" />
|
attrs="{'readonly': [('id', '=', False)]}" />
|
||||||
|
Loading…
Reference in New Issue
Block a user