Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
5669 มุมมอง

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

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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?

อวตาร
ละทิ้ง

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

คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
มิ.ย. 25
2295
1
มิ.ย. 25
24944
4
ต.ค. 24
10454
0
พ.ค. 24
1535
1
มี.ค. 24
1435