[REVERT] Reapplied changes of crm and project_caldav reverted during merge.

bzr revid: uco@tinyerp.com-20101215072745-3hskg8z1pf0q15u0
This commit is contained in:
uco (OpenERP) 2010-12-15 12:57:45 +05:30
parent 49fdb4b338
commit 3a8f6c2437
7 changed files with 130 additions and 154 deletions

View File

@ -1151,9 +1151,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
('daily', 'Days'), \
('weekly', 'Weeks'), \
('monthly', 'Months'), \
('yearly', 'Years'), \
('secondly', 'Seconds'), \
('minutely', 'Minutes') ], 'Frequency'),
('yearly', 'Years')], 'Frequency'),
'interval': fields.integer('Interval', help="Repeat every x"),
'count': fields.integer('Count', help="Repeat max that times"),
'mo': fields.boolean('Mon'),

View File

@ -153,7 +153,7 @@
<field name="usage">menu</field>
<field name="view_id" ref="board_crm_form"/>
</record>
<menuitem id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
<menuitem id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
<menuitem
name="Sales Dashboard" parent="board.menu_dasboard"
action="open_board_crm"

View File

@ -72,55 +72,28 @@ class crm_meeting(crm_case, osv.osv):
('draft', 'Unconfirmed'),
('cancel', 'Cancelled'),
('done', 'Done')], 'State', \
size=16, readonly=True)
size=16, readonly=True),
'recurrency': fields.boolean('Recurrency', help="Recurrent Meeting"),
'edit_all': fields.boolean('Edit All', help="Edit all Occurrences of recurrent Meeting."),
}
_defaults = {
'state': lambda *a: 'draft',
'active': lambda *a: 1,
'user_id': lambda self, cr, uid, ctx: uid,
}
def open_meeting(self, cr, uid, ids, context=None):
"""
Open Crm Meeting Form for Crm Meeting.
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of crm meetings IDs
@param context: A standard dictionary for contextual values
@return: Dictionary value which open Crm Meeting form.
"""
def onchange_edit_all(self, cr, uid, ids, rrule_type,edit_all, context=None):
if not context:
context = {}
data_obj = self.pool.get('ir.model.data')
value = {}
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_meet')
id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_meet')
id4 = data_obj._get_id(cr, uid, 'crm', 'crm_case_calendar_view_meet')
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
if id4:
id4 = data_obj.browse(cr, uid, id4, context=context).res_id
for id in ids:
value = {
'name': _('Meeting'),
'view_type': 'form',
'view_mode': 'form,tree',
'res_model': 'crm.meeting',
'view_id': False,
'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
'type': 'ir.actions.act_window',
'res_id': base_calendar.base_calendar_id2real_id(id),
'nodestroy': True
}
if edit_all and rrule_type:
for id in ids:
base_calendar.base_calendar_id2real_id(id)
return value
_defaults = {
'state': lambda *a: 'draft',
'active': lambda *a: 1,
'user_id': lambda self, cr, uid, ctx: uid,
}
def case_open(self, cr, uid, ids, *args):
"""Confirms meeting

View File

@ -43,63 +43,10 @@
<field name="location" />
<field name="alarm_id" string="Reminder"
widget="selection" />
<group colspan="2" col="4" >
<field name="rrule_type" string="Recurrency"
colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
<button string="Edit All"
help="Edit all Occurrences of recurrent Meeting"
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"
name="open_meeting" icon="gtk-edit"
type="object" />
<button string="Exclude range" groups="base.group_extended"
help="Add Exception Rule"
name="%(base_calendar.action_base_calendar_set_exrule)d" icon="gtk-zoom-out" type="action"
context="{'model' : 'crm.meeting'}"
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"/>
</group>
</group>
<group col="4" colspan="4" name="rrule" attrs="{'invisible': [('rrule_type','!=','custom')]}">
<separator string="Custom Recurrency Rule" colspan="8"/>
<group col="8" colspan="4">
<field name="interval" />
<field name="freq" />
<field name="count" />
<field name="end_date" />
</group>
<group col="14" colspan="4" name="Select weekdays"
attrs="{'invisible' : [('freq','!=','weekly')]}">
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<field name="fr" colspan="1" />
<field name="sa" colspan="1" />
<field name="su" colspan="1" />
<newline />
</group>
<group col="10" colspan="4"
attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1"
attrs="{'invisible' : [('select1','=','day')]}">
<field name="day"
attrs="{'required' : [('select1','=','date')]}" />
</group>
<group col="3" colspan="1"
attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The"
attrs="{'required' : [('select1','=','day')]}" />
<field name="week_list" nolabel="1"
attrs="{'required' : [('select1','=','day')]}" />
</group>
<group col="1" colspan="1"
attrs="{'invisible' : [('freq','!=','yearly')]}">
<field name="month_list" string="of"
colspan="1"
attrs="{'required' : [('freq','=','yearly')]}" />
</group>
<group colspan="2" col="4">
<field name="recurrency"/>
<field name="edit_all" attrs="{'invisible':[('recurrency','=', False)]}"
on_change="onchange_edit_all(rrule_type,edit_all)"/>
</group>
</group>
<notebook colspan="4">
@ -221,6 +168,57 @@
</form>
</field>
</page>
<page string="Recurrency Option" attrs="{'invisible':[('recurrency','=',False)]}">
<group col="4" colspan="4" name="rrule">
<group col="2" colspan="2">
<field name="rrule_type" string="Recurrency"
attrs="{'readonly':[('recurrent_uid','!=',False)]}" colspan="2"/>
<label string="" colspan="2"/>
</group>
<separator string="Recurrency Rule" colspan="8"/>
<group col="6" colspan="4">
<field name="freq" />
<field name="interval" string="Repeat Times" attrs="{'invisible': [('end_date','!=',False)]}"/>
<field name="end_date" attrs="{'invisible': [('interval','!=',False)]}"/>
</group>
<group col="14" colspan="4" name="Select weekdays"
attrs="{'invisible' : [('freq','!=','weekly')]}">
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<newline/>
<field name="fr" colspan="1" />
<field name="sa" colspan="1" />
<field name="su" colspan="1" />
<newline />
</group>
<group col="10" colspan="4"
attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1"
attrs="{'invisible' : [('select1','=','day')]}">
<field name="day"
attrs="{'required' : [('select1','=','date')]}" />
</group>
<group col="3" colspan="1"
attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The"
attrs="{'required' : [('select1','=','day')]}" />
<field name="week_list" nolabel="1"
attrs="{'required' : [('select1','=','day')]}" />
</group>
<group col="1" colspan="1"
attrs="{'invisible' : [('freq','!=','yearly')]}">
<field name="month_list" string="of"
colspan="1"
attrs="{'required' : [('freq','=','yearly')]}" />
</group>
</group>
</group>
</page>
</notebook>
</form>
</field>

View File

@ -62,7 +62,7 @@
Now If I want to edit meetings information for all occurrence I click on "Edit All" button.
-
!python {model: crm.meeting}: |
self.open_meeting(cr, uid, [ref('crm_meeting_regardingpresentation0')])
self.write(cr, uid, [ref('crm_meeting_regardingpresentation0')], {'edit_all':'True'},context)
- |
I can see that new meeting form is opened with same value
I change some data for meeting and save it

View File

@ -41,6 +41,8 @@ class project_task(osv.osv):
'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
help='If the task is created the state is \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\
\n If the task is over, the states is set to \'Done\'.'),
'recurrency': fields.boolean('Recurrency', help="Recurrent Tasks"),
'edit_all': fields.boolean('Edit All', help="Edit all Occurrences of recurrent Task."),
}
_defaults = {
'state': 'draft',

View File

@ -57,7 +57,7 @@
</field>
</field>
</record>
<record id="view_project_caldav_task_form2" model="ir.ui.view">
<field name="name">project.task.caldav.form2</field>
<field name="model">project.task</field>
@ -65,64 +65,69 @@
<field name="type">form</field>
<field name="arch" type="xml">
<field name="progress" position="after">
<group colspan="2" col="4" >
<field name="rrule_type" string="Recurrency" colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
<button string="Edit All"
help="Edit all Ourrences of recurrent Task"
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"
name="open_task" icon="gtk-edit"
type="object" />
<button string="Exclude range" groups="base.group_extended"
help="Add Exception Rule"
name="%(base_calendar.action_base_calendar_set_exrule)d" icon="gtk-zoom-out" type="action"
context="{'model' : 'project.task'}"
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"/>
</group>
<newline/>
<group col="4" colspan="6" name="rrule" attrs="{'invisible': [('rrule_type','!=','custom')]}">
<separator string="Custom Recurrency Rule" colspan="8"/>
<group col="8" colspan="4">
<field name="interval" />
<field name="freq" />
<field name="count" />
<field name="end_date" />
</group>
<group col="14" colspan="4" name="Select weekdays"
attrs="{'invisible': [('freq','=','weekly')]}">
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<field name="fr" colspan="1" />
<field name="sa" colspan="1" />
<field name="su" colspan="1" />
<newline />
</group>
<group col="10" colspan="4" attrs="{'invisible': [('freq','!=','monthly'), ('freq','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1" attrs="{'invisible' : [('select1','=','day')]}">
<field name="day" attrs="{'required' : [('select1','=','date')]}" />
</group>
<group col="3" colspan="1" attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The" attrs="{'required' : [('select1','=','day')]}" />
<field name="week_list" nolabel="1" attrs="{'required' : [('select1','=','day')]}" />
</group>
<group col="1" colspan="1" attrs="{'invisible' : [('freq','!=','yearly')]}">
<field name="month_list" string="of" colspan="1" attrs="{'required' : [('freq','=','yearly')]}" />
</group>
</group>
</group>
<field name="recurrency"/>
<field name="edit_all" attrs="{'invisible':[('recurrency','=', False)]}"/>
</field>
</field>
</record>
<record id="view_project_caldav_task_form3" model="ir.ui.view">
<record id="view_project_caldav_task_form3" model="ir.ui.view">
<field name="name">project.task.caldav.form3</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2" />
<field name="type">form</field>
<field name="arch" type="xml">
<notebook colspan="4" position="inside">
<page string="Recurrency Option" attrs="{'invisible':[('recurrency','=',False)]}">
<group colspan="2" col="4" >
<field name="rrule_type" string="Recurrency" colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
</group>
<newline/>
<group col="4" colspan="6" name="rrule">
<separator string="Custom Recurrency Rule" colspan="8"/>
<group col="6" colspan="4">
<field name="freq" />
<field name="interval" string="Repeat Times" attrs="{'invisible': [('end_date','!=',False)]}"/>
<field name="end_date" attrs="{'invisible': [('interval','!=',False)]}"/>
</group>
<group col="14" colspan="4" name="Select weekdays"
attrs="{'invisible': [('freq','!=','weekly')]}">
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<newline/>
<field name="fr" colspan="1" />
<field name="sa" colspan="1" />
<field name="su" colspan="1" />
<newline />
</group>
<group col="10" colspan="4" attrs="{'invisible': [('freq','!=','monthly'), ('freq','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1" attrs="{'invisible' : [('select1','=','day')]}">
<field name="day" attrs="{'required' : [('select1','=','date')]}" />
</group>
<group col="3" colspan="1" attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The" attrs="{'required' : [('select1','=','day')]}" />
<field name="week_list" nolabel="1" attrs="{'required' : [('select1','=','day')]}" />
</group>
<group col="1" colspan="1" attrs="{'invisible' : [('freq','!=','yearly')]}">
<field name="month_list" string="of" colspan="1" attrs="{'required' : [('freq','=','yearly')]}" />
</group>
</group>
</group>
</page>
</notebook>
</field>
</record>
<record id="view_project_caldav_task_form4" model="ir.ui.view">
<field name="name">project.task.caldav.form4</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2" />
<field name="type">form</field>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="vtimezone" colspan="2" />