Browse Source

Merge PR #667 into 12.0

Signed-off-by pedrobaeza
pull/671/head
OCA-git-bot 5 years ago
parent
commit
e279fe9fee
  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
  5. 6
      mis_builder_cash_flow/views/mis_cash_flow_forecast_line_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"/>

6
mis_builder_cash_flow/views/mis_cash_flow_forecast_line_views.xml

@ -14,6 +14,7 @@
<field name="company_id" <field name="company_id"
groups="base.group_multi_company"/> groups="base.group_multi_company"/>
<field name="date"/> <field name="date"/>
<field name="partner_id" />
<field name="account_id" <field name="account_id"
domain="[('company_id', '=', company_id)]"/> domain="[('company_id', '=', company_id)]"/>
<field name="name"/> <field name="name"/>
@ -32,6 +33,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"/>
@ -39,6 +41,9 @@
<filter string="Account" <filter string="Account"
name="group_by_account_id" name="group_by_account_id"
context="{'group_by':'account_id'}"/> context="{'group_by':'account_id'}"/>
<filter string="Partner"
name="group_by_partner_id"
context="{'group_by':'partner_id'}"/>
<filter string="Date" <filter string="Date"
name="group_by_date" name="group_by_date"
context="{'group_by':'date'}"/> context="{'group_by':'date'}"/>
@ -59,6 +64,7 @@
groups="base.group_multi_company"/> groups="base.group_multi_company"/>
<field name="date"/> <field name="date"/>
<field name="name"/> <field name="name"/>
<field name="partner_id" />
<field name="account_id" <field name="account_id"
domain="[('company_id', '=', company_id), ('deprecated', '=', False), ('hide_in_cash_flow', '=', False), ('internal_type', '=', ['receivable', 'payable', 'liquidity'])]"/> domain="[('company_id', '=', company_id), ('deprecated', '=', False), ('hide_in_cash_flow', '=', False), ('internal_type', '=', ['receivable', 'payable', 'liquidity'])]"/>
<field name="balance"/> <field name="balance"/>

Loading…
Cancel
Save