Browse Source

[IMP] include partner_id in mis builder cash flow

pull/676/head
amcor 5 years ago
committed by mreficent
parent
commit
00caa6995b
  1. 4
      mis_builder_cash_flow/models/mis_cash_flow_forecast_line.py
  2. 1
      mis_builder_cash_flow/readme/CONTRIBUTORS.rst
  3. 7
      mis_builder_cash_flow/report/mis_cash_flow.py
  4. 3
      mis_builder_cash_flow/report/mis_cash_flow_views.xml

4
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 ' help='The account of the forecast line is only for informative '
'purpose', 'purpose',
) )
partner_id = fields.Many2one(
comodel_name='res.partner',
string='Partner',
)
name = fields.Char( name = fields.Char(
required=True, required=True,
default='/', default='/',

1
mis_builder_cash_flow/readme/CONTRIBUTORS.rst

@ -1,2 +1,3 @@
* Juan José Scarafía <jjs@adhoc.com.ar> * Juan José Scarafía <jjs@adhoc.com.ar>
* Gonzalo Ruzafa <gr@adhoc.com.ar> * Gonzalo Ruzafa <gr@adhoc.com.ar>
* Alberto Martín <alberto.martin@guadaltech.es>

7
mis_builder_cash_flow/report/mis_cash_flow.py

@ -25,6 +25,11 @@ class MisCashFlow(models.Model):
index=True, index=True,
readonly=True, readonly=True,
) )
partner_id = fields.Many2one(
comodel_name='res.partner',
string='Partner',
readonly=True,
)
move_line_id = fields.Many2one( move_line_id = fields.Many2one(
comodel_name='account.move.line', comodel_name='account.move.line',
string='Journal Item', string='Journal Item',
@ -88,6 +93,7 @@ class MisCashFlow(models.Model):
END AS credit, END AS credit,
aml.reconciled as reconciled, aml.reconciled as reconciled,
aml.full_reconcile_id as full_reconcile_id, aml.full_reconcile_id as full_reconcile_id,
aml.partner_id as partner_id,
aml.company_id as company_id, aml.company_id as company_id,
aml.user_type_id as user_type_id, aml.user_type_id as user_type_id,
aml.name as name, aml.name as name,
@ -111,6 +117,7 @@ class MisCashFlow(models.Model):
END AS credit, END AS credit,
Null as reconciled, Null as reconciled,
Null as full_reconcile_id, Null as full_reconcile_id,
fl.partner_id as partner_id,
fl.company_id as company_id, fl.company_id as company_id,
%i as user_type_id, %i as user_type_id,
fl.name as name, fl.name as name,

3
mis_builder_cash_flow/report/mis_cash_flow_views.xml

@ -13,6 +13,7 @@
<field name="line_type"/> <field name="line_type"/>
<field name="date"/> <field name="date"/>
<field name="name"/> <field name="name"/>
<field name="partner_id" />
<field name="account_id"/> <field name="account_id"/>
<field name="debit" sum="Total"/> <field name="debit" sum="Total"/>
<field name="credit" sum="Total"/> <field name="credit" sum="Total"/>
@ -30,6 +31,7 @@
<group> <group>
<field name="date"/> <field name="date"/>
<field name="name"/> <field name="name"/>
<field name="partner_id" />
<field name="account_id"/> <field name="account_id"/>
<field name="move_line_id"/> <field name="move_line_id"/>
</group> </group>
@ -55,6 +57,7 @@
<field name="name"/> <field name="name"/>
<field name="date"/> <field name="date"/>
<separator/> <separator/>
<field name="partner_id" />
<field name="account_id"/> <field name="account_id"/>
<field name="company_id" <field name="company_id"
groups="base.group_multi_company"/> groups="base.group_multi_company"/>

Loading…
Cancel
Save