Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to add a Save button on the header of popup?

By
beriliox
on 3/23/16, 2:31 PM 289 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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/23/16, 2:31 PM
Seen: 289 times
Last updated: 3/24/16, 12:22 AM