[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>
|
||||
|
||||
@@ -18,5 +18,5 @@
|
||||
'views/commission_profile.xml',
|
||||
'views/commission_result.xml',
|
||||
],
|
||||
'installable': False,
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
@@ -19,5 +19,5 @@
|
||||
'views/commission_profile.xml',
|
||||
'wizards/res_config_settings.xml',
|
||||
],
|
||||
'installable': False,
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<setting id="commission_po_config" title="Purchase Order">
|
||||
<field name="commission_po_config" />
|
||||
</setting>
|
||||
</block>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -19,5 +19,5 @@
|
||||
"views/account_invoice_report.xml",
|
||||
],
|
||||
'demo': ['demo/demo.xml'],
|
||||
'installable': False,
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user