[IMP] mis_builder_cash_flow: black, isort, prettier

pull/821/head
Raphaël Valyi 2021-10-16 18:15:19 -03:00
parent be99e69116
commit e3d333973d
4 changed files with 45 additions and 14 deletions

View File

@ -7,7 +7,7 @@
"version": "13.0.1.1.0",
"license": "LGPL-3",
"author": "ADHOC SA, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/mis-builder",
"website": "https://github.com/OCA/account-financial-reporting",
"depends": ["mis_builder"],
"data": [
"security/mis_cash_flow_security.xml",

View File

@ -7,4 +7,6 @@ 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?",
)

View File

@ -9,16 +9,27 @@ 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",

View File

@ -16,7 +16,9 @@ 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",
@ -25,7 +27,9 @@ 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",
@ -40,17 +44,31 @@ 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.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",)
state = fields.Selection(
selection="_selection_parent_state",
)
def _selection_parent_state(self):
return self.env["account.move"].fields_get(allfields=["state"])["state"][