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

Error "Invalid name definition" when installing module

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
moduleodoov11
5656 Görünümler
Avatar
Sebastian782

I try to install a custom module with no problem I think (here is the code: 


class pb_orders_products(models.Model):


_name = "pb.orders.products"

_inherit = ['mail.thread']

_rec_name = "id"


reseller_private_product_id = fields.Integer(string='Ext. ID', size=128, required=True)

finalcustomer_id = fields.Many2one(comodel_name='pb.finalcustomers', inverse_name='id', string='Final Customer ID', required=True)

order_id = fields.Many2one(comodel_name='sale.order', inverse_name='id', string='SO', required=True)

purchase_order_id = fields.Many2one(comodel_name='purchase.order', inverse_name='id', string='PO', required=False)

measurements_id = fields.Many2one(comodel_name='pb.finalcustomers.measurements', inverse_name='id', string='Measurements ID', required=True)

product_type_id = fields.Selection([

('1', 'Shirt'),

('2', 'Suit'),

('3', 'Jacket'),

('4', 'Trouser'),

('5', 'Waiscoat'),

('6', 'Tie'),

('7', 'Belt'),

('8', 'Shoes'),

], string='Product', required=True)

product_quantity = fields.Char(string='Quantity', size=128, required=True)

fabric_id = fields.Many2one(comodel_name='pb.fabrics', inverse_name='id', string='Fabric', required=False)

date_received = fields.Date(string='Date of receipt', required=True)

status = fields.Selection(var_product_history, string='Status', required=True)

status_date = fields.Date(string='Status Date', required=True)

history = fields.One2many(comodel_name='pb.orders.products.history', inverse_name='product_id')

options = fields.One2many(comodel_name='pb.orders.products.options', inverse_name='product_id')

in Python models and in XML views I have:
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>

<menuitem name="Production" id="menu_pb_root" sequence="71"/>

<menuitem name="Products" id="menu_production" parent="menu_pb_root" sequence="1"/>

<record model="ir.actions.act_window" id="action_products_inproduction">
<field name="name">Products in production</field>
<field name="res_model">pb.orders.products</field>
<field name="domain">['|',('status','=','received'),'|',('status','=','checked'),('status','=','production')]</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="in production" id="menu_products_inproduction" parent="menu_production" sequence="1" action="action_products_inproduction"/>

<record model="ir.actions.act_window" id="action_products_late">
<field name="name">Products late</field>
<field name="res_model">pb.orders.products</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="late" id="menu_products_late" parent="menu_production" sequence="2" action="action_products_late"/>

<record model="ir.actions.act_window" id="action_products_issue">
<field name="name">Products with issues</field>
<field name="res_model">pb.orders.products</field>
<field name="domain">[('status','=','alteration')]</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="issues" id="menu_products_issues" parent="menu_production" sequence="3" action="action_products_issue"/>

<record model="ir.actions.act_window" id="action_products_all">
<field name="name">All products</field>
<field name="res_model">pb.orders.products</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="all" id="menu_products_all" parent="menu_production" sequence="4" action="action_products_all"/>

<menuitem name="Final Customers" id="menu_general" parent="menu_pb_root" sequence="2"/>

<record model="ir.actions.act_window" id="action_customer">
<field name="name">Final Customers</field>
<field name="res_model">pb.finalcustomers</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Final Customers" id="menu_customers" parent="menu_general" sequence="1" action="action_customer"/>

<record model="ir.actions.act_window" id="action_finalcustomers_measurements">
<field name="name">Final Customers Measurements</field>
<field name="res_model">pb.finalcustomers.measurements</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Measurements" id="menu_customerd_measurementd" parent="menu_customers" sequence="1" action="action_finalcustomers_measurements"/>

<menuitem name="Configuration" id="menu_configuration" parent="menu_pb_root" sequence="3"/>

<record model="ir.actions.act_window" id="action_fabrics">
<field name="name">Fabrics</field>
<field name="res_model">pb.fabrics</field>
<field name="view_mode">tree,form,search</field>
</record>
<menuitem name="Fabrics" id="menu_fabrics" parent="menu_configuration" sequence="1" action="action_fabrics"/>

<record model="ir.actions.act_window" id="action_products_options">
<field name="name">Products Options</field>
<field name="res_model">pb.products.options</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Products Options" id="menu_products_options" parent="menu_configuration" sequence="2" action="action_products_options"/>

<record model="ir.actions.act_window" id="action_products_options_values">
<field name="name">Products Options Values</field>
<field name="res_model">pb.products.options.values</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Products Options Values" id="menu_products_options_values" parent="menu_products_options" sequence="1" action="action_products_options_values"/>

<record model="ir.actions.act_window" id="action_orders_history">
<field name="name">History</field>
<field name="res_model">pb.orders.products.history</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="History" id="menu_orders_history" parent="menu_configuration" sequence="3" action="action_orders_history"/>

</data>
</openerp>


Error:

Odoo Server Error

Traceback (most recent call last):

  File "/opt/odoo/odoo11/odoo/tools/convert.py", line 744, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "/opt/odoo/odoo11/odoo/tools/convert.py", line 654, in _tag_record

    id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)

  File "/opt/odoo/odoo11/odoo/addons/base/ir/ir_model.py", line 1487, in _update

    record = record.create(values)

  File "/opt/odoo/odoo11/odoo/addons/base/ir/ir_actions.py", line 230, in create

    return super(IrActionsActWindow, self).create(vals)

  File "/opt/odoo/odoo11/odoo/addons/base/ir/ir_actions.py", line 57, in create

    res = super(IrActions, self).create(vals)

  File "/opt/odoo/odoo11/odoo/models.py", line 3373, in create

    record = self.browse(self._create(old_vals))

  File "/opt/odoo/odoo11/odoo/models.py", line 3526, in _create

    self._validate_fields(vals)

  File "/opt/odoo/odoo11/odoo/models.py", line 1036, in _validate_fields

    check(self)

