-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
[17.0][MIG] crm_partner_assign: Migration to 17.0 #606
base: 17.0
Are you sure you want to change the base?
Conversation
/ocabot migration crm_partner_assign |
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.
LGTM
help="Partner this case has been assigned to.", | ||
related="partner_contact_assigned_id.commercial_partner_id", | ||
store=True, | ||
readonly=True, |
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.
Please put the readonly in view.
date_partner_assign = fields.Date( | ||
compute="_compute_date_partner_assign", | ||
string="Partner Assignment Date", | ||
readonly=False, |
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 here
264c642
to
439aef5
Compare
@peluko00 thanks for your review, i made the requested changes |
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.
LGTM, code review and tested in runboat
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.
LGTM!
@rousseldenis could you please merge |
@pedrobaeza could you merge? |
crm_partner_assign/__manifest__.py
Outdated
"summary": """ | ||
Assign a Partner to an Opportunity/Lead/Partner to indicate Partnership, | ||
""", |
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.
Incorrect change. If it doesn't fit, you should split the string, but don't introduce linebreaks with """
.
"summary": """ | |
Assign a Partner to an Opportunity/Lead/Partner to indicate Partnership, | |
""", | |
"summary": "Assign a Partner to an Opportunity/Lead/Partner" | |
" to indicate Partnership", | |
""", |
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
439aef5
to
202c573
Compare
class ResPartner(models.Model): | ||
_inherit = "res.partner" | ||
|
||
assigned_partner_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.
Reading the fields names here does not reflect for which purpose they have been set.
Maybe making crm
appear or... could be great.
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.
Because I was not sure what you meant with your comments I looked up this variable and found another module which has a very similar to this implementation in the standard Odoo.
https://github.com/odoo/odoo/tree/17.0/addons/website_crm_partner_assign
Is this intended that a subset of this module is this module?
@api.depends("implemented_partner_ids", "implemented_partner_ids.active") | ||
def _compute_implemented_partner_count(self): | ||
for partner in self: | ||
partner.implemented_count = len(partner.implemented_partner_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.
Shouldn't this use read_group
instead for performances ?
Same changes from #538 with cleaned commit history.