[IMP] event_track_calendar_event:
* change widget to display dates * limit locations to company (not contacts)
This commit is contained in:
@@ -21,8 +21,12 @@
|
||||
<form>
|
||||
<group>
|
||||
<field name="name" string="Name" invisible="True" />
|
||||
<field name="start" string="From" />
|
||||
<field name="stop" string="To" />
|
||||
<label for="start" string="Date"/>
|
||||
<div class="o_row">
|
||||
<field name="start" widget="daterange" nolabel="1" class="oe_inline" options="{'related_end_date': 'stop'}"/>
|
||||
<i class="fa fa-long-arrow-right mx-2" aria-label="Arrow icon" title="Arrow"/>
|
||||
<field name="stop" widget="daterange" nolabel="1" class="oe_inline" options="{'related_start_date': 'start'}"/>
|
||||
</div>
|
||||
<field name="description" />
|
||||
</group>
|
||||
</form>
|
||||
|
@@ -5,7 +5,7 @@ from odoo import fields, models, api
|
||||
class EventTrackLocation(models.Model):
|
||||
_inherit = 'event.track.location'
|
||||
|
||||
partner_id = fields.Many2one('res.partner', 'Address')
|
||||
partner_id = fields.Many2one('res.partner', 'Address', domain="[('is_company','=',True)]")
|
||||
|
||||
def write(self, vals):
|
||||
"""update calendar events related to event tracks if partner change
|
||||
|
Reference in New Issue
Block a user