Odoo Help


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.


we need to add a purchase form in the project .how to do this?

veena vasudevan
on 1/23/14, 12:17 AM 702 views

we need to add a purchase form in the project .how to do this?

shashank verma
On 1/23/14, 12:31 AM

Hello veena

yes u can use man2many field for nesting.

.py file:

class project_project(osv.osv):

'purchase_id': fields.many2many('purchase.order',purchase_order_project_rel', 'project_id', 'purchase_id','Purchase Order'),

.xml file

<record id="project_form" model="ir.ui.view">
        <field name="name">project.project.form</field>
        <field name="model">project.project</field>
        <field name="arch" type="xml">

        <separator colspan="4" string="Purchase order info"/>
            <field colspan="4" name="purchase_id" />    


we want to reside purchase order form into another form (nesting).in project form we want the purchase form

veena vasudevan
on 1/23/14, 12:50 AM

I have edited my post, hopefully this will fulfils your requirement

shashank verma
on 1/23/14, 2:14 AM

in project form we want to add facility to create purchase orders related to the project. so can u help me to add purchase form into the project form

veena vasudevan
on 1/23/14, 2:24 AM

yes this will add purchase order related to your project only

u see the many2many relation table-> purchase_order_project_re

select * from purchase_order_project_rel ;

this will give you ids of orders related to your each project record.

shashank verma
on 1/23/14, 2:28 AM

shashank , i didn't get you.

veena vasudevan
on 1/23/14, 2:31 AM

did you try to run the code which i mentioned?

shashank verma
on 1/23/14, 2:34 AM

no since i dont know where to place that code.

veena vasudevan
on 1/23/14, 2:36 AM

place this code in your project module.

shashank verma
on 1/23/14, 2:44 AM

does your problem resolved?

shashank verma
on 1/23/14, 4:17 AM

another problem arised.....now we need to show all the transfers that take place inside a main warehouse and a local warehouse(including variations in product quantity) in a project

veena vasudevan
on 1/23/14, 4:32 AM

the same process u need to follow, just add another field in ur class

'warehouse_id': fields.many2many('stock.warehouse',warehouse_project_rel', 'project_id', 'warehouse_id','Warehouse Info'),

and do the changes in xml too

shashank verma
on 1/23/14, 4:47 AM

where to add the above code?

veena vasudevan
on 1/23/14, 5:00 AM

how to transfer products from mainstore to local warehouse?I need to implement a functionality so that the product transfer details of a particular project is viewable.It is like this,I need to save the product and its details transferred from the main store to the local warehouse for this project,the pending stock after the use has to be transferred back to the mainstore.How is this possible?

veena vasudevan
on 1/23/14, 6:18 AM

i want to install AMC(Annual Maintenance Contract),but in openerp, AMC is not found. From where we can get AMC(Annual Maintenance Contract)?

veena vasudevan
on 1/24/14, 6:22 AM

I need to add annual maintenance contract,but in openerp, AMC is not found. From where we can get AMC(Annual Maintenance Contract)?

veena vasudevan
on 1/27/14, 1:10 AM

I am a newbie in openerp and not aware of coding in open erp.My requirement is I need to place a grid in the create 'Contracts' form ,next to the Contracts Information tab.My grid should contain following headers-Product,Description,Quantity,Unit Price etc.It should also have the facility to 'Add New Product' to the product list.Can anyone help me in the above coding?

veena vasudevan
on 1/31/14, 4:25 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

0 follower(s)


Asked: 1/23/14, 12:17 AM
Seen: 702 times
Last updated: 3/16/15, 8:10 AM