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
เกี่ยวกับฟอรั่มนี้
ช่วยเหลือ

Problem with very simple module on account.invoice extension

ติดตาม

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

คำถามนี้ถูกตั้งค่าสถานะ
developmentv7
3 ตอบกลับ
10605 มุมมอง
อวตาร
Angela

Hi, this is a simple issue on a simple example (with all data provided here). I'm using OpenERP 7.0-20130212-002145

I've created a very simple module as shown below (it adds one field named dtc_dc_ident to account.invoice object and view), and when I install it all goes fine, but when I update it (with no change at all) I get the following error (in the server log file):

2013-02-13 18:17:22,721 1448 ERROR test7 openerp.osv.orm: Can't find field 'dtc_dc_ident' in the following view parts composing the view of object model 'account.invoice':

  • a_test_inherit.account.invoice.form

If I comment the line <field name="dtc_dc_ident" required="1"/> it works fine (and the field dtc_dc_ident is visible in the account.invoice object model)

This problem only arises on account.invoice, for example on hr.holidays all is OK.

Here is the module structure (4 files):

a_test

__init__.py __openerp__.py a_test_account_invoice.py a_test_account_invoice.xml

Here is the content of each file :

__init__.py

import a_test_account_invoice

__openerp__.py

{
"name" : "short description : a_test",
"version" : "1.0",
"author" : "Test DTC",
"website" : "none",
"category" : "Generic Modules/Others",
"depends" : ["base", "account" ],
"description" : "Description : A Test  module",
"init_xml" : ["a_test_account_invoice.xml", ],
"demo_xml" : [],
"update_xml" : [],
"active": False,
"installable": True,
"application": True,
}

a_test_account_invoice.py

from osv import fields, osv
import os
import time
import pooler
import codecs
import datetime
import string

from tools.translate import _
class account_invoice(osv.osv):
  _name = 'account.invoice'
  _inherit = 'account.invoice'
  _description = 'Invoice'
  _columns = {
    'dtc_dc_ident': fields.char('Identifiant DC', required=False, size=32),
  }
account_invoice()

a_test_account_invoice.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="a_test_inherit_invoice_form" model="ir.ui.view">
<field name="name">a_test_inherit.account.invoice.form</field>
<field  name="inherit_id"  ref="account.invoice_form"/>
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="dtc_dc_ident" required="1"/>
</field>
</field>
</record>

</data>
</openerp>
0
อวตาร
ละทิ้ง
Angela
ผู้เขียน

Not sure I'm allowed to push my post back up in this way... but I would like it if someone could test this and confirm what I get...

Thanks

Antonin Bourguignon (abo)

No, this is not a good practice. Although I converted your "answer" into a comment.

อวตาร
Juanjo Algaz
คำตอบที่ดีที่สุด

Maybe you can change:

"init_xml" : ["a_test_account_invoice.xml", ],

by:

"update_xml" : ["a_test_account_invoice.xml", ],

0
อวตาร
ละทิ้ง
อวตาร
Angela
ผู้เขียน คำตอบที่ดีที่สุด

Try to :

uninstall your module
restart your server OpenERP
install your module

I had the same problem and it's the only one solution i found. Tell me if it work.

Yes, this will work, but this doesn't solve my issue, because normally you can update a module without uninstalling it (and restarting the server is only in case you change the python code). Besides, the above example works perfectly if you simply replace account.invoice with hr.holidays (and adapt a little)... so I'm sure it's related to something specific with account.invoice.

ybe you can change:

"init_xml" : ["a_test_account_invoice.xml", ],

by:

"update_xml" : ["a_test_account_invoice.xml", ],

I'd tested this already... but I'll test again just to see.

Thanks for your input in all cases, I'll be back after a few more tests.

0
อวตาร
ละทิ้ง
Angela
ผู้เขียน

Well, I've done the above tests and it performs as I expected.... indeed, uninstall and reinstall works fine, but this isn't right, upgrade should work too.

Changing using update instead of init didn't change anything....

Angela
ผู้เขียน

Again... if I use hr.holidays instead of account.invoice no problem arises..

อวตาร
Bonnet Denis
คำตอบที่ดีที่สุด

Try to :

  1. uninstall your module
  2. restart your server OpenERP
  3. install your module

I had the same problem and it's the only one solution i found. Tell me if it work.

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

http://help.openerp.com/question/1095/how-to-make-openerp-take-my-python-code-modifications-into-account/ this my post on my problem with a good answer

สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!

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

ลงชื่อ
Related Posts ตอบกลับ มุมมอง กิจกรรม
What's the context? แก้ไขแล้ว
development v7
อวตาร
อวตาร
อวตาร
อวตาร
9
มี.ค. 24
120420
How to hook to events of objects?
development v7
อวตาร
อวตาร
1
มิ.ย. 20
12783
Editing process in openerp แก้ไขแล้ว
development v7
อวตาร
อวตาร
อวตาร
2
มี.ค. 16
10953
Is there a change in how new modules are created in v7?
development v7
อวตาร
1
มี.ค. 15
4353
How to make OpenERP take my python code modifications into account?
development v7
อวตาร
อวตาร
2
มี.ค. 15
10724
คอมมูนิตี้
  • บทเรียน
  • เอกสารกำกับโปรแกรม
  • ฟอรั่ม
โอเพนซอร์ส
  • ดาวน์โหลด
  • 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