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

[16.0][MIG] crm_phonecall: Migration to version 16.0 #490

Merged
merged 62 commits into from
May 30, 2023

Conversation

stefan-tecnativa
Copy link
Contributor

cc @Tecnativa TT42238

@chienandalu @pilarvargas-tecnativa please review!

cubells and others added 30 commits April 27, 2023 13:38
* crm_phonecall module (OCA#131)

This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module.

Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history.

* [MIG] crm_phone_call: Migrated to 10.0

 - FIX: Correct some lint errors

* [MIG] crm_phone_call: Migrated to 10.0
Currently translated at 100.0% (150 of 150 strings)

Translation: crm-12.0/crm-12.0-crm_phonecall
Translate-URL: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_phonecall/es/
Currently translated at 86.0% (129 of 150 strings)

Translation: crm-12.0/crm-12.0-crm_phonecall
Translate-URL: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_phonecall/de/
Currently translated at 92.7% (139 of 150 strings)

Translation: crm-12.0/crm-12.0-crm_phonecall
Translate-URL: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_phonecall/de/
Currently translated at 98.0% (147 of 150 strings)

Translation: crm-12.0/crm-12.0-crm_phonecall
Translate-URL: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_phonecall/de/
Currently translated at 27.3% (41 of 150 strings)

Translation: crm-12.0/crm-12.0-crm_phonecall
Translate-URL: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_phonecall/hr/
Currently translated at 41.3% (62 of 150 strings)

Translation: crm-12.0/crm-12.0-crm_phonecall
Translate-URL: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_phonecall/hr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: crm-13.0/crm-13.0-crm_phonecall
Translate-URL: https://translation.odoo-community.org/projects/crm-13-0/crm-13-0-crm_phonecall/
<field name="arch" type="xml">
<tree position="attributes">
<attribute name="editable" />
<t groups="crm_phonecall.group_show_form_view">
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem to work. Maybe there's a limitation for this technique when overriding attributes.

Copy link
Member

Choose a reason for hiding this comment

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

Still not working. You probably need to override _get_view and inject the attribute depending on the user's permission. Some reference on how to override such method (adapt it to your needs):

https://github.com/odoo/odoo/blob/7f6c463ccea5edf35e194e42728f62f4abe5eb9c/odoo/addons/base/models/res_currency.py#L318-L327

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, I deleted that record as it is no longer needed with these aproach. Can you check anyway if it is correct please?

Copy link
Member

Choose a reason for hiding this comment

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

You have to move the groups to the elements of the view, instead of the whole view. Does the group still exist?

@stefan-tecnativa stefan-tecnativa force-pushed the 16.0-mig-crm_phonecall branch 3 times, most recently from e19efbf to c91e5fd Compare May 9, 2023 08:50
Copy link

@CarlosRoca13 CarlosRoca13 left a comment

Choose a reason for hiding this comment

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

It LGTM 👍

@stefan-tecnativa stefan-tecnativa force-pushed the 16.0-mig-crm_phonecall branch from c91e5fd to 4e7a1a2 Compare May 15, 2023 09:22
Copy link

@pilarvargas-tecnativa pilarvargas-tecnativa left a comment

Choose a reason for hiding this comment

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

thanks 👍

@stefan-tecnativa stefan-tecnativa force-pushed the 16.0-mig-crm_phonecall branch from 4e7a1a2 to aceb8ec Compare May 18, 2023 13:02
Comment on lines 222 to 224
"""This is done for injecting the attribute depending on the user's permissions
as moving the group of the view attribute element didn't work and no similar examples
of use where found either"""
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"""This is done for injecting the attribute depending on the user's permissions
as moving the group of the view attribute element didn't work and no similar examples
of use where found either"""
"""Inject group check to make the tree editable or not. Apparently it can't be done
by pure view inheritance and attribute overriding"""

@stefan-tecnativa stefan-tecnativa force-pushed the 16.0-mig-crm_phonecall branch from aceb8ec to 715eabe Compare May 19, 2023 05:51
@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

1 similar comment
@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-490-by-pedrobaeza-bump-nobump, awaiting test results.

@pedrobaeza
Copy link
Member

/ocabot migration crm_phonecall

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone May 30, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request May 30, 2023
22 tasks
@OCA-git-bot OCA-git-bot merged commit 6fc323c into OCA:16.0 May 30, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 1d2dd01. Thanks a lot for contributing to OCA. ❤️

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.