diff options
| author | fja-odoo <fja@odoo.com> | 2020-06-15 13:00:47 +0000 |
|---|---|---|
| committer | oco-odoo <oco@odoo.com> | 2020-08-18 13:43:06 +0000 |
| commit | e46a8bc7d95501569fd95c499b84a7027a3f2831 (patch) | |
| tree | 3e76734255f293af0f1f918f8167981604aa437c | |
| parent | 4fe6936fcd6f5a7ca7b40a7e5e785fb14799fbd6 (diff) | |
[IMP] account: format the dashboard tax report
This follows the changes done in https://github.com/odoo/enterprise/pull/11160
Clearer and better-looking link for tax closing on the accounting dashboard.
task-2201995
closes odoo/odoo#52988
Related: odoo/enterprise#11160
Related: odoo/upgrade#1347
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
| -rw-r--r-- | addons/account/models/account_journal_dashboard.py | 7 | ||||
| -rw-r--r-- | addons/account/static/src/xml/account_journal_activity.xml | 6 | ||||
| -rw-r--r-- | addons/account/views/account_journal_dashboard_view.xml | 4 |
3 files changed, 8 insertions, 9 deletions
diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index 0bc805110e8..d9673abf87e 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -41,6 +41,7 @@ class account_journal(models.Model): act_type.category as activity_category, act.date_deadline, m.date, + m.ref, CASE WHEN act.date_deadline < CURRENT_DATE THEN 'late' ELSE 'future' END as status FROM account_move m LEFT JOIN mail_activity act ON act.res_id = m.id @@ -60,10 +61,8 @@ class account_journal(models.Model): 'date': odoo_format_date(self.env, activity.get('date_deadline')) } if activity.get('activity_category') == 'tax_report' and activity.get('res_model') == 'account.move': - if self.env['account.move'].browse(activity.get('res_id')).company_id.account_tax_periodicity == 'monthly': - act['name'] += ' (' + format_date(activity.get('date'), 'MMM', locale=get_lang(self.env).code) + ')' - else: - act['name'] += ' (' + format_date(activity.get('date'), 'QQQ', locale=get_lang(self.env).code) + ')' + act['name'] = activity.get('ref') + activities.append(act) journal.json_activity_data = json.dumps({'activities': activities}) diff --git a/addons/account/static/src/xml/account_journal_activity.xml b/addons/account/static/src/xml/account_journal_activity.xml index a6e73e5659d..e91b9d4ca44 100644 --- a/addons/account/static/src/xml/account_journal_activity.xml +++ b/addons/account/static/src/xml/account_journal_activity.xml @@ -5,12 +5,12 @@ <t t-name="accountJournalDashboardActivity"> <t t-foreach="activities" t-as="activity"> <div class="row"> - <div class="col-6 o_mail_activity"> + <div class="col-8 o_mail_activity"> <a href="#" t-att-class="(activity.status == 'late' ? 'o_activity_color_overdue ' : ' ') + (activity.activity_category == 'tax_report' ? 'o_open_vat_report' : 'see_activity')" t-att-data-res-id="activity.res_id" t-att-data-id="activity.id" t-att-data-model="activity.res_model"> <t t-esc="activity.name"/> </a> </div> - <div class="col-6 text-right"> + <div class="col-4 text-right"> <span><t t-esc="activity.date"/></span> </div> </div> @@ -18,4 +18,4 @@ <a t-if="more_activities" class="pull-right see_all_activities" href="#">See all activities</a> </t> -</templates>
\ No newline at end of file +</templates> diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml index 0a3117632c6..bddfb61a391 100644 --- a/addons/account/views/account_journal_dashboard_view.xml +++ b/addons/account/views/account_journal_dashboard_view.xml @@ -214,12 +214,12 @@ </t> <t t-name="JournalMiscelaneous"> - <div class="col-12 col-sm-5 mb-3 mb-sm-0 o_kanban_primary_left"> + <div class="col-12 col-sm-4 mb-3 mb-sm-0 o_kanban_primary_left"> <button type="object" name="action_create_new" class="btn btn-primary" groups="account.group_account_invoice"> <span>New Entry</span> </button> </div> - <div class="col-12 col-sm-7 o_kanban_primary_right"> + <div class="col-12 col-sm-8 o_kanban_primary_right"> <field name="json_activity_data" widget="kanban_vat_activity"/> <t t-if="dashboard.number_to_check > 0"> <div class="row"> |
