diff --git a/lcc_lokavaluto_app_connection/models/account_invoice.py b/lcc_lokavaluto_app_connection/models/account_invoice.py index 205ce4a1..75f0e827 100644 --- a/lcc_lokavaluto_app_connection/models/account_invoice.py +++ b/lcc_lokavaluto_app_connection/models/account_invoice.py @@ -45,6 +45,13 @@ class AccountInvoice(models.Model): string="LCC amount to credit", compute="_compute_global_lcc_amounts" ) + partner_name = fields.Char(compute='_compute_partner_name', string="Partner Name") + + @api.depends('partner_id') + def _compute_partner_name(self): + for record in self: + record.partner_name = record.partner_id.name if record.partner_id else '' + @api.depends("credit_request_ids") def _compute_global_credit_status(self): self.global_credit_status = status( diff --git a/lcc_lokavaluto_app_connection/views/account_invoice.xml b/lcc_lokavaluto_app_connection/views/account_invoice.xml index 70886a3b..f3ea1693 100644 --- a/lcc_lokavaluto_app_connection/views/account_invoice.xml +++ b/lcc_lokavaluto_app_connection/views/account_invoice.xml @@ -14,11 +14,11 @@ + credited on 's wallet(s). + credit on 's wallet(s).