diff --git a/commission_simple/__manifest__.py b/commission_simple/__manifest__.py index d98badc..1ec3a95 100644 --- a/commission_simple/__manifest__.py +++ b/commission_simple/__manifest__.py @@ -43,5 +43,5 @@ This module has been written by Alexis de Lattre from Akretion 'views/account_move_line.xml', 'wizards/commission_compute_view.xml', ], - 'installable': False, + 'installable': True, } diff --git a/commission_simple/models/account_invoice_report.py b/commission_simple/models/account_invoice_report.py index f703b11..4f21f79 100644 --- a/commission_simple/models/account_invoice_report.py +++ b/commission_simple/models/account_invoice_report.py @@ -3,6 +3,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models +from odoo.tools import SQL class AccountInvoiceReport(models.Model): @@ -11,7 +12,5 @@ class AccountInvoiceReport(models.Model): commission_amount = fields.Float(readonly=True) @api.model - def _select(self): - select_str = super()._select() - select_str += ", line.commission_amount * currency_table.rate AS commission_amount" - return select_str + def _select(self) -> SQL: + return SQL("%s, line.commission_amount * account_currency_table.rate AS commission_amount", super()._select()) diff --git a/commission_simple/views/commission_profile.xml b/commission_simple/views/commission_profile.xml index a103153..cda91d1 100644 --- a/commission_simple/views/commission_profile.xml +++ b/commission_simple/views/commission_profile.xml @@ -36,7 +36,7 @@ - + diff --git a/commission_simple_agent/__manifest__.py b/commission_simple_agent/__manifest__.py index 556190d..487cf35 100644 --- a/commission_simple_agent/__manifest__.py +++ b/commission_simple_agent/__manifest__.py @@ -18,5 +18,5 @@ 'views/commission_profile.xml', 'views/commission_result.xml', ], - 'installable': False, + 'installable': True, } diff --git a/commission_simple_agent_purchase/__manifest__.py b/commission_simple_agent_purchase/__manifest__.py index a8f3221..2d68895 100644 --- a/commission_simple_agent_purchase/__manifest__.py +++ b/commission_simple_agent_purchase/__manifest__.py @@ -19,5 +19,5 @@ 'views/commission_profile.xml', 'wizards/res_config_settings.xml', ], - 'installable': False, + 'installable': True, } diff --git a/commission_simple_agent_purchase/wizards/res_config_settings.xml b/commission_simple_agent_purchase/wizards/res_config_settings.xml index c04d3f3..7f4bab1 100644 --- a/commission_simple_agent_purchase/wizards/res_config_settings.xml +++ b/commission_simple_agent_purchase/wizards/res_config_settings.xml @@ -21,6 +21,7 @@ + diff --git a/sale_agent/__manifest__.py b/sale_agent/__manifest__.py index ab41da9..ceb40be 100644 --- a/sale_agent/__manifest__.py +++ b/sale_agent/__manifest__.py @@ -19,5 +19,5 @@ "views/account_invoice_report.xml", ], 'demo': ['demo/demo.xml'], - 'installable': False, + 'installable': True, }