feat(Call): Se hace visible unidad de negocio, actualizandose junto con el seguimiento de prospecto, closed #56
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Camilo Gonzalez 2023-08-24 14:11:05 -05:00
parent 4ffb654814
commit 8fa5d20ea6
5 changed files with 12 additions and 0 deletions

View File

@ -26,6 +26,12 @@ class Call(ModelSQL, ModelView):
call_result = fields.Selection(
CallResults.get_call_results(),
'Call result', states=_states)
call_business_unit = fields.Selection(
[('brigade', 'Brigade'),
('optics', 'Optics'),
('equipment', 'Equipment')],
'Business unit'
)
@classmethod
def __setup__(cls):

View File

@ -171,6 +171,7 @@ class MakeCall(Wizard):
call.description = self.start.description
call.interest = self.start.interest
call.prospect_trace = self.record
call.call_business_unit = self.record.prospect_business_unit
if call.interest == '0':
call.call_result = 'missed_call'

View File

@ -219,6 +219,8 @@ Verificar estado final del seguimiento del prospecto y sus llamadas
'first_call'
>>> prospect_trace.calls[0].date == date.today()
True
>>> prospect_trace.calls[0].call_business_unit
'brigade'
>>> prospect_trace.calls[1].call_result
'answered_call'

View File

@ -18,4 +18,6 @@ this repository contains the full copyright notices and license terms. -->
<label name="call_result"/>
<field name="call_result"/>
<label name="call_business_unit"/>
<field name="call_business_unit"/>
</form>

View File

@ -8,4 +8,5 @@ this repository contains the full copyright notices and license terms. -->
<field name="call_result" expand="1"/>
<field name="prospect_trace" expand="1"/>
<field name="description" expand="1"/>
<field name="call_business_unit" expand="1"/>
</tree>