[FIX] web,*: whitespaces in form/kanban templates
*: crm,link_tracker,project,sale,utm Before this commit, in some form and kanban views, there were missing whitespaces, typically between icons and texts. This was due to the transition to owl views, because we simply ignored `&nbsp;` in archs. This commit also fixes a layout issue in a project view, where the icon and the field should be displayed in the same line. closes odoo/odoo#101040 X-original-commit: f5813e348b6052436a4fabaa5837ecc37b15430e Related: odoo/enterprise#31746 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
@@ -12,8 +12,7 @@
|
||||
<div class="me-3"
|
||||
groups="sales_team.group_sale_salesman"
|
||||
t-att-title="record.use_leads.raw_value ? 'Leads' : 'Opportunities'">
|
||||
<i class="fa fa-star text-muted"></i>
|
||||
<small class="fw-bold"><field name="crm_lead_count"/></small>
|
||||
<i class="fa fa-star text-muted"></i> <small class="fw-bold"><field name="crm_lead_count"/></small>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='utm_statistics']" position="inside">
|
||||
<div class="me-3" title="Clicks">
|
||||
<i class="fa fa-mouse-pointer text-muted"></i>
|
||||
<small class="fw-bold" t-esc="record.click_count.raw_value" />
|
||||
<i class="fa fa-mouse-pointer text-muted"></i> <small class="fw-bold" t-esc="record.click_count.raw_value" />
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -521,11 +521,10 @@
|
||||
<field name="analytic_account_id" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]" context="{'default_partner_id': partner_id}" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="privacy_visibility" widget="radio"/>
|
||||
<span colspan="2" class="text-muted" attrs="{'invisible':[('access_instruction_message', '=', '')]}">
|
||||
<i class="fa fa-lightbulb-o"/>&nbsp;<field name="access_instruction_message" nolabel="1"/>
|
||||
<i class="fa fa-lightbulb-o"/>&nbsp;<field class="d-inline" name="access_instruction_message" nolabel="1"/>
|
||||
</span>
|
||||
<span colspan="2" class="text-muted" attrs="{'invisible':[('privacy_visibility_warning', '=', '')]}">
|
||||
<i class="fa fa-warning">&nbsp;</i>
|
||||
<field name="privacy_visibility_warning" nolabel="1"/>
|
||||
<i class="fa fa-warning"/>&nbsp;<field class="d-inline" name="privacy_visibility_warning" nolabel="1"/>
|
||||
</span>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -14,10 +14,7 @@
|
||||
</small>
|
||||
</div>
|
||||
<div class="me-3" title="Quotations" groups="sales_team.group_sale_salesman">
|
||||
<i class="fa fa-money text-muted"></i>
|
||||
<small class="fw-bold">
|
||||
<field name="quotation_count"/>
|
||||
</small>
|
||||
<i class="fa fa-money text-muted"></i> <small class="fw-bold"><field name="quotation_count"/></small>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
--KanbanGroup-padding-bottom: #{$grid-gutter-width};
|
||||
|
||||
#o_utm_actions {
|
||||
margin: 0 calc(var(--KanbanRecord-padding-h) * -1);
|
||||
|
||||
> a {
|
||||
padding: var(--KanbanRecord-gap-inner-v) var(--KanbanRecord-padding-h);
|
||||
white-space: nowrap;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { nbsp } from "@web/core/utils/strings";
|
||||
|
||||
/**
|
||||
* XML document to create new elements from. The fact that this is a "text/xml"
|
||||
* document ensures that tagNames and attribute names are case sensitive.
|
||||
@@ -47,7 +49,7 @@ export class XMLParser {
|
||||
* @returns {Element}
|
||||
*/
|
||||
parseXML(arch) {
|
||||
const cleanedArch = arch.replace(/&nbsp;/g, "");
|
||||
const cleanedArch = arch.replace(/&nbsp;/g, nbsp);
|
||||
const xml = parser.parseFromString(cleanedArch, "text/xml");
|
||||
if (hasParsingError(xml)) {
|
||||
throw new Error(
|
||||
|
||||
Reference in New Issue
Block a user