Hi friends,
Here is my problem/scenario:
I've added a new field named spot_id to 'account.payment' model:
spot_id=fields.Many2one(
comodel_name='exchange.spot',
string='Spot',
readonly=True
)
Each spot has two following fields:
out_currency_id=fields.Many2one(
comodel_name="res.currency",
string="Outgoing Currency"
)
company_currency_id=fields.Many2one(
related="company_id.currency_id"
)
Suppose that for example, both two fields have a value of 25,
Now, I want to show just payments that have the following condition:
('spot_id.out_currency_id', '=', 'spot_id.company_currency_id')
To do that, I'm trying to get payments with the following domain on account.paymeny model at XML:[Say: first domain]:
[('spot_id.out_currency_id', '=', 'spot_id.company_currency_id')]
But it doesn't work!!!
I've tried the following domains separately and each one is working well:
[('spot_id.out_currency_id', '=', 25)]
[('spot_id.company_currency_id', '=', 25)]
But the domain [first domain] doesn't work!!
Can anyone say what is the issue? and what is the solution?
I don't want to solve it with hard-coded using of 25.