Files
odoo_source/addons/hr_expense/views/account_journal_dashboard.xml
T
Adrien Dieudonne 464968de36 [FIX] account, hr_expense: amounts on multiple lines in the dashboard
Before this commit, the amount currency could be wrapped on a
second line (on mobile).

To fix this, we had to find a way to have more space:
- Buttons are now displayed at the top (mobile only).
- Amounts can grow (col-auto) and the other column will take the
  space left (col) and add "..." when there is not enough space.
  (mobile + desktop)

We also had to remove a button from a div tag in order to display
the buttons next to each other on mobile (buttons are "inline-block"
but div is a "block").
The main flow tour has been adapted accordingly and the typo has
been fixed too...

closes odoo/odoo#46680

Task-id: 2184243
X-original-commit: 159e3d4cb8a301c908f7718a56138528033e75d4
Related: odoo/enterprise#8963
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-03-03 08:09:49 +00:00

25 lines
1.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="account_journal_dashboard_kanban_view_inherit_hr_expense" model="ir.ui.view">
<field name="name">account.journal.dashboard.kanban</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.account_journal_dashboard_kanban_view" />
<field name="arch" type="xml">
<xpath expr="//t[@id='account.JournalBodySalePurchase']//div[hasclass('o_kanban_primary_right')]" position="inside">
<div class="row" t-if="dashboard.number_expenses_to_pay">
<div class="col overflow-hidden text-left">
<a type="object" t-if="journal_type == 'purchase'" name="open_expenses_action">
<t t-esc="dashboard.number_expenses_to_pay"/> Expenses to Process
</a>
</div>
<div class="col-auto text-right">
<span t-if="journal_type == 'purchase'"><t t-esc="dashboard.sum_expenses_to_pay"/></span>
</div>
</div>
</xpath>
</field>
</record>
</odoo>