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

[12.0][MIG] website_portal_contact #882

Merged
merged 10 commits into from
May 4, 2022

Conversation

SirTakobi
Copy link

@SirTakobi SirTakobi commented Mar 21, 2022

Superseding #840

Added history with format patch, plus some improvement (see commits) that ideally should go in the migration commit.
I'm keeping the new edits in dedicated commits in order to preserve authorship in existing commits.

@oca-clabot
Copy link

Hey @SirTakobi, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/cla
Here is a list of the users:

Appreciation of efforts,
OCA CLAbot

@SirTakobi SirTakobi force-pushed the 12.0-mig-website_portal_contact branch from 0ee9726 to 305dacb Compare March 21, 2022 14:40
yajo and others added 7 commits March 21, 2022 15:45
…CA#239)

[ADD] website_portal_contact Manage your contacts from your portal

This module extends the functionality of the website portal to allow your users to manage their contacts.

To use this module, you need to:

1. Log in as a portal user.
2. Go to your portal home.
3. Go to your contacts manager.
4. Read, create, edit or delete (disable) any contacts you want!

Known issues / Roadmap:

- This uses the backported version of the website portal from v10. When migrating to v10, we should adapt to any changes there.
- Remove workarounds for odoo/odoo#12961 in JS tour when fixed.
- Replace website_portal_v10 by portal
- Fix menu, breadcumb and contact_count
- Adapt test with tour
- Translate fr_CA.po, fr.po and pot
- Fix parent_id with the same partner_id
The previous access rules did only allow edits on partners with type == contact. That caused an access error
when one edited a contact with another type e.g. "invoice address". This is prevented now by allowing to edit
any contact type.
@SirTakobi SirTakobi force-pushed the 12.0-mig-website_portal_contact branch from 305dacb to a581160 Compare March 21, 2022 15:03
@SirTakobi
Copy link
Author

Hey @SirTakobi, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet. You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/cla Here is a list of the users:

Appreciation of efforts, OCA CLAbot

@yajo @mathben can I have the email linked to your accounts so that I can set it inside your commits?
Otherwise just point me to one of your commits where the github user is recognized and I'll get the email from there.
Thanks!

@mathben
Copy link

mathben commented Mar 21, 2022

@SirTakobi I update my github settings with the email [email protected]
Is it working?
Thanks

@SirTakobi
Copy link
Author

@SirTakobi I update my github settings with the email [email protected] Is it working? Thanks

Yes, now your commits in this PR show the github user too:
image

@yajo
Copy link
Member

yajo commented Mar 22, 2022

I think that's a bug in the bot and we can just ignore it. See OCA/oca-github-bot#209.

Copy link
Member

@eLBati eLBati left a comment

Choose a reason for hiding this comment

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

portalcontacts

@SirTakobi SirTakobi requested a review from eLBati March 22, 2022 16:37
@SirTakobi SirTakobi force-pushed the 12.0-mig-website_portal_contact branch 2 times, most recently from 8633598 to 87aa49b Compare March 23, 2022 11:35
Copy link
Member

@eLBati eLBati left a comment

Choose a reason for hiding this comment

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

thanks

Copy link
Member

@tarteo tarteo left a comment

Choose a reason for hiding this comment

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

I tried to install it on my local machine but I get this error:

Exception: Module loading website_portal_contact failed: file website_portal_contact/security/ir.model.access.csv could not be processed:
 No matching record found for external id 'product.model_product_pricelist' in field 'Object'
Missing required value for the field 'Object' (model_id)

I guess a dependency is missing

@SirTakobi SirTakobi force-pushed the 12.0-mig-website_portal_contact branch from 87aa49b to fca3640 Compare April 1, 2022 13:44
@SirTakobi
Copy link
Author

SirTakobi commented Apr 1, 2022

I tried to install it on my local machine but I get this error:

Exception: Module loading website_portal_contact failed: file website_portal_contact/security/ir.model.access.csv could not be processed:
 No matching record found for external id 'product.model_product_pricelist' in field 'Object'
Missing required value for the field 'Object' (model_id)

I guess a dependency is missing

Thanks for having a look, you are right it was missing the dependency from product, now I have added it.

EDIT: I know the new dependency might not fit in this module that ideally should only depend on website and portal, another possible way to fix it would be to create a bridge module for product and website_portal_contact

@SirTakobi SirTakobi requested a review from tarteo April 1, 2022 13:51
@SirTakobi SirTakobi marked this pull request as draft April 7, 2022 13:30
@SirTakobi SirTakobi requested a review from eLBati April 7, 2022 14:07
Copy link
Member

@eLBati eLBati left a comment

Choose a reason for hiding this comment

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

LGTM

@SirTakobi SirTakobi marked this pull request as ready for review April 7, 2022 14:32
Copy link
Member

@tarteo tarteo left a comment

Choose a reason for hiding this comment

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

Thanks!

@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). 🤖

Copy link

@mrcast mrcast left a comment

Choose a reason for hiding this comment

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

Functional test ok!

@tarteo
Copy link
Member

tarteo commented Apr 8, 2022

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Sorry @tarteo you are not allowed to merge.

To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons.

If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the maintainers key of its manifest.

@SirTakobi
Copy link
Author

/ocabot merge nobump

@tarteo thanks for trying 😄

Maybe someone of @OCA/website-maintainers can have a look?

@SirTakobi
Copy link
Author

@OCA/website-maintainers can someone have a look? Thanks!

@hbrunn
Copy link
Member

hbrunn commented May 4, 2022

could you squash all your migration commits?

[FIX] Prevent error 500 due to missing field 'name'
[FIX] Allow to create partners: reading pricelists is needed for computing the pricelist for the created partner.
The added rule is similar to product.access_product_pricelist_user.
[I18N] Italian translations
[REF] New README format
[REF] Align UX to other portal pages
@SirTakobi SirTakobi force-pushed the 12.0-mig-website_portal_contact branch from 603c4e4 to 6eba968 Compare May 4, 2022 08:05
@SirTakobi
Copy link
Author

could you squash all your migration commits?

I have squashed most of the commits; I have kept a few commits separated because they are dedicated to specific improvements, could you please check if it looks better now?

@hbrunn
Copy link
Member

hbrunn commented May 4, 2022

thanks
/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 12.0-ocabot-merge-pr-882-by-hbrunn-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit ba9d1d5 into OCA:12.0 May 4, 2022
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 84e8cfa. 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.