[IMP]GOLEM Resource Reservation : display avaibility period and timetable on reservation
This commit is contained in:
parent
bf5314f54f
commit
5c87abbbbc
@ -42,6 +42,10 @@ class GolemResourceReservation(models.Model):
|
||||
resource_id = fields.Many2one('golem.resource', required=True, index=True,
|
||||
string='Resource', readonly=True,
|
||||
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_timetable_ids = fields.One2many(related='resource_id.timetable_ids')
|
||||
|
||||
user_id = fields.Many2one('res.users', required=True, index=True, readonly=True,
|
||||
string='User', default=lambda self: self.env.user,
|
||||
states={'draft': [('readonly', False)]})
|
||||
|
@ -70,25 +70,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="state" widget="statusbar" />
|
||||
</header>
|
||||
<sheet>
|
||||
<group colspan="2">
|
||||
<group>
|
||||
<group string="Resource">
|
||||
<field name="id" invisible="1" />
|
||||
<field name="resource_id" options="{'no_create': True}" />
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="date" />
|
||||
<field name="hour_start" widget="float_time" />
|
||||
<field name="hour_stop" widget="float_time" />
|
||||
<field name="resource_avaibility_start" />
|
||||
<field name="resource_avaibility_stop" />
|
||||
<field name="resource_timetable_ids" readonly="1" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="user_id" options="{'no_create': True}" />
|
||||
<field name="partner_id" />
|
||||
<group string="Reservation">
|
||||
<group>
|
||||
<field name="date" />
|
||||
<field name="hour_start" widget="float_time" />
|
||||
<field name="hour_stop" widget="float_time" />
|
||||
<field name="user_id" options="{'no_create': True}" />
|
||||
<field name="partner_id" />
|
||||
<field name="rejection_reason"
|
||||
attrs="{'invisible': [('state', '!=', 'rejected')]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="2">
|
||||
<field name="rejection_reason"
|
||||
attrs="{'invisible': [('state', '!=', 'rejected')]}"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
Loading…
x
Reference in New Issue
Block a user