mirror of
https://bitbucket.org/presik/trytonpsk-crm_fiduprevisora.git
synced 2023-12-14 05:33:07 +01:00
traslate
This commit is contained in:
parent
1155bccfdc
commit
e8b31acd6c
3 changed files with 19 additions and 13 deletions
|
@ -398,28 +398,34 @@ class CustomerService(metaclass=PoolMeta):
|
||||||
days_diference = datetime.now() - self.cs_date
|
days_diference = datetime.now() - self.cs_date
|
||||||
if self.media == 'supersalud':
|
if self.media == 'supersalud':
|
||||||
if self.classification == 'reclamo_riesgo_vital' and self.state == 'open':
|
if self.classification == 'reclamo_riesgo_vital' and self.state == 'open':
|
||||||
return 'Higher'
|
# return 'Higher'
|
||||||
|
return 'Alto'
|
||||||
if self.classification == 'reclamo_riesgo_priorizado' and self.state == 'open':
|
if self.classification == 'reclamo_riesgo_priorizado' and self.state == 'open':
|
||||||
if days_diference.days == 0:
|
if days_diference.days == 0:
|
||||||
return 'Medium'
|
# return 'Medium'
|
||||||
|
return 'Medio'
|
||||||
if days_diference.days >= 1:
|
if days_diference.days >= 1:
|
||||||
return 'Higher'
|
# return 'Higher'
|
||||||
|
return 'Alto'
|
||||||
if self.classification == 'reclamo_riesgo_simple' and self.state == 'open':
|
if self.classification == 'reclamo_riesgo_simple' and self.state == 'open':
|
||||||
if days_diference.days >= 2:
|
if days_diference.days >= 2:
|
||||||
return 'Higher'
|
# return 'Higher'
|
||||||
|
return 'Alto'
|
||||||
if days_diference.days >= 1:
|
if days_diference.days >= 1:
|
||||||
return 'Medium'
|
# return 'Medium'
|
||||||
return 'low'
|
return 'Medio'
|
||||||
|
# return 'low'
|
||||||
|
return 'Bajo'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def search_current_risk(cls, name, clause):
|
def search_current_risk(cls, name, clause):
|
||||||
cursor = Transaction().connection.cursor()
|
cursor = Transaction().connection.cursor()
|
||||||
if clause[2] == 'Higher':
|
if clause[2] == 'higher':
|
||||||
query = f"""select id from crm_customer_service where (state='open' AND media='supersalud') AND
|
query = f"""select id from crm_customer_service where (state='open' AND media='supersalud') AND
|
||||||
((classification='reclamo_riesgo_vital') OR
|
((classification='reclamo_riesgo_vital') OR
|
||||||
(DATE_PART('day', CURRENT_DATE - cs_date) > 0 AND classification='reclamo_riesgo_priorizado') OR
|
(DATE_PART('day', CURRENT_DATE - cs_date) > 0 AND classification='reclamo_riesgo_priorizado') OR
|
||||||
(DATE_PART('day', CURRENT_DATE - cs_date) > 1 AND classification='reclamo_riesgo_simple'));"""
|
(DATE_PART('day', CURRENT_DATE - cs_date) > 1 AND classification='reclamo_riesgo_simple'));"""
|
||||||
elif clause[2] == 'Medium':
|
elif clause[2] == 'medium':
|
||||||
query = f"""select id from crm_customer_service where (state='open' AND media='supersalud') AND
|
query = f"""select id from crm_customer_service where (state='open' AND media='supersalud') AND
|
||||||
((DATE_PART('day', CURRENT_DATE - cs_date)=0 AND classification='reclamo_riesgo_priorizado') OR
|
((DATE_PART('day', CURRENT_DATE - cs_date)=0 AND classification='reclamo_riesgo_priorizado') OR
|
||||||
(DATE_PART('day', CURRENT_DATE - cs_date)=1 AND classification='reclamo_riesgo_simple'));"""
|
(DATE_PART('day', CURRENT_DATE - cs_date)=1 AND classification='reclamo_riesgo_simple'));"""
|
||||||
|
|
|
@ -262,7 +262,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<field name="name">Higher</field>
|
<field name="name">Higher</field>
|
||||||
<field name="sequence" eval="90"/>
|
<field name="sequence" eval="90"/>
|
||||||
<field name="domain" eval="[
|
<field name="domain" eval="[
|
||||||
('current_risk', '=', 'Higher'),
|
('current_risk', '=', 'higher'),
|
||||||
('state', '=', 'open'),
|
('state', '=', 'open'),
|
||||||
]" pyson="1"/>
|
]" pyson="1"/>
|
||||||
<field name="act_window" ref="crm.act_customer_service_form"/>
|
<field name="act_window" ref="crm.act_customer_service_form"/>
|
||||||
|
@ -272,7 +272,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<field name="sequence" eval="90"/>
|
<field name="sequence" eval="90"/>
|
||||||
<field name="domain" eval="[
|
<field name="domain" eval="[
|
||||||
('state', '=', 'open'),
|
('state', '=', 'open'),
|
||||||
('current_risk', '=', 'Medium')
|
('current_risk', '=', 'medium')
|
||||||
]" pyson="1"/>
|
]" pyson="1"/>
|
||||||
<field name="act_window" ref="crm.act_customer_service_form"/>
|
<field name="act_window" ref="crm.act_customer_service_form"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -413,17 +413,17 @@ msgstr "Reporte Fiduprevisora"
|
||||||
msgctxt ""
|
msgctxt ""
|
||||||
"model:ir.action.act_window.domain,name:act_customer_service_form_domain_higher"
|
"model:ir.action.act_window.domain,name:act_customer_service_form_domain_higher"
|
||||||
msgid "Higher"
|
msgid "Higher"
|
||||||
msgstr ""
|
msgstr "Alto"
|
||||||
|
|
||||||
msgctxt ""
|
msgctxt ""
|
||||||
"model:ir.action.act_window.domain,name:act_customer_service_form_domain_low"
|
"model:ir.action.act_window.domain,name:act_customer_service_form_domain_low"
|
||||||
msgid "Low"
|
msgid "Low"
|
||||||
msgstr ""
|
msgstr "Bajo"
|
||||||
|
|
||||||
msgctxt ""
|
msgctxt ""
|
||||||
"model:ir.action.act_window.domain,name:act_customer_service_form_domain_medium"
|
"model:ir.action.act_window.domain,name:act_customer_service_form_domain_medium"
|
||||||
msgid "Medium"
|
msgid "Medium"
|
||||||
msgstr ""
|
msgstr "Medio"
|
||||||
|
|
||||||
msgctxt "model:ir.ui.menu,name:"
|
msgctxt "model:ir.ui.menu,name:"
|
||||||
msgid "Cities"
|
msgid "Cities"
|
||||||
|
|
Loading…
Reference in a new issue