这里显示了我的错误
2013-04-23 05:36:03,877 17001 ERROR demo openerp.sql_db: bad query: SELECT "res_company".id FROM "res_company" WHERE "res_company".id = 'deduction_id.bpl_company_id.id' ORDER BY "res_company"."name"
Traceback (most recent call last):
File "/home/bellvantage/Documents/openerp-7.0/openerp-7/openerp/sql_db.py", line 226, in execute
res = self._obj.execute(query, params)
DataError: invalid input syntax for integer: "deduction_id.bpl_company_id.id"
LINE 1: ...y".id FROM "res_company" WHERE "res_company".id = 'deduction...
^
2013-04-23 05:36:03,878 17001 ERROR demo openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
这里显示了我尝试添加域过滤器的代码
class estate_bank_deductions(osv.osv):
_name = 'bpl.estate.bank.deductions'
_description = 'Estate Bank Deductions'
_columns = {
'deduction_id':fields.many2one('bpl.deduction.estate.data', 'Bank Deductions', ondelete='cascade'),
'name': fields.many2one('bpl.deduction.registration', 'Deduction', domain="[('type','=','bank'),('bpl_company_id.id','=','deduction_id.bpl_company_id.id')]"),
'bank_id': fields.many2one('bpl.bank.registration', 'Bank Name'),
'branch_id': fields.many2one('bpl.branch.registration', 'Branch'),
}
这是我父母的遗产银行扣除课程的一部分
_name = 'bpl.deduction.estate.data'
_description = 'BPL Deduction Estate Data'
_columns = {
'bpl_company_id':fields.many2one('res.company', 'Company', help='Company'),
请帮我解决这个问题。?我的域过滤机制中是否缺少任何内容,或者这种方式不正确。?
亲爱的奥多尼,
还有一件事要澄清,现在需要将我的领域定义为fields.function
?
但问题是在添加域过滤器之后,其他不相关的记录也加载到我的下拉列表中(在我添加了 widget="selection" 属性之后)。那么如何限制它们。我已经发布了那个问题
希望你能就此给我建议......再次非常感谢你