[FIX] commission module installable

This commit is contained in:
Florian da Costa
2025-11-13 11:56:13 +01:00
parent 4b5385f391
commit b4efcdb2d7
7 changed files with 9 additions and 9 deletions

View File

@@ -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,
}

View File

@@ -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())

View File

@@ -36,7 +36,7 @@
<field name="assign_type"/>
<field name="user_id" required="assign_type == 'user'" readonly="assign_type != 'user'"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="company_id" invisible="1"/>
<field name="company_id" column_invisible="1"/>
</list>
</field>
</page>

View File

@@ -18,5 +18,5 @@
'views/commission_profile.xml',
'views/commission_result.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -19,5 +19,5 @@
'views/commission_profile.xml',
'wizards/res_config_settings.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -21,6 +21,7 @@
<setting id="commission_po_config" title="Purchase Order">
<field name="commission_po_config" />
</setting>
</block>
</xpath>
</field>
</record>

View File

@@ -19,5 +19,5 @@
"views/account_invoice_report.xml",
],
'demo': ['demo/demo.xml'],
'installable': False,
'installable': True,
}