Add field title to name field of model
This commit is contained in:
parent
7cc3482546
commit
e0ce682b3f
@ -12,7 +12,9 @@ class Event(models.Model):
|
|||||||
_description = 'Event model definition'
|
_description = 'Event model definition'
|
||||||
_order = 'id asc'
|
_order = 'id asc'
|
||||||
|
|
||||||
name = fields.Char('Title', required=True)
|
title = fields.Char(required=True)
|
||||||
|
_rec_name = 'title'
|
||||||
|
|
||||||
manager_id = fields.Many2one('coworking.coworker', 'Manager', index=True, required=True,
|
manager_id = fields.Many2one('coworking.coworker', 'Manager', index=True, required=True,
|
||||||
domain="[('coworker_type', 'in', ['staffer', 'member'])]")
|
domain="[('coworker_type', 'in', ['staffer', 'member'])]")
|
||||||
date_start = fields.Datetime(default=fields.Date.context_today, required=True)
|
date_start = fields.Datetime(default=fields.Date.context_today, required=True)
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<sheet>
|
<sheet>
|
||||||
<group name="group_top">
|
<group name="group_top">
|
||||||
<group name="group_left">
|
<group name="group_left">
|
||||||
<field name="name" />
|
<field name="title" />
|
||||||
<field name="manager_id" />
|
<field name="manager_id" />
|
||||||
<field name="date_start" />
|
<field name="date_start" />
|
||||||
<field name="starts_this_week" attrs="{'invisible': [('date_start', '=', True)]}" />
|
<field name="starts_this_week" attrs="{'invisible': [('date_start', '=', True)]}" />
|
||||||
@ -31,11 +31,11 @@
|
|||||||
|
|
||||||
<!-- Tree -->
|
<!-- Tree -->
|
||||||
<record id="view_tree_coworker" model="ir.ui.view">
|
<record id="view_tree_coworker" model="ir.ui.view">
|
||||||
<field name="name">event Tree</field>
|
<field name="title">event Tree</field>
|
||||||
<field name="model">coworking.event</field>
|
<field name="model">coworking.event</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order="date_start asc">
|
<tree default_order="date_start asc">
|
||||||
<field name="name" />
|
<field name="title" />
|
||||||
<field name="manager_id" />
|
<field name="manager_id" />
|
||||||
<field name="date_start" />
|
<field name="date_start" />
|
||||||
<field name="participants_count" />
|
<field name="participants_count" />
|
||||||
@ -46,11 +46,11 @@
|
|||||||
|
|
||||||
<!-- Search -->
|
<!-- Search -->
|
||||||
<record id="view_search_event" model="ir.ui.view">
|
<record id="view_search_event" model="ir.ui.view">
|
||||||
<field name="name">Event Search</field>
|
<field name="title">Event Search</field>
|
||||||
<field name="model">coworking.event</field>
|
<field name="model">coworking.event</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<search>
|
||||||
<field name="name" />
|
<field name="title" />
|
||||||
<field name="manager_id" />
|
<field name="manager_id" />
|
||||||
|
|
||||||
<filter name="status_confirmed" string="Confirmed"
|
<filter name="status_confirmed" string="Confirmed"
|
||||||
@ -83,12 +83,12 @@
|
|||||||
</record>
|
</record>
|
||||||
<!-- Calendar -->
|
<!-- Calendar -->
|
||||||
<record id="view_calendar_event" model="ir.ui.view">
|
<record id="view_calendar_event" model="ir.ui.view">
|
||||||
<field name="name">Event Calendar</field>
|
<field name="title">Event Calendar</field>
|
||||||
<field name="model">coworking.event</field>
|
<field name="model">coworking.event</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<calendar date_start="date_start" date_stop="date_end"
|
<calendar date_start="date_start" date_stop="date_end"
|
||||||
display="name : [name]" >
|
display="title : [title]" >
|
||||||
<field name="name" />
|
<field name="title" />
|
||||||
</calendar>
|
</calendar>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
Loading…
Reference in New Issue
Block a user