Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
1
account_global_discount/report/__init__.py
Normal file
1
account_global_discount/report/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import account_invoice_report
|
||||
15
account_global_discount/report/account_invoice_report.py
Normal file
15
account_global_discount/report/account_invoice_report.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from odoo import api, models, tools
|
||||
|
||||
|
||||
class AccountInvoiceReport(models.Model):
|
||||
_inherit = "account.invoice.report"
|
||||
|
||||
@api.model
|
||||
def _where(self):
|
||||
where_sql = super()._where()
|
||||
where_sql_str = where_sql.code.replace(
|
||||
"NOT line.exclude_from_invoice_tab",
|
||||
"(NOT line.exclude_from_invoice_tab "
|
||||
"OR invoice_global_discount_id is not null)",
|
||||
)
|
||||
return tools.SQL(where_sql_str)
|
||||
Reference in New Issue
Block a user