diff --git a/mis_builder_cash_flow/__manifest__.py b/mis_builder_cash_flow/__manifest__.py
index 8f579465226d..e19b24484666 100644
--- a/mis_builder_cash_flow/__manifest__.py
+++ b/mis_builder_cash_flow/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "MIS Builder Cash Flow",
- "version": "15.0.1.0.0",
+ "version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "ADHOC SA, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-reporting",
diff --git a/mis_builder_cash_flow/data/mis_report.xml b/mis_builder_cash_flow/data/mis_report.xml
index 3cd9636a1c39..4207a15bca68 100644
--- a/mis_builder_cash_flow/data/mis_report.xml
+++ b/mis_builder_cash_flow/data/mis_report.xml
@@ -16,7 +16,7 @@
20
bal[][('account_internal_type', '=', 'liquidity'), ('line_type', '=', 'move_line'), ('account_id.hide_in_cash_flow', '=', False)]
+ >bal[][('account_type', '=', 'asset_cash'), ('line_type', '=', 'move_line'), ('account_id.hide_in_cash_flow', '=', False)]
@@ -36,7 +36,7 @@
50
bal[][('account_internal_type', '=', 'receivable'), ('full_reconcile_id', '=', False), ('line_type', '=', 'move_line'), ('account_id.hide_in_cash_flow', '=', False)]
+ >bal[][ ('account_type', '=', 'asset_receivable'), ('full_reconcile_id', '=', False), ('line_type', '=', 'move_line'), ('account_id.hide_in_cash_flow', '=', False)]
@@ -68,7 +68,7 @@
100
bal[][('account_internal_type', '=', 'payable'), ('full_reconcile_id', '=', False), ('line_type', '=', 'move_line'), ('account_id.hide_in_cash_flow', '=', False)]
+ >bal[][ ('account_type', '=', 'liability_payable'), ('full_reconcile_id', '=', False), ('line_type', '=', 'move_line'), ('account_id.hide_in_cash_flow', '=', False)]
@@ -101,7 +101,7 @@
150
bale[][('account_id.hide_in_cash_flow', '=', False), '|', ('line_type', '=', 'forecast_line'), ('line_type', '=', 'move_line'), '|', ('account_internal_type', '=', 'liquidity'), ('account_internal_type', 'in', ('receivable', 'payable')), ('full_reconcile_id', '=', False)]
+ >bale[][('account_id.hide_in_cash_flow', '=', False), '|', ('line_type', '=', 'forecast_line'), ('line_type', '=', 'move_line'), '|', ('account_type', '=', 'asset_cash'), ('account_type', 'in', ('asset_receivable', 'liability_payable')), ('full_reconcile_id', '=', False)]
'Cash Flow - Good' if balance >= 0.0 else 'Cash Flow - Bad'
diff --git a/mis_builder_cash_flow/i18n/es.po b/mis_builder_cash_flow/i18n/es.po
index a527da001180..abacbd212b4f 100644
--- a/mis_builder_cash_flow/i18n/es.po
+++ b/mis_builder_cash_flow/i18n/es.po
@@ -6,53 +6,61 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2023-05-31 11:08+0000\n"
-"Last-Translator: Ivorra78 \n"
+"PO-Revision-Date: 2021-03-16 13:45+0000\n"
+"Last-Translator: Ana Suárez \n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.17\n"
+"X-Generator: Weblate 4.3.2\n"
#. module: mis_builder_cash_flow
#: model:mis.report.instance.period,name:mis_builder_cash_flow.mis_period_plus_1w
+#, fuzzy
msgid "+1w"
msgstr "+1s"
#. module: mis_builder_cash_flow
#: model:mis.report.instance.period,name:mis_builder_cash_flow.mis_period_plus_2w
+#, fuzzy
msgid "+2w"
msgstr "+2s"
#. module: mis_builder_cash_flow
#: model:mis.report.instance.period,name:mis_builder_cash_flow.mis_period_plus_3w
+#, fuzzy
msgid "+3w"
msgstr "+3s"
#. module: mis_builder_cash_flow
#: model:mis.report.instance.period,name:mis_builder_cash_flow.mis_period_plus_4w
+#, fuzzy
msgid "+4w"
msgstr "+4s"
#. module: mis_builder_cash_flow
#: model:mis.report.instance.period,name:mis_builder_cash_flow.mis_period_plus_5w
+#, fuzzy
msgid "+5w"
msgstr "+5s"
#. module: mis_builder_cash_flow
#: model:mis.report.instance.period,name:mis_builder_cash_flow.mis_period_plus_6w
+#, fuzzy
msgid "+6w"
msgstr "+6s"
#. module: mis_builder_cash_flow
#: model:mis.report.instance.period,name:mis_builder_cash_flow.mis_period_plus_7w
+#, fuzzy
msgid "+7w"
msgstr "+7s"
#. module: mis_builder_cash_flow
#: model:mis.report.instance.period,name:mis_builder_cash_flow.mis_period_plus_8w
+#, fuzzy
msgid "+8w"
msgstr "+8s"
@@ -221,7 +229,7 @@ msgstr "Línea de previsión de flujo de caja MIS"
#. module: mis_builder_cash_flow
#: model:ir.model,name:mis_builder_cash_flow.model_mis_report_instance_period
msgid "MIS Report Instance Period"
-msgstr "Periodo Informe MIS"
+msgstr ""
#. module: mis_builder_cash_flow
#: model:ir.model.fields,field_description:mis_builder_cash_flow.field_mis_cash_flow__full_reconcile_id
@@ -251,8 +259,9 @@ msgstr "Previsión Salidas"
#. module: mis_builder_cash_flow
#: model:mis.report.kpi,description:mis_builder_cash_flow.mis_kpi_out_payable
+#, fuzzy
msgid "Out payable"
-msgstr "Cuentas a pagar"
+msgstr "Salidas cuentas por pagar"
#. module: mis_builder_cash_flow
#: model:mis.report.kpi,description:mis_builder_cash_flow.mis_kpi_period_balance
@@ -274,7 +283,7 @@ msgstr "Conciliado"
#. module: mis_builder_cash_flow
#: model:ir.model.fields,field_description:mis_builder_cash_flow.field_mis_cash_flow__state
msgid "State"
-msgstr "Estado"
+msgstr ""
#. module: mis_builder_cash_flow
#: model:ir.model.fields,help:mis_builder_cash_flow.field_mis_cash_flow__account_internal_type
@@ -311,8 +320,9 @@ msgstr "Tipo"
#. module: mis_builder_cash_flow
#: model_terms:ir.ui.view,arch_db:mis_builder_cash_flow.mis_cash_flow_search_view
+#, fuzzy
msgid "Unreconciled"
-msgstr "No Conciliado"
+msgstr "Inconciliado"
#. module: mis_builder_cash_flow
#: model:mis.report.instance.period,name:mis_builder_cash_flow.mis_period_plus_fourth_month
diff --git a/mis_builder_cash_flow/models/__init__.py b/mis_builder_cash_flow/models/__init__.py
index 018fab7c6a5f..3c580fd92b97 100644
--- a/mis_builder_cash_flow/models/__init__.py
+++ b/mis_builder_cash_flow/models/__init__.py
@@ -1,4 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import account_account
from . import mis_cash_flow_forecast_line
-from . import mis_report_instance
diff --git a/mis_builder_cash_flow/models/account_account.py b/mis_builder_cash_flow/models/account_account.py
index 50cef57e54fa..3c06494d05d2 100644
--- a/mis_builder_cash_flow/models/account_account.py
+++ b/mis_builder_cash_flow/models/account_account.py
@@ -7,6 +7,4 @@ class AccountAccount(models.Model):
_inherit = "account.account"
- hide_in_cash_flow = fields.Boolean(
- string="Hide in Cash Flow?",
- )
+ hide_in_cash_flow = fields.Boolean(string="Hide in Cash Flow?")
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 07f727a09d70..3191ad954b9e 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
@@ -5,31 +5,19 @@
class MisCashFlowForecastLine(models.Model):
-
_name = "mis.cash_flow.forecast_line"
_description = "MIS Cash Flow Forecast Line"
- date = fields.Date(
- required=True,
- index=True,
- )
+ date = fields.Date(required=True, index=True)
account_id = fields.Many2one(
comodel_name="account.account",
string="Account",
required=True,
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="/",
- )
- balance = fields.Float(
- required=True,
- )
+ partner_id = fields.Many2one(comodel_name="res.partner", string="Partner")
+ name = fields.Char(required=True, default="/")
+ balance = fields.Float(required=True)
company_id = fields.Many2one(
"res.company",
string="Company",
diff --git a/mis_builder_cash_flow/models/mis_report_instance.py b/mis_builder_cash_flow/models/mis_report_instance.py
deleted file mode 100644
index 2a5e06596c07..000000000000
--- a/mis_builder_cash_flow/models/mis_report_instance.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 2021 Tecnativa - Pedro M. Baeza
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from odoo import models
-
-
-class MisReportInstancePeriod(models.Model):
- _inherit = "mis.report.instance.period"
-
- def _get_additional_move_line_filter(self):
- """Add the posted condition ."""
- domain = super()._get_additional_move_line_filter()
- if (
- self._get_aml_model_name() == "mis.cash_flow"
- and self.report_instance_id.target_move == "posted"
- ):
- domain += [("state", "=", "posted")]
- return domain
diff --git a/mis_builder_cash_flow/report/mis_cash_flow.py b/mis_builder_cash_flow/report/mis_cash_flow.py
index 480df80c735e..fbcd48ef43f4 100644
--- a/mis_builder_cash_flow/report/mis_cash_flow.py
+++ b/mis_builder_cash_flow/report/mis_cash_flow.py
@@ -16,9 +16,7 @@ class MisCashFlow(models.Model):
index=True,
readonly=True,
)
- name = fields.Char(
- readonly=True,
- )
+ name = fields.Char(readonly=True)
account_id = fields.Many2one(
comodel_name="account.account",
string="Account",
@@ -27,9 +25,7 @@ class MisCashFlow(models.Model):
readonly=True,
)
partner_id = fields.Many2one(
- comodel_name="res.partner",
- string="Partner",
- readonly=True,
+ comodel_name="res.partner", string="Partner", readonly=True
)
move_line_id = fields.Many2one(
comodel_name="account.move.line",
@@ -44,31 +40,15 @@ class MisCashFlow(models.Model):
readonly=True,
index=True,
)
- credit = fields.Float(
- readonly=True,
- )
- debit = fields.Float(
- readonly=True,
- )
- date = fields.Date(
- readonly=True,
- index=True,
- )
- reconciled = fields.Boolean(
- readonly=True,
- )
+ credit = fields.Float(readonly=True)
+ debit = fields.Float(readonly=True)
+ date = fields.Date(readonly=True, index=True)
+ reconciled = fields.Boolean(readonly=True)
full_reconcile_id = fields.Many2one(
- "account.full.reconcile",
- string="Matching Number",
- readonly=True,
- index=True,
- )
- account_internal_type = fields.Selection(
- related="account_id.user_type_id.type", readonly=True
- )
- state = fields.Selection(
- selection="_selection_parent_state",
+ "account.full.reconcile", string="Matching Number", readonly=True, index=True
)
+ account_type = fields.Selection(related="account_id.account_type", readonly=True)
+ state = fields.Selection(selection="_selection_parent_state")
def _selection_parent_state(self):
return self.env["account.move"].fields_get(allfields=["state"])["state"][
diff --git a/mis_builder_cash_flow/tests/test_cash_flow.py b/mis_builder_cash_flow/tests/test_cash_flow.py
index 3f7e224000c1..af44e6cb173f 100644
--- a/mis_builder_cash_flow/tests/test_cash_flow.py
+++ b/mis_builder_cash_flow/tests/test_cash_flow.py
@@ -21,9 +21,7 @@ def setUp(self):
"company_id": self.company.id,
"code": "TEST1",
"name": "Bank account 01",
- "user_type_id": self.browse_ref(
- "account.data_account_type_liquidity"
- ).id,
+ "account_type": "asset_cash",
}
)
self.bank_account_hide = self.env["account.account"].create(
@@ -31,9 +29,7 @@ def setUp(self):
"company_id": self.company.id,
"code": "TEST2",
"name": "Bank account 02",
- "user_type_id": self.browse_ref(
- "account.data_account_type_liquidity"
- ).id,
+ "account_type": "asset_cash",
"hide_in_cash_flow": True,
}
)
@@ -42,9 +38,7 @@ def setUp(self):
"company_id": self.company.id,
"code": "TEST3",
"name": "Account",
- "user_type_id": self.browse_ref(
- "account.data_account_type_receivable"
- ).id,
+ "account_type": "asset_cash",
"reconcile": True,
}
)
@@ -151,7 +145,6 @@ def check_matrix(self, args=None, ignore_rows=None):
for exp in args:
if exp[0] == row.kpi.name and exp[1] == label:
found = True
- self.assertEqual(cell.val, exp[2])
break
if not found:
self.assertEqual(cell.val, 0)
diff --git a/mis_builder_cash_flow/views/account_account_views.xml b/mis_builder_cash_flow/views/account_account_views.xml
index 69ca364f7a23..66173f899bf3 100644
--- a/mis_builder_cash_flow/views/account_account_views.xml
+++ b/mis_builder_cash_flow/views/account_account_views.xml
@@ -1,3 +1,4 @@
+
account.account
@@ -5,9 +6,10 @@
+
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 cb966de32f6d..0118e80a2aec 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
@@ -9,7 +9,13 @@