[19.0][MIG] hr_expense_advance_clearing: Migration to 19.0#358
Draft
dnplkndll wants to merge 39 commits into
Draft
[19.0][MIG] hr_expense_advance_clearing: Migration to 19.0#358dnplkndll wants to merge 39 commits into
dnplkndll wants to merge 39 commits into
Conversation
247ba4c to
30c32a6
Compare
[UPD] Update hr_expense_advance_clearing.pot [UPD] README.rst (cherry picked from commit 47c7398)
Fix install error when there are already some expense in system. [UPD] README.rst hr_expense_advance_clearing 12.0.1.0.1 (cherry picked from commit 1f3ec1e)
(cherry picked from commit df4f68f)
(cherry picked from commit 00f8f4a)
We should prevent setting the analytic account in expenses used as employees advance. Otherwise, it can lead to errors charging against an analytic account that later won't be compensated when all is reconcile. Anyway, the advance is not an expense, but money of the company moving from one place to another, that later will be used for real expenses that will be imputed to the corresponding analytic account (cherry picked from commit 2723fe7)
(cherry picked from commit 3b75338)
(cherry picked from commit c77a2bc)
(cherry picked from commit 3b9851c)
…oduct (cherry picked from commit c159aff)
(cherry picked from commit 26e9383)
… view (cherry picked from commit 7ada587)
(cherry picked from commit 397249a)
(cherry picked from commit 2d47f02)
(cherry picked from commit e6c8719)
(cherry picked from commit 963dff4)
(cherry picked from commit e680241)
(cherry picked from commit e6d6691)
…ly on new clearing (cherry picked from commit fbbf303)
(cherry picked from commit 9728fd3)
(cherry picked from commit c9ad5bc)
(cherry picked from commit ee44183)
(cherry picked from commit 6f13bc8)
… clearing (cherry picked from commit 8d5a396)
(cherry picked from commit e6bc12d)
(cherry picked from commit c328cfc)
(cherry picked from commit 0004a0e)
Currently translated at 100.0% (57 of 57 strings) Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_advance_clearing Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_advance_clearing/it/ (cherry picked from commit 3a273f0)
Currently translated at 100.0% (56 of 56 strings) Translation: hr-expense-16.0/hr-expense-16.0-hr_expense_advance_clearing Translate-URL: https://translation.odoo-community.org/projects/hr-expense-16-0/hr-expense-16-0-hr_expense_advance_clearing/it/ (cherry picked from commit 1d62501)
(cherry picked from commit b91cc90)
…company so that the correct property can be retrieved (cherry picked from commit 213cb2f)
Related to odoo/odoo@063e224 (cherry picked from commit e174e02)
(cherry picked from commit 32354d4)
(cherry picked from commit 9831b13)
(cherry picked from commit 4dcae4d)
…s might intervene. TT55529 (cherry picked from commit 4a89241)
Currently translated at 100.0% (56 of 56 strings) Translation: hr-expense-18.0/hr-expense-18.0-hr_expense_advance_clearing Translate-URL: https://translation.odoo-community.org/projects/hr-expense-18-0/hr-expense-18-0-hr_expense_advance_clearing/it/ (cherry picked from commit 533941a)
…patibility) Since some other modules can introduce other moves to the expense sheet, this refactor allow some compatibility between those modules without changing behavior on this module. (cherry picked from commit 2be9623)
30c32a6 to
a59833d
Compare
4e129b3 to
2868181
Compare
hr.expense.sheet removed in 19.0; retarget to hr.expense (+ hr.employee.base->hr.employee).
2868181 to
8d34ecc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of
hr_expense_advance_clearingfrom 18.0 to 19.0 (migration guide). Substantive redesign: 19.0 removedhr.expense.sheet, so the module moves from a sheet-based to a per-expense data model (design ADR).Non-mechanical adaptations worth flagging
expense_typeSelection (expense|advance) onhr.expensereplaces the 18.0 sheet-leveladvanceboolean.clearing_advance_id(m2o) +clearing_expense_ids(o2m) replace the sheet'sadvance_sheet_id↔clearing_sheet_idslink — now per-expense.hr.employeeinherited directly (18.0'shr.employee.baseabstract was dropped in 19.0); smart button mirrored ontohr.employee.public.hr.expenseform/search (+ Advance / not-cleared / Clearing filters).account.move._compute_amountresolves the clearing link viaexpense_id.clearing_advance_idinstead of…sheet_id.advance_sheet_id.Known limitation (deferred)
clearing_residualis computed by aggregating approved clearing expenses, not by journal reconciliation — the 18.0 sheet-level auto-reconciliation (routing the clearing credit to the advance account) is deferred to a follow-up. Standard reconciliation UI still works. Existing 18.0 advance/clearing data is migrated in place bymigrations/19.0.1.0.0/— the line-leveladvance/av_line_idfields survive core's sheet removal and map toexpense_type/clearing_advance_id; sheet-only clearings without a line link are logged for manual review.19.0 relevance
19.0 core has no advance/clearing concept (no
advance/clearingin corehr_expense.py); distinct from core'saction_pay.