Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyecto
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

How to feeding a field with template by selecting a drop down list

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
v8dropdownlistemail_template
5220 Vistas
Avatar
NASHMIN YEGANEH

Hello!

Actually i would try to feeding a field (the field is "note = fields.Text") with email templates, so to do this i need to a drop down field + a templates data made in email.templates module + codes to putting it in my field in custom module.
so please any one know how to do this in that way?

version is 8

Many thanks for your kindly answers friends :)

this is part of my code to help get what i meant

********************************************************

class ResLetter(models.Model):
"""A register class to log all movements regarding letters"""
_name = 'res.letter'
_description = "Log of Letter Movements"
_inherit = 'mail.thread'

number = fields.Char(
help="Auto Generated Number of letter.",
default="/")
name = fields.Text(
string='Subject',
help="Subject of letter.")
move = fields.Selection(
[('in', 'و'), ('out', 'OUT')],
help="Incoming or Outgoing Letter.",
readonly=True,
default=lambda self: self.env.context.get('move', 'in'))

state = fields.Selection(
[
('draft', 'Draft'),
('sent', 'Sent'),
('rec', 'Received'),
('rec_bad', 'Received Damage'),
('rec_ret', 'Received But Returned'),
('cancel', 'Cancelled'),
],
default='draft',
readonly=True,
copy=False,
track_visibility='onchange',
help="""
* Draft: not confirmed yet.\n
* Sent: has been sent, can't be modified anymore.\n
* Received: has arrived.\n
* Received Damage: has been received with damages.\n
* Received But Returned: has been received but returned.\n
* Cancel: has been cancelled, can't be sent anymore."""
)

date = fields.Date(
string='Letter Date',
help='The letter\'s date.',
default=fields.Date.today)
snd_date = fields.Date(
string='Sent Date',
help='The date the letter was sent.')
rec_date = fields.Date(
string='Received Date',
help='The date the letter was received.')

def default_recipient(self):
move_type = self.env.context.get('move', False)
if move_type == 'in':
return self.env.user.company_id.partner_id

def default_sender(self):
move_type = self.env.context.get('move', False)
if move_type == 'out':
return self.env.user.company_id.partner_id

recipient_partner_id = fields.Many2one(
'res.partner',
string='Recipient',
track_visibility='onchange',
# required=True, TODO: make it required in 9.0
default=default_recipient)
sender_partner_id = fields.Many2one(
'res.partner',
string='Sender',
track_visibility='onchange',
# required=True, TODO: make it required in 9.0
default=default_sender)
note = fields.Text(
string='Delivery Notes',
help='Indications for the delivery officer.')

channel_id = fields.Many2one(
'letter.channel',
string="Channel",
help='Sent / Receive Source')

category_ids = fields.Many2many(
'letter.category',
string="Tags",
help="Classification of Document.")

folder_id = fields.Many2one(
'letter.folder',
string='Folder',
help='Folder which contains letter.')

type_id = fields.Many2one(
'letter.type',
string="Type",
help="Type of Letter, Depending upon size.")

weight = fields.Float(help='Weight (in KG)')
size = fields.Char(help='Size of the package.')

track_ref = fields.Char(
string='Tracking Reference',
help="Reference Number used for Tracking.")
orig_ref = fields.Char(
string='Original Reference',
help="Reference Number at Origin.")
expeditor_ref = fields.Char(
string='Expeditor Reference',
help="Reference Number used by Expeditor.")

parent_id = fields.Many2one(
'res.letter',
string='Parent',
groups='lettermgmt.group_letter_thread')
child_line = fields.One2many(
'res.letter',
'parent_id',
string='Letter Lines',
groups='lettermgmt.group_letter_thread')

reassignment_ids = fields.One2many(
'letter.reassignment',
'letter_id',
string='Reassignment lines',
help='Reassignment users and comments',
groups='lettermgmt.group_letter_reasignment')

# This field seems to be unused. TODO: Remove it?
extern_partner_ids = fields.Many2many(
'res.partner',
string='Recipients')

@api.model
def create(self, vals):
if ('number' not in vals) or (vals.get('number') in ('/', False)):
sequence = self.env['ir.sequence']
move_type = vals.get('move', self.env.context.get(
'default_move', self.env.context.get('move', 'in')))
vals['number'] = sequence.get('%s.letter' % move_type)
return super(ResLetter, self).create(vals)

@api.one
def action_cancel(self):
""" Put the state of the letter into Cancelled """
self.write({'state': 'cancel'})
return True

@api.one
def action_cancel_draft(self):
""" Go from cancelled state to draf state """
self.write({'state': 'draft'})
return True

@api.one
def action_send(self):
""" Put the state of the letter into sent """
self.write({
'state': 'sent',
'snd_date': self.snd_date or fields.Date.today()
})
return True

@api.one
def action_received(self):
""" Put the state of the letter into Received """
self.write({
'state': 'rec',
'rec_date': self.rec_date or fields.Date.today()
})
return True

@api.one
def action_rec_ret(self):
""" Put the state of the letter into Received but Returned """
self.write({
'state': 'rec_ret',
'rec_date': self.rec_date or fields.Date.today()
})
return True

@api.one
def action_rec_bad(self):
""" Put the state of the letter into Received but Damaged """
self.write({
'state': 'rec_bad',
'rec_date': self.rec_date or fields.Date.today()
})
return True
0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
how to call email templates with a custom module Resuelto
v8 email_template selectable
Avatar
Avatar
Avatar
Avatar
4
nov 19
14665
Email template is failed to render ? [SOLVED] Resuelto
v8 sale.order email_template
Avatar
Avatar
Avatar
Avatar
4
ene 19
33136
is it possible to use QWeb template when define a email template?
v8 qweb email_template
Avatar
Avatar
1
sept 16
4654
Default Outgoing server can't be recognize while using email templates in Odoo V8.
v8 email_template outgoing_server
Avatar
0
mar 15
4496
How to send Partner Mass Mail to partner and parters contacts, v8. Resuelto
mail v8 emailtemplate email_template
Avatar
Avatar
Avatar
Avatar
4
jun 18
10956
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now