I tried to override a function which written in sale.order
model in sale_purchase_inter_company_rules
module.
Here is my code.
saleOrder.py
def _prepare_purchase_order_data(self, company, company_partner):
""" """
result = super(SaleOrder, self)._prepare_purchase_order_data(company,company_partner)
print('inside of _prepare_purchase_order_data')
result['my_key'] = 'my_value'
print(slef.dd)
return result
This was i tried and the this function didn't execute. You can see i made a type in my code intentionally to cause an error. Unfortunately without any error its parent function executed and created a new PO from the SO.