Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
2997 Tampilan

Hi all,

im using a field service to automatically create a project when a sales order is confirmed.

i'm also trying to use studio to show a sales order field (for example the sales order id and some others) in the project list, but the field keeps coming blank (i tried using related fields via commercial entity, analytic account, sales order). i think these relate to a sales order created by the project, not the parent sales order which the project came from.

does anyone know how the project is related to the sales order it came from ?

thank you

Avatar
Buang
Penulis Jawaban Terbai

thank you for your answer, 

i'm leaving the solution here in case someone else has the same issue,

the problem was that the same field service was used in more than one sales order that automatically creates a project.

so when you create a sales order you must also create a new field service for it to connect to the field service project.

thank you


IMPORTANT EDIT:

after further investigation, it was not that the field service was used more than once, but that inside the field service there was a project template set. so, you can actually use the same field service for all the sales orders, but leave the project template inside the field service blank.

thank you

Avatar
Buang
Jawaban Terbai

Hello pan tzon,

project.project model has sale_order_id field in default odoo. you can add existing field using studio on form or tree view.



you can also inherit project list view and add sale_order_id field as below.


Please find check my comment for xml view

Thanks & Regards,



CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229 - 1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat 380015
    

Avatar
Buang

<record id="project_project_view_tree_inherit" model="ir.ui.view">
<field name="name">project.project.tree.inherit</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.view_project"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="sale_order_id"/>
</field>
</field>
</record>

Post Terkait Replies Tampilan Aktivitas
1
Jul 25
1973
2
Mar 25
2143
0
Feb 25
1735
0
Feb 25
2135
0
Feb 25
1846