-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[PORT] disable_odoo_online. [REF] remove obsolete code. OCA convention. #583
Conversation
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you dont need the OCA logo, no need to provide the credits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
_inherit = 'publisher_warranty.contract' | ||
|
||
@api.multi | ||
def update_notification(self, cron_mode=True, context=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asking myself whether this is legal for people using EE.
For them it is not allowed to temper with the notification system.
This makes this module IMO not usable for them while the other features could make sense.
Would it be an option to split this function out of the module in a separate one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As suggested by Odoo staff, we made similar feature in web_debranding optional, but don't allow to switch it off (i.e. we always send request) for enterprise users.
Code to check whether it enterprise:
from odoo.release import version_info
is_enterprise = version_info[5] == 'e'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems fair to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the test.
# Copyright (C) 2013 Therp BV (<http://therp.nl>). | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openerp import api, models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from odoo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
disable_odoo_online used to remove user menu entries (top-right drop-down menu) such as "My odoo.com account"... but you dropped that part, so after installation of the module on v10, the menu entry "My odoo.com account" is still present. I would prefer to keep that part and remove such user menu entries. |
_inherit = 'publisher_warranty.contract' | ||
|
||
@api.multi | ||
def update_notification(self, cron_mode=True, context=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost seems like Odoo SA is shooting themselves in the foot by using a method available in Community in order to phone home in Enterprise. Solution seems sound though.
Also, think we can drop the context
arg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes wirh api.multi decorator we have access to context from self.env.context
@alexis-via : Thanks ! I didn't understand this part of code. I guessed it was obsolete. thanks for pointing this problem. Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review and test. Thanks for the work !
👍 Thanks for the rework! |
…n. (OCA#583) * [PORT] disable_odoo_online. [REF] remove obsolete code. OCA convention. * [FIX] restauring old feature * [IMP] do not disable some feature for Enterprise Edition. [REF] some improvements
…n. (OCA#583) * [PORT] disable_odoo_online. [REF] remove obsolete code. OCA convention. * [FIX] restauring old feature * [IMP] do not disable some feature for Enterprise Edition. [REF] some improvements
Thanks for your reviews.
cc @StefanRijnhart, @hbrunn.