Mayur Maheshwari(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-configrework3-remove-working-time-mma 
into lp:~openerp-dev/openobject-addons/trunk-configrework3-crm.

Requested reviews:
  Rucha (Open ERP) (rpa-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-configrework3-remove-working-time-mma/+merge/71986

Hello,

  crm: Working Time field is removed from sales team view

Thanks
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-configrework3-remove-working-time-mma/+merge/71986
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-configrework3-crm.
=== modified file 'account/company.py'
--- account/company.py	2011-07-05 12:28:57 +0000
+++ account/company.py	2011-08-18 06:27:23 +0000
@@ -36,9 +36,9 @@
     }
 
     _defaults = {
-        'overdue_msg': 'Please note that the following payments are now due. If your payment \
-                        has been sent, kindly forward your payment details. If payment will be \
-                        delayed further, please contact us to discuss. \
+        'overdue_msg': 'Please note that the following payments are now due.\
+                         \nIf your payment has been sent, kindly forward your payment details.\
+                         \nIf payment will be delayed further, please contact us to discuss.\
                         \nWould your payment have been carried out after this mail was sent, please consider the present one as void.'
     }
 

=== modified file 'crm/crm.py'
--- crm/crm.py	2011-08-03 10:06:02 +0000
+++ crm/crm.py	2011-08-18 06:27:23 +0000
@@ -689,7 +689,6 @@
         'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by OpenERP about cases in this sales team"),
         'parent_id': fields.many2one('crm.case.section', 'Parent Team'),
         'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Teams'),
-        'resource_calendar_id': fields.many2one('resource.calendar', "Working Time"),
         'note': fields.text('Description'),
         'working_hours': fields.float('Working Hours', digits=(16,2 )),
         'stage_ids': fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),

