fix pylint

This commit is contained in:
Florent THOMAS 2022-02-08 13:22:06 +01:00
parent 59742b857b
commit 0d2639dc02
4 changed files with 220 additions and 377 deletions

View File

@ -40,18 +40,8 @@
<form string="Document Page">
<sheet>
<div class="oe_button_box" name="button_box">
<button
name="toggle_active"
type="object"
groups="document_page.group_document_manager"
class="oe_stat_button"
icon="fa-archive"
>
<field
name="active"
widget="boolean_button"
options="{'terminology': 'archive'}"
/>
<button name="toggle_active" type="object" groups="document_page.group_document_manager" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button" options="{'terminology': 'archive'}" />
</button>
</div>
<field name="type" invisible="1" />
@ -60,50 +50,22 @@
</h1>
<group>
<div>
<field
name="content"
widget="html"
placeholder="e.g. Once upon a time..."
required="1"
options="{'safe': True}"
/>
<field name="content" widget="html" placeholder="e.g. Once upon a time..." required="1" options="{'safe': True}" />
</div>
</group>
<notebook>
<page name="info" string="Information">
<group>
<group>
<field
name="parent_id"
string="Category"
required="True"
context="{'default_type':'category'}"
/>
<field
name="company_id"
groups="base.group_multi_company"
/>
<field name="parent_id" string="Category" required="True" context="{'default_type':'category'}" />
<field name="company_id" groups="base.group_multi_company" />
<field name="content_uid" />
<field name="content_date" />
<field
name="menu_id"
readonly="1"
attrs="{'invisible': [('menu_id','=',False)]}"
/>
<field name="menu_id" readonly="1" attrs="{'invisible': [('menu_id','=',False)]}" />
</group>
<group string="Revision" class="oe_edit_only">
<field
name="draft_name"
placeholder="Rev 01"
required="True"
class="oe_edit_only"
/>
<field
name="draft_summary"
placeholder="eg: Changed ... for ..."
required="True"
class="oe_edit_only"
/>
<field name="draft_name" placeholder="Rev 01" required="True" class="oe_edit_only" />
<field name="draft_summary" placeholder="eg: Changed ... for ..." required="True" class="oe_edit_only" />
</group>
</group>
</page>
@ -121,10 +83,7 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field
name="message_follower_ids"
widget="mail_followers"
/>
<field name="message_follower_ids" widget="mail_followers" />
<field name="activity_ids" widget="mail_activity" />
<field name="message_ids" widget="mail_thread" />
</div>
@ -141,13 +100,7 @@
<h1>
<field name="name" placeholder="Name" />
</h1>
<field
name="content"
widget="html"
class="oe_view_only"
required="1"
options='{"safe": True}'
/>
<field name="content" widget="html" class="oe_view_only" required="1" options='{"safe": True}' />
</form>
</field>
</record>
@ -158,30 +111,14 @@
<field name="model">document.page</field>
<field name="arch" type="xml">
<search string="Document Page">
<field
name="name"
string="Content"
filter_domain="['|', ('name','ilike',self), ('content','ilike',self)]"
/>
<field name="name" string="Content" filter_domain="['|', ('name','ilike',self), ('content','ilike',self)]" />
<field name="parent_id" />
<field name="create_uid" />
<field name="content_uid" />
<group expand="0" string="Group By...">
<filter
name="group_by_category"
string="Category"
context="{'group_by':'parent_id'}"
/>
<filter
name="group_by_author"
string="Author"
context="{'group_by':'create_uid'}"
/>
<filter
name="group_by_last_contributor"
string="Last Contributor"
context="{'group_by':'content_uid'}"
/>
<filter name="group_by_category" string="Category" context="{'group_by':'parent_id'}" />
<filter name="group_by_author" string="Author" context="{'group_by':'create_uid'}" />
<filter name="group_by_last_contributor" string="Last Contributor" context="{'group_by':'content_uid'}" />
</group>
</search>
</field>
@ -220,31 +157,12 @@
</record>
<menuitem
id="menu_wiki"
name="Pages"
parent="knowledge.menu_document_root"
sequence="10"
/>
<menuitem id="menu_wiki" name="Pages" parent="knowledge.menu_document_root" sequence="10" />
<menuitem
id="menu_page"
name="Pages"
parent="menu_wiki"
action="action_page"
sequence="20"
/>
<menuitem id="menu_page" name="Pages" parent="menu_wiki" action="action_page" sequence="20" />
<act_window
id="action_related_page_create_menu"
name="Create Menu"
res_model="document.page.create.menu"
target="new"
view_type="form"
view_mode="form"
src_model="document.page"
/>
<act_window id="action_related_page_create_menu" name="Create Menu" res_model="document.page.create.menu" target="new" view_type="form" view_mode="form" src_model="document.page" />
</odoo>

