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

[14.0][IMP] partner_manual_rank: Set default value based on res_partner_search_mode context #1533

Merged

Conversation

ypapouin
Copy link
Contributor

@ypapouin ypapouin commented Jun 1, 2023

Use context set by Odoo in most of their views to pre-fill supplier/customer fields.
@MiquelRForgeFlow

Copy link

@kikopeiro kikopeiro left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link

@ljsalvatierra-factorlibre ljsalvatierra-factorlibre left a comment

Choose a reason for hiding this comment

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

Thank you for the fix!. Should be port to 16.0 too.

@flalexg
Copy link

flalexg commented Jun 6, 2023

Code review! LGTM.

Copy link

@luisg123v luisg123v left a comment

Choose a reason for hiding this comment

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

Missing commit description. I think same PR description would do the trick.

@ypapouin ypapouin force-pushed the 14.0-imp-partner_manual_rank-default-values branch 2 times, most recently from d07adee to 81b8396 Compare June 7, 2023 07:37
@ypapouin
Copy link
Contributor Author

ypapouin commented Jun 7, 2023

Tests fails but not related to this module

 2023-06-07 07:39:47,638 252 ERROR odoo unittest.suite: ERROR: setUpClass (odoo.addons.base_location_nuts.tests.test_base_location_nuts.TestBaseLocationNuts)
Traceback (most recent call last):
  File "/opt/odoo/odoo/tests/common.py", line 173, in _handleClassSetUp
    setUpClass()
  File "/__w/partner-contact/partner-contact/base_location_nuts/tests/test_base_location_nuts.py", line 13, in setUpClass
    cls.importer.run_import()  # loads nuts
  File "/__w/partner-contact/partner-contact/base_location_nuts/wizard/nuts_import.py", line 213, in run_import
    xmlcontent = self._download_nuts()
  File "/__w/partner-contact/partner-contact/base_location_nuts/wizard/nuts_import.py", line 147, in _download_nuts
    % (res_request.status_code, url)
odoo.exceptions.UserError: Got an error 404 when trying to download the file http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=ACT_OTH_CLS_DLD&StrNom=NUTS_2013&StrFormat=XML&StrLanguageCode=EN&StrLayoutCode=HIERARCHIC.

Copy link

@luisg123v luisg123v left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@luisg123v
Copy link

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Sorry @luisg123v 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.

Copy link

@aliciagaarzo aliciagaarzo left a comment

Choose a reason for hiding this comment

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

Code review LGTM.

@rafaelbn rafaelbn added this to the 14.0 milestone Aug 11, 2023
@rafaelbn
Copy link
Member

/ocabot rebase

@rafaelbn
Copy link
Member

Please @MiquelRForgeFlow could you review here? Are you agree?

@rafaelbn
Copy link
Member

Please @ypapouin , could you rebase and check CI Travis error that are 🔴 ?

Also runbot don't works

@OCA-git-bot
Copy link
Contributor

@rafaelbn The rebase process failed, because command git push --force decgroupe tmp-pr-1533:14.0-imp-partner_manual_rank-default-values failed with output:

remote: Permission to decgroupe/partner-contact.git denied to OCA-git-bot.
fatal: unable to access 'https://github.com/decgroupe/partner-contact/': The requested URL returned error: 403

…arch_mode` context

Use context set by Odoo in most of their views to pre-fill supplier/customer fields.
@ypapouin ypapouin force-pushed the 14.0-imp-partner_manual_rank-default-values branch from 81b8396 to 7da619b Compare August 22, 2023 12:59
@MiquelRForgeFlow
Copy link
Contributor

What is the use case exactly? Normally, when you create a partner (this is only where the default is considered) you don't have res_partner_search_mode in the context. Could you give an example where odoo creates a partner and res_partner_search_mode is in the context?

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

@ypapouin
Copy link
Contributor Author

The context is set almost everywhere
image

You can open the contact view from sales: 'res_partner_search_mode': 'customer'
image

Or from purchase: 'res_partner_search_mode': 'supplier'
image

But also create a contact directly in m2o fields
image

Copy link

@luisg123v luisg123v left a comment

Choose a reason for hiding this comment

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

LGTM 👍

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 14.0-ocabot-merge-pr-1533-by-luisg123v-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 0037eb4 into OCA:14.0 Aug 23, 2023
6 checks passed
@OCA-git-bot
Copy link
Contributor

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

@MiquelRForgeFlow
Copy link
Contributor

Please, do forward ports :)

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.

9 participants