Skip to Content
Odoo เมนู
  • ลงชื่อเข้าใช้
  • ทดลองใช้ฟรี
  • แอป
    การเงิน
    • ระบบบัญชี
    • ระบบการออกใบแจ้งหนี้
    • ระบบบัญชีรายจ่าย
    • ระบบการจัดการข้อมูลผ่านสเปรดชีต (BI)
    • เอกสาร
    • ระบบลงลายเซ็น
    การขาย
    • ลูกค้าสัมพันธ์
    • การขาย
    • POS ร้านค้า
    • POS ร้านอาหาร
    • ระบบสมัครสมาชิก
    • การเช่า
    การจัดการเว็บไซต์
    • เครื่องมือสร้างเว็บไซต์
    • ระบบการขายออนไลน์
    • บล็อก
    • ฟอรั่ม
    • ไลฟ์แชท
    • ระบบการอบรมออนไลน์
    ซัพพลายเชน
    • คลังสินค้า
    • ระบบการผลิต
    • PLM
    • ระบบการจัดซื้อ
    • การซ่อมบำรุง
    • ระบบจัดการคุณภาพ
    ทรัพยากรบุคคล
    • ข้อมูลพนักงาน
    • ระบบสรรหาบุคลากร
    • ระบบการลา
    • การประเมิน
    • ระบบการแนะนำพนักงาน
    • ระบบจัดการยานพาหนะ
    การตลาด
    • โซเชียลมาร์เก็ตติ้ง
    • การตลาดผ่านอีเมล
    • ระบบการตลาดผ่าน SMS
    • ระบบการจัดงานอีเวนต์
    • การตลาดแบบอัตโนมัติ
    • ระบบแบบสำรวจ
    การบริการ
    • โปรเจกต์
    • ระบบบันทึกเวลา
    • ระบบการจัดการบริการภาคสนาม
    • ระบบดูแลช่วยเหลือ
    • การวางแผน
    • การนัดหมาย
    ประสิทธิผล
    • ระบบแสดงความคิดเห็น
    • ระบบการอนุมัติ
    • ไอโอที
    • VoIP
    • คลังข้อมูล
    • WhatsApp
    แอปพลิเคชันของบุคคลที่สาม Odoo สตูดิโอ แพลตฟอร์มคลาวด์ของ Odoo
  • อุตสาหกรรม
    การค้าปลีก
    • ร้านขายหนังสือ
    • ร้านขายเสื้อผ้า
    • ร้านขายเฟอร์นิเจอร์
    • ร้านขายของชำ
    • ร้านขายฮาร์ดแวร์
    • ร้านขายของเล่น
    Food & Hospitality
    • บาร์และผับ
    • ร้านอาหาร
    • อาหารฟาสต์ฟู้ด
    • Guest House
    • ตัวแทนจำหน่ายเครื่องดื่ม
    • Hotel
    Real Estate
    • Real Estate Agency
    • บริษัทสถาปัตยกรรม
    • บริษัทรับเหมา
    • การจัดการอสังหาริมทรัพย์
    • การจัดสวน
    • สมาคมเจ้าของอสังหาริมทรัพย์
    Consulting
    • Accounting Firm
    • Odoo พาร์ทเนอร์
    • เอเจนซี่การตลาด
    • สำนักงานกฎหมาย
    • บริการสรรหาบุคลากร
    • การตรวจสอบและการรับรอง
    ระบบการผลิต
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • ของขวัญขององค์กร
    สุขภาพ & ฟิตเนส
    • ชมรมกีฬา
    • ร้านขายแว่นตา
    • ฟิตเนส
    • ผู้ประกอบวิชาชีพด้านสุขภาพ
    • ร้านขายยา
    • ร้านทำผม
    Trades
    • ช่างซ่อม
    • ฮาร์ดแวร์และการสนับสนุนด้านไอที
    • Solar Energy Systems
    • ช่างทำรองเท้า
    • บริการทำความสะอาด
    • HVAC Services
    Others
    • Nonprofit Organization
    • สำนักงานสิ่งแวดล้อม
    • ร้านเช่าป้ายโฆษณา
    • การถ่ายภาพ
    • ร้านเช่าจักรยาน
    • ตัวแทนจำหน่ายซอฟต์แวร์
    Browse all Industries
  • คอมมูนิตี้
    ศึกษา
    • บทเรียน
    • เอกสารกำกับโปรแกรม
    • การรับรอง
    • การฝึกอบรม
    • บล็อก
    • พอดแคสต์
    เพิ่มศักยภาพให้กับการศึกษา
    • โปรแกรมการศึกษา
    • Scale Up! Business Game
    • เยี่ยมชม Odoo
    รับซอฟต์แวร์
    • ดาวน์โหลด
    • เปรียบเทียบรุ่น
    • เผยแพร่
    ทำงานร่วมกัน
    • Github
    • ฟอรั่ม
    • ระบบการจัดงานอีเวนต์
    • การแปล
    • ร่วมเป็นพาร์ทเนอร์
    • Services for Partners
    • ลงทะเบียนเพื่อสร้างบัญชีบริษัทของคุณ
    รับบริการ
    • ค้นหาพาร์ทเนอร์
    • ค้นหานักบัญชี
    • พบกับที่ปรึกษา
    • บริการติดตั้งระบบเพื่อใช้งาน
    • ข้อมูลอ้างอิงลูกค้า
    • การสนับสนุน
    • อัปเกรด
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    รับการสาธิต
  • ราคา
  • ช่วยเหลือ

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

  • ลูกค้าสัมพันธ์
  • e-Commerce
  • ระบบบัญชี
  • สินค้าคงคลัง
  • PoS
  • โปรเจกต์
  • MRP