View File

@ -17,11 +17,7 @@
</div>
<group>
<group>
<field
name="parent_id"
string="Category"
context="{'default_type':'category'}"
/>
<field name="parent_id" string="Category" context="{'default_type':'category'}" />
</group>
<group>
<field name="write_uid" groups="base.group_no_one" />
@ -34,12 +30,7 @@
<field name="template" placeholder="e.g. Once upon a time..." />
</page>
<page string="Documents" name="documents">
<field
name="content"
widget="html"
class="oe_view_only"
options='{"safe": True}'
/>
<field name="content" widget="html" class="oe_view_only" options="{'safe': True}" />
</page>
</notebook>
</sheet>
@ -55,9 +46,7 @@
<field name="name">Browse Wiki Content</field>
<field name="res_model">document.page</field>
<field name="domain">[]</field>
<field
name="context"
>{'default_type': 'content', 'search_default_no_parent_id':1, }</field>
<field name="context">{'default_type': 'content', 'search_default_no_parent_id':1, }</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
</record>
@ -66,9 +55,7 @@
<field name="name">Browse Wiki Content</field>
<field name="res_model">document.page</field>
<field name="domain">[]</field>
<field
name="context"
>{'default_type': 'content', 'search_default_parent_id': [active_id] }</field>
<field name="context">{'default_type': 'content', 'search_default_parent_id': [active_id] }</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
</record>
@ -90,18 +77,11 @@
<field name="color" />
<templates>
<t t-name="kanban-box">
<div
t-att-class="'oe_kanban_global_area' + ' oe_kanban_color_'+ (kanban_getcolor(record.color.raw_value)) + ' oe_kanban_global_click' "
>
<div t-att-class="'oe_kanban_global_area' + ' oe_kanban_color_'+ (kanban_getcolor(record.color.raw_value)) + ' oe_kanban_global_click' ">
<div class="o_kanban_image">
<div class="o_kanban_image_wrapper">
<t t-if="record.type.raw_value == 'category'">
<img
class="o_kanban_image"
t-if="record.image.raw_value"
t-att-src="kanban_image('document.page', 'image', record.id.raw_value)"
t-att-alt="record.display_name"
/>
<img class="o_kanban_image" t-if="record.image.raw_value" t-att-src="kanban_image('document.page', 'image', record.id.raw_value)" t-att-alt="record.display_name" />
<span style="font-size: 64px; color: lightslategray">
<i t-if="!record.image.raw_value" class="o_kanban_image fa fa-folder-open" />
</span>
@ -122,26 +102,13 @@
</strong>
<br />
<small t-if="record.parent_id.raw_value">
<img
t-att-src="kanban_image('document.page', 'image', record.parent_id.raw_value)"
t-att-alt="record.parent_id.display_name"
width="24"
height="24"
/>
<img t-att-src="kanban_image('document.page', 'image', record.parent_id.raw_value)" t-att-alt="record.parent_id.display_name" width="24" height="24" />
<field name="parent_id" />
</small>
</div>
</div>
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
<a
role="button"
class="dropdown-toggle o-no-caret btn"
data-toggle="dropdown"
data-display="static"
href="#"
aria-label="Dropdown menu"
title="Dropdown menu"
>
<a role="button" class="dropdown-toggle o-no-caret btn" data-toggle="dropdown" data-display="static" href="#" aria-label="Dropdown menu" title="Dropdown menu">
<span class="fa fa-ellipsis-v" />
</a>
<div class="dropdown-menu" role="menu">
@ -157,28 +124,14 @@
<field name="write_date" widget="date" />
</div>
<div class="oe_kanban_bottom_right">
<img
t-att-src="kanban_image('res.users', 'image_small', record.content_uid.raw_value)"
t-att-title="record.content_uid.value"
t-att-alt="record.content_uid.value"
width="24"
height="24"
class="oe_kanban_avatar"
/>
<img t-att-src="kanban_image('res.users', 'image_small', record.content_uid.raw_value)" t-att-title="record.content_uid.value" t-att-alt="record.content_uid.value" width="24" height="24" class="oe_kanban_avatar" />
</div>
</div>
</div>
</div>
<div
t-if="record.type.raw_value == 'category'"
class="o_document_page_kanban_boxes"
>
<a
class="o_document_page_kanban_box"
name="%(action_browse_all_content)d"
type="action"
>
<div t-if="record.type.raw_value == 'category'" class="o_document_page_kanban_boxes">
<a class="o_document_page_kanban_box" name="%(action_browse_all_content)d" type="action">
</a>
</div>
</div>
@ -188,6 +141,7 @@
</field>
</record>
<record id="view_category_tree" model="ir.ui.view">
<field name="name">document.page.category.tree</field>
<field name="model">document.page</field>
@ -195,6 +149,8 @@
<tree string="Categories">
<field name="sequence" widget="handle" />
<field name="name" />
<field name="parent_id" />
<field name="create_uid" invisible="1" />
<field name="write_uid" />
@ -208,30 +164,14 @@
<field name="model">document.page</field>
<field name="arch" type="xml">
<search string="Document Category">
<field
name="name"
string="Content"
filter_domain="['|', ('name','ilike',self), ('template','ilike',self)]"
/>
<field name="name" string="Content" filter_domain="['|', ('name','ilike',self), ('template','ilike',self)]" />
<field name="parent_id" />
<field name="create_uid" />
<field name="content_uid" />
<group expand="0" string="Group By...">
<filter
name="group_by_category"
string="Category"
context="{'group_by':'parent_id'}"
/>
<filter
name="group_by_author"
string="Author"
context="{'group_by':'create_uid'}"
/>
<filter
name="group_by_last_contributor"
string="Last Contributor"
context="{'group_by':'content_uid'}"
/>
<filter name="group_by_category" string="Category" context="{'group_by':'parent_id'}" />
<filter name="group_by_author" string="Author" context="{'group_by':'create_uid'}" />
<filter name="group_by_last_contributor" string="Last Contributor" context="{'group_by':'content_uid'}" />
</group>
</search>
</field>
@ -244,11 +184,7 @@
<field name="arch" type="xml">
<field name="content_uid" position="after">
<separator />
<filter
string="Top Level Ressources"
name="no_parent_id"
domain="[('parent_id', '=', False)]"
/>
<filter string="Top Level Ressources" name="no_parent_id" domain="[('parent_id', '=', False)]" />
</field>
</field>
</record>
@ -291,20 +227,8 @@
</record>
<menuitem
id="menu_category"
parent="menu_wiki"
name="Categories"
action="action_category"
sequence="20"
/>
<menuitem id="menu_category" parent="menu_wiki" name="Categories" action="action_category" sequence="20" />
<menuitem
id="menu_browse_content"
parent="knowledge.menu_document_root"
name="Browse Wiki Content"
action="action_browse_top_content"
sequence="5"
/>
<menuitem id="menu_browse_content" parent="knowledge.menu_document_root" name="Browse Wiki Content" action="action_browse_top_content" sequence="5" />
</odoo>

View File

@ -71,6 +71,7 @@
<record id="wiki_form_inherit" model="ir.ui.view">
<field name="name">document.page.form</field>
<field name="model">document.page</field>
<field name="priority" eval="100"></field>
<field name="inherit_id" ref="document_page.view_wiki_form" />
<field name="arch" type="xml">