forked from cuba-odoo/l10n-cuba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
17 lines (13 loc) · 821 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# from odoo import api, SUPERUSER_ID
# def _set_accounts(cr, registry):
# #write the default debit account on salary rule having xml_id like 'l10n_be_hr_payroll.1' up to 'l10n_be_hr_payroll.1409'
# env = api.Environment(cr, SUPERUSER_ID, {})
# names = [str(x) for x in range(1,1410)]
# data = env['ir.model.data'].search([('model', '=', 'hr.salary.rule'), ('module', '=', 'l10n_be_hr_payroll'), ('name', 'in', names)])
# account = env['account.account'].search([('code', 'like', '4530%')], limit=1)
# if account and data:
# rule_ids = [x['res_id'] for x in data.read(['res_id'])]
# env['hr.salary.rule'].browse(rule_ids).write({'account_debit': account.id})
from . import wizard