All apps
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
All Posts คน เหรียญรางวัล
แท็ก (View all)
odoo accounting v14 pos v15
เกี่ยวกับฟอรั่มนี้
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
All Posts คน เหรียญรางวัล
แท็ก (View all)
odoo accounting v14 pos v15
เกี่ยวกับฟอรั่มนี้
ช่วยเหลือ

I try install my first module and not work.

ติดตาม

รับการแจ้งเตือนเมื่อมีกิจกรรมในโพสต์นี้

คำถามนี้ถูกตั้งค่าสถานะ
odoo11communityodoo11.0Version
5 ตอบกลับ
4202 มุมมอง
อวตาร
Aitor

Hello everyone, i try to install my first module to school, don´t work and I don´t know why. The mistake is ¨module not found¨. I paste here the error and the code to models.py and views.xml. Thank you.

---MISTAKE---

Modelo no encontrado: al.taller.propietarios

Contexto del error:
Vista `taller.propietarios.tree`
[view_id: 1020, xml_id: n/a, model: al.taller.propietarios, parent_id: n/a]
None" while parsing /opt/odoo/odoo11/custom-addons/taller/views/views.xml:6, near
<record model="ir.ui.view" id="taller_propietarios_tree">
        <field name="name">taller.propietarios.tree</field>
        <field name="model">al.taller.propietarios</field>
        <field name="arch" type="xml">
          <tree>
            <field name="name"/>
            <field name="nombre"/>
            <field name="apellido1"/>
            <field name="apellido2"/>
          </tree>
        </field>
      </record>

---MODELS.PY---
from odoo import models, fields, api

class taller_propietarios(models.Model):
_name="al.taller.propietarios"
name=fields.Char(string="DNI",required=True)
nombre=fields.Char(string="Nombre",required=True)
apellido1=fields.Char(string="Primer apellido",required=True)
apellido2=fields.Char(string="Segundo apellido",required=False)
coches = fields.One2many("al.taller.coches",'name',ondelete="cascade")
class taller_mecanicos(models.Model):
_name="al.taller.mecanicos"
name=fields.Char(string="Numero empleado",required=True)
nombre=fields.Char(string="Nombre",required=True)
puesto=fields.Selection((('0','Mecanico'),('1','Chapista'),('2','Jefe taller')),string="Puesto",required=True)
coches = fields.Many2many("al.taller.coches",string="Coches a su cargo")
class taller_coches(models.Model):
_name="al.taller.coches"
name=fields.Char(string="Matricula",required=True)
bastidor=fields.Char(string="Bastidor",required=True)
marca=fields.Char(string="Marca",required=True)
modelo=fields.Char(string="Modelo",required=True)
defectos=fields.Text(string="Defectos del vehiculo",required=True)
propietaros = fields.Many2one("al.taller.propietarios",string="Propietario",ondelete='cascade')
mecanicos = fields.Many2many("al.taller.mecanicos",string="Encargado/s del coche")
class taller_marcas(models.Model):
_name="al.taller.marcas"
name=fields.Char(string="Marca",required=True);
description=fields.Text(string="Descripcion",required=False)
modelos = fields.One2many("al.taller.modelos", string="Modelos", 'coches')
class taller_modelos(models.Model):
_name="al.taller.modelos"
name=fields.Char(string="Modelos")
marcas = fields.Many2one("al.taller.marcas",string="Modelos",ondelete='cascade')

---VIEWS.XML---
<odoo>
<data>

<!--PROPIETARIOS -->

