""") % (project.name,)
try:
if project.to_invoice and project.partner_id:
help+= _("""
Timesheets on this project may be invoiced to %s, according to the terms defined in the contract.
""" ) % (project.partner_id.name,)
From 6401dc03d76021030c9b686cb1ea2e4fd990a40a Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Wed, 3 Oct 2012 17:39:55 +0530
Subject: [PATCH 005/211] [IMP] project : 'Task Stages' tab should be visible
only if 'tasks' is checked.
bzr revid: mdi@tinyerp.com-20121003120955-vhxaey5fdhzkk89q
---
addons/project/project_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index bd63eec84c5..442efd4660e 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -144,7 +144,7 @@
-
+
From c8a093941d6e8da9223def633354cd86b82df6a5 Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Wed, 3 Oct 2012 17:54:46 +0530
Subject: [PATCH 006/211] [IMP] project : Added 'date_start' on project form
view.
bzr revid: mdi@tinyerp.com-20121003122446-e4iwfe3ctrzq2yt5
---
addons/project/project_view.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index 442efd4660e..b07fb17614f 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -135,6 +135,7 @@
+
From 64229a2a93a25c57ddc4ed421827c6a06e72675d Mon Sep 17 00:00:00 2001
From: Vijaykumar Baladaniya
Date: Thu, 4 Oct 2012 12:13:47 +0530
Subject: [PATCH 007/211] Employee create time, not have a default email
address.
bzr revid: vba@tinyerp.com-20121004064347-b6oiab179q4smhs1
---
addons/hr/hr.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/hr/hr.py b/addons/hr/hr.py
index eafe5d09844..d2214f5e14f 100644
--- a/addons/hr/hr.py
+++ b/addons/hr/hr.py
@@ -231,7 +231,7 @@ class hr_employee(osv.osv):
def onchange_address_id(self, cr, uid, ids, address, context=None):
if address:
address = self.pool.get('res.partner').browse(cr, uid, address, context=context)
- return {'value': {'work_email': address.email, 'work_phone': address.phone, 'mobile_phone': address.mobile}}
+ return {'value': {'work_phone': address.phone, 'mobile_phone': address.mobile}}
return {'value': {}}
def onchange_company(self, cr, uid, ids, company, context=None):
From 1c243a435f0256bddf7dabd8a087b8c881ed9e38 Mon Sep 17 00:00:00 2001
From: Vijaykumar Baladaniya
Date: Thu, 4 Oct 2012 13:03:32 +0530
Subject: [PATCH 008/211] View improvement of autometed action form.
bzr revid: vba@tinyerp.com-20121004073332-1bdvfmsc18ev8r1e
---
addons/base_action_rule/base_action_rule.py | 2 +-
.../base_action_rule_view.xml | 27 +++++++++----------
2 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index 7e9bbacab13..fa606fdeefc 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -117,7 +117,7 @@ this if you want the rule to send a reminder by email to the user."),
the rule to mark CC(mail to any other person defined in actions)."),
'act_mail_to_email': fields.char('Mail to these Emails', size=128, \
help="Email-id of the persons whom mail is to be sent"),
- 'act_mail_body': fields.text('Mail body', help="Content of mail"),
+ 'act_mail_body': fields.text('Mail body', translate=True, help="Content of mail"),
'regex_name': fields.char('Regex on Resource Name', size=128, help="Regular expression for matching name of the resource\
\ne.g.: 'urgent.*' will search for records having name starting with the string 'urgent'\
\nNote: This is case sensitive search."),
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index 0d268438a41..64d65434cfc 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -56,21 +56,20 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
From b273232b71865369f4be306e496b471423b0e299 Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Thu, 4 Oct 2012 17:10:21 +0530
Subject: [PATCH 009/211] [FIX] project_timesheet : Fix the integrity error
when we embeded 'Timesheet Line' created through project.
bzr revid: mdi@tinyerp.com-20121004114021-rgbzhr84uditlhhj
---
addons/project_timesheet/project_timesheet.py | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py
index 41478d60210..6125d59c621 100644
--- a/addons/project_timesheet/project_timesheet.py
+++ b/addons/project_timesheet/project_timesheet.py
@@ -46,6 +46,9 @@ class project_project(osv.osv):
def open_timesheets(self, cr, uid, ids, context=None):
""" open Timesheets view """
+ mod_obj = self.pool.get('ir.model.data')
+ act_obj = self.pool.get('ir.actions.act_window')
+
project = self.browse(cr, uid, ids[0], context)
view_context = {
'search_default_account_id': [project.analytic_account_id.id],
@@ -59,16 +62,13 @@ class project_project(osv.osv):
# if the user do not have access rights on the partner
pass
- return {
- 'type': 'ir.actions.act_window',
- 'name': _('Timesheets'),
- 'res_model': 'hr.analytic.timesheet',
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'context': view_context,
- 'nodestroy': True,
- 'help': help
- }
+ result = mod_obj.get_object_reference(cr, uid, 'hr_timesheet', 'act_hr_timesheet_line_evry1_all_form')
+ id = result and result[1] or False
+ result = act_obj.read(cr, uid, [id], context=context)[0]
+ result['name'] = _('Timesheets')
+ result['context'] = view_context
+ result['help'] = help
+ return result
project_project()
From b33ca4139a77a87de36e6a20e1682c1fd80148f1 Mon Sep 17 00:00:00 2001
From: "Harry (OpenERP)"
Date: Thu, 4 Oct 2012 17:37:19 +0530
Subject: [PATCH 010/211] [IMP] base_action_rule: reminder by email: remove
fields related to remainder. for that we can configure email server action
watchers emails: remove fields related to CC,TO. added followers to set as a
followers of documents improve view of action rule
bzr revid: hmo@tinyerp.com-20121004120719-5btx7h1jp2398jra
---
addons/base_action_rule/base_action_rule.py | 223 +++---------------
.../base_action_rule_view.xml | 116 ++++-----
addons/base_status/base_stage.py | 40 +---
addons/crm/crm_action_rule.py | 40 +---
addons/crm/crm_action_rule_view.xml | 50 +---
5 files changed, 88 insertions(+), 381 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index fa606fdeefc..cb2239f76a7 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -19,15 +19,16 @@
#
##############################################################################
-from osv import fields, osv, orm
-from tools.translate import _
from datetime import datetime
from datetime import timedelta
+import re
+import time
+
+from osv import fields, osv, orm
+from tools.translate import _
from tools.safe_eval import safe_eval
from tools import ustr
import pooler
-import re
-import time
import tools
@@ -48,32 +49,20 @@ class base_action_rule(osv.osv):
_description = 'Action Rules'
def _state_get(self, cr, uid, context=None):
- """ Get State
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param context: A standard dictionary for contextual values """
+ """ Get State """
return self.state_get(cr, uid, context=context)
def state_get(self, cr, uid, context=None):
- """ Get State
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param context: A standard dictionary for contextual values """
+ """ Get State """
return [('', '')]
def priority_get(self, cr, uid, context=None):
- """ Get Priority
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param context: A standard dictionary for contextual values """
+ """ Get Priority """
return [('', '')]
_columns = {
'name': fields.char('Rule Name', size=64, required=True),
- 'model_id': fields.many2one('ir.model', 'Object', required=True),
+ 'model_id': fields.many2one('ir.model', 'Related Document Model', required=True, domain=[('osv_memory','=', False)]),
'create_date': fields.datetime('Create Date', readonly=1),
'active': fields.boolean('Active', help="If the active field is set to False,\
it will allow you to hide the rule without removing it."),
@@ -98,35 +87,14 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
'trg_state_from': fields.selection(_state_get, 'Status', size=16),
'trg_state_to': fields.selection(_state_get, 'Button Pressed', size=16),
- 'act_method': fields.char('Call Object Method', size=64),
'act_user_id': fields.many2one('res.users', 'Set Responsible to'),
'act_state': fields.selection(_state_get, 'Set State to', size=16),
- 'act_email_cc': fields.char('Add Watchers (Cc)', size=250, help="\
-These people will receive a copy of the future communication between partner \
-and users by email"),
- 'act_remind_partner': fields.boolean('Remind Partner', help="Check \
-this if you want the rule to send a reminder by email to the partner."),
- 'act_remind_user': fields.boolean('Remind Responsible', help="Check \
-this if you want the rule to send a reminder by email to the user."),
- 'act_reply_to': fields.char('Reply-To', size=64),
- 'act_remind_attach': fields.boolean('Remind with Attachment', help="Check this if you want that all documents attached to the object be attached to the reminder email sent."),
- 'act_mail_to_user': fields.boolean('Mail to Responsible', help="Check\
- this if you want the rule to send an email to the responsible person."),
- 'act_mail_to_watchers': fields.boolean('Mail to Watchers (CC)',
- help="Check this if you want \
-the rule to mark CC(mail to any other person defined in actions)."),
- 'act_mail_to_email': fields.char('Mail to these Emails', size=128, \
- help="Email-id of the persons whom mail is to be sent"),
- 'act_mail_body': fields.text('Mail body', translate=True, help="Content of mail"),
+ 'act_followers': fields.many2many("res.partner", string="Set Followers"),
'regex_name': fields.char('Regex on Resource Name', size=128, help="Regular expression for matching name of the resource\
\ne.g.: 'urgent.*' will search for records having name starting with the string 'urgent'\
\nNote: This is case sensitive search."),
'server_action_id': fields.many2one('ir.actions.server', 'Server Action', help="Describes the action name.\neg:on which object which action to be taken on basis of which condition"),
- 'filter_id':fields.many2one('ir.filters', 'Filter', required=False),
- 'act_email_from' : fields.char('Email From', size=64, required=False,
- help="Use a python expression to specify the right field on which one than we will use for the 'From' field of the header"),
- 'act_email_to' : fields.char('Email To', size=64, required=False,
- help="Use a python expression to specify the right field on which one than we will use for the 'To' field of the header"),
+ 'filter_id':fields.many2one('ir.filters', 'Filter', required=False), #TODO: set domain [('model_id','=',model)]
'last_run': fields.datetime('Last Run', readonly=1),
}
@@ -134,42 +102,24 @@ the rule to mark CC(mail to any other person defined in actions)."),
'active': lambda *a: True,
'trg_date_type': lambda *a: 'none',
'trg_date_range_type': lambda *a: 'day',
- 'act_mail_to_user': lambda *a: 0,
- 'act_remind_partner': lambda *a: 0,
- 'act_remind_user': lambda *a: 0,
- 'act_mail_to_watchers': lambda *a: 0,
}
_order = 'sequence'
- def onchange_model_id(self, cr, uid, ids, name):
- #This is not a good solution as it will affect the domain only on onchange
- res = {'domain':{'filter_id':[]}}
- if name:
- model_name = self.pool.get('ir.model').read(cr, uid, [name], ['model'])
- if model_name:
- mod_name = model_name[0]['model']
- res['domain'] = {'filter_id': [('model_id','=',mod_name)]}
- else:
- res['value'] = {'filter_id':False}
- return res
def post_action(self, cr, uid, ids, model, context=None):
# Searching for action rules
cr.execute("SELECT model.model, rule.id FROM base_action_rule rule \
LEFT JOIN ir_model model on (model.id = rule.model_id) \
- WHERE active")
+ WHERE active and model = %%s", model)
res = cr.fetchall()
# Check if any rule matching with current object
for obj_name, rule_id in res:
- if not (model == obj_name):
- continue # TODO add this condition in the WHERE clause above.
- else:
- obj = self.pool.get(obj_name)
- # If the rule doesn't involve a time condition, run it immediately
- # Otherwise we let the scheduler run the action
- if self.browse(cr, uid, rule_id, context=context).trg_date_type == 'none':
- self._action(cr, uid, [rule_id], obj.browse(cr, uid, ids, context=context), context=context)
+ obj = self.pool.get(obj_name)
+ # If the rule doesn't involve a time condition, run it immediately
+ # Otherwise we let the scheduler run the action
+ if self.browse(cr, uid, rule_id, context=context).trg_date_type == 'none':
+ self._action(cr, uid, [rule_id], obj.browse(cr, uid, ids, context=context), context=context)
return True
def _create(self, old_create, model, context=None):
@@ -279,58 +229,8 @@ the rule to mark CC(mail to any other person defined in actions)."),
rule_pool.write(cr, uid, [rule.id], {'last_run': now},
context=context)
- def format_body(self, body):
- """ Foramat Action rule's body
- @param self: The object pointer """
- return body and tools.ustr(body) or ''
-
- def format_mail(self, obj, body):
- data = {
- 'object_id': obj.id,
- 'object_subject': hasattr(obj, 'name') and obj.name or False,
- 'object_date': hasattr(obj, 'date') and obj.date or False,
- 'object_description': hasattr(obj, 'description') and obj.description or False,
- 'object_user': hasattr(obj, 'user_id') and (obj.user_id and obj.user_id.name) or '/',
- 'object_user_email': hasattr(obj, 'user_id') and (obj.user_id and \
- obj.user_id.email) or '/',
- 'object_user_phone': hasattr(obj, 'partner_address_id') and (obj.partner_address_id and \
- obj.partner_address_id.phone) or '/',
- 'partner': hasattr(obj, 'partner_id') and (obj.partner_id and obj.partner_id.name) or '/',
- 'partner_email': hasattr(obj, 'partner_address_id') and (obj.partner_address_id and\
- obj.partner_address_id.email) or '/',
- }
- return self.format_body(body % data)
-
- def email_send(self, cr, uid, obj, emails, body, emailfrom=None, context=None):
- if not emailfrom:
- emailfrom = tools.config.get('email_from')
- body = self.format_mail(obj, body)
- if not emailfrom and hasattr(obj, 'user_id') and obj.user_id and obj.user_id.email:
- emailfrom = obj.user_id.email
- emailfrom = tools.ustr(emailfrom)
- reply_to = emailfrom
- if not emailfrom:
- raise osv.except_osv(_('Error!'),
- _("Missing default email address or missing email on responsible user"))
- return self.pool.get('mail.mail').create(cr, uid,
- { 'email_from': emailfrom,
- 'email_to': emails.join(','),
- 'reply_to': reply_to,
- 'state': 'outgoing',
- 'subject': '[%d] %s' % (obj.id, tools.ustr(obj.name)),
- 'body_html': '
%s
' % body,
- 'res_id': obj.id,
- 'model': obj._table_name,
- 'auto_delete': True
- }, context=context)
-
-
def do_check(self, cr, uid, action, obj, context=None):
- """ check Action
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param context: A standard dictionary for contextual values """
+ """ check Action """
if context is None:
context = {}
ok = True
@@ -373,79 +273,32 @@ the rule to mark CC(mail to any other person defined in actions)."),
return ok
def do_action(self, cr, uid, action, model_obj, obj, context=None):
- """ Do Action
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param action: pass action
- @param model_obj: pass Model object
- @param context: A standard dictionary for contextual values """
+ """ Do Action """
if context is None:
context = {}
if action.server_action_id:
context.update({'active_id':obj.id, 'active_ids':[obj.id]})
self.pool.get('ir.actions.server').run(cr, uid, [action.server_action_id.id], context)
- write = {}
+ write = {}
if hasattr(obj, 'user_id') and action.act_user_id:
- obj.user_id = action.act_user_id
write['user_id'] = action.act_user_id.id
if hasattr(obj, 'date_action_last'):
write['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S')
if hasattr(obj, 'state') and action.act_state:
- obj.state = action.act_state
write['state'] = action.act_state
-
- if hasattr(obj, 'categ_id') and action.act_categ_id:
- obj.categ_id = action.act_categ_id
- write['categ_id'] = action.act_categ_id.id
-
+
model_obj.write(cr, uid, [obj.id], write, context)
-
- if hasattr(model_obj, 'remind_user') and action.act_remind_user:
- model_obj.remind_user(cr, uid, [obj.id], context, attach=action.act_remind_attach)
- if hasattr(model_obj, 'remind_partner') and action.act_remind_partner:
- model_obj.remind_partner(cr, uid, [obj.id], context, attach=action.act_remind_attach)
- if action.act_method:
- getattr(model_obj, 'act_method')(cr, uid, [obj.id], action, context)
-
- emails = []
- if hasattr(obj, 'user_id') and action.act_mail_to_user:
- if obj.user_id:
- emails.append(obj.user_id.email)
-
- if action.act_mail_to_watchers:
- emails += (action.act_email_cc or '').split(',')
- if action.act_mail_to_email:
- emails += (action.act_mail_to_email or '').split(',')
-
- locals_for_emails = {
- 'user' : self.pool.get('res.users').browse(cr, uid, uid, context=context),
- 'obj' : obj,
- }
-
- if action.act_email_to:
- emails.append(safe_eval(action.act_email_to, {}, locals_for_emails))
-
- emails = filter(None, emails)
- if len(emails) and action.act_mail_body:
- emails = list(set(emails))
- email_from = safe_eval(action.act_email_from, {}, locals_for_emails)
- emails = tools.email_split(','.join(filter(None, emails)))
- email_froms = tools.email_split(email_from)
- if email_froms:
- self.email_send(cr, uid, obj, emails, action.act_mail_body, emailfrom=email_froms[0])
+ if hasattr(obj, 'state') and hasattr(obj, 'message_post') and action.act_state:
+ model_obj.message_post(cr, uid, [obj], _(action.act_state), context=context)
+
+ if hasattr(obj, 'message_subscribe') and action.act_followers:
+ model_obj.message_subscribe(cr, uid, [obj.id], [x.id for x in action.act_followers], context=context)
return True
def _action(self, cr, uid, ids, objects, scrit=None, context=None):
- """ Do Action
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Basic Action Rule’s IDs,
- @param objects: pass objects
- @param context: A standard dictionary for contextual values """
+ """ Do Action """
if context is None:
context = {}
@@ -462,28 +315,6 @@ the rule to mark CC(mail to any other person defined in actions)."),
context.update({'action': False})
return True
- def _check_mail(self, cr, uid, ids, context=None):
- """ Check Mail
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Action Rule’s IDs
- @param context: A standard dictionary for contextual values """
-
- empty = orm.browse_null()
- rule_obj = self.pool.get('base.action.rule')
- for rule in self.browse(cr, uid, ids, context=context):
- if rule.act_mail_body:
- try:
- rule_obj.format_mail(empty, rule.act_mail_body)
- except (ValueError, KeyError, TypeError):
- return False
- return True
-
- _constraints = [
- (_check_mail, 'Error ! The mail is not well formated.', ['act_mail_body']),
- ]
-
base_action_rule()
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index 64d65434cfc..b35818ee8d9 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -12,81 +12,53 @@
base.action.rule
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/base_status/base_stage.py b/addons/base_status/base_stage.py
index 617af125215..999da23c560 100644
--- a/addons/base_status/base_stage.py
+++ b/addons/base_status/base_stage.py
@@ -302,50 +302,14 @@ class base_stage(object):
rule_ids = rule_obj.search(cr, uid, [('model_id','=',model_ids[0])], context=context)
return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
- def remind_partner(self, cr, uid, ids, context=None, attach=False):
- return self.remind_user(cr, uid, ids, context, attach,
- destination=False)
-
- def remind_user(self, cr, uid, ids, context=None, attach=False, destination=True):
- if hasattr(self, 'message_post'):
- for case in self.browse(cr, uid, ids, context=context):
- if destination:
- recipient_id = case.user_id.partner_id.id
- else:
- if not case.email_from:
- return False
- recipient_id = self.pool.get('res.partner').find_or_create(cr, uid, case.email_from, context=context)
-
- body = case.description or ""
- for message in case.message_ids:
- if message.type == 'email' and message.body:
- body = message.body
- break
- body = self.format_body(body)
- attach_to_send = {}
- if attach:
- attach_ids = self.pool.get('ir.attachment').search(cr, uid, [('res_model', '=', self._name), ('res_id', '=', case.id)])
- attach_to_send = self.pool.get('ir.attachment').read(cr, uid, attach_ids, ['datas_fname', 'datas'])
- attach_to_send = dict(map(lambda x: (x['datas_fname'], x['datas'].decode('base64')), attach_to_send))
-
- subject = "Reminder: [%s] %s" % (case.id, case.name)
- self.message_post(cr, uid, case.id, body=body,
- subject=subject, attachments=attach_to_send,
- partner_ids=[recipient_id], context=context)
- return True
-
+
def _check(self, cr, uid, ids=False, context=None):
""" Function called by the scheduler to process cases for date actions.
Must be overriden by inheriting classes.
"""
return True
- def format_body(self, body):
- return self.pool.get('base.action.rule').format_body(body)
-
- def format_mail(self, obj, body):
- return self.pool.get('base.action.rule').format_mail(obj, body)
-
+
# ******************************
# Notifications
# ******************************
diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py
index 8b1ba655afc..49af2f74eeb 100644
--- a/addons/crm/crm_action_rule.py
+++ b/addons/crm/crm_action_rule.py
@@ -41,24 +41,15 @@ class base_action_rule(osv.osv):
'regex_history' : fields.char('Regular Expression on Case History', size=128),
'act_section_id': fields.many2one('crm.case.section', 'Set Team to'),
'act_categ_id': fields.many2one('crm.case.categ', 'Set Category to'),
- 'act_mail_to_partner': fields.boolean('Mail to Partner',
- help="Check this if you want the rule to send an email to the partner."),
}
- def email_send(self, cr, uid, obj, emails, body, emailfrom=tools.config.get('email_from', False), context=None):
- mail_id = super(base_action_rule, self).email_send(cr, uid, obj, emails, body, emailfrom=emailfrom, context=context)
- if mail_id and hasattr(obj, 'section_id') and obj.section_id and obj.section_id.alias_id:
- reply_to = obj.section_id.alias_id.name_get()[0][1]
- self.pool.get('mail.mail').write(cr, uid, [mail_id], {'reply_to': reply_to}, context=context)
- return mail_id
-
def do_check(self, cr, uid, action, obj, context=None):
ok = super(base_action_rule, self).do_check(cr, uid, action, obj, context=context)
if hasattr(obj, 'section_id'):
ok = ok and (not action.trg_section_id or action.trg_section_id.id == obj.section_id.id)
- if hasattr(obj, 'categ_id'):
- ok = ok and (not action.trg_categ_id or action.trg_categ_id.id == obj.categ_id.id)
+ if hasattr(obj, 'categ_ids'):
+ ok = ok and (not action.trg_categ_id or action.trg_categ_id.id in [x.id for x in obj.categ_ids])
#Cheking for history
regex = action.regex_history
@@ -81,35 +72,16 @@ class base_action_rule(osv.osv):
return ok
def do_action(self, cr, uid, action, model_obj, obj, context=None):
+ res = super(base_action_rule, self).do_action(cr, uid, action, model_obj, obj, context=context)
write = {}
if hasattr(action, 'act_section_id') and action.act_section_id:
- obj.section_id = action.act_section_id
write['section_id'] = action.act_section_id.id
- if hasattr(obj, 'email_cc') and action.act_email_cc:
- if '@' in (obj.email_cc or ''):
- emails = obj.email_cc.split(",")
- if obj.act_email_cc not in emails:# and '<'+str(action.act_email_cc)+">" not in emails:
- write['email_cc'] = obj.email_cc + ',' + obj.act_email_cc
- else:
- write['email_cc'] = obj.act_email_cc
-
- # Put state change by rule in communication history
- if hasattr(obj, 'state') and hasattr(obj, 'message_post') and action.act_state:
- model_obj.message_post(cr, uid, [obj], _(action.act_state), context=context)
+ if hasattr(action, 'act_categ_id') and action.act_categ_id:
+ write['categ_ids'] = [4, action.act_categ_id]
model_obj.write(cr, uid, [obj.id], write, context)
- super(base_action_rule, self).do_action(cr, uid, action, model_obj, obj, context=context)
- emails = []
-
- if hasattr(obj, 'email_from') and action.act_mail_to_partner:
- emails.append(obj.email_from)
- emails = filter(None, emails)
- if len(emails) and action.act_mail_body:
- emails = list(set(emails))
- self.email_send(cr, uid, obj, emails, action.act_mail_body)
- return True
-
+ return res
def state_get(self, cr, uid, context=None):
"""Gets available states for crm"""
diff --git a/addons/crm/crm_action_rule_view.xml b/addons/crm/crm_action_rule_view.xml
index f2a5f57702d..b7ac5037c31 100644
--- a/addons/crm/crm_action_rule_view.xml
+++ b/addons/crm/crm_action_rule_view.xml
@@ -7,53 +7,21 @@
base.action.rule
-
-
-
+
+
+
+
+
+
-
-
-
-
-
- base.action.rule.form2.inherit
- base.action.rule
-
-
-
-
-
-
-
-
-
-
-
-
-
- base.action.rule.form3.inherit
- base.action.rule
-
-
-
+
+
-
+
-
-
- base.action.rule.form4.inherit
- base.action.rule
-
-
-
-
-
-
-
-
From 5738c0cca8a3247de8e4b064c372d7c8ee06a941 Mon Sep 17 00:00:00 2001
From: "Harry (OpenERP)"
Date: Thu, 4 Oct 2012 18:13:52 +0530
Subject: [PATCH 011/211] [FIX] base_action_rule: fix
bzr revid: hmo@tinyerp.com-20121004124352-r0nz9mihc5cmbh34
---
addons/base_action_rule/base_action_rule.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index cb2239f76a7..2328bf94cfd 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -111,7 +111,7 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
# Searching for action rules
cr.execute("SELECT model.model, rule.id FROM base_action_rule rule \
LEFT JOIN ir_model model on (model.id = rule.model_id) \
- WHERE active and model = %%s", model)
+ WHERE active and model = %s", (model,))
res = cr.fetchall()
# Check if any rule matching with current object
for obj_name, rule_id in res:
From f00e26b9ca52c3261c270a22d3fda6a38e786c30 Mon Sep 17 00:00:00 2001
From: "pankita shah (Open ERP)"
Date: Thu, 4 Oct 2012 18:36:06 +0530
Subject: [PATCH 012/211] [FIX] weekly,monthly report problem in hr module
bzr revid: shp@tinyerp.com-20121004130606-ju9ahpnk20qxeeyr
---
addons/hr_attendance/report/attendance_by_month.py | 4 +++-
addons/hr_attendance/report/timesheet.py | 2 +-
addons/hr_attendance/wizard/hr_attendance_byweek.py | 1 +
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/addons/hr_attendance/report/attendance_by_month.py b/addons/hr_attendance/report/attendance_by_month.py
index 17cf548345e..ab6ba3ce609 100644
--- a/addons/hr_attendance/report/attendance_by_month.py
+++ b/addons/hr_attendance/report/attendance_by_month.py
@@ -84,8 +84,10 @@ class report_custom(report_rml):
# sum up the attendances' durations
ldt = None
for att in attendences:
- dt = datetime.strptime(att['name'], '%Y-%m-%d %H:%M:%S')
+ dt = datetime.strptime(att['name'], '%Y-%m-%d %H:%M:%S')
if ldt and att['action'] == 'sign_out':
+ if dt.date() > ldt.date():
+ dt = ldt
wh += (float((dt - ldt).seconds)/60/60)
else:
ldt = dt
diff --git a/addons/hr_attendance/report/timesheet.py b/addons/hr_attendance/report/timesheet.py
index 900f982dc74..fdb2569b4a2 100644
--- a/addons/hr_attendance/report/timesheet.py
+++ b/addons/hr_attendance/report/timesheet.py
@@ -38,7 +38,7 @@ class report_custom(report_rml):
def create_xml(self, cr, uid, ids, datas, context=None):
obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
-
+ ids = datas['active_ids']
start_date = datetime.strptime(datas['form']['init_date'], '%Y-%m-%d')
end_date = datetime.strptime(datas['form']['end_date'], '%Y-%m-%d')
first_monday = start_date - relativedelta(days=start_date.date().weekday())
diff --git a/addons/hr_attendance/wizard/hr_attendance_byweek.py b/addons/hr_attendance/wizard/hr_attendance_byweek.py
index 9ee69a937d1..454ba7764da 100644
--- a/addons/hr_attendance/wizard/hr_attendance_byweek.py
+++ b/addons/hr_attendance/wizard/hr_attendance_byweek.py
@@ -37,6 +37,7 @@ class hr_attendance_byweek(osv.osv_memory):
def print_report(self, cr, uid, ids, context=None):
datas = {
'ids': [],
+ 'active_ids': context['active_ids'],
'model': 'hr.employee',
'form': self.read(cr, uid, ids)[0]
}
From 529b8c9e64c8bce4f628cbc89ef4b3cb5e5c6b9f Mon Sep 17 00:00:00 2001
From: "pankita shah (Open ERP)"
Date: Fri, 5 Oct 2012 12:25:08 +0530
Subject: [PATCH 013/211] [FIX] widget is undefined when press cost and revenus
bzr revid: shp@tinyerp.com-20121005065508-4axokyk4llathg21
---
addons/account/project/project_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml
index 70db95425b1..342663e700f 100644
--- a/addons/account/project/project_view.xml
+++ b/addons/account/project/project_view.xml
@@ -160,7 +160,7 @@
account.analytic.line.treeaccount.analytic.line
-
+
From ca052f42357a87de6e4756377e646049d57a29e4 Mon Sep 17 00:00:00 2001
From: "Harry (OpenERP)"
Date: Fri, 5 Oct 2012 12:42:29 +0530
Subject: [PATCH 014/211] [IMP] base_action_rule: now able to run multiple
server actions in rule
bzr revid: hmo@tinyerp.com-20121005071229-6jmrghoz1nkcnnwh
---
addons/base_action_rule/base_action_rule.py | 11 ++++++-----
addons/base_action_rule/base_action_rule_view.xml | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index 2328bf94cfd..dc56b85439c 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -93,7 +93,7 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
'regex_name': fields.char('Regex on Resource Name', size=128, help="Regular expression for matching name of the resource\
\ne.g.: 'urgent.*' will search for records having name starting with the string 'urgent'\
\nNote: This is case sensitive search."),
- 'server_action_id': fields.many2one('ir.actions.server', 'Server Action', help="Describes the action name.\neg:on which object which action to be taken on basis of which condition"),
+ 'server_action_ids': fields.many2many('ir.actions.server', 'Server Action', help="Define Server actions.\neg:Email Reminders, Call Object Service, etc.."),
'filter_id':fields.many2one('ir.filters', 'Filter', required=False), #TODO: set domain [('model_id','=',model)]
'last_run': fields.datetime('Last Run', readonly=1),
}
@@ -276,10 +276,11 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
""" Do Action """
if context is None:
context = {}
-
- if action.server_action_id:
- context.update({'active_id':obj.id, 'active_ids':[obj.id]})
- self.pool.get('ir.actions.server').run(cr, uid, [action.server_action_id.id], context)
+ ctx = dict(context)
+ action_server_obj = self.pool.get('ir.actions.server')
+ if action.server_action_ids:
+ ctx.update({'active_id':obj.id, 'active_ids':[obj.id]})
+ action_server_obj.run(cr, uid, [x.id for x in action.server_action_ids], context=ctx)
write = {}
if hasattr(obj, 'user_id') and action.act_user_id:
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index b35818ee8d9..bd5b868e3f9 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -52,7 +52,7 @@
-
+
From ac4a1375765760d800b32ace2e0d51eee87c67b8 Mon Sep 17 00:00:00 2001
From: "Harry (OpenERP)"
Date: Fri, 5 Oct 2012 12:50:01 +0530
Subject: [PATCH 015/211] [FIX] base_action_rule: do not subscribe again if
already follow document
bzr revid: hmo@tinyerp.com-20121005072001-6qy5yusrpw4n5xno
---
addons/base_action_rule/base_action_rule.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index dc56b85439c..13617cd42d9 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -295,7 +295,10 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
model_obj.message_post(cr, uid, [obj], _(action.act_state), context=context)
if hasattr(obj, 'message_subscribe') and action.act_followers:
- model_obj.message_subscribe(cr, uid, [obj.id], [x.id for x in action.act_followers], context=context)
+ exits_followers = [x.id for x in obj.message_follower_ids]
+ new_followers = [x.id for x in action.act_followers if x.id not in exits_followers]
+ if new_followers:
+ model_obj.message_subscribe(cr, uid, [obj.id], new_followers, context=context)
return True
def _action(self, cr, uid, ids, objects, scrit=None, context=None):
From 82ab8bf9a3294a95debfc8f6f2fca2d4ded6decb Mon Sep 17 00:00:00 2001
From: "Harry (OpenERP)"
Date: Fri, 5 Oct 2012 13:33:25 +0530
Subject: [PATCH 016/211] [IMP] base_action_rule: improve view and server
action should be one2many instead of many2many
bzr revid: hmo@tinyerp.com-20121005080325-3vcja1mog3yfthtr
---
addons/base_action_rule/base_action_rule.py | 8 ++++++-
.../base_action_rule_view.xml | 21 ++++++++++++-------
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index 13617cd42d9..ebc4c02a938 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -93,7 +93,7 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
'regex_name': fields.char('Regex on Resource Name', size=128, help="Regular expression for matching name of the resource\
\ne.g.: 'urgent.*' will search for records having name starting with the string 'urgent'\
\nNote: This is case sensitive search."),
- 'server_action_ids': fields.many2many('ir.actions.server', 'Server Action', help="Define Server actions.\neg:Email Reminders, Call Object Service, etc.."),
+ 'server_action_ids': fields.one2many('ir.actions.server', 'action_rule_id', 'Server Action', help="Define Server actions.\neg:Email Reminders, Call Object Service, etc.."),
'filter_id':fields.many2one('ir.filters', 'Filter', required=False), #TODO: set domain [('model_id','=',model)]
'last_run': fields.datetime('Last Run', readonly=1),
}
@@ -321,6 +321,12 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
base_action_rule()
+class actions_server(osv.osv):
+ _inherit = 'ir.actions.server'
+ _columns = {
+ 'action_rule_id': fields.many2one("base.action.rule", string="Action Rule")
+ }
+actions_server()
class ir_cron(osv.osv):
_inherit = 'ir.cron'
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index bd5b868e3f9..7c1b6c43b0e 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -15,7 +15,7 @@
-
+
@@ -47,16 +47,23 @@
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
From 4dc1a8b348999ab94eabd4c46ddef27ae12717ee Mon Sep 17 00:00:00 2001
From: "Harry (OpenERP)"
Date: Fri, 5 Oct 2012 13:38:41 +0530
Subject: [PATCH 017/211] [FIX] crm: typo
bzr revid: hmo@tinyerp.com-20121005080841-bti2swdj7kosxse7
---
addons/crm/crm_action_rule_view.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/crm/crm_action_rule_view.xml b/addons/crm/crm_action_rule_view.xml
index b7ac5037c31..e21b74de382 100644
--- a/addons/crm/crm_action_rule_view.xml
+++ b/addons/crm/crm_action_rule_view.xml
@@ -8,11 +8,11 @@
-
+
-
+
From 54c66ff0ff9e4ab3aca0a58a31e9a3cd47039640 Mon Sep 17 00:00:00 2001
From: "Harry (OpenERP)"
Date: Fri, 5 Oct 2012 14:04:24 +0530
Subject: [PATCH 018/211] [IMP] base_action_rule: improve view
bzr revid: hmo@tinyerp.com-20121005083424-pback5jfsvjb0dlo
---
addons/base_action_rule/base_action_rule_view.xml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index 7c1b6c43b0e..2bffbf5b92c 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -36,10 +36,8 @@
-
-
-
-
+
+
From 12c0f14d3916dc79aa1d1a13521b2589f311bdb6 Mon Sep 17 00:00:00 2001
From: "pankita shah (Open ERP)"
Date: Fri, 5 Oct 2012 14:12:13 +0530
Subject: [PATCH 019/211] [FIX] remove duplicate name when click sign in/out
project
bzr revid: shp@tinyerp.com-20121005084213-d4qkc25iyy5maq0m
---
addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py
index e92e88bdcbd..031a17baee0 100644
--- a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py
+++ b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py
@@ -147,7 +147,7 @@ class hr_si_project(osv.osv_memory):
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'hr.sign.%s.project' % in_out,
- 'views': [(False,'tree'), (resource_id,'form')],
+ 'views': [(resource_id,'form')],
'type': 'ir.actions.act_window',
'target': 'new'
}
From 6761871c4ea8427da90703d942f553b7334d6043 Mon Sep 17 00:00:00 2001
From: "pankita shah (Open ERP)"
Date: Mon, 8 Oct 2012 10:40:14 +0530
Subject: [PATCH 020/211] [IMP] indentation of active ids of timesheet.py
bzr revid: shp@tinyerp.com-20121008051014-fvftsi2mt44abyyn
---
addons/hr_attendance/report/timesheet.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/hr_attendance/report/timesheet.py b/addons/hr_attendance/report/timesheet.py
index fdb2569b4a2..326ffce63e0 100644
--- a/addons/hr_attendance/report/timesheet.py
+++ b/addons/hr_attendance/report/timesheet.py
@@ -38,7 +38,7 @@ class report_custom(report_rml):
def create_xml(self, cr, uid, ids, datas, context=None):
obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
- ids = datas['active_ids']
+ ids = datas['active_ids']
start_date = datetime.strptime(datas['form']['init_date'], '%Y-%m-%d')
end_date = datetime.strptime(datas['form']['end_date'], '%Y-%m-%d')
first_monday = start_date - relativedelta(days=start_date.date().weekday())
From d79f2cb7b8d6fc2510607f2f3aa7fe8c2690c8dd Mon Sep 17 00:00:00 2001
From: "Twinkle Christian (OpenERP)"
Date: Mon, 8 Oct 2012 12:23:16 +0530
Subject: [PATCH 021/211] [FIX]warning:Field res.partner.address is deprecated
bzr revid: tch@tinyerp.com-20121008065316-fblbc7ycbhmv0w1s
---
openerp/addons/base/test/test_osv_expression.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openerp/addons/base/test/test_osv_expression.yml b/openerp/addons/base/test/test_osv_expression.yml
index 3843d374e64..39712fb08dd 100644
--- a/openerp/addons/base/test/test_osv_expression.yml
+++ b/openerp/addons/base/test/test_osv_expression.yml
@@ -83,7 +83,7 @@
Test one2many operator with False
-
!assert {model: res.partner, search: "[('child_ids', '=', False)]"}:
- - address in (False, None, [])
+ - child_ids in (False, None, [])
-
Test many2many operator with empty search list
-
From 667da9253fd647a7888d7986d996b9c66f4797e7 Mon Sep 17 00:00:00 2001
From: "pankita shah (Open ERP)"
Date: Mon, 8 Oct 2012 15:04:56 +0530
Subject: [PATCH 022/211] [IMP] Exprience instead of Experience
bzr revid: shp@tinyerp.com-20121008093456-ff27x03xt89v4og3
---
addons/hr_recruitment/hr_recruitment_data.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml
index 21f4e48e42d..1bedd411cf2 100644
--- a/addons/hr_recruitment/hr_recruitment_data.xml
+++ b/addons/hr_recruitment/hr_recruitment_data.xml
@@ -312,7 +312,7 @@ You can automatically create application records from an email gateway, that you
This question requires an answer.
- Exprience
+ ExperiencecommentThe comment you entered is in an invalid format.
From 92d7b599cf9dd9087b57386cbb7514dc2f9d91b7 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Mon, 8 Oct 2012 16:00:13 +0530
Subject: [PATCH 023/211] [IMP]base : improve manu string and demo data
bzr revid: mma@tinyerp.com-20121008103013-bis8xilyyqjv6far
---
openerp/addons/base/res/res_country_view.xml | 2 +-
openerp/addons/base/res/res_partner_demo.xml | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/openerp/addons/base/res/res_country_view.xml b/openerp/addons/base/res/res_country_view.xml
index c8046d34eb2..a5c846fb8ee 100644
--- a/openerp/addons/base/res/res_country_view.xml
+++ b/openerp/addons/base/res/res_country_view.xml
@@ -45,7 +45,7 @@
Display and manage the list of all countries that can be assigned to your partner records. You can create or delete countries to make sure the ones you are working on will be maintained.
-
+
diff --git a/openerp/addons/base/res/res_partner_demo.xml b/openerp/addons/base/res/res_partner_demo.xml
index e51c4dc2e6b..28c8fe34cc2 100644
--- a/openerp/addons/base/res/res_partner_demo.xml
+++ b/openerp/addons/base/res/res_partner_demo.xml
@@ -116,7 +116,7 @@
1Fremont
- CA 94538
+ 945383661 Station Street
@@ -148,7 +148,7 @@
1Chicago
- IL 60623
+ 6062323 Rockwell Lane
@@ -206,7 +206,7 @@
1Miami
- FL 33169
+ 33169contact@jackson.com
@@ -270,7 +270,7 @@
1Detroit
- MI 48212
+ 4821260, Rosewood Court
@@ -327,7 +327,7 @@
1Boston
- MA 02203
+ 02203info@thinkbig.com+1 857 349 3049
From 82138688a2d27337fc30d0143d00bd7275754e00 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Mon, 8 Oct 2012 21:16:47 +0530
Subject: [PATCH 024/211] [FIX]: Fix analytic line shown.
bzr revid: atp@tinyerp.com-20121008154647-bdxw4ajq5hgb7jsk
---
addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
index cd58f52f959..76c6ac7ca35 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
@@ -468,7 +468,7 @@ class hr_timesheet_line(osv.osv):
for ts_line in self.browse(cursor, user, ids, context=context):
sheet_ids = sheet_obj.search(cursor, user,
[('date_to', '>=', ts_line.date), ('date_from', '<=', ts_line.date),
- ('employee_id.user_id', '=', ts_line.user_id.id)],
+ ('employee_id.user_id', '=', ts_line.sheet_id and ts_line.sheet_id.employee_id.user_id.id)],
context=context)
if sheet_ids:
# [0] because only one sheet possible for an employee between 2 dates
From 2cd8c0bf8c287e343cc57564cad9fc34f10bdf0b Mon Sep 17 00:00:00 2001
From: "pankita shah (Open ERP)"
Date: Tue, 9 Oct 2012 10:48:20 +0530
Subject: [PATCH 025/211] [IMP] whether instead of wheter
bzr revid: shp@tinyerp.com-20121009051820-2kllcfgd985opk0t
---
addons/product/product_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index 8c19aee026f..defffa5162e 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -321,7 +321,7 @@
Click to define a new product.
- You must define a product for everything you purchase, wheter
+ You must define a product for everything you purchase, whether
it's a physical product, a consumable or services you buy to
subcontractants.
From 18e59b63527c5a8185c481da8ab991f6a840f89b Mon Sep 17 00:00:00 2001
From: "pankita shah (Open ERP)"
Date: Tue, 9 Oct 2012 11:11:05 +0530
Subject: [PATCH 026/211] [IMP] massively instead of massicely
bzr revid: shp@tinyerp.com-20121009054105-5q25k6dq4b2wbhjk
---
addons/crm/crm_phonecall_menu.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/crm/crm_phonecall_menu.xml b/addons/crm/crm_phonecall_menu.xml
index c359aa461e7..30303d4205c 100644
--- a/addons/crm/crm_phonecall_menu.xml
+++ b/addons/crm/crm_phonecall_menu.xml
@@ -123,7 +123,7 @@
OpenERP allows you to easily define all the calls to be done
by your sales team and follow up based on their summary.
- You can use the import feature to massicely import a new list of
+ You can use the import feature to massively import a new list of
prospects to qualify.