コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
6457 ビュー

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!

アバター
破棄
最善の回答

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

アバター
破棄
最善の回答

hi,

the answer is here.

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


regards

アバター
破棄
関連投稿 返信 ビュー 活動
0
9月 24
1171
4
7月 24
9901
4
7月 23
8807
7
7月 19
8566
3
8月 16
7655