[FIX] * : Display improvement

This PR will introduce multiple display improvements. Here is the list:

- In the accounting settings, the fiscal localization section has a button that
was oddly placed. This PR solves that issue.

- On the dashboard, when clicking the three dots on a card, the options "remove
from favorites" and "configuration" were not aligned.

- In ir_attachment, the label and field of "datas" will be aligned, and a gap
will be added between the icons.

- In the settings, the button links were inconsistent in terms of padding. This
PR resolves that.

- In the payment providers, two button links had text wrapping issues. By adding
 Bootstrap classes, this has been resolved.

closes odoo/odoo#130522

Task-id: 3342969
X-original-commit: d4ba0c1f69212bfb0030036951c2888e935bbdf0
Related: odoo/enterprise#45060
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
This commit is contained in:
Maximilien (malb)
2023-08-02 17:29:27 +02:00
parent 00edf79a8d
commit e3f4651c52
9 changed files with 43 additions and 14 deletions
@@ -207,9 +207,9 @@
<div groups="account.group_account_manager" class="row o_kanban_card_manage_settings">
<div class="col-6 position-relative">
<field name="show_on_dashboard" widget="boolean_favorite" />
<field name="show_on_dashboard" widget="boolean_favorite"/>
</div>
<div class="col-6 text-end mt-1">
<div class="col-6 text-end">
<a class="dropdown-item" t-if="widget.editable" type="edit">Configuration</a>
</div>
</div>
@@ -27,10 +27,14 @@
<setting string="Fiscal Localization" company_dependent="1" help="Taxes, fiscal positions, chart of accounts &amp; legal statements for your country"
documentation="/applications/finance/fiscal_localizations.html">
<div class="content-group">
<div class="row mt16">
<label for="chart_template" string="Package" class="col-2 o_light_label"/>
<field name="chart_template" attrs="{'readonly': [('has_accounting_entries','!=', False)], 'required': [('chart_template', '!=', False)]}"/>
<button name="reload_template" type="object" string="Reload" class="btn-secondary" icon="fa-refresh" attrs="{'invisible': [('has_accounting_entries','=', False)]}"/>
<div class="mt16">
<div>
<label for="chart_template" string="Package" class="col-2 o_light_label"/>
<field name="chart_template" attrs="{'readonly': [('has_accounting_entries','!=', False)], 'required': [('chart_template', '!=', False)]}"/>
</div>
<div class="mt16">
<button name="reload_template" type="object" string="Reload" class="btn-secondary ps-2 w-100" icon="fa-refresh" attrs="{'invisible': [('has_accounting_entries','=', False)]}"/>
</div>
</div>
</div>
</setting>
@@ -160,7 +164,7 @@
<field name="preview_ready" invisible="1"/>
<div class="mt4 ms-1" attrs="{'invisible': [('preview_ready', '=', False)]}">
<a class="btn-link" href="/terms" role="button">
<i class="oi oi-arrow-right"></i>
<i class="oi oi-arrow-right"/>
Preview
</a>
</div>
@@ -0,0 +1,15 @@
/** @odoo-module **/
import { registry } from "@web/core/registry";
import { Component } from "@odoo/owl";
class AttachmentNumber extends Component {
setup() {
super.setup();
this.attachment_number = this.props.record.data.attachment_number
}
static template = "hr_expense.AttachmentNumber"
}
registry.category("fields").add("attachment_number", {component: AttachmentNumber});
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-name="hr_expense.AttachmentNumber" owl="1">
<div>
<span class="fa fa-paperclip pe-1 align-middle"/>
<t t-if="attachment_number > 0" class="text-center" t-out="attachment_number"/>
</div>
</t>
</templates>
+1 -1
View File
@@ -68,7 +68,7 @@
<field name="tax_ids" optional="hide" widget="many2many_tags" groups="account.group_account_invoice,account.group_account_readonly"/>
<field name="amount_tax_company" sum="Total Taxes"
optional="hide" groups="account.group_account_invoice,account.group_account_readonly"/>
<field name="attachment_number" nolabel="1" class='fa fa-paperclip align-middle' attrs="{'invisible': [('attachment_number', '=', 0)]}"/>
<field name="attachment_number" widget="attachment_number" nolabel="1"/>
<field name="total_amount_company" sum="Total Amount" widget='monetary'
options="{'currency_field': 'company_currency_id'}" decoration-bf="1"/>
<field name="total_amount" widget='monetary' options="{'currency_field': 'currency_id'}" optional="hide" decoration-bf="1" groups="base.group_multi_currency"/>
@@ -2,10 +2,10 @@
<template id="template" xml:space="preserve">
<t t-name="iap.ActionButtonsWidget" owl="1">
<div class="mt-2 row">
<div class="row">
<div class="col-sm">
<button t-on-click="onBuyLinkClicked" class="btn btn-link buy_credits px-0 o-hidden-ios"><i class="oi oi-arrow-right"/> Buy credits</button><br/>
<button t-if="props.showServiceButtons" t-on-click="onViewServicesClicked" class="btn btn-link px-0 o-hidden-ios"><i class="oi oi-arrow-right me-1"/> View My Services</button>
<button t-on-click="onBuyLinkClicked" class="btn btn-link buy_credits px-0 o-hidden-ios text-nowrap"><i class="oi oi-arrow-right"/> Buy credits</button><br/>
<button t-if="props.showServiceButtons" t-on-click="onViewServicesClicked" class="btn btn-link px-0 o-hidden-ios text-nowrap"><i class="oi oi-arrow-right"/> View My Services</button>
</div>
</div>
</t>
@@ -76,6 +76,7 @@
// Make a button look and behave like a link
.btn-link {
padding: 0;
font-weight: $font-weight-normal;
color: $btn-link-color;
text-decoration: $link-decoration;
@@ -191,7 +191,6 @@
$top: 3px,
$left: calc(var(--KanbanRecord-padding-h) - #{$o-horizontal-padding})
);
padding: $o-kanban-record-margin;
}
}
@@ -11,9 +11,10 @@
<field name="name"/>
</h1>
<group>
<group>
<group class="w-100">
<field name="type"/>
<field name="datas" filename="name" attrs="{'invisible':[('type','=','url')]}"/>
<label for="datas" class="mt-1"/>
<field name="datas" nolabel="1" class="w-100" filename="name" attrs="{'invisible':[('type','=','url')]}"/>
<field name="url" widget="url" attrs="{'invisible':[('type','=','binary')]}"/>
<field name="mimetype" groups="base.group_no_one"/>
</group>