mirror of
https://bitbucket.org/presik/trytonpsk-crm_fiduprevisora.git
synced 2023-12-14 05:33:07 +01:00
minor fix
This commit is contained in:
parent
04f7d25c12
commit
33004804e4
|
@ -25,8 +25,6 @@ NEW_MEDIA = new_sel = [
|
|||
]
|
||||
|
||||
|
||||
|
||||
|
||||
class ReceiverService(ModelSQL, ModelView):
|
||||
'Receicer Service'
|
||||
__name__ = 'crm.receiver_service'
|
||||
|
@ -105,8 +103,8 @@ class CustomerService(metaclass=PoolMeta):
|
|||
id_document = fields.Char('Document')
|
||||
email = fields.Char('Email')
|
||||
sended_mail = fields.Boolean('Sended Email')
|
||||
attach_customer_1 = fields.Char('Attach Customer ...', readonly=True)
|
||||
attach_customer_2 = fields.Char('Attach Customer ...', readonly=True)
|
||||
attach_customer_1 = fields.Char('Attach Customer Web...', readonly=True)
|
||||
attach_customer_2 = fields.Char('Attach Customer Web...', readonly=True)
|
||||
attachments = fields.One2Many('crm.fiduprevisora.attachments',
|
||||
'service', 'Attachments')
|
||||
other_receivers = fields.One2Many('crm.customer_receiver',
|
||||
|
@ -192,9 +190,8 @@ class CustomerService(metaclass=PoolMeta):
|
|||
return
|
||||
res = cls.validate_service(services)
|
||||
service = services[0]
|
||||
# super(CustomerService, cls).open(services)
|
||||
if res['status'] == 'success':
|
||||
service.set_number()
|
||||
super(CustomerService, cls).open(services)
|
||||
if service.email or service.party.email:
|
||||
service.send_email_notification(
|
||||
service.email or service.party.email
|
||||
|
@ -203,6 +200,12 @@ class CustomerService(metaclass=PoolMeta):
|
|||
else:
|
||||
cls.write([service], {'state': 'cancelled', 'notes': res['msg']})
|
||||
if service.media == 'web':
|
||||
res['customer'] = service.party.name
|
||||
res['media'] = 'web'
|
||||
res['city_region'] = {
|
||||
'id': service.party.city_attention.id,
|
||||
'name': service.party.city_attention.name,
|
||||
}
|
||||
return res
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in a new issue