我正在尝试使用track_visibility='onchange'
在One2many字段上记录更改。但这不起作用。
代码如下:
respartner.py
bank_account_ids = fields.One2many('customer.bank.account','partner_id',
string='Account',track_visibility="onchange")
account.py
_name = 'customer.bank.account'
_description = 'Partner Bank Account Details'
partner_id = fields.Many2one('res.partner',string="Partner")
name = fields.Integer(string="Account Number",required=True,
track_visibility="onchange")
bank_id = fields.Many2one('partner.bank',string="Bank",track_visibility="onchange")
branch_id = fields.Many2one('partner.bank.branch',string="Branch",
track_visibility="onchange")
答案 0 :(得分:-1)
在班级名称后添加它。
_inherit = ['mail.thread', 'mail.activity.mixin']
然后尝试:
track_visibility="onchange"