=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py	2011-07-19 09:06:02 +0000
+++ crm/crm_lead.py	2011-08-18 06:27:23 +0000
@@ -49,53 +49,22 @@
         @return: difference between current date and log date
         @param context: A standard dictionary for contextual values
         """
-        cal_obj = self.pool.get('resource.calendar')
-        res_obj = self.pool.get('resource.resource')
 
         res = {}
         for lead in self.browse(cr, uid, ids, context=context):
             for field in fields:
                 res[lead.id] = {}
-                duration = 0
                 ans = False
-                if field == 'day_open':
-                    if lead.date_open:
-                        date_create = datetime.strptime(lead.create_date, "%Y-%m-%d %H:%M:%S")
-                        date_open = datetime.strptime(lead.date_open, "%Y-%m-%d %H:%M:%S")
-                        ans = date_open - date_create
-                        date_until = lead.date_open
-                elif field == 'day_close':
-                    if lead.date_closed:
-                        date_create = datetime.strptime(lead.create_date, "%Y-%m-%d %H:%M:%S")
-                        date_close = datetime.strptime(lead.date_closed, "%Y-%m-%d %H:%M:%S")
-                        date_until = lead.date_closed
-                        ans = date_close - date_create
-                if ans:
-                    resource_id = False
-                    if lead.user_id:
-                        resource_ids = res_obj.search(cr, uid, [('user_id','=',lead.user_id.id)])
-                        if len(resource_ids):
-                            resource_id = resource_ids[0]
+                date_process = False
+                if field == 'day_open' and lead.date_open:
+                    date_process = lead.date_open
+                        
+                elif field == 'day_close' and lead.date_closed:
+                    date_process = lead.date_closed
 
-                    duration = float(ans.days)
-                    if lead.section_id and lead.section_id.resource_calendar_id:
-                        duration =  float(ans.days) * 24
-                        new_dates = cal_obj.interval_get(cr,
-                            uid,
-                            lead.section_id.resource_calendar_id and lead.section_id.resource_calendar_id.id or False,
-                            datetime.strptime(lead.create_date, '%Y-%m-%d %H:%M:%S'),
-                            duration,
-                            resource=resource_id
-                        )
-                        no_days = []
-                        date_until = datetime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
-                        for in_time, out_time in new_dates:
-                            if in_time.date not in no_days:
-                                no_days.append(in_time.date)
-                            if out_time > date_until:
-                                break
-                        duration =  len(no_days)
-                res[lead.id][field] = abs(int(duration))
+                if date_process:
+                    ans = datetime.strptime(date_process, "%Y-%m-%d %H:%M:%S") - datetime.strptime(lead.create_date, "%Y-%m-%d %H:%M:%S")
+                res[lead.id][field] = ans and ans.days or 0.0
         return res
 
     def _history_search(self, cr, uid, obj, name, args, context=None):

=== modified file 'crm/crm_view.xml'
--- crm/crm_view.xml	2011-08-03 08:16:20 +0000
+++ crm/crm_view.xml	2011-08-18 06:27:23 +0000
@@ -35,7 +35,6 @@
                         <field name="code" select="1"/>
                         <newline/>
                         <field name="user_id" select="2"/>
-                        <field name="resource_calendar_id" select="2" widget="selection"/>
                         <field name="active" select="2"/>
                     </group>
                     <notebook colspan="4">

=== modified file 'hr_timesheet_sheet/hr_timesheet_sheet_view.xml'
--- hr_timesheet_sheet/hr_timesheet_sheet_view.xml	2011-07-13 11:44:34 +0000
+++ hr_timesheet_sheet/hr_timesheet_sheet_view.xml	2011-08-18 06:27:23 +0000
@@ -202,14 +202,17 @@
             <field name="name">res.company.sheet</field>
             <field name="model">res.company</field>
             <field name="type">form</field>
+            <field name="priority">18</field>
             <field name="inherit_id" ref="base.view_company_form"/>
             <field name="arch" type="xml">
-                <page string="Configuration" position="inside">
-                    <separator string="Timesheets" colspan="4"/>
-                    <field name="timesheet_range"/>
-                    <field name="timesheet_max_difference"/>
+                <xpath expr="/form/notebook/page/group[@name='accounting']" position="after">
+                    <group col="2" colspan="2" name="hr_timesheet" sequence="25"> 
+                        <separator string="Timesheets" colspan="4"/>
+                        <field name="timesheet_range"/>
+                        <field name="timesheet_max_difference"/>
                     <newline/>
-                </page>
+                    </group>
+                </xpath>
             </field>
         </record>
 

=== modified file 'l10n_ch/company_view.xml'
--- l10n_ch/company_view.xml	2011-01-14 12:41:54 +0000
+++ l10n_ch/company_view.xml	2011-08-18 06:27:23 +0000
@@ -7,7 +7,7 @@
             <field name="type">form</field>
             <field name="inherit_id" ref="base.view_company_form"/>
             <field name="arch" type="xml">
-                <field name="rml_footer2" position="after">
+                <field name="vat" position="after">
                     <field name="bvr_delta_horz"/>
                     <field name="bvr_delta_vert"/>
                     <field name="bvr_background"/>

=== modified file 'mrp/company_view.xml'
--- mrp/company_view.xml	2011-01-14 00:11:01 +0000
+++ mrp/company_view.xml	2011-08-18 06:27:23 +0000
@@ -6,12 +6,12 @@
             <field name="name">res.company.mrp.config</field>
             <field name="model">res.company</field>
             <field name="type">form</field>
-            <field name="priority">22</field>
+            <field name="priority">24</field>
             <field name="inherit_id" ref="base.view_company_form"/>
             <field name="arch" type="xml">
-                <page string="Configuration" position="inside">
+                <xpath expr="/form/notebook/page/group[@name='mrp']" position="after">
                     <field name="manufacturing_lead"/>
-                </page>
+                </xpath>
             </field>
         </record>
 

=== modified file 'pad/company_pad.xml'
--- pad/company_pad.xml	2011-01-14 00:11:01 +0000
+++ pad/company_pad.xml	2011-08-18 06:27:23 +0000
@@ -6,9 +6,12 @@
       <field name="type">form</field>
       <field name="inherit_id" ref="base.view_company_form"/>
       <field name="arch" type="xml">
-        <xpath expr="//page[@string='Configuration']" position="inside">
-          <separator string="Pad" colspan="4"/>
-          <field name="pad_index"/>
+        <xpath expr="/form/notebook/page/group[@name='mrp']" position="after">
+            <newline/>
+            <group col="2" colspan="2" name="pad" sequence="100"> 
+                  <separator string="Pad" colspan="4"/>
+                  <field name="pad_index"/>
+             </group>
         </xpath>
       </field>
     </record>

=== modified file 'point_of_sale/point_of_sale_view.xml'
--- point_of_sale/point_of_sale_view.xml	2011-07-26 10:59:01 +0000
+++ point_of_sale/point_of_sale_view.xml	2011-08-18 06:27:23 +0000
@@ -637,13 +637,16 @@
             <field name="name">view.company.form.pos</field>
             <field name="model">res.company</field>
             <field name="type">form</field>
+            <field name="priority">25</field>
             <field name="inherit_id" ref="base.view_company_form"/>
             <field name="arch" type="xml">
-                <field name="currency_id" position="after">
-                    <separator string="Point of Sale" colspan="4"/>
-                    <field  name="company_discount" />
-                    <field  name="max_diff" />
-                </field>
+                <xpath expr="/form/notebook/page/group[@name='accounting']" position="after" >
+                   <group col="2" colspan="2" name="pos" sequence="5"> 
+                     <separator string="Point of Sale" colspan="2" />
+                     <field name="company_discount" colspan="2" />
+                     <field name="max_diff" />
+                   </group>
+                </xpath>
             </field>
            </record>
 

=== modified file 'procurement/company_view.xml'
--- procurement/company_view.xml	2011-01-14 00:11:01 +0000
+++ procurement/company_view.xml	2011-08-18 06:27:23 +0000
@@ -6,14 +6,14 @@
             <field name="name">res.company.mrp.config</field>
             <field name="model">res.company</field>
             <field name="type">form</field>
-            <field name="priority">17</field>
+            <field name="priority">25</field>
             <field name="inherit_id" ref="base.view_company_form"/>
             <field name="arch" type="xml">
-                <page string="Configuration" position="inside">
+                <xpath expr="/form/notebook/page/group[@name='mrp']" position="after">
                     <separator string="MRP &amp; Logistics Scheduler" colspan="4"/>
-                    <field name="schedule_range"/>
-                </page>
-            </field>
+                       <field name="schedule_range"/>
+                </xpath>
+          </field>
        </record>
     
     </data>

=== modified file 'project/project_view.xml'
--- project/project_view.xml	2011-08-15 14:21:41 +0000
+++ project/project_view.xml	2011-08-18 06:27:23 +0000
@@ -530,13 +530,16 @@
             <field name="name">res.company.task.config</field>
             <field name="model">res.company</field>
             <field name="type">form</field>
+            <field name="priority">22</field>
             <field name="inherit_id" ref="base.view_company_form"/>
             <field name="arch" type="xml">
-                <page string="Configuration" position="inside">
-                    <separator string="Project Management" colspan="4"/>
+                <xpath expr="/form/notebook/page/group[@name='accounting']" position="after">
+                    <group col="2" colspan="2" name="project" sequence="15"> 
+                    <separator string="Project Management" colspan="2"/>
                     <field name="project_time_mode_id"/>
                     <newline/>
-                </page>
+                     </group>
+                </xpath>
             </field>
         </record>
 

=== modified file 'purchase/company_view.xml'
--- purchase/company_view.xml	2011-01-14 00:11:01 +0000
+++ purchase/company_view.xml	2011-08-18 06:27:23 +0000
@@ -6,12 +6,12 @@
             <field name="name">res.company.mrp.config</field>
             <field name="model">res.company</field>
             <field name="type">form</field>
-            <field name="priority">19</field>
+            <field name="priority">22</field>
             <field name="inherit_id" ref="base.view_company_form"/>
             <field name="arch" type="xml">
-                <page string="Configuration" position="inside">
+               <xpath expr="/form/notebook/page/group[@name='mrp']" position="after">
                     <field name="po_lead"/>
-                </page>
+                </xpath>
             </field>
         </record>
 

=== modified file 'sale/company_view.xml'
--- sale/company_view.xml	2011-01-14 00:11:01 +0000
+++ sale/company_view.xml	2011-08-18 06:27:23 +0000
@@ -5,12 +5,12 @@
             <field name="name">res.company.mrp.config</field>
             <field name="model">res.company</field>
             <field name="type">form</field>
-            <field name="priority">24</field>
+            <field name="priority">20</field>
             <field name="inherit_id" ref="base.view_company_form"/>
             <field name="arch" type="xml">
-                <page string="Configuration" position="inside">
+                <xpath expr="/form/notebook/page/group[@name='mrp']" position="after">
                     <field name="security_lead"/>
-                </page>
+                </xpath>
             </field>
         </record>
     </data>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to