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

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
Discard
Author Best Answer

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
Discard
Best Answer

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
Discard

<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>

Related Posts Replies Views Activity
0
Dec 24
37
1
Sep 24
717
1
Sep 24
142
0
Aug 24
120
1
Apr 24
7152