deisy vor 5 Jahren
Ursprung
Commit
8038274eb9

BIN
__init__.pyc


+ 7 - 6
__openerp__.py

@@ -4,6 +4,13 @@
 'name':'Eiru CRM',
 'author':'Deisy Samudio',
 'description':'',
+'depends':[
+    'base',
+    'crm',
+    'marketing',
+    'web',
+    'partner_social_fields',
+    ],
 'data':[
     'views/crm_task_view.xml',
     'views/eiru_crm_view.xml',
@@ -16,12 +23,6 @@
     'template.xml',
     'security/ir.model.access.csv',
     ],
-'depends':[
-    'base',
-    'crm',
-    'marketing',
-    'web',
-    'partner_social_fields',],
 'application':True,
 "images": [
 		"static/description/icon.png",

+ 1 - 1
models/__init__.py

@@ -2,5 +2,5 @@
 
 import eiru_crm
 import crm_task
-import res_partner
 import task_type
+import res_partner

BIN
models/__init__.pyc


+ 1 - 1
models/crm_task.py

@@ -78,7 +78,7 @@ class crm_task(models.Model):
         if self.date_action_next < now.strftime("%Y-%m-%d %H:%M:00"):
             self.expired_date = True
 
-    expired_date = fields.Boolean(string="Fecha Vencida", compute="_current_datetime", store=False)
+    expired_date = fields.Boolean(string="Fecha Vencida", compute="_current_datetime", store=True)
 
     @api.multi
     def createOpportunity(self):

BIN
models/crm_task.pyc


+ 1 - 1
models/eiru_crm.py

@@ -43,7 +43,7 @@ class crm_lead(models.Model):
                 self.expired_date = True
 
     exist_task = fields.Boolean(string="Tarea Pendiente", compute="_exist_task", store=False)
-    expired_date = fields.Boolean(string="Fecha Vencida", compute="_exist_task", store=False)
+    expired_date = fields.Boolean(string="Fecha Vencida", compute="_exist_task", store=True)
 
     def on_change_partner_id(self, cr, uid, ids, partner_id, context=None):
         values = {}

BIN
models/eiru_crm.pyc


+ 0 - 4
models/res_partner.py

@@ -6,10 +6,6 @@ from openerp import fields, models, api
 class ResPartner(models.Model):
     _inherit="res.partner"
 
-    def _activity_count(self):
-        for partner in self:
-            partner.activity_count = self.env['crm.task'].search_count([('partner_id', '=', partner.id),('state','=','pending')])
-
     task_ids = fields.One2many('crm.task', 'partner_id','Tareas')
     instagram = fields.Char('Instagram', size=64, required=False, readonly=False)
 

BIN
models/res_partner.pyc


BIN
models/task_type.pyc


+ 1 - 1
views/crm_task_view.xml

@@ -72,7 +72,7 @@
           <field name="user_id"/>
           <field name="partner_id"/>
           <field name="state"/>
-          <field name="expired_date" invisible='1'/>
+          <field name="expired_date" invisible="1"/>
           <button name="action_done" string="Realizado" type="object" icon="gtk-apply" attrs="{'invisible':[('state','=','done')]}"/>
           <button name="action_done" string="Pendiente" type="object" icon="gtk-undo" attrs="{'invisible':[('state','=','pending')]}"/>
           <button name="action_cancel" string="Cancelado" type="object" icon="gtk-cancel" attrs="{'invisible':[('state','=','cancel')]}"/>

+ 1 - 1
views/eiru_crm_view.xml

@@ -83,7 +83,7 @@
                       <field name="user_id" required="True"/>
                       <field name="date_action_next"/>
                       <field name="state"/>
-                      <field name="expired_date" invisible='1'/>
+                      <field name="expired_date" invisible="1"/>
                       <field name="description"/>
 
                       <button name="action_done" string="Realizado" type="object" icon="gtk-apply" attrs="{'invisible':[('state','=','done')]}"/>

+ 42 - 19
views/partner_view.xml

@@ -1,25 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <openerp>
   <data>
-    <record id="partner_form_buttons" model="ir.ui.view">
-      <field name="name">partner_form_buttons</field>
+    <record id="view_partner_form" model="ir.ui.view">
+      <field name="name">view_partner_form</field>
       <field name="model">res.partner</field>
       <field name="inherit_id" ref="base.view_partner_form"/>
-      <field name="priority" eval="50"/>
       <field name="arch" type="xml">
-        <xpath expr="//button[@name='schedule_meeting']" position="attributes">
-          <attribute name="invisible">1</attribute>
-        </xpath>
-        <xpath expr="//button[@name='%(crm.crm_case_categ_phone_incoming0)d']" position="attributes">
-          <attribute name="invisible">1</attribute>
-        </xpath>
-        <xpath expr="//button[@name='%(crm.crm_case_categ_phone_incoming0)d']" position="attributes">
-          <attribute name="invisible">1</attribute>
-        </xpath>
+
         <xpath expr="//field[@name='fax']" position="attributes">
           <attribute name="invisible">1</attribute>
         </xpath>
-        <notebook>
+        <xpath expr="//notebook[@colspan='4']" position="inside">
           <page string="Historial Tareas de CRM">
             <field name="task_ids" widget="many2one_clickable">
               <tree editable="top" colors="red:expired_date == True and state == 'pending';gray:state == 'cancel';green:state == 'pending'">
@@ -28,7 +19,7 @@
                 <field name="user_id" required="True"/>
                 <field name="date_action_next"/>
                 <field name="state"/>
-                <field name="expired_date" invisible='1'/>
+                <field name="expired_date" invisible="1"/>
                 <field name="description"/>
 
                 <button name="action_done" string="Realizado" type="object" icon="gtk-apply" attrs="{'invisible':[('state','=','done')]}"/>
@@ -38,11 +29,43 @@
               </tree>
             </field>
           </page>
-         </notebook>
-           <group col="3" position="inside">
-             <field name="instagram"/>
-             <button name="goto_instagram" string="Ir" type="object"/>
-           </group>
+
+        </xpath>
+
+      </field>
+    </record>
+
+    <record id="view_partner_social_form1" model="ir.ui.view">
+      <field name="name">view_partner_social_form1</field>
+      <field name="model">res.partner</field>
+      <field name="inherit_id" ref="partner_social_fields.view_partner_social_form1"/>
+      <field name="arch" type="xml">
+        <group col="3" position="inside">
+          <field name="instagram"/>
+          <button name="goto_instagram" string="Ir" type="object"/>
+        </group>
+      </field>
+    </record>
+
+    <record id="view_partners_form_crm1" model="ir.ui.view">
+      <field name="name">view_partners_form_crm1</field>
+      <field name="model">res.partner</field>
+      <field name="inherit_id" ref="crm.view_partners_form_crm1"/>
+      <field name="arch" type="xml">
+        <xpath expr="//button[@name='schedule_meeting']" position="attributes">
+          <attribute name="invisible">1</attribute>
+        </xpath>
+      </field>
+    </record>
+
+    <record id="view_partners_form_crm_calls" model="ir.ui.view">
+      <field name="name">view_partners_form_crm_calls</field>
+      <field name="model">res.partner</field>
+      <field name="inherit_id" ref="crm.view_partners_form_crm_calls"/>
+      <field name="arch" type="xml">
+        <xpath expr="//button[@name='%(crm.crm_case_categ_phone_incoming0)d']" position="attributes">
+          <attribute name="invisible">1</attribute>
+        </xpath>
       </field>
     </record>
   </data>