Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] fieldservice_agreement: Migration to 17.0 #1210

Open
wants to merge 41 commits into
base: 17.0
Choose a base branch
from

Conversation

imlopes
Copy link

@imlopes imlopes commented Sep 9, 2024

Depends on:
agreement:

Adding new fieldservice_agreement_serviceprofile (did in a new commit❓ )

Removing dependency from agreement_serviceprofile on fieldservice_agreement and adding a new glue module :
agreement_serviceprofile: OCA/agreement#39

...

Bhavesh Odedra and others added 30 commits September 9, 2024 15:18
[UPD] README.rst
* [IMP] fieldservice_agreement

[UPD] README.rst
… move views to agreement module 3. improve location heirarchy name construction
[IMP] fieldservice_vehicle_stock
[UPD] Update fieldservice_agreement.pot

Added translation using Weblate (Portuguese (Brazil))

Added translation using Weblate (Spanish (Chile))

Translated using Weblate (Spanish (Chile))

Currently translated at 100.0% (15 of 15 strings)

Translation: field-service-12.0/field-service-12.0-fieldservice_agreement
Translate-URL: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_agreement/es_CL/

Added translation using Weblate (German)

Translated using Weblate (German)

Currently translated at 6.7% (1 of 15 strings)

Translation: field-service-12.0/field-service-12.0-fieldservice_agreement
Translate-URL: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_agreement/de/

Translated using Weblate (German)

Currently translated at 26.7% (4 of 15 strings)

Translation: field-service-12.0/field-service-12.0-fieldservice_agreement
Translate-URL: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_agreement/de/

Translated using Weblate (German)

Currently translated at 100.0% (15 of 15 strings)

Translation: field-service-12.0/field-service-12.0-fieldservice_agreement
Translate-URL: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_agreement/de/

[ADD] Spanish (es) translation

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (15 of 15 strings)

Translation: field-service-12.0/field-service-12.0-fieldservice_agreement
Translate-URL: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_agreement/pt_BR/

Translated using Weblate (Spanish)

Currently translated at 100.0% (15 of 15 strings)

Translation: field-service-12.0/field-service-12.0-fieldservice_agreement
Translate-URL: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_agreement/es/

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (15 of 15 strings)

Translation: field-service-12.0/field-service-12.0-fieldservice_agreement
Translate-URL: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_agreement/pt_BR/

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (15 of 15 strings)

Translation: field-service-12.0/field-service-12.0-fieldservice_agreement
Translate-URL: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_agreement/pt_BR/

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (15 of 15 strings)

Translation: field-service-12.0/field-service-12.0-fieldservice_agreement
Translate-URL: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_agreement/pt_BR/

Added translation using Weblate (Spanish (Argentina))

Translated using Weblate (Spanish (Argentina))

Currently translated at 100.0% (15 of 15 strings)

Translation: field-service-12.0/field-service-12.0-fieldservice_agreement
Translate-URL: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_agreement/es_AR/
[MIG] Black

[MIG] Added more coverage to tests

[MIG] Add contract to dependancy

Add maintainer

Update CONTRIBUTORS.rst

add eol
It will be better to properly fix by not using replace I guess
OCA-git-bot and others added 5 commits September 9, 2024 15:18
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: field-service-14.0/field-service-14.0-fieldservice_agreement
Translate-URL: https://translation.odoo-community.org/projects/field-service-14-0/field-service-14-0-fieldservice_agreement/
Currently translated at 100.0% (19 of 19 strings)

Translation: field-service-14.0/field-service-14.0-fieldservice_agreement
Translate-URL: https://translation.odoo-community.org/projects/field-service-14-0/field-service-14-0-fieldservice_agreement/es_AR/
@imlopes imlopes marked this pull request as draft September 10, 2024 12:34
@imlopes imlopes force-pushed the 17.0-mig-fieldservice_agreement branch 2 times, most recently from 7e0abc0 to 1f97aa3 Compare September 10, 2024 13:22
@imlopes imlopes force-pushed the 17.0-mig-fieldservice_agreement branch from 1f97aa3 to ae16354 Compare September 10, 2024 13:28
@imlopes imlopes marked this pull request as ready for review September 10, 2024 13:31
@ivantodorovich
Copy link

Can you take care of this :

TODO: Add new fieldservice_agreement_serviceprofile ❓

Otherwise we're not supporting the same features that were before the migration.

@max3903 max3903 added this to the 17.0 milestone Sep 19, 2024
@max3903 max3903 self-assigned this Sep 19, 2024
@imlopes
Copy link
Author

imlopes commented Sep 20, 2024

Can you take care of this :

TODO: Add new fieldservice_agreement_serviceprofile ❓

Otherwise we're not supporting the same features that were before the migration.

I did on a new commit

As we're removing the dependency on `agreement_serviceprofile`, a new glue module is added to keep the same features than before.
@imlopes imlopes force-pushed the 17.0-mig-fieldservice_agreement branch from fb69f70 to 2dfb703 Compare September 20, 2024 12:56
@imlopes imlopes force-pushed the 17.0-mig-fieldservice_agreement branch 2 times, most recently from 9128787 to 8b034c3 Compare September 20, 2024 13:06
@imlopes imlopes force-pushed the 17.0-mig-fieldservice_agreement branch from 8b034c3 to 4dc8a54 Compare September 20, 2024 16:34
@max3903
Copy link
Sponsor Member

max3903 commented Sep 21, 2024

@imlopes Can you split this pull request and have one for each module?

@@ -24,7 +24,7 @@
type="object"
class="oe_stat_button"
icon="fa-laptop"
context="{'default_agreement_id': active_id}"
context="{'default_agreement_id': id}"
Copy link
Contributor

Choose a reason for hiding this comment

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

why not active_id?

Copy link
Author

Choose a reason for hiding this comment

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

I got from here :

If you are using active_id, active_ids or active_model in your views (for example, for a smart-button context), you should replace them by the corresponding good practices:

id instead of active_id.
Hard-coded model name instead of active_model.
active_ids doesn't have direct replacement candidate. It will depend on what you want to achieve. It's a weird case though.

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-17.0

agreements = self.env["agreement"].search(
[("fsm_location_id", "=", loc.id)]
)
ids = []
Copy link
Contributor

Choose a reason for hiding this comment

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

agreement_ids = agreements.ids
service_profiles = self.env['agreement.serviceprofile'].search(
    [('agreement_id', 'in', agreement_ids)]
)
ids = list(set(service_profiles.ids))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.