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

So I'm using the community version of Odoo 13.0 and I've been trying to modify the fields in a request for quotation to no avail. The issue is that a request for quotation has two columns that identify a product, labeled as Product and Description. Product field is always compiled as "[Product Internal Reference] Name" and the Description is "[Vendor Product Code] Vendor Product Name". If vendor product name is left empty in the price list, it is replaced by the product name in the Description field. So I'm trying to modify this so that I have three separate fields: one for the product name, one for the vendor product code, and one for the vendor product name. If vendor product name is empty, I would like the field to remain empty. I've been trying to find the function which generates these fields from product module, but I haven't been able to find them. Is there any way to modify the way these fields are calculated? If not, how can I access the vendor product code in the purchase module?

Any help is very much appreciated.

Avatar
Discard
Best Answer

Hi,

If you are trying to add new field in the purchase order line tree view, you can first of all inherit the purchase.order.line model and new fields to it, once you done it you can inherit the view and add it to the views.

Regarding displaying of product code along with the product name, it is done using the name_get function defined for the product, if you need to change this behavior you inherit and make changes in this function. And if you look to keep the internal reference in a new field, in the onchange function of the product field, you can write its internal reference to the new field.


Thanks

Avatar
Discard