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.

1

[V8] Can Ecommerce orders be created as Sales Orders instead of Quotes?

By
grayson
on 3/6/15, 4:49 PM 1,301 views

I have noticed that orders placed in the odoo ecommerce are created as a 'Quote', which does not move any stock(virtual_available) until a salesperson confirms it as a 'Sales Order'. I am wondering how to modify the workflow so that these orders are automatically confirmed as Sales Orders as soon as they are created.

Thanks in advance for your input!

1

Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--
4136
| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
On 3/8/15, 12:41 PM

Hi,

something like that to add in a custom module:

from openerp import workflow
from openerp.osv import orm
class website(orm.Model):
    _inherit = 'website'

    def _website_confirm_sale_order(self, cr, uid, sale_order, context=None):

        context = context or {}

        if sale_order.exists() and sale_order_browse.state == 'draft':
            workflow.trg_validate(uid, 'sale.order', sale_order_browse.id, 'order_confirm', cr)

       
    def sale_get_order(self, cr, uid, ids, force_create=False, code=None, update_pricelist=None, context=None):

        context = context or {}

        sale_order_browse = super(website, self).sale_get_order(self, cr, uid, ids, force_create=force_create, code=code, update_pricelist=update_pricelist, context=context)

        self._website_confirm_sale_order(cr, uid, sale_order_browse, context=context)

        return sale_order_browse

Bye

0
Jonathan Hurtado
On 4/11/15, 6:40 PM

hi,

the answer is here.

https://www.odoo.com/forum/help-1/question/auto-action-to-confirm-sales-quotation-35598


regards

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

2 follower(s)

Stats

Asked: 3/6/15, 4:49 PM
Seen: 1301 times
Last updated: 4/11/15, 7:33 PM