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

@ -4,6 +4,7 @@ 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'

View File

@ -2,6 +2,7 @@
# 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'
__name__ = 'sale.prospect' __name__ = 'sale.prospect'
@ -9,7 +10,8 @@ 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):
@ -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

@ -3,6 +3,7 @@
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'
@ -10,13 +11,16 @@ class ProspectTrace(ModelSQL, ModelView):
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.contact_method', 'Contact method')
prospect_city = fields.Char('City') 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') _interest_field_type = fields.Selection(
current_interest = fields.Function(_interest_field_type, '_get_current_interest') 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):
@ -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