[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>
|
<form>
|
||||||
<group>
|
<group>
|
||||||
<field name="name" string="Name" invisible="True" />
|
<field name="name" string="Name" invisible="True" />
|
||||||
<field name="start" string="From" />
|
<label for="start" string="Date"/>
|
||||||
<field name="stop" string="To" />
|
<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" />
|
<field name="description" />
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -5,7 +5,7 @@ from odoo import fields, models, api
|
|||||||
class EventTrackLocation(models.Model):
|
class EventTrackLocation(models.Model):
|
||||||
_inherit = 'event.track.location'
|
_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):
|
def write(self, vals):
|
||||||
"""update calendar events related to event tracks if partner change
|
"""update calendar events related to event tracks if partner change
|
||||||
|
Reference in New Issue
Block a user