chore: se formatean archivos estilo pep8
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Jovany Leandro G.C bit4bit@riseup.net 2023-08-03 16:08:44 -05:00
parent dc649a80b5
commit 5113ad0289
5 changed files with 23 additions and 18 deletions

View File

@ -6,4 +6,4 @@ class CallTypes():
('followup_call', 'Follow up call'),
]
return call_types
return call_types

View File

@ -8,4 +8,4 @@ class Interest():
('3', '3 - Interés alto, generar venta')
]
return interest_levels
return interest_levels

View File

@ -1,12 +1,13 @@
from trytond.model import ModelSQL, ModelView, fields
from trytond.model import ModelSQL, ModelView, fields
from datetime import date
from .Util.interest import Interest
from .Util.call_types import CallTypes
class Call(ModelSQL, ModelView):
'Llamada'
__name__ = 'sale.call'
date = fields.Date('Date')
@ -19,4 +20,4 @@ class Call(ModelSQL, ModelView):
@classmethod
def default_date(cls):
return date.today()
return date.today()

View File

@ -1,6 +1,7 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model import ModelSQL, ModelView, fields
from trytond.model import ModelSQL, ModelView, fields
class Prospect(ModelSQL, ModelView):
'Prospecto'
@ -9,14 +10,15 @@ class Prospect(ModelSQL, ModelView):
name = fields.Char('Name')
city = fields.Char('City')
contact_methods = fields.One2Many('prospect.contact_method', 'prospect', 'Contact methods')
contact_methods = fields.One2Many(
'prospect.contact_method', 'prospect', 'Contact methods')
class ContactMethod(ModelSQL, ModelView):
'Mecanismo de contacto'
__name__ = 'prospect.contact_method'
_rec_name = 'value'
_type = [
('phone', 'Phone'),
('mobile', 'Mobile'),
@ -27,4 +29,3 @@ class ContactMethod(ModelSQL, ModelView):
value = fields.Char('Value')
prospect = fields.Many2One('sale.prospect', 'Prospect')

View File

@ -1,23 +1,27 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model import ModelSQL, ModelView, fields
from trytond.model import ModelSQL, ModelView, fields
from .Util.interest import Interest
class ProspectTrace(ModelSQL, ModelView):
'Seguimiento de un prospecto'
__name__ = 'sale.prospect_trace'
prospect = fields.Many2One('sale.prospect', 'Prospect')
prospect_name = fields.Char('Name')
prospect_contact = fields.Many2One('prospect.contact_method', 'Contact method')
prospect_city = fields.Char('City')
prospect_contact = fields.Many2One(
'prospect.contact_method', 'Contact method')
prospect_city = fields.Char('City')
calls = fields.One2Many('sale.call', 'prospect_trace', "Calls")
calls = fields.One2Many('sale.call', 'prospect_trace', "Calls")
_interest_field_type = fields.Selection(
Interest.get_interest_levels(), 'Interest')
current_interest = fields.Function(
_interest_field_type, '_get_current_interest')
_interest_field_type = fields.Selection(Interest.get_interest_levels(), 'Interest')
current_interest = fields.Function(_interest_field_type, '_get_current_interest')
@fields.depends('prospect')
def on_change_prospect(self):
if self.prospect:
@ -26,4 +30,3 @@ class ProspectTrace(ModelSQL, ModelView):
def _get_current_interest(self, name):
return self.calls[-1].interest