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

Can´t write file on Linux server

Iscriviti

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

La domanda è stata contrassegnata
moduleswritelinuxpyhtonodooV8
2 Risposte
6941 Visualizzazioni
Avatar
Hannes Hörting

Hello!


A freelancer build a module to write information on a FTP server. He generate the file local and copy after on the FTP.

But on my odoo Server the Phyton script can´t write on filesystem:


Traceback (most recent call last):

File "/opt/odoo/odoo-server/openerp/http.py", line 536, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/opt/odoo/odoo-server/openerp/http.py", line 573, in dispatch

result = self._call_function(**self.params)

File "/opt/odoo/odoo-server/openerp/http.py", line 309, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/opt/odoo/odoo-server/openerp/service/model.py", line 113, in wrapper

return f(dbname, *args, **kwargs)

File "/opt/odoo/odoo-server/openerp/http.py", line 306, in checked_call

return self.endpoint(*a, **kw)

File "/opt/odoo/odoo-server/openerp/http.py", line 802, in __call__

return self.method(*args, **kw)

File "/opt/odoo/odoo-server/openerp/http.py", line 402, in response_wrap

response = f(*args, **kw)

File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 941, in call_button

action = self._call_kw(model, method, args, {})

File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 929, in _call_kw

return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)

File "/opt/odoo/odoo-server/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/opt/odoo/odoo-addons/ftp_connection/ftp_connect.py", line 60, in create_file

f = open(filename, 'w')

IOError: [Errno 13] Keine Berechtigung: 'WHOUT00023.txt'


It seems not a problem with unsuffient permisson on Linux. It seems that Python cannot write because of odoo.

Has some an idea, or need you more code from the python script?


Thank you!!

0
Avatar
Abbandona
Avatar
Hannes Hörting
Autore Risposta migliore

Hello!


Thank you .. i found now the problem.

I also try to use a direct path to an folder ... but I has to restart odoo, after changes on the .py file.

So now it works, thank you!

0
Avatar
Abbandona
Avatar
Axel Mendoza
Risposta migliore

If you will save a temporary file better use a named file that is a temporary file so permissions are not involved. if you need the file in an specific folder then you need to check permission for the user that runs Odoo server, but if you will save the file in an FTP location better use a temporary file, I deal with this before. An Example of using NamedTemporaryFile

from tempfile import NamedTemporaryFile
named_zip = NamedTemporaryFile( suffix=".tmp", prefix="tmp__h2h__", delete=False )# or default True for delete the file after the first use
#to get filename
named_zip.name
named_zip.close() 



0
Avatar
Abbandona
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à
Module Install Error! Risolto
modules odooV8
Avatar
Avatar
1
dic 22
7163
Delete module from module list Risolto
modules odooV8
Avatar
Avatar
Avatar
2
giu 20
43902
models.py code to open a text file and append string , the text file is inside the odoo module (V8)
pyhton odooV8
Avatar
0
ago 18
4387
set current time in date field
write odooV8
Avatar
Avatar
1
giu 16
9185
runtime error cannot set daemon status of active thread
threading pyhton odooV8
Avatar
0
mag 22
11484
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