Skip to Content
Menu
This question has been flagged
1 Reply
951 Views

I am trying to use a product selection to limit the domain of my lots and serial numbers.

In the maintenance app i would like my specific products to be assigned by serial number. so that we can track inventory that has been consumed. This is a first step in that development. 

When i select the product "test platten roller' i would like to only see the lot/serials on that product. I can set the domain manually by setting the domain to [["product_id.default_code","ilike","0001001"]]

however i want it to be dymanic using the many2one field. x_studio_field_NmJ3x  which is linked to the product.product field.

how can i dymanically apply a domain selection. i have tried record.default_code,  x_studio_field_NmJ3x.default code etc. and get a blank dropdown. Image below to show you where i am doing it. 



Avatar
Discard
Best Answer

Hi, 

    When you enable tracking for a product in inventory, you can go with the traceability ie lot / serial number for that product.

    Lot /serial no master has a product field, for the reference of tracking the product in all the locations.

So i think in your domain you should include,  domain="[('product_id', '=', product_id)]"

'product_id' - this is the field inside lot

product_id - This is your field in the current form view

Thanks

Avatar
Discard