Hi,
Sale order line field, How can i find it's relation name.
tax_id = fields.Many2many('account.tax', string='Taxes', domain=['|', ('active', '=', False), ('active', '=', True)])
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
Sale order line field, How can i find it's relation name.
tax_id = fields.Many2many('account.tax', string='Taxes', domain=['|', ('active', '=', False), ('active', '=', True)])
Thanks
As relational name is not given in the field definition, system generates the relational table's name automatically. In this case the table name is "account_tax_sale_order_line_rel".
There is a following rule for that:
If name is not given, it is automatically generated from provided "model_name" and "comodel_name" after sorted by alphabetical order (account_tax, sale_order_line = account_tax_sale_order_line_rel)
Original Code in framework:
tables = sorted([model._table, comodel._table])
relation = '%s_%s_rel' % tuple(tables)
Sudhir Arya ERP Harbor Consulting Services Skype: sudhir@erpharbor.com Website: http://www.erpharbor.com
Thanks for explanation.
you can find the related tables from db ending with _rel. for eg:
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
lip 25
|
4825 | ||
|
2
gru 24
|
7909 | ||
How to ORDER BY? [Odoo 10]
Rozwiązane
|
|
2
lis 24
|
28719 | |
|
2
maj 24
|
7600 | ||
|
3
mar 24
|
7055 |