Skip to content

Commit

Permalink
[FIX] *: duplicate views
Browse files Browse the repository at this point in the history
If a view is present multiple times in the same module, the "last
instance" is going to win (by replacing any previous instance's arch
with its own).

Most cases of duplications are probably views which got moved then
either not removed (from the original location) or revived (through a
forward-port), the first instance can just be removed entirely.

For the few which seemed to be more than just trivial mistakes, merge
the two views instead.

closes odoo#44463

Related: odoo/enterprise#8107
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
  • Loading branch information
xmo-odoo committed Feb 3, 2020
1 parent bc6c530 commit 28796cd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 42 deletions.
13 changes: 0 additions & 13 deletions addons/crm/views/res_partner_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,6 @@
</xpath>
</field>
</record>
<!-- tree view of crm.activity.report -->
<record id="crm_activity_report_view_tree" model="ir.ui.view">
<field name="name">crm.activity.report.tree</field>
<field name="model">crm.activity.report</field>
<field name="arch" type="xml">
<tree delete="false" create="false">
<field name="author_id"/>
<field name="subtype_id"/>
<field name="lead_id"/>
<field name="date"/>
</tree>
</field>
</record>

<!-- Add contextual button on partner form view -->
<record id="view_partners_form_crm1" model="ir.ui.view">
Expand Down
13 changes: 0 additions & 13 deletions addons/purchase_requisition/views/purchase_requisition_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,6 @@

<!-- Purchase Orders -->

<record model="ir.ui.view" id="supplier_info_form_inherit">
<field name="name">product.supplierinfo.requisition.view</field>
<field name="model">product.supplierinfo</field>
<field name="inherit_id" ref="product.product_supplierinfo_form_view"/>
<field name="arch" type="xml">
<field name="product_code" position="after">
<field name="purchase_requisition_id"
attrs="{'invisible': [('purchase_requisition_id', '=', False)]}"
/>
</field>
</field>
</record>

<record model="ir.actions.act_window" id="action_purchase_requisition_to_so">
<field name="name">Request for Quotation</field>
<field name="type">ir.actions.act_window</field>
Expand Down
11 changes: 1 addition & 10 deletions addons/website/views/website_visitor_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,6 @@
</field>
</record>

<record id="website_visitor_view_graph" model="ir.ui.view">
<field name="name">website.visitor.view.graph</field>
<field name="model">website.visitor</field>
<field name="arch" type="xml">
<graph string="Visitors last connection">
<field name="visit_count"/>
</graph>
</field>
</record>

<record id="website_visitor_view_search" model="ir.ui.view">
<field name="name">website.visitor.view.search</field>
<field name="model">website.visitor</field>
Expand Down Expand Up @@ -282,6 +272,7 @@
<field name="arch" type="xml">
<graph string="Visitors">
<field name="create_date" type="row"/>
<field name="visit_count"/>
</graph>
</field>
</record>
Expand Down
9 changes: 3 additions & 6 deletions addons/website_event_sale/views/website_sale_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<t t-set="div_class" t-value="''"/>
</t>
</xpath>
<xpath expr="//del" position="attributes">
<attribute name="t-attf-class" separator=" " add="#{line.event_id and 'd-none' or ''}"/>
</xpath>
</template>

<!-- If the sale order line concerns an event, we want to show an additional line with the event name -->
Expand All @@ -34,10 +37,4 @@
</xpath>
</template>

<template id="cart_lines_inherit_website_event_sale" inherit_id="website_sale.cart_lines" name="Hide product reduction for event tickets">
<xpath expr="//del" position="attributes">
<attribute name="t-attf-class" separator=" " add="#{line.event_id and 'd-none' or ''}"/>
</xpath>
</template>

</odoo>

0 comments on commit 28796cd

Please sign in to comment.