Hi all,

I have two fields One2Many pointing to the same model. Each one must have 
its own domain, so I tried to set them each domain in its field definition, 
but it doesn't work. When I saved the record, raises an error saying that 
the domain is not correct.

Here is the code:

    current_line_accounts = fields.One2Many(
        'account.financial.statement.report.line.account', 'report_line',
        'Line Accounts', domain=[('fiscal_year', '=', 'current')])
    previous_line_accounts = fields.One2Many(
        'account.financial.statement.report.line.account', 'report_line',
        'Line Accounts', domain=[('fiscal_year', '=', 'previous')])

Can I define it in another way I can't see right now (i.e. in the view)?

Reply via email to