Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
2072 Weergaven

I have create a many2one field x_studio_default_warehouse (relation: stock.warehouse) in the res.user model. I configure what the default warehouse for this user would be.

Now I am trying to write an automated action in sales order to automatically set the warehouse_id field as the user_id.x_studio_default_warehouse. The automation is triggered on Creation and Update. Trigger Fields: user_id

for record in self:
    record[("warehouse_id")] = record.user_id.x_studio_default_warehouse
But my code doesn't seem to work. Could someone tell me what I am doing wrong? 

Avatar
Annuleer

We already have a way to set the default warehouse for each user via the Field Services App. Did you know?

Auteur

I did not know that since we aren't using the Field Services App. Could achieve what I want using studio automation?

Gerelateerde posts Antwoorden Weergaven Activiteit
0
feb. 22
2176
1
jul. 25
1348
2
mrt. 25
1614
0
feb. 25
1240
0
feb. 25
1435