Odoo Help


Add a Server Action

Faheem Khan
on 5/5/15, 2:26 AM 878 views

I am trying to add a server action to confirm multiple sale orders, create thier invoices and deliver orders at once. For this purpose I am using sale_fast_confirm module from oerp. This module can cofirm one order only as its "Fast Confirm" button appears only in sale order form. 

To achive the task I am trying to create a Server action, and trying to copy the code from module to server action with no success. can some one please help me. the code is

from openerp import models, api

class sale(models.Model):

_inherit = 'sale.order'


def order_process_now(self):


Confirms order and creates and validates invoice, confirms pickings.


# Process order


inv_id = self.action_invoice_create()

if inv_id:

inv = self.env['account.invoice'].browse(inv_id)


for picking in self.picking_ids:



I had achieved the task. I simply call the button by "exceute" in server action.

Faheem Khan
on 5/5/15, 3:55 AM

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/5/15, 2:26 AM
Seen: 878 times
Last updated: 5/5/15, 3:55 AM