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

[MIG][event_contact] Migration to v10 #87

Merged
merged 5 commits into from Aug 7, 2017

Conversation

yajo
Copy link
Member

@yajo yajo commented Jun 30, 2017

@yajo yajo self-assigned this Jun 30, 2017
@yajo yajo added this to the 10.0 milestone Jun 30, 2017
@pedrobaeza pedrobaeza mentioned this pull request Jun 30, 2017
7 tasks
the event. Contacts are needed due to inform the people
who should be contacted for the event

Installation
Copy link
Member

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

<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/
Copy link
Member

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>
Copy link
Member

Choose a reason for hiding this comment

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

Add yourself here

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

from openerp.tests.common import TransactionCase


class SomethingCase(TransactionCase):
Copy link
Member

Choose a reason for hiding this comment

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

Rename this

self.contact_ids = self.event_type_id.contact_ids


class EventType(models.Model):
Copy link
Member

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


To set contacts to event, you need to:

#. Go to *Marketing -> Events -> Events*.
Copy link
Member

Choose a reason for hiding this comment

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

Go to Events -> Events


To set contacts for an event type, you need to:

#. Go to *Marketing > Configuration > Events > Types of Events*.
Copy link
Member

Choose a reason for hiding this comment

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

Events > Configuration > Event Categories


.. 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
Copy link
Member

Choose a reason for hiding this comment

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

@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
Copy link
Member

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?

@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2016 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
Copy link
Member

Choose a reason for hiding this comment

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

add Tecnativa

@chienandalu
Copy link
Member

@yajo Looks like your tests are failing

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Perfect now 🙂 👍

@pedrobaeza
Copy link
Member

Please squash your 10.0 commits together

mikevhe18 and others added 5 commits July 10, 2017 09:58
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.
Copy link
Member

@luismontalba luismontalba left a comment

Choose a reason for hiding this comment

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

Tested on runbot

@pedrobaeza pedrobaeza merged commit 76afb35 into OCA:10.0 Aug 7, 2017
@pedrobaeza pedrobaeza deleted the 10.0-event_contact branch August 7, 2017 14:52
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.

None yet

5 participants