Hi,
My goal is to have product-codes from our suppliers listed in the PO instead of our own product code which is used by default when creating a PO. (PO with only our own product codes is useless to us) I need to make modification to Purchase-module (purchase.py) in 'purchase_order_line'-class python code in this section:
.
.
if product.description_purchase:
name += '\n' + product.description_purchase
res['value'].update({'name': name})
.
.
to this:
if product.partner_ref:
name = product.partner_ref
res['value'].update({'name': name})
(Thanks to Saeed for this code!)
I wouldn't want to just edit the existing module directly, but to make a custom-module for the changes. Please can anyone help me out how to do this.. I know how to add new fields to a class by inheritage, but I'm out of ides on how to change the actual class code.