[MERGE] merge from trunk
bzr revid: ged@openerp.com-20140417110726-8w4oktk7ml416ld7 bzr revid: ged@openerp.com-20140417130144-42bkw3f55xosxnks
This commit is contained in:
commit
a17c16a660
|
@ -1,7 +1,8 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_hr_applicant_user,hr.applicant.user,model_hr_applicant,base.group_hr_user,1,1,1,1
|
||||
access_hr_recruitment_report,hr.recruitment.report,model_hr_recruitment_report,base.group_hr_manager,1,1,1,1
|
||||
access_hr_recruitment_stage_user,hr.recruitment.stage.user,model_hr_recruitment_stage,base.group_hr_user,1,1,1,1
|
||||
access_hr_recruitment_stage_user,hr.recruitment.stage.user,model_hr_recruitment_stage,base.group_hr_user,1,0,0,0
|
||||
access_hr_recruitment_stage_manager,hr.recruitment.stage.manager,model_hr_recruitment_stage,base.group_hr_manager,1,1,1,1
|
||||
access_hr_recruitment_degree,hr.recruitment.degree,model_hr_recruitment_degree,base.group_hr_user,1,1,1,1
|
||||
access_res_partner_hr_user,res.partner.user,base.model_res_partner,base.group_hr_user,1,1,1,1
|
||||
access_survey_hr_user,survey.hr.user,survey.model_survey_survey,base.group_hr_user,1,1,1,0
|
||||
|
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
<!-- Admin should not receivve emails at creation -->
|
||||
<record id="base.partner_root" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
|
||||
<!-- Catchall Email Alias -->
|
||||
|
|
|
@ -4,76 +4,76 @@
|
|||
|
||||
<!-- Update 'Demo user' and partners email preferences to avoid mail bombing -->
|
||||
<record id="base.partner_demo" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_1" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_2" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_3" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_4" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_5" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_6" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_7" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_8" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_9" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_10" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_11" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_12" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_13" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_14" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_15" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_16" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_17" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_18" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_19" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_20" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_21" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_22" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_23" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
|
||||
<!-- Discussion: attachments and spec [DEMO: search on has_attachments -->
|
||||
|
|
|
@ -96,13 +96,7 @@ class mail_notification(osv.Model):
|
|||
if message.author_id and message.author_id.email == partner.email:
|
||||
continue
|
||||
# Partner does not want to receive any emails or is opt-out
|
||||
if partner.notification_email_send == 'none':
|
||||
continue
|
||||
# Partner wants to receive only emails and comments
|
||||
if partner.notification_email_send == 'comment' and message.type not in ('email', 'comment'):
|
||||
continue
|
||||
# Partner wants to receive only emails
|
||||
if partner.notification_email_send == 'email' and message.type != 'email':
|
||||
if partner.notify_email == 'none':
|
||||
continue
|
||||
notify_pids.append(partner.id)
|
||||
return notify_pids
|
||||
|
|
|
@ -31,21 +31,18 @@ class res_partner_mail(osv.Model):
|
|||
_mail_mass_mailing = _('Customers')
|
||||
|
||||
_columns = {
|
||||
'notification_email_send': fields.selection([
|
||||
'notify_email': fields.selection([
|
||||
('none', 'Never'),
|
||||
('email', 'Incoming Emails only'),
|
||||
('comment', 'Incoming Emails and Discussions'),
|
||||
('all', 'All Messages (discussions, emails, followed system notifications)'),
|
||||
], 'Receive Messages by Email', required=True,
|
||||
('always', 'All Messages'),
|
||||
], 'Receive Inbox Notifications by Email', required=True,
|
||||
oldname='notification_email_send',
|
||||
help="Policy to receive emails for new messages pushed to your personal Inbox:\n"
|
||||
"- Never: no emails are sent\n"
|
||||
"- Incoming Emails only: for messages received by the system via email\n"
|
||||
"- Incoming Emails and Discussions: for incoming emails along with internal discussions\n"
|
||||
"- All Messages: for every notification you receive in your Inbox"),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'notification_email_send': lambda *args: 'comment'
|
||||
'notify_email': lambda *args: 'always'
|
||||
}
|
||||
|
||||
def message_get_suggested_recipients(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='active']" position="after">
|
||||
<field name='notification_email_send'/>
|
||||
<field name='notify_email' widget="radio"/>
|
||||
</xpath>
|
||||
<xpath expr="//sheet" position="after">
|
||||
<div class="oe_chatter">
|
||||
|
|
|
@ -54,10 +54,10 @@ class res_users(osv.Model):
|
|||
init_res = super(res_users, self).__init__(pool, cr)
|
||||
# duplicate list to avoid modifying the original reference
|
||||
self.SELF_WRITEABLE_FIELDS = list(self.SELF_WRITEABLE_FIELDS)
|
||||
self.SELF_WRITEABLE_FIELDS.extend(['notification_email_send', 'display_groups_suggestions'])
|
||||
self.SELF_WRITEABLE_FIELDS.extend(['notify_email', 'display_groups_suggestions'])
|
||||
# duplicate list to avoid modifying the original reference
|
||||
self.SELF_READABLE_FIELDS = list(self.SELF_READABLE_FIELDS)
|
||||
self.SELF_READABLE_FIELDS.extend(['notification_email_send', 'alias_domain', 'alias_name', 'display_groups_suggestions'])
|
||||
self.SELF_READABLE_FIELDS.extend(['notify_email', 'alias_domain', 'alias_name', 'display_groups_suggestions'])
|
||||
return init_res
|
||||
|
||||
def _auto_init(self, cr, context=None):
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<field name="email" position="before">
|
||||
<field name="notification_email_send" readonly="0"/>
|
||||
<field name="notify_email" widget="radio" readonly="0"/>
|
||||
</field>
|
||||
</data>
|
||||
</field>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<field name="signature" position="before">
|
||||
<field name="notification_email_send"/>
|
||||
<field name="notify_email" widget="radio"/>
|
||||
</field>
|
||||
<field name="signature" position="before">
|
||||
<label for="alias_id" string="Messaging Alias" class="oe_read_only"
|
||||
|
|
|
@ -44,7 +44,7 @@ instance.web.form.FieldMany2ManyTagsEmail = instance.web.form.FieldMany2ManyTags
|
|||
new instance.web.Model('res.partner').call("search", [[
|
||||
["id", "in", ids],
|
||||
["email", "=", false],
|
||||
["notification_email_send", "in", ['all', 'comment']] ]],
|
||||
["notify_email", "=", 'always'] ]],
|
||||
{context: this.build_context()})
|
||||
.then(function (record_ids) {
|
||||
// valid partner
|
||||
|
|
|
@ -189,17 +189,6 @@
|
|||
</td>
|
||||
<td><div class="oe_view_manager_view_search" t-opentag="true"/></td>
|
||||
</tr>
|
||||
<tr class="oe_header_row" t-if="widget.action.params.view_inbox and widget.action.params.show_compose_message" >
|
||||
<td colspan="2">
|
||||
<button type="button" class="oe_write_full oe_highlight">
|
||||
Compose a new message
|
||||
</button>
|
||||
<span class='oe_alternative'>
|
||||
or
|
||||
<a href='#' class='oe_write_onwall oe_bold' help='Your followers can read this message'>Write to my followers</a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="oe_mail-placeholder"></div>
|
||||
|
|
|
@ -77,7 +77,7 @@ class TestMail(common.TransactionCase):
|
|||
'alias_name': 'ernest',
|
||||
'email': 'e.e@example.com',
|
||||
'signature': '--\nErnest',
|
||||
'notification_email_send': 'comment',
|
||||
'notify_email': 'always',
|
||||
'groups_id': [(6, 0, [self.group_employee_id])]
|
||||
}, {'no_reset_password': True})
|
||||
self.user_noone_id = self.res_users.create(cr, uid, {
|
||||
|
@ -86,7 +86,7 @@ class TestMail(common.TransactionCase):
|
|||
'alias_name': 'noemie',
|
||||
'email': 'n.n@example.com',
|
||||
'signature': '--\nNoemie',
|
||||
'notification_email_send': 'comment',
|
||||
'notify_email': 'always',
|
||||
'groups_id': [(6, 0, [])]
|
||||
}, {'no_reset_password': True})
|
||||
|
||||
|
|
|
@ -348,14 +348,14 @@ class test_mail(TestMail):
|
|||
# Data creation
|
||||
# --------------------------------------------------
|
||||
# 0 - Update existing users-partners
|
||||
self.res_users.write(cr, uid, [uid], {'email': 'a@a', 'notification_email_send': 'comment'})
|
||||
self.res_users.write(cr, uid, [uid], {'email': 'a@a', 'notify_email': 'always'})
|
||||
self.res_users.write(cr, uid, [self.user_raoul_id], {'email': 'r@r'})
|
||||
# 1 - Bert Tartopoils, with email, should receive emails for comments and emails
|
||||
p_b_id = self.res_partner.create(cr, uid, {'name': 'Bert Tartopoils', 'email': 'b@b'})
|
||||
# 2 - Carine Poilvache, with email, should receive emails for emails
|
||||
p_c_id = self.res_partner.create(cr, uid, {'name': 'Carine Poilvache', 'email': 'c@c', 'notification_email_send': 'email'})
|
||||
p_c_id = self.res_partner.create(cr, uid, {'name': 'Carine Poilvache', 'email': 'c@c', 'notify_email': 'none'})
|
||||
# 3 - Dédé Grosbedon, without email, to test email verification; should receive emails for every message
|
||||
p_d_id = self.res_partner.create(cr, uid, {'name': 'Dédé Grosbedon', 'email': 'd@d', 'notification_email_send': 'all'})
|
||||
p_d_id = self.res_partner.create(cr, uid, {'name': 'Dédé Grosbedon', 'email': 'd@d', 'notify_email': 'always'})
|
||||
# 4 - Attachments
|
||||
attach1_id = self.ir_attachment.create(cr, user_raoul.id, {
|
||||
'name': 'Attach1', 'datas_fname': 'Attach1',
|
||||
|
@ -582,9 +582,9 @@ class test_mail(TestMail):
|
|||
# 1 - Bert Tartopoils, with email, should receive emails for comments and emails
|
||||
p_b_id = self.res_partner.create(cr, uid, {'name': 'Bert Tartopoils', 'email': 'b@b'})
|
||||
# 2 - Carine Poilvache, with email, should receive emails for emails
|
||||
p_c_id = self.res_partner.create(cr, uid, {'name': 'Carine Poilvache', 'email': 'c@c', 'notification_email_send': 'email'})
|
||||
p_c_id = self.res_partner.create(cr, uid, {'name': 'Carine Poilvache', 'email': 'c@c', 'notify_email': 'always'})
|
||||
# 3 - Dédé Grosbedon, without email, to test email verification; should receive emails for every message
|
||||
p_d_id = self.res_partner.create(cr, uid, {'name': 'Dédé Grosbedon', 'email': 'd@d', 'notification_email_send': 'all'})
|
||||
p_d_id = self.res_partner.create(cr, uid, {'name': 'Dédé Grosbedon', 'email': 'd@d', 'notify_email': 'always'})
|
||||
# 4 - Create a Bird mail.group, that will be used to test mass mailing
|
||||
group_bird_id = self.mail_group.create(cr, uid,
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<field name="email">demo.portal@yourcompany.example.com</field>
|
||||
<field name="supplier" eval="False"/>
|
||||
<field name="customer" eval="True"/>
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
<field name="city">Vivegnis</field>
|
||||
<field name="zip">4683</field>
|
||||
<field name="country_id" ref="base.be"/>
|
||||
|
|
|
@ -41,9 +41,6 @@ class project_configuration(osv.osv_memory):
|
|||
'the timesheet line entries for particular date and user, with the effect of creating, '
|
||||
'editing and deleting either ways.\n'
|
||||
'-This installs the module project_timesheet.'),
|
||||
'module_project_long_term': fields.boolean("Manage resources planning on gantt view",
|
||||
help='A long term project management module that tracks planning, scheduling, and resource allocation.\n'
|
||||
'-This installs the module project_long_term.'),
|
||||
'module_project_issue': fields.boolean("Track issues and bugs",
|
||||
help='Provides management of issues/bugs in projects.\n'
|
||||
'-This installs the module project_issue.'),
|
||||
|
|
|
@ -61,10 +61,6 @@
|
|||
<field name="group_tasks_work_on_tasks" class="oe_inline"/>
|
||||
<label for="group_tasks_work_on_tasks" />
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_project_long_term" class="oe_inline"/>
|
||||
<label for="module_project_long_term"/>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<separator string="Helpdesk & Support"/>
|
||||
|
|
|
@ -3,7 +3,8 @@ access_project_project,project.project,model_project_project,project.group_proje
|
|||
access_project_project_manager,project.project,model_project_project,project.group_project_manager,1,1,1,1
|
||||
access_account_analytic_account_user,account.analytic.account,analytic.model_account_analytic_account,project.group_project_user,1,0,0,0
|
||||
access_account_analytic_account,account.analytic.account,analytic.model_account_analytic_account,project.group_project_manager,1,1,1,1
|
||||
access_project_task_type_user,project.task.type user,model_project_task_type,project.group_project_user,1,1,1,1
|
||||
access_project_task_type_user,project.task.type user,model_project_task_type,project.group_project_user,1,0,0,0
|
||||
access_project_task_type_manager,project.task.type manager,model_project_task_type,project.group_project_manager,1,1,1,1
|
||||
access_project_task,project.task,model_project_task,project.group_project_user,1,1,1,1
|
||||
access_project_task_work,project.task.work,model_project_task_work,project.group_project_user,1,1,1,1
|
||||
access_report_project_task_user,report.project.task.user,model_report_project_task_user,project.group_project_manager,1,1,1,1
|
||||
|
@ -11,7 +12,7 @@ access_partner_task user,base.res.partner user,base.model_res_partner,project.gr
|
|||
access_task_on_partner,project.task on partners,model_project_task,base.group_user,1,0,0,0
|
||||
access_project_on_partner,project.project on partners,model_project_project,base.group_user,1,0,0,0
|
||||
access_project_task_sale_user,project.task salesman,model_project_task,base.group_sale_salesman,1,1,1,1
|
||||
access_project_task_type_sale_user,project.task.type salesman,project.model_project_task_type,base.group_sale_salesman,1,1,1,1
|
||||
access_project_task_type_sale_user,project.task.type salesman,project.model_project_task_type,base.group_sale_salesman,1,0,0,0
|
||||
access_project_task_history_sale_user,project.task.history salesman,project.model_project_task_history,base.group_sale_salesman,1,1,1,1
|
||||
access_project_project_sale_user,project.project salesman,model_project_project,base.group_sale_salesman,1,0,0,0
|
||||
access_account_analytic_line_project,account.analytic.line project,analytic.model_account_analytic_line,project.group_project_manager,1,1,1,1
|
||||
|
|
|
|
@ -358,7 +358,7 @@
|
|||
<field name="name">sale.order.line.tree</field>
|
||||
<field name="model">sale.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Sales Order Lines">
|
||||
<tree string="Sales Order Lines" create="false">
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="order_id"/>
|
||||
<field name="order_partner_id"/>
|
||||
|
@ -376,7 +376,7 @@
|
|||
<field name="name">sale.order.line.form2</field>
|
||||
<field name="model">sale.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sales Order Lines" version="7.0">
|
||||
<form string="Sales Order Lines" version="7.0" create="false">
|
||||
<header>
|
||||
<button name="%(action_view_sale_order_line_make_invoice)d" string="Create Invoice" type="action" attrs="{'invisible': ['|',('invoiced', '=', 1), ('state', 'not in', ('confirmed', 'draft'))]}" class="oe_highlight" groups="base.group_user"/>
|
||||
<button name="button_cancel" string="Cancel Line" type="object" states="confirmed,exception" groups="base.group_user"/>
|
||||
|
|
|
@ -241,15 +241,15 @@ Best Designers has now emerged serving the Small and Medium Business – SMB’s
|
|||
</record>
|
||||
|
||||
<record id="base.res_partner_24" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
|
||||
<record id="base.res_partner_25" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
|
||||
<record id="base.res_partner_26" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue