[FIX] commission module installable
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user