<record model="ir.ui.view" id="taller_propietarios_tree">
<field name="name">taller.propietarios.tree</field>
<field name="model">al.taller.propietarios</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="nombre"/>
<field name="apellido1"/>
<field name="apellido2"/>
</tree>
</field>
</record>

<record model="ir.ui.view" id="taller_propietarios_form">
<field name="name">taller.propietarios.form</field>
<field name="model">al.taller.propietarios</field>
<field name="arch" type="xml">
<form>
<group colspan="2" col="2">
<field name="name"/>
<field name="nombre"/>
<field name="apellido1"/>
<field name="apellido2"/>
<field name="coches"/>
</group>
</form>
</field>
</record>

<!-- MECANICOS -->

<record model="ir.ui.view" id="taller_mecanicos_tree">
<field name="name">taller.mecanicos.tree</field>
<field name="model">al.taller.mecanicos</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="nombre"/>
<field name="puesto"/>
<field name="coches"/>
</tree>
</field>
</record>

<record model="ir.ui.view" id="taller_mecanicos_form">
<field name="name">taller.mecanicos.form</field>
<field name="model">al.taller.mecanicos</field>
<field name="arch" type="xml">
<form>
<group colspan="2" col="2">
<field name="name"/>
<field name="nombre"/>
<field name="puesto"/>
<field name="coches"/>
</group>
</form>
</field>
</record>

<!-- COCHES -->

<record model="ir.ui.view" id="taller_coches_tree">
<field name="name">taller.coches.tree</field>
<field name="model">al.taller.coches</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="bastidor"/>
<field name="marca"/>
<field name="modelo"/>
<field name="defectos"/>
<field name="propietarios"/>
<field name="mecanicos"/>
</tree>
</field>
</record>

<record model="ir.ui.view" id="taller_coches_form">
<field name="name">taller.coches.form</field>
<field name="model">al.taller.coches</field>
<field name="arch" type="xml">
<form>
<group colspan="2" col="2">
<field name="name"/>
<field name="bastidor"/>
<field name="marca"/>
<field name="modelo"/>
<field name="defectos"/>
<field name="propietarios"/>
<field name="mecanicos"/>
</group>
</form>
</field>
</record>

<!-- MARCAS -->

<record model="ir.ui.view" id="taller_marcas_tree">
<field name="name">taller.marcas.tree</field>
<field name="model">al.taller.marcas</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="description"/>
<field name="modelos"/>
</tree>
</field>
</record>

<record model="ir.ui.view" id="taller_marcas_form">
<field name="name">taller.marcas.form</field>
<field name="model">al.taller.marcas</field>
<field name="arch" type="xml">
<form>
<group colspan="2" col="2">
<field name="name"/>
<field name="description"/>
<field name="modelos"/>
</group>
</form>
</field>
</record>

<!-- MODELOS -->

<record model="ir.ui.view" id="taller_modelos_tree">
<field name="name">taller.modelos.tree</field>
<field name="model">al.taller.modelos</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="marcas"/>
</tree>
</field>
</record>

<record model="ir.ui.view" id="taller_modelos_form">
<field name="name">taller.modelos.form</field>
<field name="model">al.taller.modelos</field>
<field name="arch" type="xml">
<form>
<group colspan="2" col="2">
<field name="name"/>
<field name="marcas"/>
</group>
</form>
</field>
</record>

<!-- ACTIONS -->

<record model="ir.actions.act_window" id="taller.propietarios_action_window">
<field name="name">taller.propietarios.action_window</field>
<field name="res_model">al.taller.propietarios</field>
<field name="view_mode">tree,form</field>
</record>

<record model="ir.actions.act_window" id="taller.mecanicos_action_window">
<field name="name">taller.mecanicos.action_window</field>
<field name="res_model">al.taller.mecanicos</field>
<field name="view_mode">tree,form</field>
</record>

<record model="ir.actions.act_window" id="taller.coches_action_window">
<field name="name">taller.coches.action_window</field>
<field name="res_model">al.taller.coches</field>
<field name="view_mode">tree,form</field>
</record>

<record model="ir.actions.act_window" id="taller_marcas_action_window">
<field name="name">taller.marcas.action_window</field>
<field name="res_model">al.taller.marcas</field>
<field name="view_mode">tree,form</field>
</record>

<record model="ir.actions.act_window" id="taller_modelos_action_window">
<field name="name">taller.modelos.action_window</field>
<field name="res_model">al.taller.modelos</field>
<field name="view_mode">tree,form</field>
</record>

<!-- MENU -->

