Skip to Content
Menu
This question has been flagged
2 Replies
4592 Views

I have a custom ManytoOne Studio field named x_studio_field_luJPt which i am trying to have automatically updated to match the Source Document in the Manufacturing order.

I have tried a few different options and keep getting errors so am guessing my python code is all wrong as i am a newbie to this.

Basically field x_studio_field_luJPt needs to be the same as Origin (source field) when document is created/updated.

V12 odoo

Avatar
Discard
Author Best Answer

Hello,

So i am needing the full product description from the Sales Order to show up on the manufacturing order in the manufacturing module so the guys on the shop floor can see all the custom description.

I created a ManytoOne field that is the Sales Order number ie Source Document, then created a related field to that showing the full description. It all works fine except i have to manually choose the Sales Order from a dropdown each time...

So i am trying to automated that as it is the same number as the Source document or origin filed so figured we could automate that to match. Are you saying that is not possible or what do you suggest would be the best way?

Avatar
Discard

I already told you in the answer.

If you need it only for a specific model, put If condition in your search result (if only result comes with a record) and map the value to Many2one field. otherwise put that field empty.

Specific model in your case it will be sale.order

Best Answer

Hi,

From your question, what i understand is, you are trying to put the record mention in the source field to a Many2one field.

Source field is Char field. also it may contains the value(record name) from different models.

So you can't map that values to a Many2One relational field.

If you need it only for a specific model,  put If condition in your search result (if only result comes with a record) and map the value to Many2one field. otherwise put that field empty.


Thanks

Avatar
Discard
Related Posts Replies Views Activity
4
Oct 24
8736
0
May 24
335
1
Mar 24
295
1
Jun 24
659
3
Feb 24
12083