oca-hr/odoo-bringout-oca-hr-expense-hr_expense_sequence/hr_expense_sequence/hooks.py
Ernad Husremovic dfcda4100c Move all OCA HR modules from oca-technical to dedicated oca-hr submodule
Reorganized 67 HR-related modules for better structure:
- Moved all odoo-bringout-oca-hr-* packages from packages/oca-technical/
- Now organized in dedicated packages/oca-hr/ submodule
- Includes attendance, expense, holiday, employee, and contract modules
- Maintains all module functionality while improving project organization

This creates a cleaner separation between general technical modules
and HR-specific functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-30 17:11:28 +02:00

13 lines
551 B
Python

# Copyright 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api
def assign_old_sequences(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
expense_obj = env["hr.expense.sheet"]
sequence_obj = env["ir.sequence"]
for expense in expense_obj.search([], order="id"):
expense.write({"number": sequence_obj.next_by_code("hr.expense.sheet")})