[MERGE]: Merged with addons
authorAtul Patel (OpenERP) <atp@tinyerp.com>
Mon, 10 Feb 2014 06:46:42 +0000 (12:16 +0530)
committerAtul Patel (OpenERP) <atp@tinyerp.com>
Mon, 10 Feb 2014 06:46:42 +0000 (12:16 +0530)
bzr revid: atp@tinyerp.com-20140210064642-edr5rju09v49dzqg

1  2 
addons/account/account_bank_statement.py
addons/account_asset/account_asset.py
addons/calendar/calendar_view.xml
addons/crm/crm_phonecall.py
addons/crm/crm_phonecall_menu.xml

Simple merge
index 0000000,01c4b59..ddcf41a
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,321 +1,321 @@@
+ <?xml version="1.0"?>
+ <openerp>
+     <data>
+     <!-- Calendar Events Types Form View -->
+     <record id="view_calendar_event_type_tree" model="ir.ui.view">
+         <field name="name">Meeting Types Tree</field>
+         <field name="model">calendar.event.type</field>
+         <field name="arch" type="xml">
 -            <tree string="Meeting Types" editable="bottom">
++            <tree string="Meeting Types">
+                 <field name="name"/>
+             </tree>
+         </field>
+     </record>    
+     <record id="action_calendar_event_type" model="ir.actions.act_window">
+         <field name="name">Meeting Types</field>
+         <field name="res_model">calendar.event.type</field>
+         <field name="view_type">form</field>
+         <field name="view_id" ref="view_calendar_event_type_tree"/>
+     </record>
+     
+     <!-- Calendar Events Form View -->
+     <record model="ir.ui.view" id="view_calendar_event_form">
+         <field name="name">Calendar - Event Form</field>
+         <field name="model">calendar.event</field>
+         <field name="priority" eval="1"/>
+         <field name="arch" type="xml">
+             <form string="Meetings" version="7.0">
+                 <sheet>
+                     <field name="state" invisible="1"/>
+                     <field name="is_attendee" invisible="1"/>
+                     <field name="attendee_status" invisible="1"/>
+                     <div class="oe_title">
+                         <div class="oe_edit_only">
+                             <label for="name"/>
+                         </div>
+                         <h1>
+                             <field name="name"/>
+                         </h1>
+                         <label for="partner_ids" class="oe_edit_only"/>
+                         <h2>
+                             <field name="partner_ids" widget="many2manyattendee"
+                                 context="{'force_email':True}"
+                                 on_change="onchange_partner_ids(partner_ids)"
+                                 class="oe_inline"/>
+                         </h2>
+                     </div>
+                     <notebook>
+                         <page string="Meeting Details">
+                             <group>
+                                 <group>
+                                     <field name="date" string="Starting at" on_change="onchange_dates(date, duration, False, allday)"/>
+                                     <label for="duration"/>
+                                     <div>
+                                         <field name="duration" widget="float_time"
+                                             on_change="onchange_dates(date,duration,False,allday)"
+                                             class="oe_inline" attrs="{'invisible': [('allday','=',True)]}"/>
+                                         <label string="hours" attrs="{'invisible': [('allday','=',True)]}"/>
+                                         (<field name="allday" on_change="onchange_dates(date,False,False,allday)" class="oe_inline"/>
+                                         <label for="allday" string="All Day?"/>)
+                                     </div>
+                                     <field name="date_deadline" groups="base.group_no_one"
+                                         attrs="{'invisible': ['|', ('allday','=',True), ('duration','&lt;', 24)]}"
+                                         on_change="onchange_dates(date,False,date_deadline)"/>
+                                 </group>
+                                 <group>
+                                     <field name="categ_ids" widget="many2many_tags"/>
+                                     <field name="alarm_ids" widget="many2many_tags" />
+                                     <field name="location"/>
+                                 </group>
+                             </group>
+                             <label for="description"/>
+                             <field name="description"/>
+                         </page>
+                         <page string="Options">
+                             <group>
+                                 <group col="1">
+                                     <group>
+                                         <field name="recurrency"/>
+                                     </group>
+                                     <group attrs="{'invisible': [('recurrency','=',False)]}">
+                                         <label for="interval"/>
+                                         <div>
+                                             <field name="interval" attrs="{'required': [('recurrency','==',True)]}" class="oe_inline"/>
+                                             <field name="rrule_type" attrs="{'required': [('recurrency','==',True)]}" class="oe_inline"/>
+                                         </div>
+                                         <label string="Until" for="end_type"/>
+                                         <div>
+                                             <field name="end_type" attrs="{'required': [('recurrency','==',True)]}" class="oe_inline"/>
+                                             <field name="count" attrs="{'invisible': [('end_type', '!=', 'count')], 'required': [('recurrency','==',True)]}" class="oe_inline"/>
+                                             <field name="end_date" attrs="{'invisible': [('end_type', '!=', 'end_date')], 'required': [('end_type', '=', 'end_date')]}" class="oe_inline"/>
+                                         </div>
+                                         <label string="Select Weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}"/>
+                                         <group col="2" colspan="1" name="weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}" >
+                                             <field name="mo" on_change="onchange_rec_day(date,mo,tu,we,th,fr,sa,su)"/>
+                                             <field name="tu" on_change="onchange_rec_day(date,mo,tu,we,th,fr,sa,su)"/>
+                                             <field name="we" on_change="onchange_rec_day(date,mo,tu,we,th,fr,sa,su)"/>
+                                             <field name="th" on_change="onchange_rec_day(date,mo,tu,we,th,fr,sa,su)"/>
+                                             <field name="fr" on_change="onchange_rec_day(date,mo,tu,we,th,fr,sa,su)"/>
+                                             <field name="sa" on_change="onchange_rec_day(date,mo,tu,we,th,fr,sa,su)"/>
+                                             <field name="su" on_change="onchange_rec_day(date,mo,tu,we,th,fr,sa,su)"/>
+                                         </group>
+     
+                                         <label string="Day of Month"
+                                             attrs="{'invisible': [('rrule_type','!=','monthly')]}"/>
+     
+                                         <div attrs="{'invisible': [('rrule_type','!=','monthly')]}">
+                                             <field name="month_by"/>
+                                             <field name="day"
+                                                 attrs="{'required': [('month_by','=','date'), ('rrule_type','=','monthly')],
+                                                     'invisible': [('month_by','=','day')]}"/>
+                                             <field name="byday" string="The"
+                                                 attrs="{'required': [('month_by','=','day'), ('rrule_type','=','monthly')], 'invisible': [('month_by','=','date')]}"/>
+                                             <field name="week_list" nolabel="1"
+                                                 attrs="{'required': [('month_by','=','day'), ('rrule_type','=','monthly')], 'invisible': [('month_by','=','date')]}"/>
+                                         </div>
+                                     </group>
+                                 </group>
+                                 <group>                                    
+                                     <field name="class"/>
+                                     <field name="show_as"/>
+                                     <field name="rrule" invisible="1" readonly="0" />
+                                     <field name="recurrent_id" invisible="1" />
+                                 </group>
+                             </group>
+                         </page>
+                         
+                         <page string="Invitations" groups="base.group_no_one">
+                             <button name="do_sendmail" type="object" string="Send mail" icon="terp-mail-message-new" class="oe_link"/>
+                             <field name="attendee_ids" widget="one2many" >
+                                 <tree string="Invitation details" editable="top" create="false" delete="false">
+                                     <field name="partner_id" />
+                                     <field name="state" />
+                                     <field name="email" widget="email"/>                                   
+                                      
+                                     <button name="do_tentative" states="needsAction,declined,accepted" string="Uncertain" type="object" icon="terp-crm" />
+                                     <button name="do_accept" string="Accept" states="needsAction,tentative,declined" type="object" icon="gtk-apply"/>
+                                     <button name="do_decline" string="Decline" states="needsAction,tentative,accepted" type="object" icon="gtk-cancel"/>
+                                 </tree>
+                             </field>
+                         </page>
+                         <page string="Misc" groups="base.group_no_one">
+                             <label string="Owner"/>
+                             <field name="user_id" />
+                             
+                         </page>
+                     </notebook>
+                 </sheet>
+                 <div class="oe_chatter">
+                     <field name="message_follower_ids" widget="mail_followers"/>
+                     <field name="message_ids" widget="mail_thread" />
+                 </div>
+             </form>
+         </field>
+     </record>
+     
+     <record model="ir.ui.view" id="view_calendar_event_form_popup">
+         <field name="name">Meetings Popup</field>
+         <field name="model">calendar.event</field>
+         <field name="priority" eval="2"/>
+         <field name="arch" type="xml">
+             <form string="Meetings" version="7.0">
+                 <field name="state" invisible="1"/>
+                 <field name="is_attendee" invisible="1"/>
+                 <field name="attendee_status" invisible="1"/>
+                 <label for="name"/>
+                 <field name="name"/>
+                 <group>
+                     <group>
+                         <field name="date" string="Start" />
+                         <field name="duration" string="Duration" widget="float_time" attrs="{'invisible': [('allday','=',True)]}"/>
+                         <field name="allday" class="oe_inline" attrs="{'invisible': [('allday','=',False)]}"/>
+                         <field name="partner_ids" widget="many2manyattendee" string="Attendees"/>                                                                        
+                     </group>
+                     <group>
+                         <field name="categ_ids" widget="many2many_tags"/>
+                         <field name="alarm_ids" widget="many2many_tags" />
+                         <field name="location"/>
+                     </group>
+                 </group>       
+             </form>
+         </field>
+     </record>
+     <!-- CRM Meeting Tree View  -->
+     <record model="ir.ui.view" id="view_calendar_event_tree">
+         <field name="name">CRM - Meetings Tree</field>
+         <field name="model">calendar.event</field>
+         <field name="arch" type="xml">
+             <tree string="Meetings" fonts="bold:message_unread==True">
+                 <field name="name" string="Subject"/>
+                 <field name="date" string="Event Date"/>
+                 <field name="user_id"/>
+                 <field name="location"/>
+                 <field name="show_as"/>
+                 <field name="class" string="Privacy"/>
+                 <field name="state" invisible="True"/>
+                 <field name="duration"/>
+                 <field name="message_unread" invisible="1"/>
+             </tree>
+         </field>
+     </record>
+     <!-- CRM Meeting Calendar -->
+     <record model="ir.ui.view" id="view_calendar_event_calendar">
+         <field name="name">Meetings Calendar</field>
+         <field name="model">calendar.event</field>
+         <field name="priority" eval="2"/>
+         <field name="arch" type="xml">                          
+             <calendar string="Meetings" date_start="date" date_stop="date_deadline" date_delay="duration" all_day="allday" 
+                          display="[name]" color="color_partner_id" attendee="partner_ids" avatar_model="res.partner"
+                          use_contacts="True" event_open_popup="%(calendar.view_calendar_event_form_popup)s">
+             
+                 <field name="name"/>
+                 <field name="user_id"/>
+                 <field name="color_partner_id"/>
+                 <field name="partner_ids"/>
+             </calendar>
+         </field>
+     </record>
+     <!-- CRM Meeting Gantt  -->
+     <record id="view_calendar_event_gantt" model="ir.ui.view">
+         <field name="name">CRM - Meetings Gantt</field>
+         <field name="model">calendar.event</field>
+         <field name="arch" type="xml">
+             <gantt date_delay="duration" date_start="date" string="Meetings"/>
+         </field>
+     </record>
+     <!-- CRM Meeting Search View  -->
+     <record id="view_calendar_event_search" model="ir.ui.view">
+         <field name="name">CRM - Meetings Search</field>
+         <field name="model">calendar.event</field>
+         <field name="arch" type="xml">
+             <search string="Search Meetings">
+                 <field name="name" string="Meeting" filter_domain="[('name','ilike',self)]"/>
+                 <field name="partner_ids"/>
+                 <field name="categ_ids"/>
+                 <field name="user_id"/>
+                 <field name="show_as"/>
+                 <field name="class" string="Privacy"/>
+                 <filter icon="terp-go-today" string="My Events" domain="[('user_id','=',uid)]" help="My Events"/>                
+                 <filter string="My Meetings" help="My Meetings" name="mymeetings" context='{"mymeetings": 1}'/>
+                 <filter string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
+                 <separator/>                
+                 <group expand="0" string="Group By...">
+                     <filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
+                     <filter string="Availability" icon="terp-camera_test" domain="[]" context="{'group_by':'show_as'}"/>
+                     <filter string="Privacy" icon="terp-locked" domain="[]" context="{'group_by':'class'}"/>                    
+                     <filter string="Event Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Start Date of Event by Month"/>
+                 </group>
+             </search>
+         </field>
+     </record>
+     <record id="action_calendar_event" model="ir.actions.act_window">
+         <field name="name">Meetings</field>
+         <field name="res_model">calendar.event</field>
+         <field name="view_mode">calendar,tree,form,gantt</field>
+         <field name="view_id" ref="view_calendar_event_calendar"/>
+         <field name="search_view_id" ref="view_calendar_event_search"/>       
+         <field name="context">{"search_default_mymeetings": 1}</field>
+         <field name="help" type="html">
+           <p class="oe_view_nocontent_create">
+             Click to schedule a new meeting.
+           </p><p>
+             The calendar is shared between employees and fully integrated with
+             other applications such as the employee holidays or the business
+             opportunities.
+           </p>
+         </field>
+     </record>
+     <record model="ir.actions.act_window.view" id="action_view_calendar_event_calendar">
+         <field name="act_window_id" ref="action_calendar_event"/>
+         <field name="sequence" eval="1"/>
+         <field name="view_mode">calendar</field>
+         <field name="view_id" ref="view_calendar_event_calendar"/>
+     </record>
+     <record model="ir.actions.act_window.view" id="action_view_calendar_event_tree">
+         <field name="act_window_id" ref="action_calendar_event"/>
+         <field name="sequence" eval="2"/>
+         <field name="view_mode">tree</field>
+         <field name="view_id" ref="view_calendar_event_tree"/>
+     </record>
+     <record model="ir.actions.act_window.view" id="action_view_calendar_event_form">
+         <field name="act_window_id" ref="action_calendar_event"/>
+         <field name="sequence" eval="3"/>
+         <field name="view_mode">form</field>
+         <field name="view_id" ref="view_calendar_event_form"/>
+     </record>
+     <record model="ir.actions.act_window.view" id="action_view_calendar_event_gantt">
+         <field name="act_window_id" ref="action_calendar_event"/>
+         <field name="sequence" eval="4"/>
+         <field name="view_mode">gantt</field>
+         <field name="view_id" ref="view_calendar_event_gantt"/>
+     </record>
+     <menuitem name="Calendar" id="mail_menu_calendar" parent="mail.mail_my_stuff" sequence="10" action="action_calendar_event"/>
+     <menuitem id="menu_calendar_configuration" name="Calendar" parent="base.menu_custom" groups="base.group_no_one"/>
+     <menuitem id="menu_calendar_event_type" parent="menu_calendar_configuration" action="action_calendar_event_type" groups="base.group_no_one"/>
+         
+     <!-- called in js from '/js/base_calendar.js' -->
+     <record id="action_calendar_event_notify" model="ir.actions.act_window">
+         <field name="name">Meetings</field>
+         <field name="res_model">calendar.event</field>
+         <field name="view_mode">form,calendar,tree,gantt</field>
+         <field name="view_id" ref="view_calendar_event_form"/>        
+     </record>
+        
+     
+     </data>
+ </openerp>
@@@ -262,16 -264,14 +264,16 @@@ class crm_phonecall(osv.osv)
          Open meeting's calendar view to schedule a meeting on current phonecall.
          :return dict: dictionary value for created meeting view
          """
 +        partner_ids = []
          phonecall = self.browse(cr, uid, ids[0], context)
 +        if phonecall.partner_id and phonecall.partner_id.email:
 +            partner_ids.append(phonecall.partner_id.id)
-         res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'base_calendar', 'action_crm_meeting', context)
+         res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_calendar_event', context)
          res['context'] = {
              'default_phonecall_id': phonecall.id,
 -            'default_partner_id': phonecall.partner_id and phonecall.partner_id.id or False,
 +            'default_partner_ids': partner_ids,
              'default_user_id': uid,
              'default_email_from': phonecall.email_from,
 -            'default_state': 'open',
              'default_name': phonecall.name,
          }
          return res
Simple merge