Skip to Content
Menu
This question has been flagged
1 Reply
3680 Views

I am new to the Odoo and like to learn how to add a custom field to the Purchase Order - Order Line to include Part Number as primary search and selection instead of Product Name.

Thanks,

Avatar
Discard
Author

Thanks Cybrosys for your comment. Unfortunately the link you provided is not the solution I was looking for.

I need to add a new custom column (ex. Part Number) on the purchase order form for the order lines.

Best Answer

Hi,

For adding custom fields in Odoo,  you can refer to this question: https://www.odoo.com/forum/help-1/question/how-to-add-custom-fields-in-odoo-10-0-111122


This link will give you the idea about how to add the field, what you have to do is that just change the model and inherit view id to your model and view id.


Regarding searching using the part number, if you have got the same field in the product model, either you can change name_get method of the product model so that part number in the product model will be shown in the many2one field of the product model or you can add the field to order line and give an onchange function for the field and assign the product to product field.


Thanks

Avatar
Discard