Orm osv_内存中的相关字段不工作
我正在OpenERP5中构建一个osv_内存向导 但是,我似乎无法将相关的字段添加到向导中Orm osv_内存中的相关字段不工作,orm,relationship,wizard,openerp,Orm,Relationship,Wizard,Openerp,我正在OpenERP5中构建一个osv_内存向导 但是,我似乎无法将相关的字段添加到向导中 'current_invoice_id': fields.many2one( 'account.invoice', 'Invoice' ), 'current_amount_total': fields.related(
'current_invoice_id': fields.many2one(
'account.invoice',
'Invoice'
),
'current_amount_total': fields.related(
'current_invoice_id',
'amount_total',
type='float',
store=False,
string='Amount'
),
我做错什么了吗?或者只是OpenERP 5不支持它?尝试使用fields.one2many而不是fields.related。
参见我们最终放弃了OpenERP 5.0模块中的
osv\u内存。从osv\u内存
表到常规表使用fields.manyOne()
时,我们肯定遇到了问题,因此您可能遇到了同样的问题
好消息是,osv\u memory
似乎在我们的OpenERP6.0测试中运行良好。试试这个:“当前金额”:fields.one2many('relation.object'、'current\u invoice\u id'、'amount'),
或者您只是错误地自定义了关系字段?Try:'current\u amount\u total':字段。相关('current\u invoice\u id','amount\u total',type='one2many',relation=“relation.object”,store=False,string='amount'),
描述一下尝试此操作时发生的情况可能会有所帮助。