[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', 'views/account_move_line.xml',
'wizards/commission_compute_view.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). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models from odoo import api, fields, models
from odoo.tools import SQL
class AccountInvoiceReport(models.Model): class AccountInvoiceReport(models.Model):
@@ -11,7 +12,5 @@ class AccountInvoiceReport(models.Model):
commission_amount = fields.Float(readonly=True) commission_amount = fields.Float(readonly=True)
@api.model @api.model
def _select(self): def _select(self) -> SQL:
select_str = super()._select() return SQL("%s, line.commission_amount * account_currency_table.rate AS commission_amount", super()._select())
select_str += ", line.commission_amount * currency_table.rate AS commission_amount"
return select_str

View File

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

View File

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

View File

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

View File

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

View File

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