This question has been flagged
2102 Views

I have a popup form as the image is displayed. But I have not a button to save records Form view.

http://es.zimagez.com/zimage/popupsavebutton.php


Explained , the button that opens the popup is in the sale.order.line model. And the popup view is in the stock.picking model.

The problem is that when I open the popup do not have the save button .

And finally , this is the code of the function that opens the popup :

@api.multi
def action_stock_picking(self):
    self.ensure_one()
    picking_form = self.env.ref('stock.view_picking_form', False)
    return {
        'name': _('Formulario de Inventario: Recepciones'),
        'type': 'ir.actions.act_window',
        'view_type': 'form',
        'view_mode': 'form',
        'res_model': 'stock.picking',
        'views': [(picking_form.id, 'form')],
        'view_id': picking_form.id,
        'target': 'new',
        'context': dict(
            default_partner_id=self.order_id.partner_id.id,
            default_origin=self.order_id.name,
            default_picking_type_id = 1,
            default_model='stock.picking',
            default_res_id=self.id,
            default_composition_mode='comment',
            mark_invoice_as_sent=True,
        ),
    }

Thanks for all your help.

Avatar
Discard