opt seq sale

This commit is contained in:
ivan deng
2019-02-07 18:44:28 +08:00
parent 73d97e1eb3
commit 414c7d89e3
36 changed files with 2088 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import SUPERUSER_ID
from odoo.api import Environment
def post_init_hook(cr, pool):
"""
Fetches all the sale order and resets the sequence of the order lines
"""
env = Environment(cr, SUPERUSER_ID, {})
sale = env['sale.order'].search([])
sale._reset_sequence()