Commit 80c71e4b by Maria Agustina

312 comienzos

1 parent e777dc0e
......@@ -19,7 +19,8 @@
'version': '2020.12.15.0',
# any module necessary for this one to work correctly
'depends': ['base',
'depends': [
'base',
'hgt_pm',
'asw_crm',
],
......
# -*- coding: utf-8 -*-
from . import models
\ No newline at end of file
from . import instituciones
from . import contactos
\ No newline at end of file
No preview for this file type
No preview for this file type
# -*- coding: utf-8 -*-
from odoo import models, fields, api
class asw_contactos(models.Model):
_inherit = 'asw.contactos'
llamada = fields.Many2one(
string='Llamada',
comodel_name='hgt.llamada_pendiente',
ondelete='restrict',
)
# -*- coding: utf-8 -*-
from odoo import models, fields, api
class instituciones(models.Model):
_inherit = 'hgt.instituciones'
llamada = fields.Many2one(
string='Llamada',
comodel_name='hgt.llamada_pendiente',
ondelete='restrict',
)
# -*- coding: utf-8 -*-
from odoo import models, fields, api
# class my_module(models.Model):
# _name = 'my_module.my_module'
# name = fields.Char()
# value = fields.Integer()
# value2 = fields.Float(compute="_value_pc", store=True)
# description = fields.Text()
#
# @api.depends('value')
# def _value_pc(self):
# self.value2 = float(self.value) / 100
\ No newline at end of file
# -*- coding: utf-8 -*-
from odoo import models, fields, api
class hgt_llamada_pendiente(models.TransientModel):
_name = 'hgt.llamada_pendiente'
organizacion = fields.One2many(
string=u'Organización',
comodel_name='hgt.instituciones',
inverse_name='llamada',
)
fecha_llamada = fields.Datetime(
string='Fecha y hora de la llamada',
)
fecha_hoy = fields.Date(
string='Fecha del acuerdo',
default=fields.Date.context_today,
)
medio = fields.Selection(
string=u'Medio',
selection=[('tel', 'Teléfono'), ('wpp', 'Whatsapp'), ('mail', 'E-Mail'),]
)
#desp generar algun metodo para q ponga contactos de la organiacion nomas
contacto = fields.One2many(
string='Contacto',
comodel_name='asw.contactos',
inverse_name='llamada',
)
otro = fields.Boolean(
string='Otro?',
)
#si otro es True que aparezcan estos campos y al guardar cree el contacto
otro_nombre = fields.Char(
string='Nombre',
uppercase=True,
required=True
)
#segun el medio q se haya elegido corroborar q este ingresado ese dato
otro_telefono = fields.Char(
string=u'Teléfono',
)
otro_email = fields.Char(
string='Email',
)
otro_celular = fields.Char(
string='Celular',
)
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!