Skip to content

Commit

Permalink
*: Pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
etobella committed Oct 28, 2023
1 parent 53fa052 commit 0d6095c
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 39 deletions.
16 changes: 7 additions & 9 deletions barcode_action/demo/barcode_action_demo.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<record id="res_partner_find" model="ir.actions.act_window">
<field name="name">Find Partner</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">barcode.action</field>
<field name="view_mode">form</field>
<field
name="context"
>{'default_model': 'res.partner', 'default_method': 'find_res_partner_by_ref_using_barcode'}</field>
name="context"
>{'default_model': 'res.partner', 'default_method': 'find_res_partner_by_ref_using_barcode'}</field>
<field name="target">new</field>
</record>
<menuitem
id="menu_orders_customers"
name="Find partners"
action="res_partner_find"
parent="base.menu_administration"
/>
</data>
id="menu_orders_customers"
name="Find partners"
action="res_partner_find"
parent="base.menu_administration"
/>
</odoo>
2 changes: 1 addition & 1 deletion base_export_manager/views/ir_exports.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<field name="name">Export Profile tree</field>
<field name="model">ir.exports</field>
<field name="arch" type="xml">
<tree string="Export Profiles">
<tree>
<field name="name" />
<field name="model_id" />
<field name="resource" />
Expand Down
16 changes: 7 additions & 9 deletions base_import_security_group/demo/assets.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<template
id="assets_tests"
name="Base Import Security Group Assets Tests"
inherit_id="web.assets_tests"
>
id="assets_tests"
name="Base Import Security Group Assets Tests"
inherit_id="web.assets_tests"
>
<xpath expr="." position="inside">
<script
type="text/javascript"
src="/base_import_security_group/static/src/js/tour_import.js"
/>
type="text/javascript"
src="/base_import_security_group/static/src/js/tour_import.js"
/>
</xpath>
</template>
</data>
</odoo>
2 changes: 1 addition & 1 deletion base_tier_validation/views/tier_definition_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<field name="name">tier.definition.tree</field>
<field name="model">tier.definition</field>
<field name="arch" type="xml">
<tree string="Tier Definition">
<tree>
<field name="model_id" />
<field name="name" />
<field name="review_type" />
Expand Down
1 change: 0 additions & 1 deletion base_tier_validation/views/tier_review_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<field name="model">tier.review</field>
<field name="arch" type="xml">
<tree
string="Tier Review"
decoration-danger="status=='rejected'"
decoration-success="status=='approved'"
>
Expand Down
11 changes: 4 additions & 7 deletions base_tier_validation_correction/security/correction_groups.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data noupdate="0">
<odoo noupdate="0">

<record id="group_tier_correction" model="res.groups">
<field name="name">Tier Review Correction</field>
<field name="category_id" ref="base.module_category_hidden" />
<field
name="users"
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
/>
name="users"
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
/>
</record>

</data>
</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<field name="name">tier.correction.tree</field>
<field name="model">tier.correction</field>
<field name="arch" type="xml">
<tree string="Tier Correction">
<tree>
<field name="name" />
<field name="correction_type" />
<field name="reference" />
Expand Down
1 change: 0 additions & 1 deletion base_tier_validation_report/reports/tier_review_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<field name="priority" eval="100" />
<field name="arch" type="xml">
<tree
string="Tier Review"
decoration-danger="status=='rejected'"
decoration-success="status=='approved'"
create="0"
Expand Down
1 change: 1 addition & 0 deletions chained_swapper/demo/chained_swapper_demo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
}"
/>
</record>
<!-- oca-hooks:disable=xml-duplicate-record-id -->
<!-- pylint:disable=duplicate-xml-record-id -->
<record id="chained_swapper_demo" model="chained.swapper">
<field
Expand Down
4 changes: 2 additions & 2 deletions date_range/static/src/js/date_range.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ odoo.define("date_range.CustomFilterItem", function (require) {
condition.operator
];
if (operator.date_range) {
const eid = parseInt(ev.target.value);
const eid = parseInt(ev.target.value, 10);
const ranges = this.date_ranges[operator.date_range_type];
const range = ranges.find((x) => x.id == eid);
const range = ranges.find((x) => x.id === eid);
const d_start = moment(`${range.date_start} 00:00:00Z`);
const d_end = moment(`${range.date_end} 23:59:59Z`);
condition.value = [d_start, d_end];
Expand Down
4 changes: 2 additions & 2 deletions date_range/views/date_range_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<field name="name">date.range.tree</field>
<field name="model">date.range</field>
<field name="arch" type="xml">
<tree editable="bottom" string="Date range">
<tree editable="bottom">
<field name="name" />
<field name="type_id" />
<field name="date_start" />
Expand Down Expand Up @@ -42,7 +42,7 @@
<field name="name">date.range.type.tree</field>
<field name="model">date.range.type</field>
<field name="arch" type="xml">
<tree string="Date range type">
<tree>
<field name="name" />
<field name="allow_overlap" />
<field
Expand Down
10 changes: 5 additions & 5 deletions sequence_range_end/models/ir_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ def _interpolation_dict():
"sec": "%S",
}
res = {}
for key, format in sequences.items():
res[key] = effective_date.strftime(format)
res["current_" + key] = now.strftime(format)
res["range_" + key] = range_date.strftime(format)
res["range_end_" + key] = range_end_date.strftime(format)
for key, sequence_format in sequences.items():
res[key] = effective_date.strftime(sequence_format)
res["current_" + key] = now.strftime(sequence_format)
res["range_" + key] = range_date.strftime(sequence_format)
res["range_end_" + key] = range_end_date.strftime(sequence_format)
return res

self.ensure_one()
Expand Down

0 comments on commit 0d6095c

Please sign in to comment.