[IMP] pre-commit run -a

This commit is contained in:
Jairo Llopis 2021-01-26 14:06:17 +00:00 committed by emagdalenaC2i
parent 1def741e34
commit 16f1ce9ddb
4 changed files with 102 additions and 54 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com> <!-- Copyright 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com>
Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com> Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com>
Copyright 2015 Javier Iniesta <javieria@antiun.com> Copyright 2015 Javier Iniesta <javieria@antiun.com>
@ -10,10 +10,13 @@
<record model="ir.ui.view" id="view_mail_mass_mailing_contact_tree"> <record model="ir.ui.view" id="view_mail_mass_mailing_contact_tree">
<field name="name">mailing.contact.tree.inherit</field> <field name="name">mailing.contact.tree.inherit</field>
<field name="model">mailing.contact</field> <field name="model">mailing.contact</field>
<field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_contact_tree"/> <field
name="inherit_id"
ref="mass_mailing.view_mail_mass_mailing_contact_tree"
/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="email" position="after"> <field name="email" position="after">
<field name="partner_id"/> <field name="partner_id" />
</field> </field>
</field> </field>
</record> </record>
@ -21,28 +24,43 @@
<record model="ir.ui.view" id="view_mail_mass_mailing_contact_form"> <record model="ir.ui.view" id="view_mail_mass_mailing_contact_form">
<field name="name">mailing.contact.form.partner</field> <field name="name">mailing.contact.form.partner</field>
<field name="model">mailing.contact</field> <field name="model">mailing.contact</field>
<field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_contact_form"/> <field
name="inherit_id"
ref="mass_mailing.view_mail_mass_mailing_contact_form"
/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//field[@name='email']/.." position="after"> <xpath expr="//field[@name='email']/.." position="after">
<field name="partner_id"/> <field name="partner_id" />
</xpath> </xpath>
<field name="title_id" position="attributes"> <field name="title_id" position="attributes">
<attribute name="attrs">{'readonly': [('partner_id', '!=', False)]}</attribute> <attribute
name="attrs"
>{'readonly': [('partner_id', '!=', False)]}</attribute>
</field> </field>
<field name="email" position="attributes"> <field name="email" position="attributes">
<attribute name="attrs">{'readonly': [('partner_id', '!=', False)]}</attribute> <attribute
name="attrs"
>{'readonly': [('partner_id', '!=', False)]}</attribute>
</field> </field>
<field name="name" position="attributes"> <field name="name" position="attributes">
<attribute name="attrs">{'readonly': [('partner_id', '!=', False)]}</attribute> <attribute
name="attrs"
>{'readonly': [('partner_id', '!=', False)]}</attribute>
</field> </field>
<field name="company_name" position="attributes"> <field name="company_name" position="attributes">
<attribute name="attrs">{'readonly': [('partner_id', '!=', False)]}</attribute> <attribute
name="attrs"
>{'readonly': [('partner_id', '!=', False)]}</attribute>
</field> </field>
<field name="country_id" position="attributes"> <field name="country_id" position="attributes">
<attribute name="attrs">{'readonly': [('partner_id', '!=', False)]}</attribute> <attribute
name="attrs"
>{'readonly': [('partner_id', '!=', False)]}</attribute>
</field> </field>
<field name="tag_ids" position="attributes"> <field name="tag_ids" position="attributes">
<attribute name="attrs">{'readonly': [('partner_id', '!=', False)]}</attribute> <attribute
name="attrs"
>{'readonly': [('partner_id', '!=', False)]}</attribute>
</field> </field>
</field> </field>
</record> </record>
@ -50,15 +68,20 @@
<record model="ir.ui.view" id="view_mail_mass_mailing_contact_search"> <record model="ir.ui.view" id="view_mail_mass_mailing_contact_search">
<field name="name">Add partner search field and group by</field> <field name="name">Add partner search field and group by</field>
<field name="model">mailing.contact</field> <field name="model">mailing.contact</field>
<field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_contact_search"/> <field
name="inherit_id"
ref="mass_mailing.view_mail_mass_mailing_contact_search"
/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="name" position="after"> <field name="name" position="after">
<field name="partner_id"/> <field name="partner_id" />
</field> </field>
<filter name="group_create_date" position="after"> <filter name="group_create_date" position="after">
<filter string="Partner" <filter
name="group_partner" string="Partner"
context="{'group_by': 'partner_id'}"/> name="group_partner"
context="{'group_by': 'partner_id'}"
/>
</filter> </filter>
</field> </field>
</record> </record>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com> <!-- Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>
Copyright 2020 Tecnativa - Manuel Calero Copyright 2020 Tecnativa - Manuel Calero
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
@ -7,10 +7,10 @@
<record model="ir.ui.view" id="mailing_trace_view_form"> <record model="ir.ui.view" id="mailing_trace_view_form">
<field name="name">Add partner field</field> <field name="name">Add partner field</field>
<field name="model">mailing.trace</field> <field name="model">mailing.trace</field>
<field name="inherit_id" ref="mass_mailing.mailing_trace_view_form"/> <field name="inherit_id" ref="mass_mailing.mailing_trace_view_form" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="res_id" position="after"> <field name="res_id" position="after">
<field name="partner_id"/> <field name="partner_id" />
</field> </field>
</field> </field>
</record> </record>
@ -18,10 +18,10 @@
<record model="ir.ui.view" id="mailing_trace_view_tree"> <record model="ir.ui.view" id="mailing_trace_view_tree">
<field name="name">Add partner column</field> <field name="name">Add partner column</field>
<field name="model">mailing.trace</field> <field name="model">mailing.trace</field>
<field name="inherit_id" ref="mass_mailing.mailing_trace_view_tree"/> <field name="inherit_id" ref="mass_mailing.mailing_trace_view_tree" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="sent" position="before"> <field name="sent" position="before">
<field name="partner_id"/> <field name="partner_id" />
</field> </field>
</field> </field>
</record> </record>
@ -29,15 +29,17 @@
<record model="ir.ui.view" id="mailing_trace_view_search"> <record model="ir.ui.view" id="mailing_trace_view_search">
<field name="name">Add partner search field and group by</field> <field name="name">Add partner search field and group by</field>
<field name="model">mailing.trace</field> <field name="model">mailing.trace</field>
<field name="inherit_id" ref="mass_mailing.mailing_trace_view_search"/> <field name="inherit_id" ref="mass_mailing.mailing_trace_view_search" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="mass_mailing_id" position="after"> <field name="mass_mailing_id" position="after">
<field name="partner_id"/> <field name="partner_id" />
</field> </field>
<filter name="group_reply_date" position="after"> <filter name="group_reply_date" position="after">
<filter string="Partner" <filter
string="Partner"
name="group_partner" name="group_partner"
context="{'group_by': 'partner_id'}"/> context="{'group_by': 'partner_id'}"
/>
</filter> </filter>
</field> </field>
</record> </record>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com> <!-- Copyright 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com>
Copyright 2015-16 Antonio Espinosa <antonio.espinosa@tecnativa.com> Copyright 2015-16 Antonio Espinosa <antonio.espinosa@tecnativa.com>
Copyright 2015 Javier Iniesta <javieria@antiun.com> Copyright 2015 Javier Iniesta <javieria@antiun.com>
@ -10,29 +10,40 @@
<record model="ir.ui.view" id="view_partner_form"> <record model="ir.ui.view" id="view_partner_form">
<field name="name">Partner Form with mailing contacts</field> <field name="name">Partner Form with mailing contacts</field>
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/> <field name="inherit_id" ref="base.view_partner_form" />
<field name="groups_id" eval="[(4, ref('mass_mailing.group_mass_mailing_user'))]"/> <field
name="groups_id"
eval="[(4, ref('mass_mailing.group_mass_mailing_user'))]"
/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<div name="button_box" position="inside"> <div name="button_box" position="inside">
<button name="%(mass_mailing.action_view_mass_mailing_contacts)d" <button
context="{'search_default_partner_id': active_id, name="%(mass_mailing.action_view_mass_mailing_contacts)d"
context="{'search_default_partner_id': active_id,
'default_partner_id': active_id}" 'default_partner_id': active_id}"
type="action" type="action"
class="oe_stat_button oe_inline" class="oe_stat_button oe_inline"
icon="fa-envelope-o"> icon="fa-envelope-o"
<field name="mass_mailing_contacts_count" >
widget="statinfo" <field
string="Mailing contacts"/> name="mass_mailing_contacts_count"
widget="statinfo"
string="Mailing contacts"
/>
</button> </button>
<button name="%(mass_mailing.mailing_trace_action)d" <button
context="{'search_default_partner_id': active_id, name="%(mass_mailing.mailing_trace_action)d"
context="{'search_default_partner_id': active_id,
'default_partner_id': active_id}" 'default_partner_id': active_id}"
type="action" type="action"
class="oe_stat_button oe_inline" class="oe_stat_button oe_inline"
icon="fa-envelope-o"> icon="fa-envelope-o"
<field name="mass_mailing_stats_count" >
widget="statinfo" <field
string="Mass mailing stats"/> name="mass_mailing_stats_count"
widget="statinfo"
string="Mass mailing stats"
/>
</button> </button>
</div> </div>
</field> </field>
@ -41,13 +52,19 @@
<record id="view_res_partner_filter" model="ir.ui.view"> <record id="view_res_partner_filter" model="ir.ui.view">
<field name="name">Partner Search with mailing contacts</field> <field name="name">Partner Search with mailing contacts</field>
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/> <field name="inherit_id" ref="base.view_res_partner_filter" />
<field name="groups_id" eval="[(4, ref('mass_mailing.group_mass_mailing_user'))]"/> <field
name="groups_id"
eval="[(4, ref('mass_mailing.group_mass_mailing_user'))]"
/>
<field name="priority">20</field> <field name="priority">20</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="category_id" position="after"> <field name="category_id" position="after">
<field name="mass_mailing_contact_ids" string="Mailing List" <field
filter_domain="[('mass_mailing_contact_ids.list_ids','ilike', self)]"/> name="mass_mailing_contact_ids"
string="Mailing List"
filter_domain="[('mass_mailing_contact_ids.list_ids','ilike', self)]"
/>
</field> </field>
</field> </field>
</record> </record>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com> <!-- Copyright 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com>
Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com> Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com>
Copyright 2015 Javier Iniesta <javieria@antiun.com> Copyright 2015 Javier Iniesta <javieria@antiun.com>
@ -6,12 +6,14 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<odoo> <odoo>
<act_window id="action_partner_mail_list" <act_window
id="action_partner_mail_list"
name="Add to mailing list" name="Add to mailing list"
res_model="partner.mail.list.wizard" res_model="partner.mail.list.wizard"
binding_model="res.partner" binding_model="res.partner"
target="new" target="new"
view_mode="form"/> view_mode="form"
/>
<record model="ir.ui.view" id="partner_mail_list_wizard_form"> <record model="ir.ui.view" id="partner_mail_list_wizard_form">
<field name="name">partner.mail.list.form</field> <field name="name">partner.mail.list.form</field>
@ -19,11 +21,15 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Create contact mailing list"> <form string="Create contact mailing list">
<group> <group>
<field name="mail_list_id"/> <field name="mail_list_id" />
</group> </group>
<footer> <footer>
<button string="Add contacts to mailing list" name="add_to_mail_list" <button
type="object" class="oe_highlight"/> string="Add contacts to mailing list"
name="add_to_mail_list"
type="object"
class="oe_highlight"
/>
<button string="Cancel" class="oe_link" special="cancel" /> <button string="Cancel" class="oe_link" special="cancel" />
</footer> </footer>
</form> </form>