İç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

Non-dict expression

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
buttonformview
2 Cevaplar
3634 Görünümler
Avatar
Guilherme

Hello guys, yesterday i've make a button in my odoo module and that button have the action created is .py file but the only code i put there was "return True;" just for me was able to see if the buttons is working or not, and until yesterday the button was working, today the button doesn't work give me the error "Non-dict expression"...




I'll post my code bellow:   


And the code in .py file is: 

def teste_butao(self):

    returnTrue;


Anyone can help me with this please? 

Appreciate your time and afford already, tks!

0
Avatar
Vazgeç
loay elhaj

Could you copy & share full error message

Avatar
Guilherme
Üretici En İyi Yanıt

Remove the " attrs="required" " of "  " and solve the problem!

0
Avatar
Vazgeç
Avatar
loay elhaj
En İyi Yanıt

Try to replace return True and add pass

1
Avatar
Vazgeç
Guilherme
Üretici

@loay elhaj, the full error message is this(maybe the xml part will be executed but i edit my post and now i have a print of the xml part where it gives me an error):

Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 677, in _tag_root
f(rec)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 580, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4220, in _load_records
data['record']._load_records_write(data['values'])
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1841, in _load_records_write
super(View, self)._load_records_write(values)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4149, in _load_records_write
self.write(values)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 500, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3703, in write
fields[0].determine_inverse(real_recs)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1187, in determine_inverse
getattr(records, self.inverse)()
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 300, in _inverse_arch
view.write(data)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 500, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3693, in write
real_recs._validate_fields(vals, inverse_fields)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1266, in _validate_fields
check(self)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 411, in _check_xml
)).with_traceback(e.__traceback__) from None
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 391, in _check_xml
view.postprocess_and_fields(view_doc, validate=True)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 850, in postprocess_and_fields
arch, name_manager = self._postprocess_view(node, model, validate=validate)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 862, in _postprocess_view
self.postprocess(node, [], editable, name_manager)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 962, in postprocess
self.postprocess(child, current_node_path, node_info['editable'], name_manager)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 962, in postprocess
self.postprocess(child, current_node_path, node_info['editable'], name_manager)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 962, in postprocess
self.postprocess(child, current_node_path, node_info['editable'], name_manager)
[Previous line repeated 1 more time]
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 954, in postprocess
self._validate_attrs(node, name_manager, node_info)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1301, in _validate_attrs
for key, val_ast in get_dict_asts(expr).items():
File "/usr/lib/python3/dist-packages/odoo/tools/view_validation.py", line 88, in get_dict_asts
raise ValueError("Non-dict expression")
odoo.exceptions.ValidationError: Error while validating view:

Non-dict expression

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 683, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 347, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 912, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 531, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1398, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1386, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-78>", line 2, in button_immediate_upgrade
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 654, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 593, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 89, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 457, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 349, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 69, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 733, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 799, in convert_xml_import
obj.parse(doc.getroot())
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 719, in parse
self._tag_root(de)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 685, in _tag_root
)) from e
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /mnt/extra-addons/insurance/views/prospect_view.xml:3, near
<record id="view_prospect_form" model="ir.ui.view">
<field name="name">prospect.form</field>
<field name="model">prospect</field>
<field name="arch" type="xml">
<form create="false">
<sheet>
<h1>Prospeção nº <field name="num_prospect"/> </h1>
<group>
<group>
<!--What appears when you click for more information-->
<field name="name" attrs="required"/>
<field name="email_client"/>
<field name="tlm_client"/>

</group>
<group>
<field name="num_prospect"/>
<field name="ent_prospect"/>
<field name="situation"/>
</group>
</group>

<notebook name="notebook"> <!-- attrs="{'invisible': [('name', '=', 'null')]}" -->
<page string="Produto">
<p><h3>Dados de Risco</h3></p>
<group>
<group>
<field name="insurance_type"/>
</group>
<group>
</group>
<group>
<p attrs="{'invisible': [('insurance_type', '!=', 'option2'), ('insurance_type', '!=', 'option3'), ('insurance_type', '!=', 'option4')]}">
Página ainda em desenvolvimento...
</p>

<field name="a_id" attrs="{'invisible': [('insurance_type', '!=', 'option1')]}"/>
<field name="license" attrs="{'invisible': [('insurance_type', '!=', 'option1')]}"/>
<field name="month_year_license" attrs="{'invisible': [('insurance_type', '!=', 'option1')]}"/>
</group>
<group>
<field name="brand" attrs="{'invisible': [('insurance_type', '!=', 'option1')]}"/>
<field name="model" attrs="{'invisible': [('insurance_type', '!=', 'option1')]}"/>
<field name="version" attrs="{'invisible': [('insurance_type', '!=', 'option1')]}"/>
</group>
</group>
<group>
<field name="results" attrs="{'invisible': [('insurance_type', '!=', 'option1')]}"/>
</group>
<group>
<button name="teste_butao" string="Adicionar Simulação"/>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>

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
Process a file using JS on client
javascript button formview
Avatar
0
Mar 24
1908
Show a button in form view, when in view mode, and hide in edit mode Çözüldü
hide button formview
Avatar
Avatar
Avatar
Avatar
3
Oca 24
15268
How to display form or tree view with some fields when click is made on button?
treeview button formview
Avatar
Avatar
2
Mar 15
8027
V17 Tree, Form view Çözüldü
formview
Avatar
1
Mar 25
2731
Create new record by opening a new form on a button click Çözüldü
form button formview odoo12
Avatar
Avatar
Avatar
2
Tem 23
784
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