The inherited function didn't execute in Odoo 17 EE

42 views Asked by At

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.

0

There are 0 answers