[REF] account: make fields definition more readable

Since we don't have other docs for `account.tax.report.line`, let's just improve
source readability

closes odoo/odoo#79696

Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
Ivan Yelizariev
2021-11-12 17:25:52 +00:00
parent da642c06e3
commit a437b3ed33
+58 -12
View File
@@ -98,22 +98,68 @@ class AccountTaxReportLine(models.Model):
_order = 'sequence'
_parent_store = True
name = fields.Char(string="Name", required=True, help="Complete name for this report line, to be used in report.")
tag_ids = fields.Many2many(string="Tags", comodel_name='account.account.tag', relation='account_tax_report_line_tags_rel', help="Tax tags populating this line")
report_action_id = fields.Many2one(string="Report Action", comodel_name='ir.actions.act_window', help="The optional action to call when clicking on this line in accounting reports.")
children_line_ids = fields.One2many(string="Children Lines", comodel_name='account.tax.report.line', inverse_name='parent_id', help="Lines that should be rendered as children of this one")
parent_id = fields.Many2one(string="Parent Line", comodel_name='account.tax.report.line')
sequence = fields.Integer(string='Sequence', required=True,
help="Sequence determining the order of the lines in the report (smaller ones come first). This order is applied locally per section (so, children of the same line are always rendered one after the other).")
name = fields.Char(
string="Name",
required=True,
help="Complete name for this report line, to be used in report.",
)
tag_ids = fields.Many2many(
string="Tags",
comodel_name="account.account.tag",
relation="account_tax_report_line_tags_rel",
help="Tax tags populating this line",
)
report_action_id = fields.Many2one(
string="Report Action",
comodel_name="ir.actions.act_window",
help="The optional action to call when clicking on this line in accounting reports.",
)
children_line_ids = fields.One2many(
string="Children Lines",
comodel_name="account.tax.report.line",
inverse_name="parent_id",
help="Lines that should be rendered as children of this one",
)
parent_id = fields.Many2one(
string="Parent Line",
comodel_name="account.tax.report.line"
)
sequence = fields.Integer(
string="Sequence",
required=True,
help="Sequence determining the order of the lines in the report (smaller ones come first). "
"This order is applied locally per section "
"(so, children of the same line are always rendered one after the other).",
)
parent_path = fields.Char(index=True, unaccent=False)
report_id = fields.Many2one(string="Tax Report", required=True, comodel_name='account.tax.report', ondelete='cascade', help="The parent tax report of this line")
report_id = fields.Many2one(
string="Tax Report",
required=True,
comodel_name="account.tax.report",
ondelete="cascade",
help="The parent tax report of this line",
)
# helper to create tags (positive and negative) on report line creation
tag_name = fields.Char(string="Tag Name", help="Short name for the tax grid corresponding to this report line. Leave empty if this report line should not correspond to any such grid.")
tag_name = fields.Char(
string="Tag Name",
help="Short name for the tax grid corresponding to this report line. "
"Leave empty if this report line should not correspond to any such grid.",
)
# fields used in specific localization reports, where a report line isn't simply the given by the sum of account.move.line with selected tags
code = fields.Char(string="Code", help="Optional unique code to refer to this line in total formulas")
formula = fields.Char(string="Formula", help="Python expression used to compute the value of a total line. This field is mutually exclusive with tag_name, setting it turns the line to a total line. Tax report line codes can be used as variables in this expression to refer to the balance of the corresponding lines in the report. A formula cannot refer to another line using a formula.")
# fields used in specific localization reports,
# where a report line isn't simply the given by the sum of account.move.line with selected tags
code = fields.Char(
string="Code", help="Optional unique code to refer to this line in total formulas"
)
formula = fields.Char(
string="Formula",
help="Python expression used to compute the value of a total line. "
"This field is mutually exclusive with tag_name, setting it turns the line to a total line. "
"Tax report line codes can be used as variables in this expression "
"to refer to the balance of the corresponding lines in the report. "
"A formula cannot refer to another line using a formula.",
)
# fields used to carry over amounts between periods