Is it possible to add a field in purchase order line in purchase order tree view?

Asked by Joel Cabral

Hi

Lets say i want to see the product field from purchase order line appear in purchase order tree view (xml).. is it possible? if its not then, is there other way for me to do something like this.

thanks,

Question information

Language:
English Edit question
Status:
Answered
For:
OpenERP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anup(SerpentCS) (anup-serpent) said :
#1

Hello Joel,

   You can get a field from a purchase.order.line(one2many) field to purchase.order using fields.related in purchase.order. You can see an example from res.partner where country and city are fields.related and correspond to the res.partner.address. Hope this helps.

Thanks.

Revision history for this message
John (john-ciangiulli) said :
#2

Hello Anup,

Can you expand on your answer?

I am trying to accomplish the same as Joel and have not had any luck.

I attempted to go to settings > db structure > models > purchase.order and have added a custom field (x_product_qty) as one2many, object relation as purchase.order.line, and relation field as product_qty. I then went to the purchase order tree view where I attempted to add the new custom field via the xml file in edit form view. After that did not work I attempted to add it via the purchase order tree view under manage views which also did not work. I can get the Quantity (x_product_qty) field to show in the purchase order tree view, but it is not populating the data from the order line inside of the quotation.

Any help will be much appreciated.

Thank you!

Can you help with this problem?

Provide an answer of your own, or ask Joel Cabral for more information if necessary.

To post a message you must log in.