When my Opportunity goes from the stage new to qualified, I need odoo to create a project containing certain tasks following a given template.
For that I tried to create a product "Project creation", which is a service and whose sale should create a project following my template. Therefore, the stage change on my opportunity should create a sale order, on which a quotation template is defined and for which the customer is the same as the opportunity's customer.
This is where I have a problem, if i try to set sale_order.partner_id = record.partner_id. I get this error :
psycopg2.ProgrammingError: can't adapt type 'res.partner'
If I do not set this line, I also get an error as a sale cannot be created without a customer.
Where does this error come from ? Is there another way to do this ?