← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/uco-dev-addons1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons1

 

uco (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/uco-dev-addons1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons1.

Requested reviews:
  OpenERP R&D Team (openerp-dev)
Related bugs:
  #683770 [6.0] base_contact installer does not copy names from res_partner_address
  https://bugs.launchpad.net/bugs/683770


* [FIX] base_contact: Corrected installer wizard problem.
  => lp:683770

* [IMP] crm,  project_caldav: Removed 'Edit All' and 'Exclude range' buttons without changing the functionality from Meetings and Tasks views.
           
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/uco-dev-addons1/+merge/43737
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-dev/openobject-addons/uco-dev-addons1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons1.
=== modified file 'base_calendar/base_calendar.py'
--- base_calendar/base_calendar.py	2010-11-15 06:23:57 +0000
+++ base_calendar/base_calendar.py	2010-12-15 06:25:05 +0000
@@ -1151,9 +1151,7 @@
                                 ('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'),

=== modified file 'base_contact/base_contact_installer_view.xml'
--- base_contact/base_contact_installer_view.xml	2010-09-15 06:58:45 +0000
+++ base_contact/base_contact_installer_view.xml	2010-12-15 06:25:05 +0000
@@ -52,7 +52,7 @@
         <record id="base_contact_installer_todo" model="ir.actions.todo">
             <field name="action_id" ref="action_base_contact_installer"/>
             <field name="sequence">3</field>
-            <field name="state">skip</field>
+            <field name="restart">always</field>
         </record>
 
     </data>

=== modified file 'crm/board_crm_view.xml'
--- crm/board_crm_view.xml	2010-11-23 13:15:31 +0000
+++ crm/board_crm_view.xml	2010-12-15 06:25:05 +0000
@@ -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"

=== modified file 'crm/crm_meeting.py'
--- crm/crm_meeting.py	2010-11-26 16:13:59 +0000
+++ crm/crm_meeting.py	2010-12-15 06:25:05 +0000
@@ -72,56 +72,29 @@
                                     ('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."),         
     }
-
+    
+    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 = {}
+        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 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 user’s ID for security checks,
-        @param ids: List of crm meeting’s IDs
-        @param context: A standard dictionary for contextual values
-        @return: Dictionary value which open Crm Meeting form.
-        """
-
-        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
-                    }
-
-        return value
-
     def case_open(self, cr, uid, ids, *args):
         """Confirms meeting
         @param self: The object pointer

=== modified file 'crm/crm_meeting_view.xml'
--- crm/crm_meeting_view.xml	2010-12-07 10:30:14 +0000
+++ crm/crm_meeting_view.xml	2010-12-15 06:25:05 +0000
@@ -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>

=== modified file 'crm/test/test_crm_meeting.yml'
--- crm/test/test_crm_meeting.yml	2010-09-27 14:48:08 +0000
+++ crm/test/test_crm_meeting.yml	2010-12-15 06:25:05 +0000
@@ -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

=== modified file 'project_caldav/project_caldav.py'
--- project_caldav/project_caldav.py	2010-11-11 13:30:06 +0000
+++ project_caldav/project_caldav.py	2010-12-15 06:25:05 +0000
@@ -41,6 +41,8 @@
         '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',

=== modified file 'project_caldav/project_caldav_view.xml'
--- project_caldav/project_caldav_view.xml	2010-11-10 10:31:46 +0000
+++ project_caldav/project_caldav_view.xml	2010-12-15 06:25:05 +0000
@@ -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,65 +65,70 @@
             <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" />
                     <field name="location" colspan="2" />


Follow ups