[18.0][MIG] fieldservice_account_analytic - #1578
Open
Jimmy-sc94 wants to merge 48 commits into
Open
Conversation
- This change removes most of the invoicing logic from fieldservice_account and puts it into its own module
…invoice* and fsm_order
[IMP] Move Method Up [IMP] api.model + space [IMP] fsm_parent_id [FIX] Typo
[IMP] Remove Unused Import [IMP] Github Comments [IMP] Add FSM to Variable
Currently translated at 100.0% (25 of 25 strings) Translation: field-service-14.0/field-service-14.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-14-0/field-service-14-0-fieldservice_account_analytic/es_AR/
Currently translated at 76.0% (19 of 25 strings) Translation: field-service-14.0/field-service-14.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-14-0/field-service-14-0-fieldservice_account_analytic/tr/
Currently translated at 100.0% (25 of 25 strings) Translation: field-service-14.0/field-service-14.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-14-0/field-service-14-0-fieldservice_account_analytic/pt_BR/
Currently translated at 100.0% (21 of 21 strings) Translation: field-service-15.0/field-service-15.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-15-0/field-service-15-0-fieldservice_account_analytic/it/
Currently translated at 100.0% (21 of 21 strings) Translation: field-service-15.0/field-service-15.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-15-0/field-service-15-0-fieldservice_account_analytic/es_AR/
Currently translated at 95.2% (20 of 21 strings) Translation: field-service-15.0/field-service-15.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-15-0/field-service-15-0-fieldservice_account_analytic/pt_BR/
Currently translated at 100.0% (21 of 21 strings) Translation: field-service-16.0/field-service-16.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-16-0/field-service-16-0-fieldservice_account_analytic/es/
Currently translated at 100.0% (21 of 21 strings) Translation: field-service-16.0/field-service-16.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-16-0/field-service-16-0-fieldservice_account_analytic/pt_BR/
Currently translated at 100.0% (21 of 21 strings) Translation: field-service-16.0/field-service-16.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-16-0/field-service-16-0-fieldservice_account_analytic/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: field-service-17.0/field-service-17.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-17-0/field-service-17-0-fieldservice_account_analytic/
This fixes unit tests in other modules like `fieldservice_sale`, which don't
directly depend on this one.
e.g.:
```
File "/opt/odoo/odoo/api.py", line 415, in _model_create_multi
return create(self, arg)
File "/__w/field-service/field-service/fieldservice_account_analytic/models/account_move.py", line 22, in create
raise ValidationError(
odoo.exceptions.ValidationError: No analytic account set on the order's Location.
```
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: field-service-17.0/field-service-17.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-17-0/field-service-17-0-fieldservice_account_analytic/
Currently translated at 100.0% (24 of 24 strings) Translation: field-service-17.0/field-service-17.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-17-0/field-service-17-0-fieldservice_account_analytic/it/
Currently translated at 91.6% (22 of 24 strings) Translation: field-service-17.0/field-service-17.0-fieldservice_account_analytic Translate-URL: https://translation.odoo-community.org/projects/field-service-17-0/field-service-17-0-fieldservice_account_analytic/es/
…_account_analytic When fieldservice_account_analytic is in the addons graph, analytic lines linked to an FSM order require the order's location to carry an analytic account. Set one on the test location (guarded, so tests keep passing when the module is not installed).
Jimmy-sc94
force-pushed
the
18.0-mig-fieldservice_account_analytic
branch
from
July 22, 2026 21:27
d753346 to
8dcfb46
Compare
Author
|
Note for reviewers: this PR contains a second commit touching fieldservice_subcontracting tests only. That module is new in 18.0 and its tests create analytic lines linked to FSM orders whose test location has no analytic account — which this module (faithful to its 17.0 behavior) rejects. The fix seeds an analytic account on the test location, guarded so those tests keep passing when this module is not installed. |
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.
Migration of fieldservice_account_analytic to 18.0.
Supersedes #1226 (closed as stale). This is a plain migration of the 17.0 module, as suggested in that PR discussion: the extra features that raised review concerns there (analytic plans, automatic analytic account creation loops, fsm.order.cost, the account_usability dependency) are NOT included.
Review feedback from #1226 addressed on the 17.0 codebase:
18.0 adaptations verified against the 18.0 branches: fsm_order_list_view / fsm_location_list_view inheritance ids, _search signature without access_rights_uid, t-out in report templates, demo data re-pointed to analytic.analytic_plan_projects, tests updated (no detailed_type, fields.Command, tracking_disable).
Module installs on a real Odoo 18 database and all its tests pass with demo data.