File "/opt/odoo/odoo11/odoo/addons/base/ir/ir_actions.py", line 138, in _check_model

    raise ValidationError(_('Invalid model name %r in action definition.') % action.res_model)

odoo.exceptions.ValidationError: ("Invalid model name 'pb.orders.products' in action definition.", None)


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/opt/odoo/odoo11/odoo/http.py", line 650, in _handle_exception

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

  File "/opt/odoo/odoo11/odoo/http.py", line 310, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/opt/odoo/odoo11/odoo/tools/pycompat.py", line 87, in reraise

    raise value

  File "/opt/odoo/odoo11/odoo/http.py", line 692, in dispatch

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

  File "/opt/odoo/odoo11/odoo/http.py", line 342, in _call_function

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

  File "/opt/odoo/odoo11/odoo/service/model.py", line 97, in wrapper

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

  File "/opt/odoo/odoo11/odoo/http.py", line 335, in checked_call

    result = self.endpoint(*a, **kw)

  File "/opt/odoo/odoo11/odoo/http.py", line 936, in __call__

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

  File "/opt/odoo/odoo11/odoo/http.py", line 515, in response_wrap

    response = f(*args, **kw)

  File "/opt/odoo/odoo11/addons/web/controllers/main.py", line 938, in call_button

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

  File "/opt/odoo/odoo11/addons/web/controllers/main.py", line 926, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/opt/odoo/odoo11/odoo/api.py", line 689, in call_kw

    return call_kw_multi(method, model, args, kwargs)

  File "/opt/odoo/odoo11/odoo/api.py", line 680, in call_kw_multi

    result = method(recs, *args, **kwargs)

  File "<decorator-gen-42>", line 2, in button_immediate_install

  File "/opt/odoo/odoo11/odoo/addons/base/module/module.py", line 71, in check_and_log

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

  File "/opt/odoo/odoo11/odoo/addons/base/module/module.py", line 449, in button_immediate_install

    return self._button_immediate_function(type(self).button_install)

  File "/opt/odoo/odoo11/odoo/addons/base/module/module.py", line 542, in _button_immediate_function

    modules.registry.Registry.new(self._cr.dbname, update_module=True)

  File "/opt/odoo/odoo11/odoo/modules/registry.py", line 85, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/opt/odoo/odoo11/odoo/modules/loading.py", line 380, in load_modules

    loaded_modules, update_module, models_to_check)

  File "/opt/odoo/odoo11/odoo/modules/loading.py", line 274, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "/opt/odoo/odoo11/odoo/modules/loading.py", line 181, in load_module_graph

    _load_data(cr, module_name, idref, mode, kind='data')

  File "/opt/odoo/odoo11/odoo/modules/loading.py", line 95, in _load_data

    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)

  File "/opt/odoo/odoo11/odoo/tools/convert.py", line 791, in convert_file

    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)

  File "/opt/odoo/odoo11/odoo/tools/convert.py", line 852, in convert_xml_import

    obj.parse(doc.getroot(), mode=mode)

  File "/opt/odoo/odoo11/odoo/tools/convert.py", line 741, in parse

    self.parse(rec, mode)

  File "/opt/odoo/odoo11/odoo/tools/convert.py", line 751, in parse

    exc_info[2]

  File "/opt/odoo/odoo11/odoo/tools/pycompat.py", line 86, in reraise

    raise value.with_traceback(tb)

  File "/opt/odoo/odoo11/odoo/tools/convert.py", line 744, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "/opt/odoo/odoo11/odoo/tools/convert.py", line 654, in _tag_record

    id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)

  File "/opt/odoo/odoo11/odoo/addons/base/ir/ir_model.py", line 1487, in _update

    record = record.create(values)

  File "/opt/odoo/odoo11/odoo/addons/base/ir/ir_actions.py", line 230, in create

    return super(IrActionsActWindow, self).create(vals)

  File "/opt/odoo/odoo11/odoo/addons/base/ir/ir_actions.py", line 57, in create

    res = super(IrActions, self).create(vals)

  File "/opt/odoo/odoo11/odoo/models.py", line 3373, in create

    record = self.browse(self._create(old_vals))

  File "/opt/odoo/odoo11/odoo/models.py", line 3526, in _create

    self._validate_fields(vals)

  File "/opt/odoo/odoo11/odoo/models.py", line 1036, in _validate_fields

    check(self)

  File "/opt/odoo/odoo11/odoo/addons/base/ir/ir_actions.py", line 138, in _check_model

    raise ValidationError(_('Invalid model name %r in action definition.') % action.res_model)

