[REF] *: graph archs cleaning

We clean various graph archs taking into consideration that:
 - the default type of a graph is "bar".
 - a bar chart is by default stacked.
 - the field attributes type="row" and type="col" does not make sense for
   a graph view (since its implementation was separated from the pivot
   implementation a long time ago))
 - the boolean attributes should now take 1 or 0 as value (but the other
   values are accepted for retrocompatibility).

Part-of: odoo/odoo#76065
This commit is contained in:
Mathieu Duckerts-Antoine
2021-09-07 15:50:14 +00:00
parent 3d7b9bbf27
commit 7545913020
45 changed files with 96 additions and 96 deletions
@@ -392,7 +392,7 @@
<field name="name">account.bank.statement.graph</field>
<field name="model">account.bank.statement</field>
<field name="arch" type="xml">
<graph string="Account Statistics" type="bar" sample="1">
<graph string="Account Statistics" sample="1">
<field name="date"/>
<field name="balance_start" operator="+"/>
<field name="balance_end" operator="+"/>
+1 -1
View File
@@ -322,7 +322,7 @@
<field name="name">account.move.line.graph</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<graph string="Account Statistics" type="bar" sample="1">
<graph string="Account Statistics" sample="1">
<field name="date"/>
<field name="balance" operator="+" type='measure'/>
</graph>
@@ -307,7 +307,7 @@
<field name="name">account.payment.graph</field>
<field name="model">account.payment</field>
<field name="arch" type="xml">
<graph string="Invoices" type="bar" stacked="1" sample="1">
<graph string="Invoices" sample="1">
<field name="payment_type"/>
<field name="journal_id"/>
<field name="amount" type="measure"/>
@@ -338,7 +338,7 @@
<field name="model">account.analytic.line</field>
<field name="arch" type="xml">
<graph string="Analytic Entries" sample="1">
<field name="account_id" type="row"/>
<field name="account_id"/>
<field name="unit_amount" type="measure"/>
<field name="amount" type="measure"/>
</graph>
@@ -5,9 +5,9 @@
<field name="name">crm.activity.report.graph</field>
<field name="model">crm.activity.report</field>
<field name="arch" type="xml">
<graph string="Activities Analysis" stacked="True" sample="1">
<field name="mail_activity_type_id" type="col"/>
<field name="date" interval="month" type="row"/>
<graph string="Activities Analysis" sample="1">
<field name="mail_activity_type_id"/>
<field name="date" interval="month"/>
</graph>
</field>
</record>
@@ -32,9 +32,9 @@
<field name="name">crm.opportunity.report.graph</field>
<field name="model">crm.lead</field>
<field name="arch" type="xml">
<graph string="Pipeline Analysis" stacked="True" sample="1">
<field name="stage_id" type="row"/>
<field name="date_deadline" type="row" interval="month"/>
<graph string="Pipeline Analysis" sample="1">
<field name="stage_id"/>
<field name="date_deadline" interval="month"/>
<field name="prorated_revenue" type="measure"/>
<field name="color" invisible="1"/>
</graph>
@@ -46,9 +46,9 @@
<field name="model">crm.lead</field>
<field name="priority">20</field>
<field name="arch" type="xml">
<graph string="Leads Analysis" stacked="True" sample="1">
<field name="create_date" interval="month" type="col"/>
<field name="team_id" type="col"/>
<graph string="Leads Analysis" sample="1">
<field name="create_date" interval="month"/>
<field name="team_id"/>
<field name="color" invisible="1"/>
</graph>
</field>
+3 -3
View File
@@ -862,8 +862,8 @@
<field name="model">crm.lead</field>
<field name="arch" type="xml">
<graph string="Opportunities" sample="1">
<field name="stage_id" type="col"/>
<field name="user_id" type="row"/>
<field name="stage_id"/>
<field name="user_id"/>
<field name="color" invisible="1"/>
</graph>
</field>
@@ -875,7 +875,7 @@
<field name="priority">32</field>
<field name="arch" type="xml">
<graph string="Opportunities Forecast" sample="1" js_class="forecast_graph">
<field name="date_deadline" type="row"/>
<field name="date_deadline"/>
<field name="prorated_revenue" type="measure"/>
<field name="automated_probability" invisible="1"/>
<field name="color" invisible="1"/>
+1 -1
View File
@@ -451,7 +451,7 @@
<field name="model">event.event</field>
<field name="arch" type="xml">
<graph string="Events" sample="1">
<field name="name" type="row"/>
<field name="name"/>
<field name="seats_available" type="measure"/>
</graph>
</field>
+3 -3
View File
@@ -37,9 +37,9 @@
<field name="name">fleet.vehicle.cost.view.graph</field>
<field name="model">fleet.vehicle.cost.report</field>
<field name="arch" type="xml">
<graph string="Fleet Costs Analysis" type="bar" sample="1">
<field name="date_start" type="row" interval="month"/>
<field name="cost_type" type="row"/>
<graph string="Fleet Costs Analysis" sample="1">
<field name="date_start" interval="month"/>
<field name="cost_type"/>
<field name="cost" type="measure"/>
</graph>
</field>
@@ -125,9 +125,9 @@
<field name="name">fleet.vehicle.log.contract.graph</field>
<field name="model">fleet.vehicle.log.contract</field>
<field name="arch" type="xml">
<graph string="Contract Costs Per Month" type="bar" stacked="True" sample="1">
<field name="date" type="row"/>
<field name="vehicle_id" type="row"/>
<graph string="Contract Costs Per Month" sample="1">
<field name="date"/>
<field name="vehicle_id"/>
<field name="amount" type="measure"/>
</graph>
</field>
@@ -332,9 +332,9 @@
<field name="name">fleet.vehicle.log.services.graph</field>
<field name="model">fleet.vehicle.log.services</field>
<field name="arch" type="xml">
<graph string="Services Costs Per Month" stacked="True" sample="1">
<field name="date" type="row"/>
<field name="vehicle_id" type="row"/>
<graph string="Services Costs Per Month" sample="1">
<field name="date"/>
<field name="vehicle_id"/>
<field name="amount" type="measure"/>
</graph>
</field>
+1 -1
View File
@@ -417,7 +417,7 @@
<field name="model">fleet.vehicle.odometer</field>
<field name="arch" type="xml">
<graph string="Odometer Values Per Vehicle" sample="1">
<field name="vehicle_id" type="row"/>
<field name="vehicle_id"/>
<field name="value" type="measure"/>
</graph>
</field>
@@ -33,9 +33,9 @@
<field name="name">hr.attendance.report.view.graph</field>
<field name="model">hr.attendance.report</field>
<field name="arch" type="xml">
<graph string="Attendance Statistics" stacked="False" disable_linking="1">
<field name="employee_id" type="row"/>
<field name="check_in" type="col"/>
<graph string="Attendance Statistics" stacked="0" disable_linking="1">
<field name="employee_id"/>
<field name="check_in"/>
<field name="overtime_hours" type="measure" />
<field name="worked_hours" type="measure" />
</graph>
+4 -4
View File
@@ -301,8 +301,8 @@
<field name="model">hr.expense</field>
<field name="arch" type="xml">
<graph string="Expenses Analysis" sample="1">
<field name="date" type="col"/>
<field name="employee_id" type="row"/>
<field name="date"/>
<field name="employee_id"/>
<field name="total_amount" type="measure"/>
</graph>
</field>
@@ -854,8 +854,8 @@
<field name="model">hr.expense.sheet</field>
<field name="arch" type="xml">
<graph string="Expenses Analysis" sample="1">
<field name="employee_id" type="col"/>
<field name="accounting_date" interval="month" type="row"/>
<field name="employee_id"/>
<field name="accounting_date" interval="month"/>
<field name="total_amount" type="measure"/>
</graph>
</field>
+4 -4
View File
@@ -26,10 +26,10 @@
<field name="name">hr.holidays.graph</field>
<field name="model">hr.leave</field>
<field name="arch" type="xml">
<graph string="Appraisal Analysis" stacked="True" sample="1">
<field name="employee_id" type="row"/>
<field name="holiday_status_id" type="row"/>
<field name="date_from" type="col"/>
<graph string="Appraisal Analysis" sample="1">
<field name="employee_id"/>
<field name="holiday_status_id"/>
<field name="date_from"/>
<field name="number_of_days" type="measure"/>
</graph>
</field>
@@ -185,8 +185,8 @@
<field name="name">Jobs - Recruitment Graph</field>
<field name="model">hr.applicant</field>
<field name="arch" type="xml">
<graph string="Cases By Stage and Estimates" type="bar" stacked="True" sample="1">
<field name="stage_id" type="col"/>
<graph string="Cases By Stage and Estimates" sample="1">
<field name="stage_id"/>
</graph>
</field>
</record>
@@ -1007,8 +1007,8 @@ action = act
<field name="model">hr.applicant</field>
<field name="arch" type="xml">
<graph string="Recruitment Analysis" sample="1">
<field name="stage_id" type="row"/>
<field name="job_id" type="col"/>
<field name="stage_id"/>
<field name="job_id"/>
</graph>
</field>
</record>
@@ -80,8 +80,8 @@
<field name="model">account.analytic.line</field>
<field name="arch" type="xml">
<graph string="Timesheets" sample="1" js_class="hr_timesheet_graphview">
<field name="task_id" type="row"/>
<field name="project_id" type="row"/>
<field name="task_id"/>
<field name="project_id"/>
<field name="unit_amount" type="measure" widget="timesheet_uom"/>
<field name="amount" string="Timesheet Costs"/>
</graph>
@@ -94,8 +94,8 @@
<field name="model">account.analytic.line</field>
<field name="arch" type="xml">
<graph string="Timesheet" sample="1" js_class="hr_timesheet_graphview">
<field name="date" interval="week" type="row"/>
<field name="project_id" type="row"/>
<field name="date" interval="week"/>
<field name="project_id"/>
<field name="amount" type="measure" string="Timesheet Costs"/>
<field name="unit_amount" type="measure" widget="timesheet_uom"/>
</graph>
@@ -108,8 +108,8 @@
<field name="model">account.analytic.line</field>
<field name="arch" type="xml">
<graph string="Timesheet" sample="1" js_class="hr_timesheet_graphview">
<field name="employee_id" type="row"/>
<field name="project_id" type="row"/>
<field name="employee_id"/>
<field name="project_id"/>
<field name="amount" type="measure" string="Timesheet Costs"/>
<field name="unit_amount" type="measure" widget="timesheet_uom"/>
</graph>
@@ -74,8 +74,8 @@
<field name="name">link.tracker.view.graph</field>
<field name="model">link.tracker</field>
<field name="arch" type="xml">
<graph string="Links" type="bar" sample="1">
<field name="url" type="row"/>
<graph string="Links" sample="1">
<field name="url"/>
<field name="count" type="measure"/>
</graph>
</field>
+1 -1
View File
@@ -127,7 +127,7 @@
<field name="model">lunch.order</field>
<field name="arch" type="xml">
<graph sample="1">
<field name="product_id" type="col"/>
<field name="product_id"/>
</graph>
</field>
</record>
@@ -219,8 +219,8 @@
<field name="model">mailing.contact</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<graph string="Mailing List Contacts" stacked="True" sample="1">
<field name="create_date" type="row"/>
<graph string="Mailing List Contacts" sample="1">
<field name="create_date"/>
</graph>
</field>
</record>
@@ -530,8 +530,8 @@
<field name="name">mailing.mailing.graph</field>
<field name="model">mailing.mailing</field>
<field name="arch" type="xml">
<graph string="Mailing" type="bar" sample="1">
<field name="state" type="row"/>
<graph string="Mailing" sample="1">
<field name="state"/>
<field name="color" invisible="1"/>
</graph>
</field>
@@ -114,9 +114,9 @@
<field name="name">Mail Statistics Graph</field>
<field name="model">mailing.trace</field>
<field name="arch" type="xml">
<graph string="Mail Statistics" type="bar" stacked="True" sample="1">
<field name="write_date" type="row" interval="day"/>
<field name="trace_status" type="row"/>
<graph string="Mail Statistics" sample="1">
<field name="write_date" interval="day"/>
<field name="trace_status"/>
</graph>
</field>
</record>
@@ -51,8 +51,8 @@
<field name="model">report.membership</field>
<field name="arch" type="xml">
<graph string="Membership" sample="1">
<field name="membership_id" type="row"/>
<field name="start_date" interval="month" type="col"/>
<field name="membership_id"/>
<field name="start_date" interval="month"/>
<field name="quantity" type="measure"/>
</graph>
</field>
+1 -1
View File
@@ -473,7 +473,7 @@
<field name="name">mrp.production.graph</field>
<field name="model">mrp.production</field>
<field name="arch" type="xml">
<graph string="Manufacturing Orders" type="bar" stacked="False" sample="1">
<graph string="Manufacturing Orders" stacked="0" sample="1">
<field name="date_planned_finished"/>
<field name="product_uom_qty" type="measure"/>
<field name="backorder_sequence" invisible="1"/>
+2 -2
View File
@@ -271,7 +271,7 @@
<field name="name">mrp.production.work.order.graph</field>
<field name="model">mrp.workorder</field>
<field name="arch" type="xml">
<graph string="Operations" type="bar" stacked="False" sample="1">
<graph string="Operations" stacked="0" sample="1">
<field name="production_id"/>
<field name="duration" type="measure" string="Duration (minutes)"/>
<field name="duration_unit" type="measure"/>
@@ -498,7 +498,7 @@
<field name="name">report.workcenter.load.graph</field>
<field name="model">mrp.workorder</field>
<field name="arch" type="xml">
<graph string="Work Center load" type="bar" sample="1">
<graph string="Work Center load" sample="1">
<field name="production_date" interval="day"/>
<field name="workcenter_id"/>
<field name="duration_expected" type="measure" string="Expected Duration (minutes)"/>
@@ -19,7 +19,7 @@
<field name="model">report.pos.order</field>
<field name="arch" type="xml">
<graph string="Point of Sale Analysis" sample="1">
<field name="product_categ_id" type="row"/>
<field name="product_categ_id"/>
<field name="price_total" type="measure"/>
</graph>
</field>
@@ -5,7 +5,7 @@
<field name="model">product.product</field>
<field name="priority" eval="50"/>
<field name="arch" type="xml">
<graph string="Product Margins" type="bar" sample="1">
<graph string="Product Margins" sample="1">
<field name="product_tmpl_id"/>
<field name="total_margin" type="measure" operator="+"/>
</graph>
@@ -15,9 +15,9 @@
<field name="name">report.project.task.user.graph</field>
<field name="model">report.project.task.user</field>
<field name="arch" type="xml">
<graph string="Tasks Analysis" type="bar" sample="1">
<field name="project_id" type="row"/>
<field name="user_id" type="col"/>
<graph string="Tasks Analysis" sample="1">
<field name="project_id"/>
<field name="user_id"/>
<field name="nbr" invisible="1"/>
</graph>
</field>
@@ -34,7 +34,7 @@
<field name="model">project.task.burndown.chart.report</field>
<field name="arch" type="xml">
<graph string="Burndown Chart" type="line" sample="1" disable_linking="1" js_class="burndown_chart">
<field name="date" string="Date" interval="month" type="row"/>
<field name="date" string="Date" interval="month"/>
<field name="stage_id"/>
<field name="nb_tasks" type="measure"/>
</graph>
@@ -17,7 +17,7 @@
<field name="model">purchase.report</field>
<field name="arch" type="xml">
<graph string="Purchase Analysis" type="line" sample="1">
<field name="date_approve" interval="day" type="col"/>
<field name="date_approve" interval="day"/>
<field name="untaxed_total" type="measure"/>
</graph>
</field>
@@ -16,8 +16,8 @@
<field name="name">vendor.delay.report.view.graph</field>
<field name="model">vendor.delay.report</field>
<field name="arch" type="xml">
<graph string="On-Time Delivery" type="bar" sample="1" disable_linking="1">
<field name="product_id" type="row"/>
<graph string="On-Time Delivery" sample="1" disable_linking="1">
<field name="product_id"/>
<field name="on_time_rate" type="measure"/>
</graph>
</field>
+2 -2
View File
@@ -121,8 +121,8 @@
<field name="name">rating.rating.graph</field>
<field name="model">rating.rating</field>
<field name="arch" type="xml">
<graph string="Ratings" type="bar" sample="1">
<field name="create_date" type="row"/>
<graph string="Ratings" sample="1">
<field name="create_date"/>
<field name="rating" type="measure" string="Rating Value (/5)"/>
<field name="parent_res_id" invisible="1"/>
<field name="res_id" invisible="1"/>
+1 -1
View File
@@ -18,7 +18,7 @@
<field name="model">sale.report</field>
<field name="arch" type="xml">
<graph string="Sales Analysis" type="line" sample="1">
<field name="date" type="row" interval="day"/>
<field name="date" interval="day"/>
<field name="price_subtotal" type="measure"/>
</graph>
</field>
@@ -20,9 +20,9 @@
<field name="name">project.profitability.report.graph</field>
<field name="model">project.profitability.report</field>
<field name="arch" type="xml">
<graph string="Profitability Analysis" type="bar" sample="1" js_class="hr_timesheet_graphview">
<field name="project_id" type="row"/>
<field name="product_id" type="col"/>
<graph string="Profitability Analysis" sample="1" js_class="hr_timesheet_graphview">
<field name="project_id"/>
<field name="product_id"/>
<field name="amount_untaxed_to_invoice" type="measure"/>
<field name="amount_untaxed_invoiced" type="measure"/>
<field name="timesheet_cost" type="measure"/>
@@ -6,7 +6,7 @@
<field name="arch" type="xml">
<graph string="report_stock_quantity_graph" type="line" sample="1" disable_linking="1">
<field name="date" interval="day"/>
<field name="product_id" type="row"/>
<field name="product_id"/>
<field name="product_qty" type="measure"/>
</graph>
</field>
+1 -1
View File
@@ -19,7 +19,7 @@
<field name="arch" type="xml">
<graph string="Stock Moves Analysis" sample="1">
<field name="product_id"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations" type="row"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
<field name="product_uom_qty" type="measure"/>
</graph>
</field>
@@ -285,7 +285,7 @@
<field name="model">website.visitor</field>
<field name="arch" type="xml">
<graph string="Visitors" type="line" sample="1">
<field name="last_connection_datetime" interval="day" type="row"/>
<field name="last_connection_datetime" interval="day"/>
</graph>
</field>
</record>
@@ -34,8 +34,8 @@
<field name="name">crm.partner.assign.report.graph</field>
<field name="model">crm.partner.report.assign</field>
<field name="arch" type="xml">
<graph string="Opportunities Assignment Analysis" stacked="True" sample="1">
<field name="grade_id" type="row"/>
<graph string="Opportunities Assignment Analysis" sample="1">
<field name="grade_id"/>
<field name="nbr_opportunities" type="measure"/>
<field name="turnover" type="measure"/>
</graph>
@@ -258,7 +258,7 @@
<field name="name">event.track.graph</field>
<field name="model">event.track</field>
<field name="arch" type="xml">
<graph string="Tracks" type="bar" sample="1">
<graph string="Tracks" sample="1">
<field name="location_id"/>
<field name="duration" operator="+"/>
</graph>
+2 -2
View File
@@ -294,8 +294,8 @@
<field name="model">forum.post</field>
<field name="arch" type="xml">
<graph string="Graph of Posts" sample="1">
<field name="write_date" interval="month" type="col" />
<field name="forum_id" type="row" />
<field name="write_date" interval="month"/>
<field name="forum_id"/>
</graph>
</field>
</record>
@@ -48,7 +48,7 @@
<field name="name">sale.report.view.graph.website</field>
<field name="model">sale.report</field>
<field name="arch" type="xml">
<graph string="Sale Analysis" type="bar" sample="1">
<graph string="Sale Analysis" sample="1">
<field name="date"/>
<field name="price_subtotal" type='measure'/>
</graph>
@@ -5,7 +5,7 @@
<field name="model">sale.report</field>
<field name="arch" type="xml">
<graph string="eLearning Sales Analysis" type="line" sample="1">
<field name="date" type="row" interval="day"/>
<field name="date" interval="day"/>
<field name="price_subtotal" type="measure"/>
</graph>
</field>
@@ -79,8 +79,8 @@
<field name="model">rating.rating</field>
<field name="priority">20</field>
<field name="arch" type="xml">
<graph string="Rating Average" type="bar" sample="1">
<field name="res_name" type="row"/>
<graph string="Rating Average" sample="1">
<field name="res_name"/>
<field name="rating" type="measure"/>
</graph>
</field>
@@ -194,7 +194,7 @@
<field name="name">slide.channel.view.graph</field>
<field name="model">slide.channel</field>
<field name="arch" type="xml">
<graph string="Courses" type="bar" sample="1">
<graph string="Courses" sample="1">
<field name="name"/>
<field name="total_views" type="measure"/>
</graph>
@@ -281,9 +281,9 @@
<field name="name">slide.slide.view.graph</field>
<field name="model">slide.slide</field>
<field name="arch" type="xml">
<graph string="Graph of Contents" stacked="False" sample="1">
<field name="channel_id" type="row"/>
<field name="slide_type" type="col"/>
<graph string="Graph of Contents" stacked="0" sample="1">
<field name="channel_id"/>
<field name="slide_type"/>
<field name="total_views" type="measure"/>
</graph>
</field>
@@ -47,8 +47,8 @@
<field name="model">forum.post</field>
<field name="arch" type="xml">
<graph string="eLearning Forum Posts" sample="1">
<field name="create_date" interval="month" type="col"/>
<field name="forum_id" type="row"/>
<field name="create_date" interval="month"/>
<field name="forum_id"/>
</graph>
</field>
</record>