[MIG] account_usability to v16 + rename to account_usability_akretion

This commit is contained in:
Alexis de Lattre
2022-12-13 23:02:02 +01:00
parent a63c35fcbf
commit a0c1d5f55f
54 changed files with 130 additions and 364 deletions

View File

@@ -0,0 +1,17 @@
# Copyright 2022 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountInvoiceReport(models.Model):
_inherit = 'account.invoice.report'
industry_id = fields.Many2one('res.partner.industry', string='Partner Industry', readonly=True)
@api.model
def _select(self):
res = super()._select()
res += ", COALESCE(partner.industry_id, commercial_partner.industry_id) AS industry_id"
return res