[IMP] pre-commit run -a

This commit is contained in:
Jairo Llopis 2021-01-26 14:06:17 +00:00 committed by Bernat Puig Font
parent 7fc501891a
commit 324d84aea1
4 changed files with 75 additions and 51 deletions

View File

@ -1,15 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="mail_activity_rule_my_team" model="ir.rule">
<field name="name">mail.activity: user: my team</field>
<field name="model_id" ref="mail.model_mail_activity"/>
<field name="domain_force">["|", ('team_id', 'in', user.activity_team_ids.ids), "&amp;", ('team_id', '=', False), ('user_id', '=', user.id)]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_create" eval="True"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="True"/>
<field name="perm_unlink" eval="True"/>
<field name="model_id" ref="mail.model_mail_activity" />
<field
name="domain_force"
>["|", ('team_id', 'in', user.activity_team_ids.ids), "&amp;", ('team_id', '=', False), ('user_id', '=', user.id)]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]" />
<field name="perm_create" eval="True" />
<field name="perm_read" eval="False" />
<field name="perm_write" eval="True" />
<field name="perm_unlink" eval="True" />
</record>
</odoo>

View File

@ -11,32 +11,46 @@
<field name="arch" type="xml">
<form string="Activity Team">
<header>
<field name="count_missing_activities" invisible="1"/>
<button name="assign_team_to_unassigned_activities" string="Assign to missing activities"
type="object" class="oe_highlight"
groups="base.group_no_one"
attrs="{'invisible': [('count_missing_activities', '=', 0)]}"/>
<field name="count_missing_activities" invisible="1" />
<button
name="assign_team_to_unassigned_activities"
string="Assign to missing activities"
type="object"
class="oe_highlight"
groups="base.group_no_one"
attrs="{'invisible': [('count_missing_activities', '=', 0)]}"
/>
</header>
<sheet string="Activity Team">
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object"
class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button"
options='{"terminology": "archive"}'/></button>
<button
name="toggle_active"
type="object"
class="oe_stat_button"
icon="fa-archive"
>
<field
name="active"
widget="boolean_button"
options='{"terminology": "archive"}'
/></button>
</div>
<group>
<group name="base">
<field name="name"/>
<field name="user_id"/>
<field name="name" />
<field name="user_id" />
</group>
<group name="models">
<field name="res_model_ids" widget="many2many_tags"
options="{'no_create': True, 'no_open': True}"/>
<field
name="res_model_ids"
widget="many2many_tags"
options="{'no_create': True, 'no_open': True}"
/>
</group>
</group>
<notebook>
<page name="members" string="Members">
<field name="member_ids" nolabel="1"/>
<field name="member_ids" nolabel="1" />
</page>
</notebook>
</sheet>
@ -51,8 +65,8 @@
<field name="model">mail.activity.team</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="res_model_ids" widget="many2many_tags"/>
<field name="name" />
<field name="res_model_ids" widget="many2many_tags" />
</tree>
</field>
</record>
@ -64,9 +78,9 @@
<field name="model">mail.activity.team</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
<field name="res_model_ids"/>
<field name="member_ids"/>
<field name="name" />
<field name="res_model_ids" />
<field name="member_ids" />
</search>
</field>
</record>
@ -81,7 +95,7 @@
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="context">{}</field>
<field name="search_view_id" ref="mail_activity_team_view_search"/>
<field name="search_view_id" ref="mail_activity_team_view_search" />
</record>
@ -89,9 +103,10 @@
Menus
-->
<menuitem
id="menu_mail_activity_team"
name="Activity Teams"
parent="base.menu_email"
action="mail_activity_team_action"/>
id="menu_mail_activity_team"
name="Activity Teams"
parent="base.menu_email"
action="mail_activity_team_action"
/>
</odoo>

View File

@ -1,13 +1,13 @@
<?xml version="1.0"?>
<?xml version="1.0" ?>
<odoo>
<record id="mail_activity_view_form_popup" model="ir.ui.view">
<field name="name">mail.activity.view.form.popup</field>
<field name="model">mail.activity</field>
<field name="inherit_id" ref="mail.mail_activity_view_form_popup"/>
<field name="inherit_id" ref="mail.mail_activity_view_form_popup" />
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="team_id" options="{'no_create': True, 'no_open': True}"/>
<field name="team_id" options="{'no_create': True, 'no_open': True}" />
</field>
</field>
</record>
@ -15,10 +15,10 @@
<record id="mail_activity_view_tree" model="ir.ui.view">
<field name="name">mail.activity.view.tree</field>
<field name="model">mail.activity</field>
<field name="inherit_id" ref="mail.mail_activity_view_tree"/>
<field name="inherit_id" ref="mail.mail_activity_view_tree" />
<field name="arch" type="xml">
<field name="date_deadline" position="after">
<field name="team_id"/>
<field name="team_id" />
</field>
</field>
</record>
@ -26,10 +26,13 @@
<record id="mail_activity_view_form_board" model="ir.ui.view">
<field name="name">mail.activity.view.form</field>
<field name="model">mail.activity</field>
<field name="inherit_id" ref="mail_activity_board.mail_activity_view_form_board"/>
<field
name="inherit_id"
ref="mail_activity_board.mail_activity_view_form_board"
/>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="team_id"/>
<field name="team_id" />
</field>
</field>
</record>
@ -37,15 +40,15 @@
<record id="mail_activity_view_kanban" model="ir.ui.view">
<field name="name">mail.activity.boards.view.kanban</field>
<field name="model">mail.activity</field>
<field name="inherit_id" ref="mail_activity_board.mail_activity_view_kanban"/>
<field name="inherit_id" ref="mail_activity_board.mail_activity_view_kanban" />
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="team_id"/>
<field name="team_id" />
</field>
<xpath expr="//div[hasclass('oe_kanban_content')]" position="inside">
<br/>
<br />
<div>
Team: <field name="team_id"/>
Team: <field name="team_id" />
</div>
</xpath>
</field>
@ -55,17 +58,21 @@
<record id="mail_activity_view_search" model="ir.ui.view">
<field name="name">mail.activity.boards.view.search</field>
<field name="model">mail.activity</field>
<field name="inherit_id" ref="mail_activity_board.mail_activity_view_search"/>
<field name="priority" eval="2"/>
<field name="inherit_id" ref="mail_activity_board.mail_activity_view_search" />
<field name="priority" eval="2" />
<field name="arch" type="xml">
<xpath expr='//field[@name="user_id"]' position='before'>
<field name="team_id"/>
<field name="team_id" />
</xpath>
<xpath expr='//filter[@name="activities_6_month"]' position='after'>
<filter name="my_team_activities" string="My Team Activities" domain="[('team_id.member_ids', '=', uid)]"/>
<filter
name="my_team_activities"
string="My Team Activities"
domain="[('team_id.member_ids', '=', uid)]"
/>
</xpath>
<group position='inside'>
<filter name='team' string="Team" context="{'group_by': 'team_id'}"/>
<filter name='team' string="Team" context="{'group_by': 'team_id'}" />
</group>
</field>

View File

@ -1,14 +1,14 @@
<?xml version="1.0"?>
<?xml version="1.0" ?>
<odoo>
<!-- Update user form !-->
<record id="view_users_form_activity_teams" model="ir.ui.view">
<field name="name">res.users.form.activity.team</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="inherit_id" ref="base.view_users_form" />
<field name="arch" type="xml">
<data>
<field name="signature" position="before">
<field name="activity_team_ids" widget="many2many_tags"/>
<field name="activity_team_ids" widget="many2many_tags" />
</field>
</data>
</field>