Skip to Content
Odoo เมนู
  • ลงชื่อเข้าใช้
  • ทดลองใช้ฟรี
  • แอป
    การเงิน
    • ระบบบัญชี
    • ระบบการออกใบแจ้งหนี้
    • ระบบบัญชีรายจ่าย
    • ระบบการจัดการข้อมูลผ่านสเปรดชีต (BI)
    • เอกสาร
    • ระบบลงลายเซ็น
    การขาย
    • ลูกค้าสัมพันธ์
    • การขาย
    • POS ร้านค้า
    • POS ร้านอาหาร
    • ระบบสมัครสมาชิก
    • การเช่า
    การจัดการเว็บไซต์
    • เครื่องมือสร้างเว็บไซต์
    • ระบบการขายออนไลน์
    • บล็อก
    • ฟอรั่ม
    • ไลฟ์แชท
    • ระบบการอบรมออนไลน์
    ซัพพลายเชน
    • คลังสินค้า
    • ระบบการผลิต
    • PLM
    • ระบบการจัดซื้อ
    • การซ่อมบำรุง
    • ระบบจัดการคุณภาพ
    ทรัพยากรบุคคล
    • ข้อมูลพนักงาน
    • ระบบสรรหาบุคลากร
    • ระบบการลา
    • การประเมิน
    • ระบบการแนะนำพนักงาน
    • ระบบจัดการยานพาหนะ
    การตลาด
    • โซเชียลมาร์เก็ตติ้ง
    • การตลาดผ่านอีเมล
    • ระบบการตลาดผ่าน SMS
    • ระบบการจัดงานอีเวนต์
    • การตลาดแบบอัตโนมัติ
    • ระบบแบบสำรวจ
    การบริการ
    • โปรเจกต์
    • ระบบบันทึกเวลา
    • ระบบการจัดการบริการภาคสนาม
    • ระบบดูแลช่วยเหลือ
    • การวางแผน
    • การนัดหมาย
    ประสิทธิผล
    • ระบบแสดงความคิดเห็น
    • ระบบการอนุมัติ
    • ไอโอที
    • VoIP
    • คลังข้อมูล
    • WhatsApp
    แอปพลิเคชันของบุคคลที่สาม Odoo สตูดิโอ แพลตฟอร์มคลาวด์ของ Odoo
  • อุตสาหกรรม
    การค้าปลีก
    • ร้านขายหนังสือ
    • ร้านขายเสื้อผ้า
    • ร้านขายเฟอร์นิเจอร์
    • ร้านขายของชำ
    • ร้านขายฮาร์ดแวร์
    • ร้านขายของเล่น
    Food & Hospitality
    • บาร์และผับ
    • ร้านอาหาร
    • อาหารฟาสต์ฟู้ด
    • Guest House
    • ตัวแทนจำหน่ายเครื่องดื่ม
    • Hotel
    อสังหาริมทรัพย์
    • Real Estate Agency
    • บริษัทสถาปัตยกรรม
    • บริษัทรับเหมา
    • การจัดการอสังหาริมทรัพย์
    • การจัดสวน
    • สมาคมเจ้าของอสังหาริมทรัพย์
    ปรึกษา
    • สำนักงานบัญชี
    • Odoo พาร์ทเนอร์
    • เอเจนซี่การตลาด
    • สำนักงานกฎหมาย
    • บริการสรรหาบุคลากร
    • การตรวจสอบและการรับรอง
    ระบบการผลิต
    • Textile
    • เหล็ก
    • เฟอร์นิเจอร์
    • อาหาร
    • Brewery
    • ของขวัญขององค์กร
    สุขภาพ & ฟิตเนส
    • ชมรมกีฬา
    • ร้านขายแว่นตา
    • ฟิตเนส
    • ผู้ประกอบวิชาชีพด้านสุขภาพ
    • ร้านขายยา
    • ร้านทำผม
    Trades
    • ช่างซ่อม
    • ฮาร์ดแวร์และการสนับสนุนด้านไอที
    • ระบบพลังงานแสงอาทิตย์
    • ช่างทำรองเท้า
    • บริการทำความสะอาด
    • HVAC Services
    อื่น ๆ
    • 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
เกี่ยวกับฟอรั่มนี้
ช่วยเหลือ

how fixed thies error :Invalid XML for View Architecture!

ติดตาม

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

คำถามนี้ถูกตั้งค่าสถานะ
architectureinvalid
7073 มุมมอง
อวตาร
Muaz

whine i install my module show this error: (('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!'))

my files:

accbalance.py:

from osv import fields, osv
import time
class accbalance(osv.osv):
_name = 'account.account'
_inherit = 'account.account'
_description = 'Simple accountiec'
_columns = {

    }
accbalance()

accbalance_view.xml:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_accaccount_form" model="ir.ui.view">
        <field name="name">account.account.form</field>
        <field name="model">account.account</field>
        <field name="arch" type="xml">
            <form string="Account" version="7.0">
                    <group>
                        <field name="parent_id"/>
                        <field name="type"/>
                        <field name="user_type"/>
                        <field name="active"/>
                        <field name="company_id" widget="selection" groups="base.group_multi_company"/>
                    </group>
            </form>
        </field>
    </record>

    <record id="view_accaccount_tree" model="ir.ui.view">
        <field name="name">account.account.tree</field>
        <field name="model">account.account</field>
        <field name="arch" type="xml">
            <tree string="Chart of accounts" toolbar="1" >
                <field name="parent_id"/>
                <field name="type"/>
                <field name="user_type"/>
                <field name="active"/>
                <field name="company_id"/>
            </tree>
        </field>
    </record>

    <record id="accaction_account_form" model="ir.actions.act_window">
        <field name="name">Accounts</field>
        <field name="res_model">account.account</field>
        <field name="view_type">form</field>
        <field name="view_id" ref="view_accaccount_tree"/>
    </record>

</data> </openerp>

wizard file:

account_balance_report.py:

from openerp.osv import fields, osv

 class account_balance_report(osv.osv_memory):
_inherit = "account.common.account.report"
_name = 'account.balance.report'
_description = 'Trial Balance Report'

_columns = {
    'journal_ids': fields.many2many('account.journal', 'account_balance_report_journal_rel', 'account_id', 'journal_id', 'Journals', required=True),
}

_defaults = {
    'journal_ids': [],
}

def _print_report(self, cr, uid, ids, data, context=None):
    data = self.pre_print_report(cr, uid, ids, data, context=context)
    return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data}

account_balance_report()

account_report_account_accbalance_view.xml:

<?xml version="1.0" encoding="utf-8"?>

<openerp> <data>

    <record id="account_report_accbalance_view" model="ir.ui.view">
      <field name="name">Balance</field>
      <field name="model">account.balance.report</field>
      <field name="inherit_id" ref="account.account_common_report_view" />
      <field name="arch" type="xml">
        <data>
        <xpath expr="//notebook/page[@string='Journals']" position="replace">
        </xpath>
        <xpath expr="//field[@name='target_move']" position="after">
            <field name="display_account"/>
            <newline/>
        </xpath>
        </data>
      </field>
    </record>

    <record id="action_account_accbalance_menu" model="ir.actions.act_window">
        <field name="name">Trial Balance</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">account.balance.report</field>
        <field name="view_type">form</field>
        <field name="view_mode">form</field>
        <field name="view_id" ref="account_report_accbalance_view"/>
        <field name="target">new</field>
    </record>

    <menuitem
            name="acc Trial Balance"
            parent="account.final_accounting_reports"
            action="action_account_accbalance_menu"
            id="menu_general_accBalance_report"
           />

    <record model="ir.values" id="action_account_accbalance_report_values1">
        <field name="model_id" ref="account.model_account_account" />
        <field name="name">acc Trial Balance</field>
        <field name="key2">client_print_multi</field>
        <field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_accbalance_menu'))" />
        <field name="key">action</field>
        <field name="model">account.account</field>
    </record>

    <record id="action_account_accbalance2_menu" model="ir.actions.act_window">
        <field name="name">Trial Balance</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">account.balance.report</field>
        <field name="view_type">form</field>
        <field name="view_mode">form</field>
        <field name="view_id" ref="account_report_accbalance_view"/>
        <field name="target">new</field>
    </record>

</data>

</openerp>

report files: account_balance.py:

import time

from openerp.report import report_sxw
from common_report_header import common_report_header

 class account_balance(report_sxw.rml_parse, common_report_header):
_name = 'report.account.account.balance'

def __init__(self, cr, uid, name, context=None):
    super(account_balance, self).__init__(cr, uid, name, context=context)
    self.sum_debit = 0.00
    self.sum_credit = 0.00
    self.date_lst = []
    self.date_lst_string = ''
    self.result_acc = []
    self.localcontext.update({
        'time': time,
        'lines': self.lines,
        'sum_debit': self._sum_debit,
        'sum_credit': self._sum_credit,
        'get_fiscalyear':self._get_fiscalyear,
        'get_filter': self._get_filter,
        'get_start_period': self.get_start_period,
        'get_end_period': self.get_end_period ,
        'get_account': self._get_account,
        'get_journal': self._get_journal,
        'get_start_date':self._get_start_date,
        'get_end_date':self._get_end_date,
        'get_target_move': self._get_target_move,
    })
    self.context = context