<menuitem name="Taller" id="taller.menu_root" />
<menuitem name="Propietarios" id="taller.propietarios_menu" parent="taller.menu_root" action="taller.propietarios_action_window" />
<menuitem name="Mecanicos" id="taller.mecanicos_menu" parent="taller.menu_root" action="taller.mecanicos_action_window"/>
<menuitem name="Coches" id="taller.coches_menu" parent="taller.menu_root" action="taller.coches_action_window" />
<menuitem name="Marcas" id="taller.marcas_menu" parent="taller.menu_root" action="taller.marcas_action_window" />
<menuitem name="Modelos" id="taller.modelos_menu" parent="taller.menu_root" action="taller.modelos_action_window" />
</data>
</odoo>



0
อวตาร
ละทิ้ง
Sehrish

Follow these tips: http://learnopenerp.blogspot.com/

อวตาร
Aitor
ผู้เขียน คำตอบที่ดีที่สุด

Thank you all, but yes, in the __inity.py of my models folder, have the line ¨from . import models¨

0
อวตาร
ละทิ้ง
อวตาร
Nasir
คำตอบที่ดีที่สุด

Hi Aitor,

Kindlt check if you have written "from . import (module_name_of_yours)" in the __init__.py file listed in the module folder in a module folder. Thanks.

Regards,

Nasir

0
อวตาร
ละทิ้ง
อวตาร
Niyas Raphy (Walnut Software Solutions)
คำตอบที่ดีที่สุด

HI,

If you are new to odoo development, you can see this videos which explains the basic of how to create a module from scratch in odoo: https://www.youtube.com/watch?v=BDepk0LhVuI&list=PLqRRLx0cl0hoJhjFWkFYowveq2Zn55dhM


And you can get the code samples used in the above tutorials from this link: https://apps.odoo.com/apps/modules/12.0/om_hospital/


Even though its for v12, it will work in v11 also. Regarding the issue you have told just make sure that you have restarted the service after adding the model, all python files are imported in init file .

Thanks

0
อวตาร
ละทิ้ง
อวตาร
Cybrosys Techno Solutions Pvt.Ltd
คำตอบที่ดีที่สุด

Hi Aitor,
Kindly check if you have omitted to import the models.py in the __init__.py file like below
from . import models
Regards

0
อวตาร
ละทิ้ง
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!

สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!

ลงชื่อ
Related Posts ตอบกลับ มุมมอง กิจกรรม
when generating payslip i got this error แก้ไขแล้ว
odoo11community odoo11.0
อวตาร
อวตาร
1
ก.พ. 21
4243
How to programatically move file from i.attachment to specific directory
odoo11community odoo11.0
อวตาร
0
มิ.ย. 20
3230
Add a button after import button แก้ไขแล้ว
odoo11community odoo11.0
อวตาร
อวตาร
2
ม.ค. 19
6020
How to add a sequence on date that we select from date field ???
odoo11 odoo11community odoo11.0
อวตาร
0
พ.ค. 22
4133
Group by function / computed field with out ==> “store = True” in odoo 11 แก้ไขแล้ว
python3 odoo11community odoo11.0
อวตาร
อวตาร
1
มี.ค. 22
14279
คอมมูนิตี้
  • บทเรียน
  • เอกสารกำกับโปรแกรม
  • ฟอรั่ม
โอเพนซอร์ส
  • ดาวน์โหลด
  • Github
  • Runbot
  • การแปล
บริการ
  • โฮสติ้ง odoo.sh เซิร์ฟเวอร์
  • การสนับสนุน
  • อัปเกรด
  • การพัฒนาที่กำหนดเอง
  • การศึกษา
  • ค้นหานักบัญชี
  • ค้นหาพาร์ทเนอร์
  • ร่วมเป็นพาร์ทเนอร์
เกี่ยวกับเรา
  • บริษัทของเรา
  • ทรัพย์สินในรูปของเครื่องหมายการค้า
  • ติดต่อเรา
  • งาน
  • ระบบการจัดงานอีเวนต์
  • พอดแคสต์
  • บล็อก
  • ลูกค้า
  • กฎหมาย • ความเป็นส่วนตัว
  • ความปลอดภัย
الْعَرَبيّة 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 เป็นชุดแอปธุรกิจแบบเปิดที่ครอบคลุมทุกความต้องการของบริษัทของคุณ อาธิ CRM eCommerce ระบบบัญชี ระบบสินค้าคงคลัง ระบบการขายหน้าร้าน โปรเจกต์ และ อีกมากมาย

ความเหนือกว่าอันเป็นเอกลักษณ์ของ Odoo คือการใช้งานที่ง่ายดายและผสานการทำงานอย่างสมบูรณ์แบบในเวลาเดียวกัน

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