Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Inherit a field in Salesorder/Quotation Report

By
abin c ibrahim
on 1/5/15, 11:17 PM 676 views

Friends,

I changed the sale_view.xml as per the requirments.I have to bind the field referred(Object:crm.lead) from the Opportunities to this report.Can you say how it is possible?

is it a RML/Q-Web/MAKO report? You need to find what report to modify.

Atchuthan - Technical Consultant, Sodexis Inc
on 1/6/15, 12:26 AM
0
Kazim Mirza
On 1/6/15, 2:12 PM

Hello Abin

When ever you create a Quotation from crm.lead it will set the "Source Document" : "Quatation NUMBER"

"Source Document" : "Quatation NUMBER" Number will be ID of CRM.LEAD

No what you have to do is tou have to get the ID of that crm.lead and then you have to now get use BROWSE method with that ID.

Please don't hesitate to ask any question regarding this.

If you get the answer as you need then please accept the answer.

Thank You

 

 

 

0
abin c ibrahim
On 1/6/15, 11:03 PM

Thanks Kasim,

Can u tell me how to browse using that ID?

Regards...

Which field od crm.lead you want there in sale order. like if its a field_x Then you have to use browse method : def create(self, cr, uid, vals ,context=None): res = super(sale_order,self).create(cr, uid, vals) crm_obj = self.pool.get('sale.order') origin = self.browse(cr, uid,ids)[0].origin origin = origin.split('_', 1)[-1] #origin is the id of the crm.lead #for get any field value from crm.lead of perticuler id field_y_value = crm_obj.browse(cr, uid, origin)[0].field_y # now you can pput this field value in your custom field in sale order Thnkz

Kazim Mirza
on 1/7/15, 4:43 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 1/5/15, 11:17 PM
Seen: 676 times
Last updated: 3/16/15, 8:10 AM