-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
[9.0][MIG] crm_lead_to_event_registration module #68
[9.0][MIG] crm_lead_to_event_registration module #68
Conversation
* [ADD] crm_lead_to_event_registration ==================================== Register a lead directly in an event ==================================== This module allows to register a lead directly in an event when converting this lead into a partner, so that you can save several steps. Usage ===== Go to any lead in *Sales > Sales > Leads*, and click on the button "Convert to Opportunity". In the resulting screen, if the conversion action is "Convert to opportunity" and you have selected a related partner (a new or an existing one), you will have a section called "Event registration". In that section, you can select an event, and when you click on "Create opportunity", the partner will be registered automatically in the event. * [IMP] crm_lead_to_event_registration: Track state changes * [IMP] crm_lead_to_event_registration: Adapt to latest company changes
- Updated views - Updated Readme
class WizardModel(models.TransientModel): | ||
_name = "crm.lead.event.pick" | ||
|
||
lead_id = fields.Many2one( |
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.
Test this wizard.
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.
name = (s.contact_name or | ||
s.partner_name or | ||
s.partner_id.name) | ||
if not name: |
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.
Put here # pragma: no cover
and this is not critical to test
def action_check_status_confirm_registration(self): | ||
"""If the opportunity is won/lost, open/cancel registration.""" | ||
for s in self: | ||
if self._track_subtype(['stage_id']) == "crm.mt_lead_won": |
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.
Test this and change it if XML-IDs have changed.
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 tests.
def action_apply(self): | ||
res = super(CrmLead2OpportunityPartner, self).action_apply() | ||
self.ensure_one() | ||
if not self.event_id: |
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.
Put event_id
as required and you can remove this.
7e125b0
to
be88a6c
Compare
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.
Functionality tested on runbot
cc @Tecnativa