Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
2593 Widoki

class parent 

category_id many2one

child_ids


class child 

parent_id

product_id


so,on select category at parent form view 

then select only product related to category

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,
Please try with the below domain. Add it into the child product id field.

         domain="[('category_id', '=', parent.category_id)]"

Hope it will help you.
Up vote please.

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Invalid composed field farm_materials.category_id in domain of ([('categ_id', '=', farm_materials.category_id)])


also

ValueError: Invalid composed field materials.category_id in domain of ([('categ_id', '=', materials.category_id)])


Awatar
Odrzuć

No Not that way.
you have to use the "parent" key on a right side of the domain. Not 'farm_materials' or 'materials'.

please take the reference from here :

https://github.com/odoo/odoo/blob/15.0/addons/account/views/account_move_views.xml#L902

Powiązane posty Odpowiedzi Widoki Czynność
0
kwi 22
2642
1
cze 25
1650
3
lip 25
3282
1
maj 25
1424
1
maj 25
1672