Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Hello friends. My situation is as follows:
I have my form sale.order model. And what I want is that when you press 'Confirm sale' , it must open the inventory form ( stock.picking.form ) . An easy way is modifying sensitive button 'Confirm sale' and add the function that opens the inventory form . The function that opens the inventory form is called action_view_delivery (). This in the sale.order model. And the function of the button 'Confirm sale' is called action_confirm (). And also this in the sale.order model.
This is the imagine that shows the sale.order form before to confirm sale.
This is what should display when i press the 'Confirm sale' button .
And this is the function of the button 'Confirm sale'
for order in self:
order.state = 'sale'
if not order.project_id:
for line in order.order_line:
if line.product_id.invoice_policy == 'cost':
if self.env['ir.values'].get_default('sale.config.settings', 'auto_done_setting'):
self.action_view_delivery() // I added this line to call the funcion that opens the stock picking form.
Why not automatically open the inventory form when i press the custom button?
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 platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/16/16, 3:49 PM|
|Seen: 265 times|
|Last updated: 5/17/16, 1:36 AM|