OCA / cooperative

GNU Affero General Public License v3.0
11 stars 22 forks source link

[16.0][FIX] remove duplicated field in partner form view #106

Closed huguesdk closed 6 months ago

huguesdk commented 10 months ago

remove duplicated member field in res.partner form view.

this is version 16.0 of #104. (the rest has been done in #86.)

huguesdk commented 10 months ago

i’m sorry, i don’t understand your remark. where is the field in that view except on line 39?

flotho commented 9 months ago

What tricks me is that the issue is called remove duplicate field and the code not referencing membership module. AFAICI, membership field is probably provide by the membership module of the odoo core. So this module should inherit from this module. As a consequence, we'll be able to understand and see that there is a duplicate field. Maybe also make the view inherit from the one's provided by the membership module.

But of course maybe I'm totally out of the scope, so please forgive me if it's the case. Let me know

huguesdk commented 9 months ago

i understand the confusion. this module has actually no link whatsoever with the membership module. it defines its own cooperative.membership model. the member field on the partner is a company-dependent computed field that refers to the member field of the cooperative.membership of the partner for the current company.

this change is just a fix in the view: without it, the member field would be present twice (on line 39 and 89), which is a mistake. it is needed to compute the visibility of some pages of the view, but since it is already present in the form, the value is available, no need to add it again (even as invisible).

OCA-git-bot commented 9 months ago

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

huguesdk commented 6 months ago

/ocabot merge patch

OCA-git-bot commented 6 months ago

Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 16.0-ocabot-merge-pr-106-by-huguesdk-bump-patch, awaiting test results.

OCA-git-bot commented 6 months ago

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