Skip to Content
Menu
This question has been flagged
1610 Views

Hi,

We use odoo 11,  I created a module for contracts.

 In the contract form, I put a button on the sales order button to enter the sales order registration form .

I would also like to see the registered sales orders associated with this contract.  

 But I don't know how to do i. please help me.


<button name="create_sale_order" string="Sale Order"  type="object" class="oe_highlight" />  



 def create_sale_order(self):        

    return {           

         'name': 'Create Sale Order',         

         'res_model': 'sale.order',         

         'type': 'ir.actions.act_window',           

          'view_type': 'form',            

          'view_mode': 'form',        

          'views': [(self.env.ref('sale.view_order_form').id, 'form')],                

          view_id': self.env.ref('sale.view_order_form').id,        

         'target': 'current',                

       }     

Avatar
Discard