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
[MIG][event_contact] Migration to v10 #87
Conversation
event_contact/README.rst
Outdated
the event. Contacts are needed due to inform the people | ||
who should be contacted for the event | ||
|
||
Installation |
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.
Remove this obvious instructions that are also referred to 8.0 version (and other people can obtain the module via Apps).
event_contact/README.rst
Outdated
<https://github.com/OCA/event/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smashing it by providing a detailed and welcomed `feedback | ||
<https://github.com/OCA/ |
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.
Update template
Contributors | ||
------------ | ||
|
||
* Michael Viriyananda <viriyananda.michael@gmail.com> |
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.
Add yourself here
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
event_contact/tests/test_event.py
Outdated
from openerp.tests.common import TransactionCase | ||
|
||
|
||
class SomethingCase(TransactionCase): |
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.
Rename this
event_contact/models/event.py
Outdated
self.contact_ids = self.event_type_id.contact_ids | ||
|
||
|
||
class EventType(models.Model): |
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.
Split this in the corresponding file
event_contact/README.rst
Outdated
|
||
To set contacts to event, you need to: | ||
|
||
#. Go to *Marketing -> Events -> Events*. |
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.
Go to Events -> Events
event_contact/README.rst
Outdated
|
||
To set contacts for an event type, you need to: | ||
|
||
#. Go to *Marketing > Configuration > Events > Types of Events*. |
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.
Events > Configuration > Event Categories
event_contact/README.rst
Outdated
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/199/8.0 |
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.
event_contact/models/event.py
Outdated
@api.onchange("event_type_id") | ||
def _onchange_type_set_contact_ids(self): | ||
if self.event_type_id.contact_ids and not self.contact_ids: | ||
self.contact_ids = self.event_type_id.contact_ids |
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.
Why to check if there are previous contacts assigned to the event
? Isn't it better to add those on the event_type
to the existing ones?
event_contact/__manifest__.py
Outdated
@@ -0,0 +1,21 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright 2016 OpenSynergy Indonesia | |||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
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.
add Tecnativa
@yajo Looks like your tests are failing |
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.
Perfect now 🙂 👍
Please squash your 10.0 commits together |
Also it will load the contacts from the event type if the event has none and the type has some.
Document new behavior for event type contacts, and fix its test.
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.
Tested on runbot
@Tecnativa