mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
The report is displayed on the first page
Otherwise one needs to switch page every time. Use a field.Html for the report so we can emphasise the main information. The page where the report was should be displayed only for technical users, it is meaningless for normal users.
This commit is contained in:
@@ -49,7 +49,7 @@ class CreditControlRun(models.Model):
|
||||
states={'draft': [('readonly', False)]},
|
||||
default=_get_policies,
|
||||
)
|
||||
report = fields.Text(string='Report', readonly=True, copy=False)
|
||||
report = fields.Html(string='Report', readonly=True, copy=False)
|
||||
state = fields.Selection([('draft', 'Draft'),
|
||||
('done', 'Done')],
|
||||
string='State',
|
||||
@@ -123,13 +123,13 @@ class CreditControlRun(models.Model):
|
||||
self.date)
|
||||
generated |= policy_lines_generated
|
||||
if policy_lines_generated:
|
||||
report += (_("Policy \"%s\" has generated %d Credit "
|
||||
"Control Lines.\n") %
|
||||
report += (_("Policy \"<b>%s</b>\" has generated <b>%d Credit "
|
||||
"Control Lines.</b><br/>") %
|
||||
(policy.name, len(policy_lines_generated)))
|
||||
else:
|
||||
report += _(
|
||||
"Policy \"%s\" has not generated any "
|
||||
"Credit Control Lines.\n" % policy.name
|
||||
"Policy \"<b>%s</b>\" has not generated any "
|
||||
"Credit Control Lines.<br/>" % policy.name
|
||||
)
|
||||
|
||||
vals = {'state': 'done',
|
||||
|
||||
@@ -29,10 +29,12 @@
|
||||
<notebook>
|
||||
<page string="Policies">
|
||||
<field name="policy_ids" colspan="4" nolabel="1"/>
|
||||
<separator string="Report"
|
||||
attrs="{'invisible': [('report', '=', False)]}"/>
|
||||
<field name="report" colspan="4" nolabel="1"
|
||||
attrs="{'invisible': [('report', '=', False)]}"/>
|
||||
</page>
|
||||
<page string="Report and Errors">
|
||||
<field name="report" colspan="4" nolabel="1"/>
|
||||
<separator string="Move lines To be treated manually"/>
|
||||
<page string="Manual Lines" groups="base.group_no_one">
|
||||
<field name="manual_ids" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
Reference in New Issue
Block a user