diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index f0a420f7496..066f8d1abec 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -107,7 +107,7 @@ class account_analytic_line(osv.osv): if journal_id: journal = analytic_journal_obj.browse(cr, uid, journal_id, context=context) if journal.type == 'sale': - product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context) + product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context=context) if product_price_type_ids: pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context=context)[0] # Take the company currency as the reference one diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 8e79376aa87..4422537007f 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -486,6 +486,19 @@ class account_bank_statement(osv.osv): default['move_line_ids'] = [] return super(account_bank_statement, self).copy(cr, uid, id, default, context=context) + def button_journal_entries(self, cr, uid, ids, context=None): + ctx = (context or {}).copy() + ctx['journal_id'] = self.browse(cr, uid, ids[0], context=context).journal_id.id + return { + 'view_type':'form', + 'view_mode':'tree', + 'res_model':'account.move.line', + 'view_id':False, + 'type':'ir.actions.act_window', + 'domain':[('statement_id','in',ids)], + 'context':ctx, + } + account_bank_statement() class account_bank_statement_line(osv.osv): diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index b37118c3baa..3e86c4963b7 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -402,6 +402,7 @@ class account_invoice(osv.osv): 'default_res_id': ids[0], 'default_use_template': True, 'default_template_id': template_id, + 'default_composition_mode': 'comment', }) return { 'view_type': 'form', @@ -431,7 +432,7 @@ class account_invoice(osv.osv): if t['state'] in ('draft', 'cancel') and t['internal_number']== False: unlink_ids.append(t['id']) else: - raise osv.except_osv(_('Invalid Action!'), _('You cannot delete an invoice which is open or paid. You should refund it instead.')) + raise osv.except_osv(_('Invalid Action!'), _('You can not delete an invoice which is not cancelled. You should refund it instead.')) osv.osv.unlink(self, cr, uid, unlink_ids, context=context) return True diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 4feb97c2f5f..d3697b13ea9 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -436,7 +436,7 @@
The accounting features are fully integrated with other OpenERP applications to automate all your processes: creation of customer invoices, control of supplier invoices, point-of-sale integration, automated follow-ups, etc.
]]>You can track customer payments easily and automate follow-ups. You get an overview of the discussion with your customers on each invoice for easier traceability. For advanced accounting features, you should install the "Accounting and Finance" module.
]]>- Click to define a new customer segmentation. + Click to define a new customer segmentation.
Create specific categories which you can assign to your
contacts to better manage your interactions with them. The
@@ -425,7 +424,7 @@
+ parent="base.menu_base_config"/>
@@ -466,11 +465,11 @@
Admin\n' - _body_html2 = 'I am angry !\n
Admin\n' + _body_html1 = 'Fans of Pigs, unite !\n
Admin
\n' + _body_html2 = 'I am angry !\nAdmin
\n' _attachments = [ {'name': 'First', 'datas_fname': 'first.txt', 'datas': base64.b64encode('My first attachment')}, {'name': 'Second', 'datas_fname': 'second.txt', 'datas': base64.b64encode('My second attachment')} @@ -63,11 +63,16 @@ class test_message_compose(test_mail.TestMailMockups): # Create template on mail.group, with attachments group_model_id = self.registry('ir.model').search(cr, uid, [('model', '=', 'mail.group')])[0] email_template = self.registry('email.template') - email_template_id = email_template.create(cr, uid, {'model_id': group_model_id, - 'name': 'Pigs Template', 'subject': '${object.name}', - 'body_html': '${object.description}', 'user_signature': True, + email_template_id = email_template.create(cr, uid, { + 'model_id': group_model_id, + 'name': 'Pigs Template', + 'subject': '${object.name}', + 'body_html': '${object.description}', + 'user_signature': True, 'attachment_ids': [(0, 0, _attachments[0]), (0, 0, _attachments[1])], - 'email_to': 'b@b.b c@c.c', 'email_cc': 'd@d.d'}) + 'email_to': 'b@b.b c@c.c', + 'email_cc': 'd@d.d' + }) # ---------------------------------------- # CASE1: comment and save as template @@ -76,9 +81,9 @@ class test_message_compose(test_mail.TestMailMockups): # 1. Comment on pigs compose_id = mail_compose.create(cr, uid, {'subject': 'Forget me subject', 'body': 'Dummy body
'}, - {'default_composition_mode': 'comment', 'default_model': 'mail.group', + {'default_composition_mode': 'comment', + 'default_model': 'mail.group', 'default_res_id': self.group_pigs_id, - 'default_template_id': email_template_id, 'active_ids': [self.group_pigs_id, self.group_bird_id]}) compose = mail_compose.browse(cr, uid, compose_id) @@ -97,8 +102,10 @@ class test_message_compose(test_mail.TestMailMockups): # 1. Comment on pigs compose_id = mail_compose.create(cr, uid, {'subject': 'Forget me subject', 'body': 'Dummy body'}, - {'default_composition_mode': 'comment', 'default_model': 'mail.group', + {'default_composition_mode': 'comment', + 'default_model': 'mail.group', 'default_res_id': self.group_pigs_id, + 'default_use_template': False, 'default_template_id': email_template_id, 'active_ids': [self.group_pigs_id, self.group_bird_id]}) compose = mail_compose.browse(cr, uid, compose_id) @@ -135,8 +142,10 @@ class test_message_compose(test_mail.TestMailMockups): # 1. Mass_mail on pigs and bird, with a default_partner_ids set to check he is correctly added compose_id = mail_compose.create(cr, uid, {'subject': 'Forget me subject', 'body': 'Dummy body'}, - {'default_composition_mode': 'mass_mail', 'default_model': 'mail.group', + {'default_composition_mode': 'mass_mail', + 'default_model': 'mail.group', 'default_res_id': self.group_pigs_id, + 'default_use_template': False, 'default_template_id': email_template_id, 'default_partner_ids': [p_a_id], 'active_ids': [self.group_pigs_id, self.group_bird_id]}) @@ -170,3 +179,26 @@ class test_message_compose(test_mail.TestMailMockups): partner_ids = self.res_partner.search(cr, uid, [('email', 'in', ['b@b.b', 'c@c.c', 'd@d.d'])]) self.assertEqual(set(message_pigs_pids), set(partner_ids), 'mail.message on pigs incorrect number of notified_partner_ids') self.assertEqual(set(message_bird_pids), set(partner_ids), 'mail.message on bird notified_partner_ids incorrect') + + # ---------------------------------------- + # CASE4: test newly introduced email_recipients field + # ---------------------------------------- + + # get already-created partners back + p_b_id = self.res_partner.search(cr, uid, [('email', '=', 'b@b.b')])[0] + p_c_id = self.res_partner.search(cr, uid, [('email', '=', 'c@c.c')])[0] + p_d_id = self.res_partner.search(cr, uid, [('email', '=', 'd@d.d')])[0] + # modify template: use email_recipients, use template and email address in email_to to test all features together + user_model_id = self.registry('ir.model').search(cr, uid, [('model', '=', 'res.users')])[0] + email_template.write(cr, uid, [email_template_id], { + 'model_id': user_model_id, + 'body_html': '${object.login}', + 'email_to': '${object.email} c@c', + 'email_recipients': '%i,%i' % (p_b_id, p_c_id), + 'email_cc': 'd@d', + }) + # patner by email + partner by id (no double) + send_to = [p_a_id, p_b_id, p_c_id, p_d_id] + # Generate messsage with default email and partner on template + mail_value = mail_compose.generate_email_for_composer(cr, uid, email_template_id, uid) + self.assertEqual(set(mail_value['partner_ids']), set(send_to), 'mail.message partner_ids list created by template is incorrect') diff --git a/addons/email_template/wizard/email_template_preview_view.xml b/addons/email_template/wizard/email_template_preview_view.xml index f91535a17a5..8dd4bc92ba7 100644 --- a/addons/email_template/wizard/email_template_preview_view.xml +++ b/addons/email_template/wizard/email_template_preview_view.xml @@ -17,6 +17,7 @@
diff --git a/addons/fleet/static/src/img/icon.png b/addons/fleet/static/src/img/icon.png
index 3db7ae9fa49..5b41e43c5bd 100644
Binary files a/addons/fleet/static/src/img/icon.png and b/addons/fleet/static/src/img/icon.png differ
diff --git a/addons/hr/hr.py b/addons/hr/hr.py
index d57fcf49ab2..5f3a5653307 100644
--- a/addons/hr/hr.py
+++ b/addons/hr/hr.py
@@ -158,6 +158,8 @@ class hr_employee(osv.osv):
return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context)
_columns = {
+ #we need a related field in order to be able to sort the employee by name
+ 'name_related': fields.related('resource_id', 'name', type='char', string='Name', readonly=True, store=True),
'country_id': fields.many2one('res.country', 'Nationality'),
'birthday': fields.date("Date of Birth"),
'ssnid': fields.char('SSN No', size=32, help='Social Security Number'),
@@ -207,6 +209,8 @@ class hr_employee(osv.osv):
'last_login': fields.related('user_id', 'date', type='datetime', string='Latest Connection', readonly=1),
}
+ _order='name_related'
+
def create(self, cr, uid, data, context=None):
employee_id = super(hr_employee, self).create(cr, uid, data, context=context)
try:
diff --git a/addons/hr/hr_data.xml b/addons/hr/hr_data.xml
index 514cf1f80f6..25c882f2201 100644
--- a/addons/hr/hr_data.xml
+++ b/addons/hr/hr_data.xml
@@ -6,11 +6,11 @@
More HR features are available via extra applications: Recruitment Process (manage job positions and recruitment), Timesheet Validation (record timesheets and attendance), +Leave Management (keep track of employee leaves), Expense Management (manage employee expenses), Employee Appraisals (organize employee surveys, where employees evaluate their subordinates or their manager).
]]>This feature is also linked to analytic accounting and compatible with timesheet invoices, so you will be able to automatically re-invoice project-related expenses to your customers.
]]>Once validated, they are visible in the employee's calendar. HR officers can define leave types and allocate leaves to employees and employee categories.
]]>You can automatically receive job application though an email gateway, see the Human Resources settings.
]]>+The top menu bar contains all applications you installed. You can use the Settings menu to install more applications, activate others features or give access to new users.
+To setup your preferences (name, email signature, avatar), click on the top right corner.
]]>+ Good Job! Your inbox is empty. +
+ Your inbox contains private messages or emails sent to you + as well as information related to documents or people you + follow. +
++ No private message. +
+ This list contains messages sent to you. +
++ No todo! +
+ When you process messages in your inbox, you can mark some + as todo. From this menu, you can process all your todo. +
++ No message found. +
++ No message sent yet. +
+ Click on the top-right icon to compose a message. This + message will be sent by email if it's an internal contact. +
+