mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 11: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
|
|
@ -5,19 +5,18 @@ from . import models
|
|||
from . import wizard
|
||||
from . import report
|
||||
|
||||
from odoo import api, SUPERUSER_ID
|
||||
|
||||
def uninstall_hook(cr, registry):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
|
||||
def uninstall_hook(env):
|
||||
env.ref("account.account_analytic_line_rule_billing_user").write({'domain_force': "[(1, '=', 1)]"})
|
||||
rule_readonly_user = env.ref("account.account_analytic_line_rule_readonly_user", raise_if_not_found=False)
|
||||
if rule_readonly_user:
|
||||
rule_readonly_user.write({'domain_force': "[(1, '=', 1)]"})
|
||||
env.ref("account.account_analytic_line_rule_readonly_user").write({'domain_force': "[(1, '=', 1)]"})
|
||||
|
||||
def _sale_timesheet_post_init(cr, registry):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
products = env['product.template'].search([('detailed_type', '=', 'service'), ('invoice_policy', '=', 'order'), ('service_type', '=', 'manual')])
|
||||
def _sale_timesheet_post_init(env):
|
||||
products = env['product.template'].search([
|
||||
('type', '=', 'service'),
|
||||
('service_tracking', 'in', ['no', 'task_global_project', 'task_in_project', 'project_only']),
|
||||
('invoice_policy', '=', 'order'),
|
||||
('service_type', '=', 'manual'),
|
||||
])
|
||||
|
||||
for product in products:
|
||||
product.service_type = 'timesheet'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue