5962a1516f7403e602f2c3939043cc55e3398b0c
Current behaviour: In the project update section, if the project has only draft invoices linked to the analytic account of the project, the invoices smart button isn't present. But once we have at least 1 posted invoice, the button is shown, and when triggering the action, we see both the posted invoice and all the draft invoices that were not shown previously. Expected behaviour: The button should be visible, even if the only invoices linked to the analytic account of the project are only in draft. Steps to reproduce: - Install Project, Sales, Accounting - Activate Analytic Accounting in the Settings - Create a Project and make sure it has an analytic account linked to it - Create a new invoice in draft, make sure on the line you have set the analytic account of the project we just created. Save. - Go to the project update page, there is no smart button that will go to the invoice we just created. Reason for the problem: The Invoices smart button is shown only when the `invoice_count` is > 0. `invoice_count` is a related field to the same field name of the analytic account, which is a compute. In that compute we explicitly only take invoices that are posted, since in the context of an analytic account, it only makes sense to take actually posted invoices, since those are real revenues. So the button is shown only when we have at least 1 posted invoice. The action itself is just fetching all the `in_invoice, out_refund` invoices that are linked to this analytic account. Fix: Transform the `invoice_count` in `sale_project` module from a related to a regular compute and do a query with the same heuristics for the action of the invoice smart button. Affected versions: - 16.0 - saas-16.1 - saas-16.2 - master opw-3227421 closes odoo/odoo#119578 X-original-commit: 1b45e22530cb07ca437d2fd53bda3af2c918c223 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%