-
Notifications
You must be signed in to change notification settings - Fork 26
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
Integrate partner_contact_address to cooperator module #350
Comments
@robinkeunen I don't have a full picture yet, but here's below what I understand. But first, is this work on v12, v14 or both at the same time? This module was just ported to v14, so I guess a refactoring would need to affect v14 as well.
For me, there is a difference by design: "adding a contact as representative" is meant as a general feature and put in the module
If there is no need for a 'representative' type outside of
Not that I could find. However, if the need behind the representative type is to have an address, there seems to be a module that does this (is this why
I don't understand what that is.
Let's ask someone who knows more about |
Yes, it will have to affect both versions.
From what you say, I still don't see the difference. It seems to me these are two technical solutions to address the same functional problem. Moreover, As is, there are no limits whatsoever to the number of representative in the code. I would have thought that we would need one to know whom to address the communication to but I seem to be wrong on that.
I don't think there is a need since
As said above, there are no constraints at this time on the number of representatives for a company. Both the boolean and the type are used throughout the code.
This is no exactly what the
It's a view in the Cooperator Application that displays all the representative contacts of member companies. |
@robinkeunen and @polchampion
For "lesptitspots", Cath did the implementation and I don't know why a module was or was not installed, and I don't know why it was made by default a representative type. They have an odoo consultant volunteer, I might have tried some things. I don't think we need to spend a lot of time on their database (the consultant told me he would advise to not touch anymore the functionalities of the database because they have no money). |
Recap discussion with @polchampion Let's split the problem in two parts and process sequentially:
|
Part 1 is enough for now. Part 2 can be put in ROADMAP.rst and and in an issue for the time being. I'm 95% sure lesptitspots is not aware of this module. |
I checked in all the *partner.py files and the type doesn't seem to be used in any logic. Because the field name "type" is so generic, I could not check in all the codebase. I ran |
PR in 12.0: PR in 14.0: |
@victor-champonnois Can't access |
@polchampion it's fixed ! |
@victor-champonnois LGTM
|
@polchampion should I put the deploy note in a task ?
import logging
_logger = logging.getLogger(__name__)
# undefined name 'env'
env = env # noqa: F821
module_to_uninstall_names = [
"partner_contact_address",
]
modules_to_uninstall = env["ir.module.module"].search(
[
(
"name",
"in",
module_to_uninstall_names,
),
(
"state",
"!=",
"uninstalled",
),
]
)
for module in modules_to_uninstall:
_logger.info("uninstall %s", module.name)
try:
module.button_immediate_uninstall()
except Exception:
_logger.exception("failed to uninstall %s", module.name)
env.cr.commit() |
@victor-champonnois If ran through the shell, it will need a |
@polchampion
|
@victor-champonnois Sur
|
@polchampion le problème arrive déjà en 12.0. Je créé une issue à part là dessus. |
Goal
Remove
partner_contact_address
dependencies ofcooperator
since it is not in the oca.partner_contact_address
adds a representative type to partners. Other types areSuggestion
My first idea was
cooperator
topartner_contact_address
partner_contact_address
fromcie-addons
.BUT
While doing that, I realise that
cooperator
module alsorepresentative
representative_of_member_company
Questions to the analysts before I start
representative
type.Other information
representative==True
. 10 of those are not of type "cooperator".The
representative_of_member_company
field is used to open the view "Company representative" from the menu. We should keep it.Miscellaneous notes
partner_contact_address
is only installed on databases that usecooperator
except forlesptitspots
.Most contacts of
lesptitspots
are representative which does not make much sense. It's probably a mistake since "representative" is made the default value to the partner type field by thepartner_contact_address
module.The text was updated successfully, but these errors were encountered: