Skip to content

[19.0][MIG] hr_expense_sequence: Migration to 19.0#353

Open
dnplkndll wants to merge 35 commits into
OCA:19.0from
ledoent:19.0-mig-hr_expense_sequence
Open

[19.0][MIG] hr_expense_sequence: Migration to 19.0#353
dnplkndll wants to merge 35 commits into
OCA:19.0from
ledoent:19.0-mig-hr_expense_sequence

Conversation

@dnplkndll

Copy link
Copy Markdown

Port of hr_expense_sequence from 18.0 to 19.0. Migration guide: https://github.com/OCA/maintainer-tools/wiki/#migration-to-version-19.0

Non-mechanical adaptations worth flagging

  • Sheet removed in 19.0: _inherit = "hr.expense.sheet"_inherit = "hr.expense". The number Char + auto-sequence-in-create() logic moves to hr.expense itself, and the recordset-level _rec_name = "number" follows. Sequence code changes from hr.expense.sheet to hr.expense.
  • View inherits: rewired to hr_expense.hr_expense_view_form / hr_expense_view_expenses_analysis_tree / hr_expense_view_search (the 18.0 sheet view IDs are gone).
  • Report inherit: rewired to hr_expense.report_expense (was report_expense_sheet).
  • post_init_hook: backfill now iterates hr.expense records (not sheet); same sequence-pull pattern.
  • Test rewrite: 18.0 tests created sheets and asserted the number on the sheet; the 19.0 version exercises hr.expense.create() with explicit / auto / manual-override paths.

@OCA-git-bot OCA-git-bot added series:19.0 mod:hr_expense_sequence Module hr_expense_sequence labels May 26, 2026
@dnplkndll dnplkndll force-pushed the 19.0-mig-hr_expense_sequence branch from 7cd28b5 to 0473f31 Compare May 26, 2026 23:37
@dnplkndll dnplkndll marked this pull request as draft May 27, 2026 00:15
@dnplkndll dnplkndll force-pushed the 19.0-mig-hr_expense_sequence branch 2 times, most recently from bcbf310 to bff17b0 Compare May 29, 2026 15:31
pedrobaeza and others added 21 commits May 29, 2026 16:51
In order to get visibility on https://www.odoo.com/apps the OCA board has
decided to add the OCA as author of all the addons maintained as part of the
association.
Currently translated at 100.0% (3 of 3 strings)

Translation: hr-10.0/hr-10.0-hr_expense_sequence
Translate-URL: https://translation.odoo-community.org/projects/hr-10-0/hr-10-0-hr_expense_sequence/de/
Currently translated at 100.0% (3 of 3 strings)

Translation: hr-expense-14.0/hr-expense-14.0-hr_expense_sequence
Translate-URL: https://translation.odoo-community.org/projects/hr-expense-14-0/hr-expense-14-0-hr_expense_sequence/pt_BR/
@dnplkndll dnplkndll force-pushed the 19.0-mig-hr_expense_sequence branch 2 times, most recently from d415fb2 to f6bf345 Compare May 30, 2026 14:55
@dnplkndll dnplkndll marked this pull request as ready for review May 30, 2026 15:19
/>
<field name="arch" type="xml">
<field name="name" position="before">
<field name="number" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why aren't we adding this field to the form view?

Comment on lines +14 to +15
# Create our own product fixture — OCA CI runs without demo data so
# `product.product_product_4` is not available.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Create our own product fixture — OCA CI runs without demo data so
# `product.product_product_4` is not available.

Could we remove this unnecessary comment?

@dnplkndll dnplkndll force-pushed the 19.0-mig-hr_expense_sequence branch from f6bf345 to 5c23b75 Compare June 2, 2026 17:46

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review LGTM!

@dnplkndll dnplkndll force-pushed the 19.0-mig-hr_expense_sequence branch 5 times, most recently from de2bfb9 to f165570 Compare June 19, 2026 19:12
@BhaveshHeliconia

Copy link
Copy Markdown
Contributor

Please squash the commits as explained here: https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests#mergesquash-the-commits-generated-by-bots-or-weblate

TheerayutEncoder and others added 14 commits June 22, 2026 13:56
Currently translated at 100.0% (3 of 3 strings)

Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_sequence
Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_sequence/it/
Currently translated at 100.0% (3 of 3 strings)

Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_sequence
Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_sequence/it/
Currently translated at 100.0% (3 of 3 strings)

Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_sequence
Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_sequence/it/
Currently translated at 100.0% (2 of 2 strings)

Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_sequence
Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_sequence/es/
hr.expense.sheet was removed in 19.0; retarget the sequence and number
field from the expense sheet to the individual hr.expense record.
@dnplkndll dnplkndll force-pushed the 19.0-mig-hr_expense_sequence branch from f165570 to b0e3b46 Compare June 22, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:hr_expense_sequence Module hr_expense_sequence series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.