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'), ('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') ('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 datetime import date
from .Util.interest import Interest from .Util.interest import Interest
from .Util.call_types import CallTypes from .Util.call_types import CallTypes
class Call(ModelSQL, ModelView): class Call(ModelSQL, ModelView):
'Llamada' 'Llamada'
__name__ = 'sale.call' __name__ = 'sale.call'
date = fields.Date('Date') date = fields.Date('Date')
@ -19,4 +20,4 @@ class Call(ModelSQL, ModelView):
@classmethod @classmethod
def default_date(cls): 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 file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms. # 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): class Prospect(ModelSQL, ModelView):
'Prospecto' 'Prospecto'
@ -9,14 +10,15 @@ class Prospect(ModelSQL, ModelView):
name = fields.Char('Name') name = fields.Char('Name')
city = fields.Char('City') 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): class ContactMethod(ModelSQL, ModelView):
'Mecanismo de contacto' 'Mecanismo de contacto'
__name__ = 'prospect.contact_method' __name__ = 'prospect.contact_method'
_rec_name = 'value' _rec_name = 'value'
_type = [ _type = [
('phone', 'Phone'), ('phone', 'Phone'),
('mobile', 'Mobile'), ('mobile', 'Mobile'),
@ -27,4 +29,3 @@ class ContactMethod(ModelSQL, ModelView):
value = fields.Char('Value') value = fields.Char('Value')
prospect = fields.Many2One('sale.prospect', 'Prospect') 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 file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms. # 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 from .Util.interest import Interest
class ProspectTrace(ModelSQL, ModelView): class ProspectTrace(ModelSQL, ModelView):
'Seguimiento de un prospecto' 'Seguimiento de un prospecto'
__name__ = 'sale.prospect_trace' __name__ = 'sale.prospect_trace'
prospect = fields.Many2One('sale.prospect', 'Prospect') prospect = fields.Many2One('sale.prospect', 'Prospect')
prospect_name = fields.Char('Name') prospect_name = fields.Char('Name')
prospect_contact = fields.Many2One('prospect.contact_method', 'Contact method') prospect_contact = fields.Many2One(
prospect_city = fields.Char('City') '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') @fields.depends('prospect')
def on_change_prospect(self): def on_change_prospect(self):
if self.prospect: if self.prospect:
@ -26,4 +30,3 @@ class ProspectTrace(ModelSQL, ModelView):
def _get_current_interest(self, name): def _get_current_interest(self, name):
return self.calls[-1].interest return self.calls[-1].interest