diff options
| author | Jigar Vaghela <jva@odoo.com> | 2020-02-19 13:07:03 +0000 |
|---|---|---|
| committer | Jigar Vaghela <jva@odoo.com> | 2020-03-24 10:51:55 +0000 |
| commit | 2bacc392763d4828adce47e4e6eef29e9ae55928 (patch) | |
| tree | 51bdc83f5a17590b111e8dc0c16651e3bf1593d3 | |
| parent | b446a1e95863734841771931adc0a5627c4f60b0 (diff) | |
[IMP] l10n_in_sale: support null product_id in tax line
we add product_id in tax line from saas-12.1 from this commit https://github.com/odoo/odoo/commit/451fd6cc90aaa14816376a0285334678df9ce484?diff=unified#diff-cc1fa4f0d598f9e02993620519146532R68
so when user is migrated from old version then product_id is null in tax line so in this commit we support null in product_id
closes odoo/odoo#48241
X-original-commit: f7da145a9a453dcf9057c3dbe719ae6c02804c04
Signed-off-by: Josse Colpaert <jco@openerp.com>
| -rw-r--r-- | addons/l10n_in_sale/report/account_invoice_report.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/l10n_in_sale/report/account_invoice_report.py b/addons/l10n_in_sale/report/account_invoice_report.py index 92894cecec9..16834b44fe0 100644 --- a/addons/l10n_in_sale/report/account_invoice_report.py +++ b/addons/l10n_in_sale/report/account_invoice_report.py @@ -9,7 +9,7 @@ class L10nInAccountInvoiceReport(models.Model): def _where(self): where_str = super(L10nInAccountInvoiceReport, self)._where() - where_str += """ AND aml.product_id != COALESCE( - (SELECT value from ir_config_parameter where key = 'sale.default_deposit_product_id'), '0')::int + where_str += """ AND (aml.product_id IS NULL or aml.product_id != COALESCE( + (SELECT value from ir_config_parameter where key = 'sale.default_deposit_product_id'), '0')::int) """ return where_str |
