[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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user