My goal is to make the "Description" (name) field in Sale Order lines to only show the products "Sales Description"(description_sale)....and NOT the products "Name"+"Sales Description" as per default.
I have already accomplished what I want by editing the "/addons/sale/sale.py" file directly:
by simply modifying this code in class sale_order_line
:
if product_obj.description_sale:
result['name'] += '\n'+product_obj.description_sale
to
if product_obj.description_sale:
result['name'] = product_obj.description_sale
And now I want to add this modification to a module I have created with different modifications for my company so it survives future OpenERP updates. What is the correct way to inherit the class and modify that line of code from a custom module?
Thanks in advance for any help! ...i think it should be pretty easy for any experienced python programmer
Note1: My custom module is already up and running with other modifications, so I don't need help with that, I just need help with the python code necessary to accomplish my request above through inheritance. Note2: Before anyone recommends it to me, i'm aware there's already a module (sale_line_description) which accomplishes something similar, but INCORRECTLY....when the module is installed, when I add a product to the Sale Order line it does not use the product translation if it's a foreign partner.