Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2156 Представления

Hello everyone,

I have 2 invoice lines with different taxes.


Line 1: account.tax(1)

Line 2: account.tax(1, 2)


I need to compare two many2many fields (related to account.tax) and return the exact taxes on each record on the loop.


I am trying:

domain = [('my_many2many_field_ids', '=', 'invoice_line_tax_ids.ids')]
test_taxes = self.env['my_model'].search(domain, limit=1)

(Tried also with "=like" with no luck...)

The result is always the 2 records above.


I am expecting to have:

- If account.tax(1) on domain, returns only first record;

- If account.tax(1, 2) on domain, returns only second record;


Can anyone help me please?


Thank you in advance


Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
нояб. 22
80
1
июн. 22
7176
1
июл. 21
2753
1
июл. 21
4188
1
нояб. 19
3900