diff --git a/addons/account/account.py b/addons/account/account.py index c9dd1950347..cfba30856a9 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -541,10 +541,18 @@ class account_account(osv.osv): return False return True + def _check_company_account(self, cr, uid, ids, context=None): + for account in self.browse(cr, uid, ids, context=context): + if account.parent_id: + if account.company_id != account.parent_id.company_id: + return False + return True + _constraints = [ (_check_recursion, 'Error!\nYou cannot create recursive accounts.', ['parent_id']), (_check_type, 'Configuration Error!\nYou cannot define children to an account with internal type different of "View".', ['type']), (_check_account_type, 'Configuration Error!\nYou cannot select an account type with a deferral method different of "Unreconciled" for accounts with internal type "Payable/Receivable".', ['user_type','type']), + (_check_company_account, 'Error!\nYou cannot create an account which has parent account of different company.', ['parent_id']), ] _sql_constraints = [ ('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !') diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml index fe8ff9b181f..0e855337d22 100644 --- a/addons/base_action_rule/base_action_rule_view.xml +++ b/addons/base_action_rule/base_action_rule_view.xml @@ -16,10 +16,10 @@ - + diff --git a/addons/base_setup/res_config.py b/addons/base_setup/res_config.py index 0dc4a0f0794..e7898395d62 100644 --- a/addons/base_setup/res_config.py +++ b/addons/base_setup/res_config.py @@ -60,14 +60,14 @@ class sale_config_settings(osv.osv_memory): 'module_web_linkedin': fields.boolean('Get contacts automatically from linkedIn', help="""When you create a new contact (person or company), you will be able to load all the data from LinkedIn (photos, address, etc)."""), 'module_crm': fields.boolean('CRM'), - 'module_plugin_thunderbird': fields.boolean('Enable Thunderbird plugin', + 'module_plugin_thunderbird': fields.boolean('Enable Thunderbird plug-in', help="""The plugin allows you archive email and its attachments to the selected OpenERP objects. You can select a partner, or a lead and attach the selected mail as a .eml file in the attachment of a selected record. You can create documents for CRM Lead, Partner from the selected emails. This installs the module plugin_thunderbird."""), - 'module_plugin_outlook': fields.boolean('Enable Outlook plugin', + 'module_plugin_outlook': fields.boolean('Enable Outlook plug-in', help="""The Outlook plugin allows you to select an object that you would like to add to your email and its attachments from MS Outlook. You can select a partner, or a lead object and archive a selected diff --git a/addons/crm/crm_segmentation.py b/addons/crm/crm_segmentation.py index 9cafe950410..b87d6a3b653 100644 --- a/addons/crm/crm_segmentation.py +++ b/addons/crm/crm_segmentation.py @@ -56,6 +56,7 @@ added to partners that match the segmentation criterions after computation.'), @param uid: the current user’s ID for security checks, @param ids: List of Process continue’s IDs""" + partner_obj = self.pool.get('res.partner') categs = self.read(cr, uid, ids, ['categ_id', 'exclusif', 'partner_id',\ 'sales_purchase_active', 'profiling_active']) for categ in categs: @@ -80,9 +81,11 @@ added to partners that match the segmentation criterions after computation.'), for pid in to_remove_list: partners.remove(pid) - for partner_id in partners: - cr.execute('insert into res_partner_res_partner_category_rel (category_id,partner_id) \ - values (%s,%s)', (categ['categ_id'][0], partner_id)) + for partner in partner_obj.browse(cr, uid, partners): + category_ids = [categ_id.id for categ_id in partner.category_id] + if categ['categ_id'][0] not in category_ids: + cr.execute('insert into res_partner_res_partner_category_rel (category_id,partner_id) \ + values (%s,%s)', (categ['categ_id'][0], partner.id)) self.write(cr, uid, [id], {'state':'not running', 'partner_id':0}) return True diff --git a/addons/crm_profiling/crm_profiling.py b/addons/crm_profiling/crm_profiling.py index 8f07dfcbdda..7dc72f80289 100644 --- a/addons/crm_profiling/crm_profiling.py +++ b/addons/crm_profiling/crm_profiling.py @@ -244,6 +244,7 @@ class crm_segmentation(osv.osv): @param uid: the current user’s ID for security checks, @param ids: List of crm segmentation’s IDs """ + partner_obj = self.pool.get('res.partner') categs = self.read(cr,uid,ids,['categ_id','exclusif','partner_id', \ 'sales_purchase_active', 'profiling_active']) for categ in categs: @@ -280,8 +281,10 @@ class crm_segmentation(osv.osv): for pid in to_remove_list: partners.remove(pid) - for partner_id in partners: - cr.execute('insert into res_partner_res_partner_category_rel (category_id,partner_id) values (%s,%s)', (categ['categ_id'][0],partner_id)) + for partner in partner_obj.browse(cr, uid, partners): + category_ids = [categ_id.id for categ_id in partner.category_id] + if categ['categ_id'][0] not in category_ids: + cr.execute('insert into res_partner_res_partner_category_rel (category_id,partner_id) values (%s,%s)', (categ['categ_id'][0],partner.id)) self.write(cr, uid, [id], {'state':'not running', 'partner_id':0}) return True diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml index 2895855fc2e..85e3020512e 100644 --- a/addons/event/event_view.xml +++ b/addons/event/event_view.xml @@ -510,7 +510,7 @@ event.registration - + @@ -519,6 +519,7 @@ + diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py index b13e90cd627..eece0c7497e 100644 --- a/addons/hr_evaluation/hr_evaluation.py +++ b/addons/hr_evaluation/hr_evaluation.py @@ -291,6 +291,7 @@ survey_request() class hr_evaluation_interview(osv.osv): _name = 'hr.evaluation.interview' _inherits = {'survey.request': 'request_id'} + _inherit = 'mail.thread' _rec_name = 'request_id' _description = 'Appraisal Interview' _columns = { diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index f315f3d4ef3..419b1bb8335 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -113,6 +113,13 @@ class hr_holidays(osv.osv): result[hol.id] = hol.number_of_days_temp return result + def _check_date(self, cr, uid, ids): + for holiday in self.browse(cr, uid, ids): + holiday_ids = self.search(cr, uid, [('date_from', '<=', holiday.date_to), ('date_to', '>=', holiday.date_from), ('employee_id', '=', holiday.employee_id.id), ('id', '<>', holiday.id)]) + if holiday_ids: + return False + return True + _columns = { 'name': fields.char('Description', size=64), 'state': fields.selection([('draft', 'To Submit'), ('cancel', 'Cancelled'),('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')], @@ -146,6 +153,10 @@ class hr_holidays(osv.osv): 'user_id': lambda obj, cr, uid, context: uid, 'holiday_type': 'employee' } + _constraints = [ + (_check_date, 'You can not have 2 leaves that overlaps on same day!', ['date_from','date_to']), + ] + _sql_constraints = [ ('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "The employee or employee category of this request is missing."), ('date_check2', "CHECK ( (type='add') OR (date_from <= date_to))", "The start date must be anterior to the end date."), @@ -252,6 +263,13 @@ class hr_holidays(osv.osv): result['value']['number_of_days_temp'] = 0 return result + + def write(self, cr, uid, ids, vals, context=None): + check_fnct = self.pool.get('hr.holidays.status').check_access_rights + for holiday in self.browse(cr, uid, ids, context=context): + if holiday.state in ('validate','validate1') and not check_fnct(cr, uid, 'write', raise_exception=False): + raise osv.except_osv(_('Warning!'),_('You cannot modify a leave request that has been approved. Contact a human resource manager.')) + return super(hr_holidays, self).write(cr, uid, ids, vals, context=context) def set_to_draft(self, cr, uid, ids, context=None): self.write(cr, uid, ids, { diff --git a/addons/hr_holidays/hr_holidays_demo.xml b/addons/hr_holidays/hr_holidays_demo.xml index 4c9d18683c7..accf8c26935 100644 --- a/addons/hr_holidays/hr_holidays_demo.xml +++ b/addons/hr_holidays/hr_holidays_demo.xml @@ -34,8 +34,8 @@ Summer Vacation - - + + add draft 7 @@ -45,8 +45,8 @@ International Tour - - + + add 7 diff --git a/addons/mail/__init__.py b/addons/mail/__init__.py index aea7ee62cbc..003369be38f 100644 --- a/addons/mail/__init__.py +++ b/addons/mail/__init__.py @@ -22,12 +22,12 @@ import mail_message_subtype import mail_alias import mail_followers +import mail_favorite import mail_message import mail_mail import mail_thread import mail_group import mail_vote -import mail_favorite import res_partner import res_users import report diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml index 189bd8285f2..ab45f802371 100644 --- a/addons/marketing_campaign/marketing_campaign_view.xml +++ b/addons/marketing_campaign/marketing_campaign_view.xml @@ -270,7 +270,7 @@ - + diff --git a/addons/plugin_outlook/plugin_outlook.xml b/addons/plugin_outlook/plugin_outlook.xml index e99fbf72b6d..91c51e87ad9 100644 --- a/addons/plugin_outlook/plugin_outlook.xml +++ b/addons/plugin_outlook/plugin_outlook.xml @@ -10,7 +10,11 @@
Install Outlook Plug-In
- + +
+
+
@@ -19,10 +23,10 @@

Click on the link above to download the installer for either 32 or 64 bits, and execute it.

System requirements:

-
    -
  • 1. MS Outlook 2005 or above.
  • -
  • 2. MS .Net Framework 3.5 or above.
  • -
+
    +
  1. MS Outlook 2005 or above.
  2. +
  3. MS .Net Framework 3.5 or above.
  4. +
@@ -51,7 +55,7 @@
diff --git a/addons/plugin_thunderbird/plugin_thunderbird.py b/addons/plugin_thunderbird/plugin_thunderbird.py index 6473758883d..923611b97a9 100644 --- a/addons/plugin_thunderbird/plugin_thunderbird.py +++ b/addons/plugin_thunderbird/plugin_thunderbird.py @@ -30,13 +30,11 @@ class plugin_thunderbird_installer(osv.osv_memory): 'thunderbird': fields.boolean('Thunderbird Plug-in', help="Allows you to select an object that you would like to add to your email and its attachments."), 'plugin_name': fields.char('File name', size=64), 'plugin_file': fields.char('Thunderbird Plug-in', size=256, readonly=True, help="Thunderbird plug-in file. Save this file and install it in Thunderbird."), - 'pdf_file': fields.char('Installation Manual', size=256, help="The documentation file :- how to install Thunderbird Plug-in.", readonly=True), } _defaults = { 'thunderbird': True, 'plugin_name': 'openerp_plugin.xpi', - 'pdf_file': 'http://doc.openerp.com/book/2/2_6_Comms/2_6_Comms_thunderbird.html', } def default_get(self, cr, uid, fields, context=None): @@ -45,4 +43,4 @@ class plugin_thunderbird_installer(osv.osv_memory): res['plugin_file'] = base_url + '/plugin_thunderbird/static/openerp_plugin.xpi' return res -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/plugin_thunderbird/plugin_thunderbird.xml b/addons/plugin_thunderbird/plugin_thunderbird.xml index 5ea5fc38219..3774a369437 100644 --- a/addons/plugin_thunderbird/plugin_thunderbird.xml +++ b/addons/plugin_thunderbird/plugin_thunderbird.xml @@ -10,25 +10,28 @@
Install Thunderbird Plug-In
- + +
+
+
- -

Thunderbird plugin installation:

-
    -
  • 1. Save the Thunderbird plug-in.
  • -
  • 2. From the Thunderbird menubar: Tools ­> Add-ons -> Screwdriver/Wrench Icon -> Install add-on from file...
  • -
  • 3. Select the plug-in (the file named openerp_plugin.xpi).
  • -
  • 4. Click "Install Now".
  • -
  • 5. Restart Thunderbird.
  • -
  • 6. From the Thunderbird menubar: OpenERP -> Configuration.
  • -
  • 7. Configure your openerp server.
  • -
+

Thunderbird plug-in installation:

+
    +
  1. Save the Thunderbird plug-in.
  2. +
  3. From the Thunderbird menubar: Tools ­> Add-ons -> Screwdriver/Wrench Icon -> Install add-on from file...
  4. +
  5. Select the plug-in (the file named openerp_plugin.xpi).
  6. +
  7. Click "Install Now".
  8. +
  9. Restart Thunderbird.
  10. +
  11. From the Thunderbird menubar: OpenERP -> Configuration.
  12. +
  13. Configure your openerp server.
  14. +
@@ -57,7 +60,7 @@
diff --git a/addons/portal_claim/portal_claim_view.xml b/addons/portal_claim/portal_claim_view.xml index 86be0764d26..e08b39e476b 100644 --- a/addons/portal_claim/portal_claim_view.xml +++ b/addons/portal_claim/portal_claim_view.xml @@ -10,7 +10,14 @@ {"search_default_user_id":'', "stage_type":'claim'} - Record and track your customers' claims. Claims may be linked to a sales order or a lot. You can send emails with attachments and keep the full history for a claim (emails sent, intervention type and so on). Claims may automatically be linked to an email address using the mail gateway module. + +

+ Click to register a new claim. +

+ You can track your claims from this menu and the action we + will take. +

+
kanban,calendar,tree,form,graph
{"search_default_upcoming":1} - No public events. + There are no public events. kanban,tree,form - No public products. + There are no public products. @@ -65,7 +65,7 @@ {'type':'receipt'} current - You don't have any payment. + You don't have any refunds or payments. Portal Personal Contacts [('message_follower_ids','in',[user.partner_id.id])] + diff --git a/addons/project/project.py b/addons/project/project.py index 62c1b34dbf9..741cae4b91b 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -1305,7 +1305,17 @@ class task(base_stage, osv.osv): msg = _('Task has been delegated to %s.') % (task.user_id.name) self.message_post(cr, uid, [task.id], body=msg, context=context) return True - + + def project_task_reevaluate(self, cr, uid, ids, context=None): + if self.pool.get('res.users').has_group(cr, uid, 'project.group_time_work_estimation_tasks'): + return { + 'view_type': 'form', + "view_mode": 'form', + 'res_model': 'project.task.reevaluate', + 'type': 'ir.actions.act_window', + 'target': 'new', + } + return self.do_reopen(cr, uid, ids, context=context) class project_work(osv.osv): _name = "project.task.work" diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index ec29b19e97b..58f0ae17962 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -392,7 +392,7 @@