def set_context(self, objects, data, ids, report_type=None):
    new_ids = ids
    if (data['model'] == 'ir.ui.menu'):
        new_ids = 'chart_account_id' in data['form'] and [data['form']['chart_account_id']] or []
        objects = self.pool.get('account.account').browse(self.cr, self.uid, new_ids)
    return super(account_balance, self).set_context(objects, data, new_ids, report_type=report_type)

#def _add_header(self, node, header=1):
#    if header == 0:
#        self.rml_header = ""
#    return True

def _get_account(self, data):
    if data['model']=='account.account':
        return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name
    return super(account_balance ,self)._get_account(data)

def lines(self, form, ids=None, done=None):
    def _process_child(accounts, disp_acc, parent):
            account_rec = [acct for acct in accounts if acct['id']==parent][0]
            currency_obj = self.pool.get('res.currency')
            acc_id = self.pool.get('account.account').browse(self.cr, self.uid, account_rec['id'])
            currency = acc_id.currency_id and acc_id.currency_id or acc_id.company_id.currency_id
            res = {
                'id': account_rec['id'],
                'type': account_rec['type'],
                'code': account_rec['code'],
                'name': account_rec['name'],
                'level': account_rec['level'],
                'debit': account_rec['debit'],
                'credit': account_rec['credit'],
                'balance': account_rec['balance'],
                'parent_id': account_rec['parent_id'],
                'bal_type': '',
            }
            self.sum_debit += account_rec['debit']
            self.sum_credit += account_rec['credit']
            if disp_acc == 'movement':
                if not currency_obj.is_zero(self.cr, self.uid, currency, res['credit']) or not currency_obj.is_zero(self.cr, self.uid, currency, res['debit']) or not currency_obj.is_zero(self.cr, self.uid, currency, res['balance']):
                    self.result_acc.append(res)
            elif disp_acc == 'not_zero':
                if not currency_obj.is_zero(self.cr, self.uid, currency, res['balance']):
                    self.result_acc.append(res)
            else:
                self.result_acc.append(res)
            if account_rec['child_id']:
                for child in account_rec['child_id']:
                    _process_child(accounts,disp_acc,child)

    obj_account = self.pool.get('account.account')
    if not ids:
        ids = self.ids
    if not ids:
        return []
    if not done:
        done={}

    ctx = self.context.copy()

    ctx['fiscalyear'] = form['fiscalyear_id']
    if form['filter'] == 'filter_period':
        ctx['period_from'] = form['period_from']
        ctx['period_to'] = form['period_to']
    elif form['filter'] == 'filter_date':
        ctx['date_from'] = form['date_from']
        ctx['date_to'] =  form['date_to']
    ctx['state'] = form['target_move']
    parents = ids
    child_ids = obj_account._get_children_and_consol(self.cr, self.uid, ids, ctx)
    if child_ids:
        ids = child_ids
    accounts = obj_account.read(self.cr, self.uid, ids, ['type','code','name','debit','credit','balance','parent_id','level','child_id'], ctx)

    for parent in parents:
            if parent in done:
                continue
            done[parent] = 1
            _process_child(accounts,form['display_account'],parent)
    return self.result_acc

  report_sxw.report_sxw('report.account.account.accbalance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header="internal")

account_report.xml:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

    <report auto="False" id="account_account_accbalance" menu="False" model="account.account" name="account.account.accbalance" rml="accbalance/report/account_balance.rml" string="Trial Balance"/>



</data>

</openerp>

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

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

ลงชื่อ
Related Posts ตอบกลับ มุมมอง กิจกรรม
OPENERP: ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture
xml architecture invalid validateerror
อวตาร
อวตาร
อวตาร
2
มี.ค. 15
9792
Can't install custom module -> arch: Invalid XML for View Architecture! แก้ไขแล้ว
module xml install architecture invalid
อวตาร
อวตาร
อวตาร
4
พ.ย. 15
6727
Invalid XML for View Architecture on Account Banking Payment export module install
export xml account architecture invalid
อวตาร
อวตาร
1
มี.ค. 15
6666
Multi instance sharing same database
architecture databases
อวตาร
อวตาร
1
ก.ย. 24
6547
invalid signup token
invalid token
อวตาร
0
ส.ค. 22
1328
คอมมูนิตี้
  • บทเรียน
  • เอกสารกำกับโปรแกรม
  • ฟอรั่ม
โอเพนซอร์ส
  • ดาวน์โหลด
  • 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