Skip to Content
Menu
This question has been flagged
1098 Views

I would like to add analytic_account_id of products inside inventory report to add a filter 

I tried this way:

product_id = fields.Many2one('product.product', 'Product', readonly=True, required=True, check_company=True)


analytic_account_id = fields.Many2one('account.analytic.account', related='product_id.analytic_account_id',string='Analytic Account', readonly=True)


Getting error:

field = model.pool[model_name]._fields[name]

KeyError: 'analytic_account_id' - - -


Avatar
Discard