From 23faeca2562a0230d3f5ef99fd4577c426f91da3 Mon Sep 17 00:00:00 2001 From: Sergio Lop Sanz Date: Tue, 11 Jun 2024 09:29:41 +0200 Subject: [PATCH] Retoques --- .../models/account_move_line_group.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/mis_report_por_grupo/models/account_move_line_group.py b/mis_report_por_grupo/models/account_move_line_group.py index 740c30c..1a8e7fa 100644 --- a/mis_report_por_grupo/models/account_move_line_group.py +++ b/mis_report_por_grupo/models/account_move_line_group.py @@ -30,7 +30,15 @@ class AccountMoveLineGroup(models.Model): readonly=True, index=True, ) - partner_id = fields.Many2one('res.partner', string='Partner') + partner_id = fields.Many2one( + comodel_name='res.partner', + string='Partner') + move_line_id = fields.Many2one( + 'account.move.line', + string='Move Line') + move_id = fields.Many2one( + comodel_name='account.move', + string='Move') def init(self): tools.drop_view_if_exists(self._cr, self._table) @@ -42,7 +50,7 @@ def init(self): acc2.name AS acc2_name, acc.code AS original_code, acc.name AS original_name, - aml.id AS id, + aml.id AS move_line_id, aml.date AS date, aml.debit AS debit, aml.credit AS credit, @@ -50,7 +58,8 @@ def init(self): acc.user_type_id AS user_type_id, aml.reconciled AS reconciled, aml.full_reconcile_id AS full_reconcile_id, - aml.partner_id AS partner_id + aml.partner_id AS partner_id, + aml.move_id AS move_id FROM account_move_line aml JOIN account_account acc ON aml.account_id = acc.id LEFT JOIN (