我正在尝试为"每日交易"创建一个模块ValueError
并获得评估错误
value = d[key] = self.method(*args, **kwargs) File "/home/odoo/odoo-dev/odoo/odoo/addons/base/ir/ir_model.py", line 1028, in xmlid_lookup raise ValueError('External ID not found in the system: %s' % xmlid) ParseError: "External ID not found in the system: daily_transaction.action_daily_transaction" while parsing /home/odoo/odoo-dev/custom-addons/daily_transaction/daily_transaction_view.xml:11, near/home/odoo/odoo-dev/custom-addons/daily_transaction/daily_transaction_view.xml:11,近
我的文件结构:(一个用Bold是我的文件名)
__init__.py
from import daily_transaction
__manifest__.py
{ 'name':'Daily Transaction Manager', 'version':'1.0', 'description':'**********************This app will keep the record of all the tansactions happening*********', 'author':'Test', 'data':['daily_transaction_view.xml'], 'installable':True, 'auto_install':False, }
daily_transaction.py
from . import fields,osv class daily_transaction(osv.osv): _name = 'daily.transaction' _description = 'Daily Transaction' _columns = { 'subject': fields.char('Subject', size=128, required = True), 'data' : fields.data('Date', required = True), 'note': fields.text('Notes'), 'amount': fields.float('Amount', required = True), 'type' : fields.selection([ ('transport','Transport'), ('household','Household'), ('personal','Personal'), ], 'Type', required = True), }
daily_transaction_view.xml
daily.transaction.tree daily.transaction daily.transaction.form.view daily.transaction Daily Transaction daily.transaction form tree,form {} Create new daily transaction. >
1> Emipro Techn..:它是在给出此错误,因为您在创建之前使用了操作,因此首先您必须定义操作然后才能使用它.
所以你应该尝试如下:
Daily Transaction daily.transaction form tree,form {} Create new daily transaction.