This question has been flagged

Hello,


I'm using Odoo13 Community Edition.


In the Sale Order view from the website (/my/order), I want to create a Button from my module.

From this button I want to perform a method in python.


If you dont know what I mean, I want to perform the method def button_validate(self) from stock.picking on a specific ID in the /my/order view, in this view the users can see the delivery orders and for specific dilevery orders they should be able to validate them on their own (lets say only for the IDs: "if self.location_dest_id == self.env.ref('stock.stock_location_stock"), but on the website.
I found out that I need to create a controller, but how can I catch the IDs from the view and how to create the button in the view?


The inherit template: sale_stock.sale_order_portal_content_inherit_sale_stock.


I would be very glad, if somebody could help me.

Avatar
Discard