trytondo-sale_opportunity_m.../prospect.py
camilogs ed3435c139
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
feat: Se crean relaciones entre ciudades y departamentos
2023-08-05 14:01:51 -05:00

35 lines
924 B
Python

# 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
class Prospect(ModelSQL, ModelView):
'Prospecto'
__name__ = 'sale.prospect'
name = fields.Char('Name')
city = fields.Char('City')
contact_methods = fields.One2Many(
'prospect.contact_method', 'prospect', 'Contact methods')
department = fields.Char('Department')
city_ = fields.Char('City')
class ContactMethod(ModelSQL, ModelView):
'Mecanismo de contacto'
__name__ = 'prospect.contact_method'
_rec_name = 'value'
_type = [
('phone', 'Phone'),
('mobile', 'Mobile'),
('mail', 'Mail')
]
contact_type = fields.Selection(_type, 'Contact type')
value = fields.Char('Value')
prospect = fields.Many2One('sale.prospect', 'Prospect')