mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 14:52:00 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -3,17 +3,15 @@
|
|||
|
||||
from . import models
|
||||
from . import controllers
|
||||
from odoo.api import Environment, SUPERUSER_ID
|
||||
from odoo.tools import column_exists, create_column
|
||||
from odoo.tools.sql import column_exists, create_column
|
||||
|
||||
|
||||
def pre_init_hook(cr):
|
||||
def pre_init_hook(env):
|
||||
"""Do not compute the sale_order_template_id field on existing SOs."""
|
||||
if not column_exists(cr, "sale_order", "sale_order_template_id"):
|
||||
create_column(cr, "sale_order", "sale_order_template_id", "int4")
|
||||
if not column_exists(env.cr, "sale_order", "sale_order_template_id"):
|
||||
create_column(env.cr, "sale_order", "sale_order_template_id", "int4")
|
||||
|
||||
def uninstall_hook(cr, registry):
|
||||
env = Environment(cr, SUPERUSER_ID, {})
|
||||
def uninstall_hook(env):
|
||||
res_ids = env['ir.model.data'].search([
|
||||
('model', '=', 'ir.ui.menu'),
|
||||
('module', '=', 'sale')
|
||||
|
|
@ -21,8 +19,7 @@ def uninstall_hook(cr, registry):
|
|||
env['ir.ui.menu'].browse(res_ids).update({'active': False})
|
||||
|
||||
|
||||
def post_init_hook(cr, registry):
|
||||
env = Environment(cr, SUPERUSER_ID, {})
|
||||
def post_init_hook(env):
|
||||
res_ids = env['ir.model.data'].search([
|
||||
('model', '=', 'ir.ui.menu'),
|
||||
('module', '=', 'sale'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue