-
-
Notifications
You must be signed in to change notification settings - Fork 416
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
[16.0][MIG] crm_lead_product: Migration to 16.0 #551
base: 16.0
Are you sure you want to change the base?
Conversation
add filter for open opportunities in pipeline by product report [IMP] Extend test coverage
Currently translated at 100.0% (63 of 63 strings) Translation: crm-12.0/crm-12.0-crm_lead_product Translate-URL: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_lead_product/es/
Currently translated at 100.0% (63 of 63 strings) Translation: crm-12.0/crm-12.0-crm_lead_product Translate-URL: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_lead_product/ca/
* avoid conflict when testing a database with sale installed
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: crm-13.0/crm-13.0-crm_lead_product Translate-URL: https://translation.odoo-community.org/projects/crm-13-0/crm-13-0-crm_lead_product/
Currently translated at 100.0% (63 of 63 strings) Translation: crm-13.0/crm-13.0-crm_lead_product Translate-URL: https://translation.odoo-community.org/projects/crm-13-0/crm-13-0-crm_lead_product/it/
Currently translated at 100.0% (63 of 63 strings) Translation: crm-13.0/crm-13.0-crm_lead_product Translate-URL: https://translation.odoo-community.org/projects/crm-13-0/crm-13-0-crm_lead_product/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: crm-13.0/crm-13.0-crm_lead_product Translate-URL: https://translation.odoo-community.org/projects/crm-13-0/crm-13-0-crm_lead_product/
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
bc3b980
to
b748b5b
Compare
/ocabot migration crm_lead_product |
Hi! Can anyone merge this PR if there's no blocking issues? Thanks! |
@pedrobaeza Hi! Do you know who is the responsible to review and merge this PR? Thanks! |
It should be reviewed by 2 persons, one at least being PSC or maintainer: https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#review You can review other PRs, and ask in exchange that they review yours. |
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.
The only problem I see is with the report. Otherwise it looks good.
category_id = fields.Many2one("product.category", "Category", readonly=True) | ||
expected_revenue = fields.Float(readonly=True) | ||
planned_revenue = fields.Float(readonly=True) | ||
product_id = fields.Many2one("product.product", "Product", readonly=True) | ||
product_qty = fields.Integer("Product Quantity", readonly=True) | ||
product_tmpl_id = fields.Many2one( | ||
"product.template", "Product Template", 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.
The problem with the Many2one fields here is that they're not many-to-one for the lead, but for the lead line. Same applies to the rest of the lead line fields as there isn't a single planned_revenue
per lead, but per lead line. I think this report is fundamentally wrong; the id
of the report "record" should be the ID of the lead line, not ID of the lead, just like in Odoo's invoicing report.
As a result, you can't see the actual field values in the report's list view, but only the values of the first lead line repeated as many times as there are lead lines.
_description = "CRM Pipeline by Product Analysis" | ||
_rec_name = "id" | ||
|
||
active = fields.Boolean(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.
Suggestion to have Lead/Opportunity as a related field and use the lead line as the base model.
active = fields.Boolean(readonly=True) | |
active = fields.Boolean(readonly=True) | |
lead_id = fields.Many2one("crm.lead", "Lead/Opportunity", readonly=True) |
def _select(self): | ||
return """ | ||
SELECT | ||
l.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.
Suggestion to have Lead/Opportunity as a related field and use the lead line as the base model.
l.id, | |
ll.id, | |
l.id as lead_id, |
No description provided.