odoo.tools.convert.ParseError: "Invalid model name 'pb.orders.products' in action definition.

None" while parsing /opt/odoo/odoo11-custom-addons/probespoke/views/menu.xml:9, near

<record model="ir.actions.act_window" id="action_products_inproduction">

<field name="name">Products in production</field>

<field name="res_model">pb.orders.products</field>

<field name="domain">['|',('status','=','received'),'|',('status','=','checked'),('status','=','production')]</field>

<field name="view_mode">tree,form</field>

</record>

0
Avatar
Vazgeç
Alexandre Pecorilla

Hey. You should use the code formatter tag to make more legible.

Ermin Trevisan

Did you read your error message? You can't install a buggy module.

Sebastian782
Üretici

Yes but I don't see how this is buggy. What "Invalid model name 'pb.orders.products' in action definition." could mean?

When I google it I find nobody who has the same issue...

Sebastian782
Üretici

Okay guy, I can you explain me this:

I comment all the data in the __manifest__.py in order to install the database part, it work. Then I uncomment and install the view, it work to!

Any idea of why should I install this addons in 2 part?

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
Error when importing module Product Bidding In ECommerce in odoo 17
module
Avatar
Avatar
1
Tem 24
2643
Missing required value for the field 'Model' (model_id)
module
Avatar
Avatar
1
Oca 24
6560
View newly installed Module
module
Avatar
Avatar
Avatar
2
Mar 23
3583
Change default location in update quantity on hand window Çözüldü
odoov11
Avatar
Avatar
Avatar
2
Tem 22
9974
odoo v11 options are missing
odoov11
Avatar
Avatar
1
Haz 21
3155
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