Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

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

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
v8dropdownlistemail_template
5216 Widoki
Awatar
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
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
how to call email templates with a custom module Rozwiązane
v8 email_template selectable
Awatar
Awatar
Awatar
Awatar
4
lis 19
14660
Email template is failed to render ? [SOLVED] Rozwiązane
v8 sale.order email_template
Awatar
Awatar
Awatar
Awatar
4
sty 19
33127
is it possible to use QWeb template when define a email template?
v8 qweb email_template
Awatar
Awatar
1
wrz 16
4650
Default Outgoing server can't be recognize while using email templates in Odoo V8.
v8 email_template outgoing_server
Awatar
0
mar 15
4487
How to send Partner Mass Mail to partner and parters contacts, v8. Rozwiązane
mail v8 emailtemplate email_template
Awatar
Awatar
Awatar
Awatar
4
cze 18
10952
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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