İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

[Odoo 11] Error uploading a file through custom model

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
binarybinaryfieldodoo
1 Cevapla
6631 Görünümler
Avatar
Nicolás Mena

I'm trying to upload a file in the a custom model but I'm getting the following error:

aError:
Uncaught TypeError: Cannot read property 'clone' of undefined
http://odoo:8069/web/content/3752-d2319e5/web.assets_backend.js:957
Rastreo de error:
TypeError: Cannot read property 'clone' of undefined
at Object.formatDateTime [as datetime] (http://odoo:8069/web/content/3752-d2319e5/web.assets_backend.js:957:69)
at Class._renderBodyCell (http://odoo:8069/web/content/3752-d2319e5/web.assets_backend.js:1575:137)
at http://odoo:8069/web/content/3752-d2319e5/web.assets_backend.js:1593:132
at Function._.map._.collect (http://odoo:8069/web/content/3751-9f77f21/web.assets_common.js:13:270)
at Class._renderRow [as _super] (http://odoo:8069/web/content/3752-d2319e5/web.assets_backend.js:1593:82)
at Class._renderRow (http://odoo:8069/web/content/3752-d2319e5/web.assets_backend.js:1538:71)
at Class._renderRow (http://odoo:8069/web/content/3751-9f77f21/web.assets_common.js:3814:371)
at Function._.map._.collect (http://odoo:8069/web/content/3751-9f77f21/web.assets_common.js:13:270)
at Class._renderRows (http://odoo:8069/web/content/3752-d2319e5/web.assets_backend.js:1594:85)
at Class._renderRows (http://odoo:8069/web/content/3752-d2319e5/web.assets_backend.js:1539:53)
There is my code

class partner_document(models.Model):    
_name = "partner.document"
_rec_name = "doc_type"
global function_env
function_env = 'pecuchile.partner.functions'
partner_id = fields.Many2one('res.partner', string=u"Tercero", ondelete="cascade")
doc_type = fields.Selection([(u'cover_letter', u'Carta de respaldo'),
(u'dni', u'DNI'),
                                 (u'rut', u'RUT'),
                                 (u'institution_document', u'RUT Tributario'),
(u'other', u'Otro') ], string=u"Tipo de documento",

required=True)
document_filename = fields.Char(string=u"Nombre de archivo")
document = fields.Binary(string=u"Archivo")
description = fields.Text(string=u"Descripción") 
rut_serie = fields.Char(string=u"Número/Serie")
 
comment = fields.Text(string=u"Comentarios adicionales")
still_valid = fields.Selection([(u'valid', u'Documento Válido'),
(u'invalid', u'Documento caducado')
                                ], default=u'valid', string=u"Validez", required=True)
additional_data = fields.Boolean(string=u"¿Información adicional?")

The model partner_document its called from another model (an extended version of res.partner) whit this declaration:

document_ids = fields.One2many('partner.document', 'partner_id', string=u"Documentos")

I've tried with different widgets and field declarations, but all ends in the same error message.

Regards

0
Avatar
Vazgeç
Avatar
Nicolás Mena
Üretici En İyi Yanıt

Finally I've solved my problem, the issue was generated by the create_date field In my view, because when you create a new record through a M2O (I suppose is the same for O2M or M2M fields), the recordas are not saved to the database until you  save the parent record. So I've removed the create_date from the view and solved my issue.

Now im going to make a calculated field for the creation date of the record.

0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
Odoo 12 - Binary Field get Binary Data from that Field Çözüldü
binary binaryfield
Avatar
Avatar
2
Şub 23
11099
How to write back data table into Excel file after modifying on the table which is read out from a Excel file?
binary binaryfield
Avatar
0
Tem 16
5381
How do I download a file from tree view using widget="binary" but retaining its original file name? Çözüldü
treeview widget binary binaryfield
Avatar
Avatar
2
Eyl 23
19111
How can we save binary Images into the filesysytem instead of database ? Çözüldü
image filestore binary binaryfield
Avatar
Avatar
1
Ara 22
6717
How to provide mime type to binary file?
base64 binary binaryfield mimetype
Avatar
Avatar
1
May 21
10366
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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