Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2961 Widoki

Hello everybody ,
I'm a noob on odoo development and in english. I'm sorry if I use wrong terms.

I will try to explain my problem.

My client create many of sale order and it is boring for him to see the sale order he just create. He would like when he click on save button a new view of sale order (like when he click on create button)
I have override the function create of sale order in my custom module and try to return a new views of sale order.

It does not work, I'don't know if is the good way.

Thx for your help

This is my code :

from openerp.osv import  osv, fields
class sale_order(osv.osv):
    _inherit = "sale.order"
    def create(self, cr, uid, vals, context=None):
        super(sale_order, self).create(cr, uid, vals, context=context)
        return {
            'type': 'ir.actions.act_window',
            'view_type': 'form',
            'view_mode': 'form',
            'res_model': 'sale.order',
            'context': context,
            'target': 'new',
        }

Alex

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
lip 21
13845
1
mar 15
6811
0
mar 15
3038
2
lip 23
2593
0
lip 19
2504