From f07e70efcdc2ecd1b99dad77c047f657f7734f52 Mon Sep 17 00:00:00 2001 From: amcor Date: Thu, 26 Mar 2020 10:10:20 +0100 Subject: [PATCH 1/2] [IMP] include partner_id in mis builder cash flow --- .../models/mis_cash_flow_forecast_line.py | 4 ++++ mis_builder_cash_flow/readme/CONTRIBUTORS.rst | 1 + mis_builder_cash_flow/report/mis_cash_flow.py | 7 +++++++ mis_builder_cash_flow/report/mis_cash_flow_views.xml | 3 +++ 4 files changed, 15 insertions(+) diff --git a/mis_builder_cash_flow/models/mis_cash_flow_forecast_line.py b/mis_builder_cash_flow/models/mis_cash_flow_forecast_line.py index 23e5297f..6173d6e9 100644 --- a/mis_builder_cash_flow/models/mis_cash_flow_forecast_line.py +++ b/mis_builder_cash_flow/models/mis_cash_flow_forecast_line.py @@ -20,6 +20,10 @@ class MisCashFlowForecastLine(models.Model): help='The account of the forecast line is only for informative ' 'purpose', ) + partner_id = fields.Many2one( + comodel_name='res.partner', + string='Partner', + ) name = fields.Char( required=True, default='/', diff --git a/mis_builder_cash_flow/readme/CONTRIBUTORS.rst b/mis_builder_cash_flow/readme/CONTRIBUTORS.rst index 2fe7ced3..bf76fd12 100644 --- a/mis_builder_cash_flow/readme/CONTRIBUTORS.rst +++ b/mis_builder_cash_flow/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Juan José Scarafía * Gonzalo Ruzafa +* Alberto Martín diff --git a/mis_builder_cash_flow/report/mis_cash_flow.py b/mis_builder_cash_flow/report/mis_cash_flow.py index bffb988e..7e82eea3 100644 --- a/mis_builder_cash_flow/report/mis_cash_flow.py +++ b/mis_builder_cash_flow/report/mis_cash_flow.py @@ -25,6 +25,11 @@ class MisCashFlow(models.Model): index=True, readonly=True, ) + partner_id = fields.Many2one( + comodel_name='res.partner', + string='Partner', + readonly=True, + ) move_line_id = fields.Many2one( comodel_name='account.move.line', string='Journal Item', @@ -88,6 +93,7 @@ class MisCashFlow(models.Model): END AS credit, aml.reconciled as reconciled, aml.full_reconcile_id as full_reconcile_id, + aml.partner_id as partner_id, aml.company_id as company_id, aml.user_type_id as user_type_id, aml.name as name, @@ -111,6 +117,7 @@ class MisCashFlow(models.Model): END AS credit, Null as reconciled, Null as full_reconcile_id, + fl.partner_id as partner_id, fl.company_id as company_id, %i as user_type_id, fl.name as name, diff --git a/mis_builder_cash_flow/report/mis_cash_flow_views.xml b/mis_builder_cash_flow/report/mis_cash_flow_views.xml index 9b313717..28dbd96c 100644 --- a/mis_builder_cash_flow/report/mis_cash_flow_views.xml +++ b/mis_builder_cash_flow/report/mis_cash_flow_views.xml @@ -13,6 +13,7 @@ + @@ -30,6 +31,7 @@ + @@ -55,6 +57,7 @@ + From db32551f95fd1a821356c80ac4c6d02628370b2f Mon Sep 17 00:00:00 2001 From: amcor Date: Fri, 27 Mar 2020 08:19:05 +0100 Subject: [PATCH 2/2] [IMP] partner_id in forecastline --- .../views/mis_cash_flow_forecast_line_views.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mis_builder_cash_flow/views/mis_cash_flow_forecast_line_views.xml b/mis_builder_cash_flow/views/mis_cash_flow_forecast_line_views.xml index 650f773e..ea921087 100644 --- a/mis_builder_cash_flow/views/mis_cash_flow_forecast_line_views.xml +++ b/mis_builder_cash_flow/views/mis_cash_flow_forecast_line_views.xml @@ -14,6 +14,7 @@ + @@ -32,6 +33,7 @@ + @@ -39,6 +41,9 @@ + @@ -59,6 +64,7 @@ groups="base.group_multi_company"/> +