Odoo Help


Include project name on purchase order

on 3/18/15, 5:43 AM 1,619 views


We are a consultancy and all of our work is on projects for clients. We often buy parts to build prototypes for our customers. When I write a purchase order for the parts, how do I include a reference to the project I am working on? I'd eventually like to see all of the purchase orders written for a given project.

Thanks for your help.




| 5 3 8
Pondicherry, India
On 3/18/15, 9:43 AM

Hi Anthony,

you have to define a many2one or selection or a text fields with default value contains your project reference in the purchase.order class and also defines it in xml view.It helps you every time if you create a purchase order, you can select you project reference also

for example:

for selection field:

'project_ref': fields.selection([('ref1','Reference1'),('ref2','Reference2')], 'Project Reference',),

_defaults = {

'project_ref': 'ref1', 


for text or char field:

'project_ref':fields.char('Project Reference', size=64),

_defaults = {

'project_ref': 'Reference1',


On 4/9/15, 8:38 PM

Thanks for your help. It took me quite a while to learn enough of odoo to understand your answer. I think I get it now!

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/18/15, 5:43 AM
Seen: 1619 times
Last updated: 4/9/15, 8:38 PM