[IMP] mis_builder_cash_flow: black, isort, prettier
parent
be99e69116
commit
e3d333973d
|
@ -7,7 +7,7 @@
|
||||||
"version": "13.0.1.1.0",
|
"version": "13.0.1.1.0",
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"author": "ADHOC SA, " "Odoo Community Association (OCA)",
|
"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"],
|
"depends": ["mis_builder"],
|
||||||
"data": [
|
"data": [
|
||||||
"security/mis_cash_flow_security.xml",
|
"security/mis_cash_flow_security.xml",
|
||||||
|
|
|
@ -7,4 +7,6 @@ class AccountAccount(models.Model):
|
||||||
|
|
||||||
_inherit = "account.account"
|
_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?",
|
||||||
|
)
|
||||||
|
|
|
@ -9,16 +9,27 @@ class MisCashFlowForecastLine(models.Model):
|
||||||
_name = "mis.cash_flow.forecast_line"
|
_name = "mis.cash_flow.forecast_line"
|
||||||
_description = "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(
|
account_id = fields.Many2one(
|
||||||
comodel_name="account.account",
|
comodel_name="account.account",
|
||||||
string="Account",
|
string="Account",
|
||||||
required=True,
|
required=True,
|
||||||
help="The account of the forecast line is only for informative purpose",
|
help="The account of the forecast line is only for informative purpose",
|
||||||
)
|
)
|
||||||
partner_id = fields.Many2one(comodel_name="res.partner", string="Partner",)
|
partner_id = fields.Many2one(
|
||||||
name = fields.Char(required=True, default="/",)
|
comodel_name="res.partner",
|
||||||
balance = fields.Float(required=True,)
|
string="Partner",
|
||||||
|
)
|
||||||
|
name = fields.Char(
|
||||||
|
required=True,
|
||||||
|
default="/",
|
||||||
|
)
|
||||||
|
balance = fields.Float(
|
||||||
|
required=True,
|
||||||
|
)
|
||||||
company_id = fields.Many2one(
|
company_id = fields.Many2one(
|
||||||
"res.company",
|
"res.company",
|
||||||
string="Company",
|
string="Company",
|
||||||
|
|
|
@ -16,7 +16,9 @@ class MisCashFlow(models.Model):
|
||||||
index=True,
|
index=True,
|
||||||
readonly=True,
|
readonly=True,
|
||||||
)
|
)
|
||||||
name = fields.Char(readonly=True,)
|
name = fields.Char(
|
||||||
|
readonly=True,
|
||||||
|
)
|
||||||
account_id = fields.Many2one(
|
account_id = fields.Many2one(
|
||||||
comodel_name="account.account",
|
comodel_name="account.account",
|
||||||
string="Account",
|
string="Account",
|
||||||
|
@ -25,7 +27,9 @@ class MisCashFlow(models.Model):
|
||||||
readonly=True,
|
readonly=True,
|
||||||
)
|
)
|
||||||
partner_id = fields.Many2one(
|
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(
|
move_line_id = fields.Many2one(
|
||||||
comodel_name="account.move.line",
|
comodel_name="account.move.line",
|
||||||
|
@ -40,17 +44,31 @@ class MisCashFlow(models.Model):
|
||||||
readonly=True,
|
readonly=True,
|
||||||
index=True,
|
index=True,
|
||||||
)
|
)
|
||||||
credit = fields.Float(readonly=True,)
|
credit = fields.Float(
|
||||||
debit = fields.Float(readonly=True,)
|
readonly=True,
|
||||||
date = fields.Date(readonly=True, index=True,)
|
)
|
||||||
reconciled = fields.Boolean(readonly=True,)
|
debit = fields.Float(
|
||||||
|
readonly=True,
|
||||||
|
)
|
||||||
|
date = fields.Date(
|
||||||
|
readonly=True,
|
||||||
|
index=True,
|
||||||
|
)
|
||||||
|
reconciled = fields.Boolean(
|
||||||
|
readonly=True,
|
||||||
|
)
|
||||||
full_reconcile_id = fields.Many2one(
|
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(
|
account_internal_type = fields.Selection(
|
||||||
related="account_id.user_type_id.type", readonly=True
|
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):
|
def _selection_parent_state(self):
|
||||||
return self.env["account.move"].fields_get(allfields=["state"])["state"][
|
return self.env["account.move"].fields_get(allfields=["state"])["state"][
|
||||||
|
|
Loading…
Reference in New Issue