forked from michel/Coworking
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'
|
||||
_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,
|
||||
domain="[('coworker_type', 'in', ['staffer', 'member'])]")
|
||||
date_start = fields.Datetime(default=fields.Date.context_today, required=True)
|
||||
|
@ -13,7 +13,7 @@
|
||||
<sheet>
|
||||
<group name="group_top">
|
||||
<group name="group_left">
|
||||
<field name="name" />
|
||||
<field name="title" />
|
||||
<field name="manager_id" />
|
||||
<field name="date_start" />
|
||||
<field name="starts_this_week" attrs="{'invisible': [('date_start', '=', True)]}" />
|
||||
@ -31,11 +31,11 @@
|
||||
|
||||
<!-- Tree -->
|
||||
<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="arch" type="xml">
|
||||
<tree default_order="date_start asc">
|
||||
<field name="name" />
|
||||
<field name="title" />
|
||||
<field name="manager_id" />
|
||||
<field name="date_start" />
|
||||
<field name="participants_count" />
|
||||
@ -46,11 +46,11 @@
|
||||
|
||||
<!-- Search -->
|
||||
<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="arch" type="xml">
|
||||
<search>
|
||||
<field name="name" />
|
||||
<field name="title" />
|
||||
<field name="manager_id" />
|
||||
|
||||
<filter name="status_confirmed" string="Confirmed"
|
||||
@ -83,12 +83,12 @@
|
||||
</record>
|
||||
<!-- Calendar -->
|
||||
<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="arch" type="xml">
|
||||
<calendar date_start="date_start" date_stop="date_end"
|
||||
display="name : [name]" >
|
||||
<field name="name" />
|
||||
display="title : [title]" >
|
||||
<field name="title" />
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
Loading…
Reference in New Issue
Block a user