Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

How to work with ir.attachment in Odoo 8?

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
pdfdatabasefilestorefilenameir.attachment
1 Rispondi
21498 Visualizzazioni
Avatar
Pascal Tremblay

Hey guy,

Other questions here. 

Document module is well installed. We are on Odoo 8 nightly build.

When we go in Setting->Database Structure->Attachments, we many icons of our reports an attachments.


1) If we prefer to store our attachments in a external filestore, should they appear there too?

2) In this place, can we only see attachment stored in database?


3) And you guys, do you use this ir_attachment.location parameter in the setting of Odoo 8???



4) It is impossible to write any PDF report in the filestore (on disk). We can not see them in settings -> Database Structure -> Attachment, anymore... It worked before!!!??!!!  See image above.... We can see any PDF there... But now, it doesn't work.


5) I have made a search in all the directory of our odoo installations. No trace of any PDF there... It is magic.... Where are my report????? When it is written on the web that we can store our attachment on a disk filestore, does it include also the PDF REPORTS?????


Thanks to help or discuss any of my questions.

1
Avatar
Abbandona
Avatar
Temur
Risposta migliore

We had some discussion about the topic here. It covers at least 4 and 5.

UPDATE:

1) Currently it's other way around: if we prefer to store files in database, then we have to configure it to be this way. by default files are stored in filestore, we do not have to configure anything. Files are stored in filestore and naturally they appear there. Thus, database records ("ir.attachment") are necessary as they are pointing to actual files in the filestore. 

2) In this place we see ir.attachment records, any of them may have actual file saved in filestore or in database. It does not matter where file is stored, in database or in filestore, here we can see all ir.attachment records.

3) this setting determine where files are actually stored. value 'file' is default and it means that files will be stored in the filestore. value 'db' means that files will be stored in the database, you can set it to 'db'. also possible use some path, I tried to use path in v7 but it become relative path under filestore... for path you can check how it works for v8. also you can implement support for other storage engines, refer to ir_attachment code. Note: if we change this setting, it'll affect only new records. i.e. if it was set to 'file' and we changed to 'db', then old files will stay where they are in filestore, but new files will be stored in database, and so on.

4) if you interested to do it yourself, then this is completely cowered in the thread that I've referred in the beginning. i.e. create file (csv) and save it using ir.attachment. only difference is that in your case file type is pdf, this difference does not make big deal. But if you just worry that now, it doesn't work... then I can assure you that it works like a charm.

5) Also cowered in the referred thread. files on the disk are NOT saved with it's original names, but using hash code of it's content (used sha1 of content, part of hash used for parent directory of actual file). that's why you can't find the file you search with it's name, but files are there. file names are stored in the database, in ir.attachment. if it's absolutely necessary you can find file on the disk if you know or can compute it's sha1 hash code. you'll find the file under filestore, under directory with a name matching the start (left part) of hashcode. as you find the correct one and you know it's original name, you can rename it (or just add .pdf extension) and open with some pdfreader.


3
Avatar
Abbandona
Pascal Tremblay
Autore

Thanks. Someone else?

Temur

Updated. Added answers to 1, 2 and 3. Also added notes for 4 and 5.

Pascal Tremblay
Autore

Big big big thanks! We analyze each one of your words and we come back with our comments.

Temur

You're welcome.

Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
How to store programmatically created file in ir.attachment
pdf attachment filestore filename odoo
Avatar
Avatar
Avatar
2
set 23
12766
database backup keep getting corrupted
database filestore odoo16
Avatar
Avatar
2
mar 25
2173
How to avoid storing pdf invoices in the filestore?
pdf invoice filestore
Avatar
Avatar
2
apr 24
2974
ir_attachment_force_storage then files not found
database filestore attachments
Avatar
0
ago 18
4509
Invoice number into the pdf file name Risolto
pdf invoice filename
Avatar
Avatar
Avatar
Avatar
Avatar
27
ago 24
41706
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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