""") % (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 064d80917e76d52e133b6609cdc3ce3fbaf9d4f9 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Wed, 3 Oct 2012 17:19:46 +0530
Subject: [PATCH 014/372] [IMP] change old port 8080
bzr revid: fka@tinyerp.com-20121003114946-n25y3i5yx2s3bild
---
addons/survey/wizard/survey_send_invitation.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/survey/wizard/survey_send_invitation.py b/addons/survey/wizard/survey_send_invitation.py
index 8c9bb2a7fbe..b6d68a47004 100644
--- a/addons/survey/wizard/survey_send_invitation.py
+++ b/addons/survey/wizard/survey_send_invitation.py
@@ -74,7 +74,7 @@ class survey_send_invitation(osv.osv_memory):
raise osv.except_osv(_('Warning!'), _('%sSurvey is not in open state') % msg)
data['mail'] = '''Hello %(name)s, \n\n We are inviting you for following survey. \
\n ''' + name + '''\n Your login ID: %(login)s, Your password: %(passwd)s
- \n link :- http://'''+ str(socket.gethostname()) + ''':8080 \n\n Thanks,'''
+ \n link :- http://'''+ str(socket.gethostname()) + ''':8069 \n\n Thanks,'''
return data
def create_report(self, cr, uid, res_ids, report_name=False, file_name=False):
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 015/372] [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 016/372] [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 017/372] 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 018/372] 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 c2eb5616b7ed3ffb84ef1094b8296b20e5ab9174 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Thu, 4 Oct 2012 14:43:51 +0530
Subject: [PATCH 019/372] [IMP] improve code
bzr revid: fka@tinyerp.com-20121004091351-sky1or0w62lqmf1d
---
addons/survey/survey.py | 10 ++++++----
addons/survey/survey_demo.xml | 3 +++
addons/survey/survey_view.xml | 3 +++
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/addons/survey/survey.py b/addons/survey/survey.py
index 6e350ccf9ce..b3d38aeeb4d 100644
--- a/addons/survey/survey.py
+++ b/addons/survey/survey.py
@@ -53,6 +53,7 @@ class survey(osv.osv):
'id': fields.integer('ID'),
'title': fields.char('Survey Title', size=128, required=1),
'page_ids': fields.one2many('survey.page', 'survey_id', 'Page'),
+ 'date_open': fields.datetime('Survey Open Date', readonly=1),
'date_close': fields.datetime('Survey Close Date', readonly=1),
'max_response_limit': fields.integer('Maximum Answer Limit',
help="Set to one if survey is answerable only once"),
@@ -60,10 +61,10 @@ class survey(osv.osv):
help="Set to one if you require only one Answer per user"),
'state': fields.selection([('open', 'Open'), ('cancel', 'Cancelled'),('close', 'Closed') ], 'Status', readonly=True),
'responsible_id': fields.many2one('res.users', 'Responsible', help="User responsible for survey"),
- 'tot_start_survey': fields.integer("Total Started Survey"),
- 'tot_comp_survey': fields.integer("Total Completed Survey"),
+ 'tot_start_survey': fields.integer("Total Started Survey", readonly=1),
+ 'tot_comp_survey': fields.integer("Total Completed Survey", readonly=1),
'note': fields.text('Description', size=128),
- 'history': fields.one2many('survey.history', 'survey_id', 'History Lines'),
+ 'history': fields.one2many('survey.history', 'survey_id', 'History Lines', readonly=True),
'users': fields.many2many('res.users', 'survey_users_rel', 'sid', 'uid', 'Users'),
'send_response': fields.boolean('Email Notification on Answer'),
'type': fields.many2one('survey.type', 'Type'),
@@ -76,10 +77,11 @@ class survey(osv.osv):
'tot_comp_survey': lambda * a: 0,
'send_response': lambda * a: 1,
'response_user': lambda * a:1,
+ 'date_open': strftime("%Y-%m-%d %H:%M:%S"),
}
def survey_open(self, cr, uid, ids, arg):
- self.write(cr, uid, ids, {'state': 'open'})
+ self.write(cr, uid, ids, {'state': 'open', 'date_open': strftime("%Y-%m-%d %H:%M:%S")})
return True
def survey_close(self, cr, uid, ids, arg):
diff --git a/addons/survey/survey_demo.xml b/addons/survey/survey_demo.xml
index f9a3e8f3159..6f89095c699 100644
--- a/addons/survey/survey_demo.xml
+++ b/addons/survey/survey_demo.xml
@@ -17,6 +17,7 @@
115
+
@@ -165,6 +166,7 @@
115
+
@@ -631,6 +633,7 @@
115
+
diff --git a/addons/survey/survey_view.xml b/addons/survey/survey_view.xml
index a03df6800e7..e6d92b72ba1 100644
--- a/addons/survey/survey_view.xml
+++ b/addons/survey/survey_view.xml
@@ -220,6 +220,7 @@
+
@@ -252,6 +253,7 @@
+
@@ -293,6 +295,7 @@
+
From 9dd89df9ce1132de0174ea56145237f9006787e8 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Thu, 4 Oct 2012 16:47:03 +0530
Subject: [PATCH 020/372] [IMP] make all fields readable in close state
bzr revid: fka@tinyerp.com-20121004111703-nrzz774gjydu0oo8
---
addons/survey/survey_view.xml | 14 +++++++-------
addons/survey/wizard/survey_answer.py | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/addons/survey/survey_view.xml b/addons/survey/survey_view.xml
index e6d92b72ba1..c0bf7d25b7b 100644
--- a/addons/survey/survey_view.xml
+++ b/addons/survey/survey_view.xml
@@ -38,15 +38,15 @@
-
+
-
-
-
+
+
+
@@ -55,7 +55,7 @@
-
+
-
+
-
+
diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py
index 76d2f012be8..5a027601446 100644
--- a/addons/survey/wizard/survey_answer.py
+++ b/addons/survey/wizard/survey_answer.py
@@ -429,7 +429,7 @@ class survey_question_wiz(osv.osv_memory):
vals['attachment_ids'] = [(0,0,{'name': a_name,
'datas_fname': a_name,
'datas': str(a_content).encode('base64')})
- for a_name, a_content in attachments]
+ for a_name, a_content in attachments.items()]
self.pool.get('mail.mail').create(cr, uid, vals, context=context)
xml_form = etree.Element('form', {'string': _('Complete Survey Answer')})
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 021/372] [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 022/372] [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 023/372] [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 024/372] [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 f07e90b5cbfa0fbd8f8b57fa097bb5ba8f93a2cd Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Fri, 5 Oct 2012 11:08:34 +0530
Subject: [PATCH 025/372] [IMP] solve error When click on Edit Survey
bzr revid: fka@tinyerp.com-20121005053834-62y619ae1xe10ojg
---
addons/survey/wizard/survey_answer.py | 43 ++++++++++++++-------------
1 file changed, 23 insertions(+), 20 deletions(-)
diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py
index 5a027601446..10ab4bf82da 100644
--- a/addons/survey/wizard/survey_answer.py
+++ b/addons/survey/wizard/survey_answer.py
@@ -112,26 +112,29 @@ class survey_question_wiz(osv.osv_memory):
flag = False
fields = {}
if sur_name_read.page == "next" or sur_name_rec.page_no == -1:
- if total_pages > sur_name_rec.page_no + 1:
- if ((context.has_key('active') and not context.get('active', False)) \
- or not context.has_key('active')) and not sur_name_rec.page_no + 1:
- if sur_rec.state != "open" :
- raise osv.except_osv(_('Warning!'),_("You cannot answer because the survey is not open."))
- cr.execute('select count(id) from survey_history where user_id=%s\
- and survey_id=%s', (uid,survey_id))
- res = cr.fetchone()[0]
- user_limit = survey_obj.browse(cr, uid, survey_id)
- user_limit = user_limit.response_user
- if user_limit and res >= user_limit:
- raise osv.except_osv(_('Warning!'),_("You cannot answer this survey more than %s times.") % (user_limit))
-
- if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey and not sur_name_rec.page_no + 1:
- survey_obj.write(cr, uid, survey_id, {'state':'close', 'date_close':strftime("%Y-%m-%d %H:%M:%S")})
-
- p_id = p_id[sur_name_rec.page_no + 1]
- surv_name_wiz.write(cr, uid, [context['sur_name_id'],], {'page_no' : sur_name_rec.page_no + 1})
- flag = True
- page_number += 1
+ if total_pages:
+ if total_pages > sur_name_rec.page_no + 1:
+ if ((context.has_key('active') and not context.get('active', False)) \
+ or not context.has_key('active')) and not sur_name_rec.page_no + 1:
+ if sur_rec.state != "open" :
+ raise osv.except_osv(_('Warning!'),_("You cannot answer because the survey is not open."))
+ cr.execute('select count(id) from survey_history where user_id=%s\
+ and survey_id=%s', (uid,survey_id))
+ res = cr.fetchone()[0]
+ user_limit = survey_obj.browse(cr, uid, survey_id)
+ user_limit = user_limit.response_user
+ if user_limit and res >= user_limit:
+ raise osv.except_osv(_('Warning!'),_("You cannot answer this survey more than %s times.") % (user_limit))
+
+ if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey and not sur_name_rec.page_no + 1:
+ survey_obj.write(cr, uid, survey_id, {'state':'close', 'date_close':strftime("%Y-%m-%d %H:%M:%S")})
+
+ p_id = p_id[sur_name_rec.page_no + 1]
+ surv_name_wiz.write(cr, uid, [context['sur_name_id'],], {'page_no' : sur_name_rec.page_no + 1})
+ flag = True
+ page_number += 1
+ else:
+ raise osv.except_osv(_('Warning!'),_('This survey has no pages defined. Please define the pages first.'))
if sur_name_rec.page_no > - 1:
pre_button = True
else:
From dab351dcc7d8680b91ba99a235811958b41917dc Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Fri, 5 Oct 2012 11:53:07 +0530
Subject: [PATCH 026/372] [IMP] solve error When no pages define on test survey
bzr revid: fka@tinyerp.com-20121005062307-er263zwe3mm9dgt3
---
addons/survey/survey.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/addons/survey/survey.py b/addons/survey/survey.py
index b3d38aeeb4d..809079eaedb 100644
--- a/addons/survey/survey.py
+++ b/addons/survey/survey.py
@@ -164,10 +164,14 @@ class survey(osv.osv):
'context': context
}
def test_survey(self, cr, uid, ids, context=None):
- sur_obj = self.read(cr, uid, ids,['title'], context=context)
+ sur_obj = self.read(cr, uid, ids,['title','page_ids'], context=context)
for sur in sur_obj:
name = sur['title']
- context.update({'active':True,'survey_id': ids[0]})
+ pages = sur['page_ids']
+ if not pages:
+ raise osv.except_osv(_('Warning!'), _('This survey has no pages defined. Please define pages first.'))
+ else:
+ context.update({'active':True,'survey_id': ids[0]})
return {
'view_type': 'form',
'view_mode': 'form',
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 027/372] [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 028/372] [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 029/372] [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 030/372] [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 031/372] [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 032/372] [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 033/372] [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 b2661913d4ae1ca15e558ed5b8310d78a0fcc4a2 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Fri, 5 Oct 2012 16:01:36 +0530
Subject: [PATCH 034/372] [IMP] solve error When no pages define in edit survey
bzr revid: fka@tinyerp.com-20121005103136-ji9uo2h4eow9aqec
---
addons/survey/wizard/survey_answer.py | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py
index 5a027601446..7e1417ecdb7 100644
--- a/addons/survey/wizard/survey_answer.py
+++ b/addons/survey/wizard/survey_answer.py
@@ -134,6 +134,8 @@ class survey_question_wiz(osv.osv_memory):
page_number += 1
if sur_name_rec.page_no > - 1:
pre_button = True
+ else:
+ flag = True
else:
if sur_name_rec.page_no != 0:
p_id = p_id[sur_name_rec.page_no - 1]
@@ -146,7 +148,15 @@ class survey_question_wiz(osv.osv_memory):
pre_button = True
if flag:
pag_rec = page_obj.browse(cr, uid, p_id, context=context)
- xml_form = etree.Element('form', {'string': tools.ustr(pag_rec.title or sur_rec.title)})
+ note = False
+ question_ids = []
+ if pag_rec:
+ title = pag_rec.title
+ note = pag_rec.note
+ question_ids=pag_rec.question_ids
+ else:
+ title=sur_rec.title
+ xml_form = etree.Element('form', {'string': tools.ustr(title)})
if context.has_key('active') and context.get('active',False) and context.has_key('edit'):
context.update({'page_id' : tools.ustr(p_id),'page_number' : sur_name_rec.page_no , 'transfer' : sur_name_read.transfer})
xml_group3 = etree.SubElement(xml_form, 'group', {'col': '4', 'colspan': '4'})
@@ -174,10 +184,10 @@ class survey_question_wiz(osv.osv_memory):
fields["wizardid_" + str(wiz_id)] = {'type':'char', 'size' : 255, 'string':"", 'views':{}}
etree.SubElement(xml_form, 'field', {'invisible':'1','name': "wizardid_" + str(wiz_id),'default':str(lambda *a: 0),'modifiers':'{"invisible":true}'})
- if pag_rec.note:
- for que_test in pag_rec.note.split('\n'):
+ if note:
+ for que_test in note.split('\n'):
etree.SubElement(xml_form, 'label', {'string': to_xml(tools.ustr(que_test)), 'align':"0.0"})
- que_ids = pag_rec.question_ids
+ que_ids = question_ids
qu_no = 0
for que in que_ids:
From ddb869f1804da7ad549dc9565653c861ab77ba0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?=
Date: Fri, 5 Oct 2012 16:06:16 +0200
Subject: [PATCH 035/372] [FIX] fixing css errors as reported by firefox
bzr revid: fva@openerp.com-20121005140616-w5tulvk6v6hesjmn
---
addons/point_of_sale/static/src/css/pos.css | 2 +-
addons/process/static/src/css/process.css | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css
index cbb625c02d7..81c6a1e1a6e 100644
--- a/addons/point_of_sale/static/src/css/pos.css
+++ b/addons/point_of_sale/static/src/css/pos.css
@@ -897,7 +897,7 @@
width: 100%;
height: 100%;
margin: 0;
- margin-right: 18px
+ margin-right: 18px;
font-family: "Inconsolata";
color: #6c6c6c;
text-shadow: 0px 3px 3px rgba(0,0,0, 0.2);
diff --git a/addons/process/static/src/css/process.css b/addons/process/static/src/css/process.css
index 7442db9bc4a..5f438622653 100644
--- a/addons/process/static/src/css/process.css
+++ b/addons/process/static/src/css/process.css
@@ -44,7 +44,7 @@ a.cta-a strong {
background-color:#FFF;
}
.process_canvas svg{
- height:500px;!important;
+ height:500px;
padding:15px;
}
.oe_process {
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 036/372] [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 037/372] [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 09e5d404df56c542e7f9f8b6256d77183797b9ba Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Mon, 8 Oct 2012 14:18:04 +0530
Subject: [PATCH 038/372] [IMP] mail : Improved the terminologies.
bzr revid: mdi@tinyerp.com-20121008084804-9mmxzdlyxhyarf0j
---
addons/mail/mail_message.py | 4 ++--
addons/mail/mail_thread_view.xml | 2 +-
addons/mail/wizard/mail_compose_message_view.xml | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py
index bbf68509277..61ea9fb9f6b 100644
--- a/addons/mail/mail_message.py
+++ b/addons/mail/mail_message.py
@@ -580,11 +580,11 @@ class mail_message(osv.Model):
partner_wo_email_lst.append(partner)
if not partner_wo_email_lst:
return {}
- warning_msg = _('The following partners chosen as recipients for the email have no email address linked :')
+ warning_msg = _('The following contacts do not have an email address specified.')
for partner in partner_wo_email_lst:
warning_msg += '\n- %s' % (partner.name)
return {'warning': {
- 'title': _('Partners email addresses not found'),
+ 'title': _('Email not found'),
'message': warning_msg,
}
}
diff --git a/addons/mail/mail_thread_view.xml b/addons/mail/mail_thread_view.xml
index 3507e7c449f..5f504f3c3da 100644
--- a/addons/mail/mail_thread_view.xml
+++ b/addons/mail/mail_thread_view.xml
@@ -9,7 +9,7 @@
sequence="10"/>
-
+
diff --git a/addons/mail/wizard/mail_compose_message_view.xml b/addons/mail/wizard/mail_compose_message_view.xml
index 0f384dc5a0d..c7b9ed36a39 100644
--- a/addons/mail/wizard/mail_compose_message_view.xml
+++ b/addons/mail/wizard/mail_compose_message_view.xml
@@ -58,10 +58,10 @@
-
-
Date: Mon, 8 Oct 2012 14:35:29 +0530
Subject: [PATCH 039/372] [IMP] mail : Partners should always be replaced with
Customer, Supplier, or Contact (if it can be both).
bzr revid: mdi@tinyerp.com-20121008090529-pi43dm3zxc1jsqbm
---
addons/mail/mail_message.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py
index 61ea9fb9f6b..68e40ef705c 100644
--- a/addons/mail/mail_message.py
+++ b/addons/mail/mail_message.py
@@ -580,8 +580,13 @@ class mail_message(osv.Model):
partner_wo_email_lst.append(partner)
if not partner_wo_email_lst:
return {}
- warning_msg = _('The following contacts do not have an email address specified.')
for partner in partner_wo_email_lst:
+ terminology = 'Contact'
+ if partner.customer and not partner.supplier:
+ terminology = 'Customer'
+ elif partner.supplier and not partner.customer:
+ terminology = 'Supplier'
+ warning_msg = _('The following %s do not have an email address specified.') % (terminology,)
warning_msg += '\n- %s' % (partner.name)
return {'warning': {
'title': _('Email not found'),
From 65e70487c2842b72a2236876650a3dc4e595808f Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Mon, 8 Oct 2012 14:40:18 +0530
Subject: [PATCH 040/372] [IMP] mail : Partners should always be replaced with
Customer, Supplier, or Contact (if it can be both).
bzr revid: mdi@tinyerp.com-20121008091018-s116zi83vwfqkngy
---
addons/mail/mail_message.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py
index 68e40ef705c..df169f94404 100644
--- a/addons/mail/mail_message.py
+++ b/addons/mail/mail_message.py
@@ -581,11 +581,11 @@ class mail_message(osv.Model):
if not partner_wo_email_lst:
return {}
for partner in partner_wo_email_lst:
- terminology = 'Contact'
+ terminology = 'contact'
if partner.customer and not partner.supplier:
- terminology = 'Customer'
+ terminology = 'customer'
elif partner.supplier and not partner.customer:
- terminology = 'Supplier'
+ terminology = 'supplier'
warning_msg = _('The following %s do not have an email address specified.') % (terminology,)
warning_msg += '\n- %s' % (partner.name)
return {'warning': {
From 39eea5b86c60ba3f3314d3397eadbbe00f6c1beb Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Mon, 8 Oct 2012 15:00:50 +0530
Subject: [PATCH 041/372] [IMP] procurement : 'Compute schedulers' should be
'Run schedulers'.
bzr revid: mdi@tinyerp.com-20121008093050-xvhx0vtz010xk2qg
---
addons/procurement/wizard/schedulers_all_view.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/procurement/wizard/schedulers_all_view.xml b/addons/procurement/wizard/schedulers_all_view.xml
index 2e72dfdbadc..321f05bb223 100644
--- a/addons/procurement/wizard/schedulers_all_view.xml
+++ b/addons/procurement/wizard/schedulers_all_view.xml
@@ -2,10 +2,10 @@
-
+
- Compute Schedulers
+ Run Schedulersprocurement.order.compute.all
@@ -21,7 +21,7 @@
-
Date: Mon, 8 Oct 2012 15:04:56 +0530
Subject: [PATCH 042/372] [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 48ad382705bf01c8a19a140ba77ddcaacd672354 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Mon, 8 Oct 2012 15:44:22 +0530
Subject: [PATCH 043/372] [IMP]all : improve string
bzr revid: mma@tinyerp.com-20121008101422-hen3r94996e6pzye
---
addons/base_calendar/base_calendar.py | 6 ++---
addons/base_calendar/crm_meeting_view.xml | 2 +-
.../crm_partner_assign/res_partner_view.xml | 2 +-
addons/hr_expense/hr_expense.py | 2 +-
addons/membership/membership.py | 2 +-
addons/product/product_view.xml | 4 ++--
addons/sale/sale_view.xml | 22 +++++++++++++++++--
7 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index 5b8c41787d4..bcfb9340966 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -1016,9 +1016,9 @@ defines the list of date/time exceptions for a recurring calendar component."),
rule or repeating pattern of time to exclude from the recurring rule."),
'rrule': fields.function(_get_rulestring, type='char', size=124, \
fnct_inv=_rrule_write, store=True, string='Recurrent Rule'),
- 'rrule_type': fields.selection([('none', ''), ('daily', 'Daily'), \
- ('weekly', 'Weekly'), ('monthly', 'Monthly'), \
- ('yearly', 'Yearly'),],
+ 'rrule_type': fields.selection([('none', ''), ('daily', 'Day(s)'), \
+ ('weekly', 'Week(s)'), ('monthly', 'Month(s)'), \
+ ('yearly', 'Year(s)'),],
'Recurrency', states={'done': [('readonly', True)]},
help="Let the event automatically repeat at that interval"),
'alarm_id': fields.many2one('res.alarm', 'Reminder', states={'done': [('readonly', True)]},
diff --git a/addons/base_calendar/crm_meeting_view.xml b/addons/base_calendar/crm_meeting_view.xml
index adcfc23a520..26c11262a2c 100644
--- a/addons/base_calendar/crm_meeting_view.xml
+++ b/addons/base_calendar/crm_meeting_view.xml
@@ -86,7 +86,7 @@
-
+
diff --git a/addons/crm_partner_assign/res_partner_view.xml b/addons/crm_partner_assign/res_partner_view.xml
index f5a1e9aad25..d1e72432550 100644
--- a/addons/crm_partner_assign/res_partner_view.xml
+++ b/addons/crm_partner_assign/res_partner_view.xml
@@ -77,7 +77,7 @@
-
+
diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py
index 91dc44fed61..a0d133aef86 100644
--- a/addons/hr_expense/hr_expense.py
+++ b/addons/hr_expense/hr_expense.py
@@ -233,7 +233,7 @@ hr_expense_expense()
class product_product(osv.osv):
_inherit = "product.product"
_columns = {
- 'hr_expense_ok': fields.boolean('Can Constitute an Expense', help="Determines if the product can be visible in the list of product within a selection from an HR expense sheet line."),
+ 'hr_expense_ok': fields.boolean('Can be Expensed', help="Determines if the product can be visible in the list of product within a selection from an HR expense sheet line."),
}
def on_change_hr_expense_ok(self, cr, uid, id, hr_expense_ok):
diff --git a/addons/membership/membership.py b/addons/membership/membership.py
index 87af723f2f9..f3192948afc 100644
--- a/addons/membership/membership.py
+++ b/addons/membership/membership.py
@@ -323,7 +323,7 @@ class Partner(osv.osv):
help = 'The price negotiated by the partner'),
'membership_state': fields.function(
__get_membership_state,
- string = 'Current Membership State', type = 'selection',
+ string = 'Current Membership Status', type = 'selection',
selection = STATE,
store = {
'account.invoice': (_get_invoice_partner, ['state'], 10),
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index 8c19aee026f..266a70e0fe3 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -144,7 +144,7 @@
-
+
@@ -763,7 +763,7 @@
-
+
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 5505a6a88b5..920e64d46da 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -131,7 +131,24 @@
-
+
+
+
+
+
+
+
+
+
+
+
+ sale.order.tree
+ sale.order
+ 2
+
+
+
+
@@ -358,7 +375,7 @@
- Sales Orders
+ Sale Ordersir.actions.act_windowsale.orderform
@@ -405,6 +422,7 @@
ir.actions.act_windowsale.orderform
+ tree,form,calendar,graph{'show_address': 1}[('state','in',('draft','sent','cancel'))]
From 31336151de7d65cbc2fe324c071d7167d1ae72ec Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Mon, 8 Oct 2012 15:58:36 +0530
Subject: [PATCH 044/372] [IMP] mrp_byproduct : Renamed 'subproduct' to
'byproduct'.
bzr revid: mdi@tinyerp.com-20121008102836-rwd3ooy413yxqou8
---
addons/{mrp_subproduct => mrp_byproduct}/__init__.py | 2 +-
.../{mrp_subproduct => mrp_byproduct}/__openerp__.py | 10 +++++-----
addons/{mrp_subproduct => mrp_byproduct}/i18n/ab.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/ar.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/bg.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/bs.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/ca.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/cs.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/da.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/de.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/es.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/es_AR.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/es_CR.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/es_EC.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/es_MX.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/es_VE.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/et.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/fi.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/fr.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/gl.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/hr.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/hu.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/id.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/it.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/ja.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/ko.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/lt.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/mn.po | 0
.../i18n/mrp_subproduct.pot | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/nb.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/nl.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/nl_BE.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/oc.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/pl.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/pt.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/pt_BR.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/ro.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/ru.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/sk.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/sl.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/sq.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/sr.po | 0
.../{mrp_subproduct => mrp_byproduct}/i18n/sr@latin.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/sv.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/tlh.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/tr.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/uk.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/vi.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/zh_CN.po | 0
addons/{mrp_subproduct => mrp_byproduct}/i18n/zh_TW.po | 0
.../mrp_byproduct.py} | 10 +++++-----
.../mrp_byproduct_view.xml} | 6 +++---
.../security/ir.model.access.csv | 0
.../test/mrp_byproduct.yml} | 0
54 files changed, 14 insertions(+), 14 deletions(-)
rename addons/{mrp_subproduct => mrp_byproduct}/__init__.py (97%)
rename addons/{mrp_subproduct => mrp_byproduct}/__openerp__.py (88%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/ab.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/ar.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/bg.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/bs.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/ca.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/cs.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/da.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/de.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/es.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/es_AR.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/es_CR.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/es_EC.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/es_MX.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/es_VE.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/et.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/fi.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/fr.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/gl.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/hr.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/hu.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/id.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/it.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/ja.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/ko.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/lt.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/mn.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/mrp_subproduct.pot (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/nb.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/nl.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/nl_BE.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/oc.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/pl.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/pt.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/pt_BR.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/ro.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/ru.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/sk.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/sl.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/sq.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/sr.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/sr@latin.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/sv.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/tlh.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/tr.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/uk.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/vi.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/zh_CN.po (100%)
rename addons/{mrp_subproduct => mrp_byproduct}/i18n/zh_TW.po (100%)
rename addons/{mrp_subproduct/mrp_subproduct.py => mrp_byproduct/mrp_byproduct.py} (92%)
rename addons/{mrp_subproduct/mrp_subproduct_view.xml => mrp_byproduct/mrp_byproduct_view.xml} (86%)
rename addons/{mrp_subproduct => mrp_byproduct}/security/ir.model.access.csv (100%)
rename addons/{mrp_subproduct/test/mrp_subproduct.yml => mrp_byproduct/test/mrp_byproduct.yml} (100%)
diff --git a/addons/mrp_subproduct/__init__.py b/addons/mrp_byproduct/__init__.py
similarity index 97%
rename from addons/mrp_subproduct/__init__.py
rename to addons/mrp_byproduct/__init__.py
index 5b48431ef16..7e507e0fe0a 100644
--- a/addons/mrp_subproduct/__init__.py
+++ b/addons/mrp_byproduct/__init__.py
@@ -18,5 +18,5 @@
# along with this program. If not, see .
#
##############################################################################
-import mrp_subproduct
+import mrp_byproduct
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mrp_subproduct/__openerp__.py b/addons/mrp_byproduct/__openerp__.py
similarity index 88%
rename from addons/mrp_subproduct/__openerp__.py
rename to addons/mrp_byproduct/__openerp__.py
index 6475cbe4a91..58e7a194771 100644
--- a/addons/mrp_subproduct/__openerp__.py
+++ b/addons/mrp_byproduct/__openerp__.py
@@ -21,14 +21,14 @@
{
- 'name': 'MRP Subproducts',
+ 'name': 'MRP Byproducts',
'version': '1.0',
'category': 'Manufacturing',
'description': """
This module allows you to produce several products from one production order.
=============================================================================
-You can configure sub-products in the bill of material.
+You can configure by-products in the bill of material.
Without this module:
--------------------
@@ -40,14 +40,14 @@ With this module:
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
- 'images': ['images/bom_subproduct.jpeg'],
+ 'images': ['images/bom_byproduct.jpeg'],
'depends': ['base', 'mrp'],
'data': [
'security/ir.model.access.csv',
- 'mrp_subproduct_view.xml'
+ 'mrp_byproduct_view.xml'
],
'demo': [],
- 'test': ['test/mrp_subproduct.yml'],
+ 'test': ['test/mrp_byproduct.yml'],
'installable': True,
'auto_install': False,
}
diff --git a/addons/mrp_subproduct/i18n/ab.po b/addons/mrp_byproduct/i18n/ab.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/ab.po
rename to addons/mrp_byproduct/i18n/ab.po
diff --git a/addons/mrp_subproduct/i18n/ar.po b/addons/mrp_byproduct/i18n/ar.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/ar.po
rename to addons/mrp_byproduct/i18n/ar.po
diff --git a/addons/mrp_subproduct/i18n/bg.po b/addons/mrp_byproduct/i18n/bg.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/bg.po
rename to addons/mrp_byproduct/i18n/bg.po
diff --git a/addons/mrp_subproduct/i18n/bs.po b/addons/mrp_byproduct/i18n/bs.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/bs.po
rename to addons/mrp_byproduct/i18n/bs.po
diff --git a/addons/mrp_subproduct/i18n/ca.po b/addons/mrp_byproduct/i18n/ca.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/ca.po
rename to addons/mrp_byproduct/i18n/ca.po
diff --git a/addons/mrp_subproduct/i18n/cs.po b/addons/mrp_byproduct/i18n/cs.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/cs.po
rename to addons/mrp_byproduct/i18n/cs.po
diff --git a/addons/mrp_subproduct/i18n/da.po b/addons/mrp_byproduct/i18n/da.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/da.po
rename to addons/mrp_byproduct/i18n/da.po
diff --git a/addons/mrp_subproduct/i18n/de.po b/addons/mrp_byproduct/i18n/de.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/de.po
rename to addons/mrp_byproduct/i18n/de.po
diff --git a/addons/mrp_subproduct/i18n/es.po b/addons/mrp_byproduct/i18n/es.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/es.po
rename to addons/mrp_byproduct/i18n/es.po
diff --git a/addons/mrp_subproduct/i18n/es_AR.po b/addons/mrp_byproduct/i18n/es_AR.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/es_AR.po
rename to addons/mrp_byproduct/i18n/es_AR.po
diff --git a/addons/mrp_subproduct/i18n/es_CR.po b/addons/mrp_byproduct/i18n/es_CR.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/es_CR.po
rename to addons/mrp_byproduct/i18n/es_CR.po
diff --git a/addons/mrp_subproduct/i18n/es_EC.po b/addons/mrp_byproduct/i18n/es_EC.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/es_EC.po
rename to addons/mrp_byproduct/i18n/es_EC.po
diff --git a/addons/mrp_subproduct/i18n/es_MX.po b/addons/mrp_byproduct/i18n/es_MX.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/es_MX.po
rename to addons/mrp_byproduct/i18n/es_MX.po
diff --git a/addons/mrp_subproduct/i18n/es_VE.po b/addons/mrp_byproduct/i18n/es_VE.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/es_VE.po
rename to addons/mrp_byproduct/i18n/es_VE.po
diff --git a/addons/mrp_subproduct/i18n/et.po b/addons/mrp_byproduct/i18n/et.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/et.po
rename to addons/mrp_byproduct/i18n/et.po
diff --git a/addons/mrp_subproduct/i18n/fi.po b/addons/mrp_byproduct/i18n/fi.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/fi.po
rename to addons/mrp_byproduct/i18n/fi.po
diff --git a/addons/mrp_subproduct/i18n/fr.po b/addons/mrp_byproduct/i18n/fr.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/fr.po
rename to addons/mrp_byproduct/i18n/fr.po
diff --git a/addons/mrp_subproduct/i18n/gl.po b/addons/mrp_byproduct/i18n/gl.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/gl.po
rename to addons/mrp_byproduct/i18n/gl.po
diff --git a/addons/mrp_subproduct/i18n/hr.po b/addons/mrp_byproduct/i18n/hr.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/hr.po
rename to addons/mrp_byproduct/i18n/hr.po
diff --git a/addons/mrp_subproduct/i18n/hu.po b/addons/mrp_byproduct/i18n/hu.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/hu.po
rename to addons/mrp_byproduct/i18n/hu.po
diff --git a/addons/mrp_subproduct/i18n/id.po b/addons/mrp_byproduct/i18n/id.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/id.po
rename to addons/mrp_byproduct/i18n/id.po
diff --git a/addons/mrp_subproduct/i18n/it.po b/addons/mrp_byproduct/i18n/it.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/it.po
rename to addons/mrp_byproduct/i18n/it.po
diff --git a/addons/mrp_subproduct/i18n/ja.po b/addons/mrp_byproduct/i18n/ja.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/ja.po
rename to addons/mrp_byproduct/i18n/ja.po
diff --git a/addons/mrp_subproduct/i18n/ko.po b/addons/mrp_byproduct/i18n/ko.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/ko.po
rename to addons/mrp_byproduct/i18n/ko.po
diff --git a/addons/mrp_subproduct/i18n/lt.po b/addons/mrp_byproduct/i18n/lt.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/lt.po
rename to addons/mrp_byproduct/i18n/lt.po
diff --git a/addons/mrp_subproduct/i18n/mn.po b/addons/mrp_byproduct/i18n/mn.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/mn.po
rename to addons/mrp_byproduct/i18n/mn.po
diff --git a/addons/mrp_subproduct/i18n/mrp_subproduct.pot b/addons/mrp_byproduct/i18n/mrp_subproduct.pot
similarity index 100%
rename from addons/mrp_subproduct/i18n/mrp_subproduct.pot
rename to addons/mrp_byproduct/i18n/mrp_subproduct.pot
diff --git a/addons/mrp_subproduct/i18n/nb.po b/addons/mrp_byproduct/i18n/nb.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/nb.po
rename to addons/mrp_byproduct/i18n/nb.po
diff --git a/addons/mrp_subproduct/i18n/nl.po b/addons/mrp_byproduct/i18n/nl.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/nl.po
rename to addons/mrp_byproduct/i18n/nl.po
diff --git a/addons/mrp_subproduct/i18n/nl_BE.po b/addons/mrp_byproduct/i18n/nl_BE.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/nl_BE.po
rename to addons/mrp_byproduct/i18n/nl_BE.po
diff --git a/addons/mrp_subproduct/i18n/oc.po b/addons/mrp_byproduct/i18n/oc.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/oc.po
rename to addons/mrp_byproduct/i18n/oc.po
diff --git a/addons/mrp_subproduct/i18n/pl.po b/addons/mrp_byproduct/i18n/pl.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/pl.po
rename to addons/mrp_byproduct/i18n/pl.po
diff --git a/addons/mrp_subproduct/i18n/pt.po b/addons/mrp_byproduct/i18n/pt.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/pt.po
rename to addons/mrp_byproduct/i18n/pt.po
diff --git a/addons/mrp_subproduct/i18n/pt_BR.po b/addons/mrp_byproduct/i18n/pt_BR.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/pt_BR.po
rename to addons/mrp_byproduct/i18n/pt_BR.po
diff --git a/addons/mrp_subproduct/i18n/ro.po b/addons/mrp_byproduct/i18n/ro.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/ro.po
rename to addons/mrp_byproduct/i18n/ro.po
diff --git a/addons/mrp_subproduct/i18n/ru.po b/addons/mrp_byproduct/i18n/ru.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/ru.po
rename to addons/mrp_byproduct/i18n/ru.po
diff --git a/addons/mrp_subproduct/i18n/sk.po b/addons/mrp_byproduct/i18n/sk.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/sk.po
rename to addons/mrp_byproduct/i18n/sk.po
diff --git a/addons/mrp_subproduct/i18n/sl.po b/addons/mrp_byproduct/i18n/sl.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/sl.po
rename to addons/mrp_byproduct/i18n/sl.po
diff --git a/addons/mrp_subproduct/i18n/sq.po b/addons/mrp_byproduct/i18n/sq.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/sq.po
rename to addons/mrp_byproduct/i18n/sq.po
diff --git a/addons/mrp_subproduct/i18n/sr.po b/addons/mrp_byproduct/i18n/sr.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/sr.po
rename to addons/mrp_byproduct/i18n/sr.po
diff --git a/addons/mrp_subproduct/i18n/sr@latin.po b/addons/mrp_byproduct/i18n/sr@latin.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/sr@latin.po
rename to addons/mrp_byproduct/i18n/sr@latin.po
diff --git a/addons/mrp_subproduct/i18n/sv.po b/addons/mrp_byproduct/i18n/sv.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/sv.po
rename to addons/mrp_byproduct/i18n/sv.po
diff --git a/addons/mrp_subproduct/i18n/tlh.po b/addons/mrp_byproduct/i18n/tlh.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/tlh.po
rename to addons/mrp_byproduct/i18n/tlh.po
diff --git a/addons/mrp_subproduct/i18n/tr.po b/addons/mrp_byproduct/i18n/tr.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/tr.po
rename to addons/mrp_byproduct/i18n/tr.po
diff --git a/addons/mrp_subproduct/i18n/uk.po b/addons/mrp_byproduct/i18n/uk.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/uk.po
rename to addons/mrp_byproduct/i18n/uk.po
diff --git a/addons/mrp_subproduct/i18n/vi.po b/addons/mrp_byproduct/i18n/vi.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/vi.po
rename to addons/mrp_byproduct/i18n/vi.po
diff --git a/addons/mrp_subproduct/i18n/zh_CN.po b/addons/mrp_byproduct/i18n/zh_CN.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/zh_CN.po
rename to addons/mrp_byproduct/i18n/zh_CN.po
diff --git a/addons/mrp_subproduct/i18n/zh_TW.po b/addons/mrp_byproduct/i18n/zh_TW.po
similarity index 100%
rename from addons/mrp_subproduct/i18n/zh_TW.po
rename to addons/mrp_byproduct/i18n/zh_TW.po
diff --git a/addons/mrp_subproduct/mrp_subproduct.py b/addons/mrp_byproduct/mrp_byproduct.py
similarity index 92%
rename from addons/mrp_subproduct/mrp_subproduct.py
rename to addons/mrp_byproduct/mrp_byproduct.py
index bacdeb2c675..bf2a798aeff 100644
--- a/addons/mrp_subproduct/mrp_subproduct.py
+++ b/addons/mrp_byproduct/mrp_byproduct.py
@@ -30,10 +30,10 @@ class mrp_subproduct(osv.osv):
'product_id': fields.many2one('product.product', 'Product', required=True),
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
- 'subproduct_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Quantity Type', required=True, help="Define how the quantity of subproducts will be set on the production orders using this BoM.\
- 'Fixed' depicts a situation where the quantity of created subproduct is always equal to the quantity set on the BoM, regardless of how many are created in the production order.\
+ 'subproduct_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Quantity Type', required=True, help="Define how the quantity of byproducts will be set on the production orders using this BoM.\
+ 'Fixed' depicts a situation where the quantity of created byproduct is always equal to the quantity set on the BoM, regardless of how many are created in the production order.\
By opposition, 'Variable' means that the quantity will be computed as\
- '(quantity of subproduct set on the BoM / quantity of manufactured product set on the BoM * quantity of manufactured product in the production order.)'"),
+ '(quantity of byproduct set on the BoM / quantity of manufactured product set on the BoM * quantity of manufactured product in the production order.)'"),
'bom_id': fields.many2one('mrp.bom', 'BoM'),
}
_defaults={
@@ -59,7 +59,7 @@ class mrp_bom(osv.osv):
_inherit='mrp.bom'
_columns={
- 'sub_products':fields.one2many('mrp.subproduct', 'bom_id', 'sub_products'),
+ 'sub_products':fields.one2many('mrp.subproduct', 'bom_id', 'Byproducts'),
}
mrp_bom()
@@ -106,7 +106,7 @@ class mrp_production(osv.osv):
def _get_subproduct_factor(self, cr, uid, production_id, move_id=None, context=None):
"""Compute the factor to compute the qty of procucts to produce for the given production_id. By default,
it's always equal to the quantity encoded in the production order or the production wizard, but with
- the module mrp_subproduct installed it can differ for subproducts having type 'variable'.
+ the module mrp_byproduct installed it can differ for byproducts having type 'variable'.
:param production_id: ID of the mrp.order
:param move_id: ID of the stock move that needs to be produced. Identify the product to produce.
:return: The factor to apply to the quantity that we should produce for the given production order and stock move.
diff --git a/addons/mrp_subproduct/mrp_subproduct_view.xml b/addons/mrp_byproduct/mrp_byproduct_view.xml
similarity index 86%
rename from addons/mrp_subproduct/mrp_subproduct_view.xml
rename to addons/mrp_byproduct/mrp_byproduct_view.xml
index 94da87ef0de..754d7ef1b34 100644
--- a/addons/mrp_subproduct/mrp_subproduct_view.xml
+++ b/addons/mrp_byproduct/mrp_byproduct_view.xml
@@ -7,15 +7,15 @@
-
+
-
+
-
-
+
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 9a264c33699fae73e8d9fa139ac4df668e480910 Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Mon, 8 Oct 2012 16:11:51 +0530
Subject: [PATCH 046/372] [IMP] There is no consistency throughout OpenERP with
'Source document', 'Source', 'Origin'. It should always be 'Source document'.
bzr revid: mdi@tinyerp.com-20121008104151-opvu1mig2xbxxpli
---
addons/account/account_invoice.py | 2 +-
addons/event/event.py | 2 +-
addons/purchase_requisition/purchase_requisition.py | 2 +-
addons/stock/stock.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index c543b493831..1df4032a3a4 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -1359,7 +1359,7 @@ class account_invoice_line(osv.osv):
_description = "Invoice Line"
_columns = {
'name': fields.text('Description', required=True),
- 'origin': fields.char('Source', size=256, help="Reference of the document that produced this invoice."),
+ 'origin': fields.char('Source Document', size=256, help="Reference of the document that produced this invoice."),
'invoice_id': fields.many2one('account.invoice', 'Invoice Reference', ondelete='cascade', select=True),
'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null'),
'product_id': fields.many2one('product.product', 'Product', ondelete='set null'),
diff --git a/addons/event/event.py b/addons/event/event.py
index d86fd92d054..e7b562f4c2e 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -327,7 +327,7 @@ class event_registration(osv.osv):
_inherit = ['ir.needaction_mixin','mail.thread']
_columns = {
'id': fields.integer('ID'),
- 'origin': fields.char('Source', size=124,readonly=True,help="Name of the sale order which create the registration"),
+ 'origin': fields.char('Source Document', size=124,readonly=True,help="Name of the sale order which create the registration"),
'nb_register': fields.integer('Number of Participants', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'event_id': fields.many2one('event.event', 'Event', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}),
diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py
index 8954de6c1dc..ea2346d3aab 100644
--- a/addons/purchase_requisition/purchase_requisition.py
+++ b/addons/purchase_requisition/purchase_requisition.py
@@ -34,7 +34,7 @@ class purchase_requisition(osv.osv):
_inherit = ['mail.thread', 'ir.needaction_mixin']
_columns = {
'name': fields.char('Requisition Reference', size=32,required=True),
- 'origin': fields.char('Source', size=32),
+ 'origin': fields.char('Source Document', size=32),
'date_start': fields.datetime('Requisition Date'),
'date_end': fields.datetime('Requisition Deadline'),
'user_id': fields.many2one('res.users', 'Responsible'),
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 91e300eaa07..25a05a1f458 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -627,7 +627,7 @@ class stock_picking(osv.osv):
_columns = {
'name': fields.char('Reference', size=64, select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
- 'origin': fields.char('Source', size=64, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Reference of the document", select=True),
+ 'origin': fields.char('Source Document', size=64, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Reference of the document", select=True),
'backorder_id': fields.many2one('stock.picking', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], 'Shipping Type', required=True, select=True, readonly=True, help="Shipping type specify, goods coming in or going out."),
'note': fields.text('Notes', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
From 9c58413280ffa5bb8e75d3f449148471d8c54bbd Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Mon, 8 Oct 2012 16:19:35 +0530
Subject: [PATCH 047/372] [IMP] mrp : In manufacturing orders, 'Consumed
product' should have an 'S'.
bzr revid: mdi@tinyerp.com-20121008104935-pdeix1mw0do90z19
---
addons/mrp/mrp_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index abf0f823e5c..21d4bca9955 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -692,7 +692,7 @@
-
+
From 79b2eae9eb6b2b72cc5029c3ac087e3d293fafef Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Mon, 8 Oct 2012 16:22:22 +0530
Subject: [PATCH 048/372] [IMP]all : improve button string
bzr revid: mma@tinyerp.com-20121008105222-9n6sfk9xnerfwxgj
---
addons/base_vat/base_vat_view.xml | 2 +-
addons/project_gtd/project_gtd_view.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/base_vat/base_vat_view.xml b/addons/base_vat/base_vat_view.xml
index ec98b7922de..6d15099dc5a 100644
--- a/addons/base_vat/base_vat_view.xml
+++ b/addons/base_vat/base_vat_view.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/addons/project_gtd/project_gtd_view.xml b/addons/project_gtd/project_gtd_view.xml
index fdb8ae8495c..da9ffebc0d4 100644
--- a/addons/project_gtd/project_gtd_view.xml
+++ b/addons/project_gtd/project_gtd_view.xml
@@ -93,7 +93,7 @@
-
+
From 9487c2d9ba9381e04c677d861864e29895f48e8e Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Mon, 8 Oct 2012 16:35:49 +0530
Subject: [PATCH 049/372] [IMP]account : improve string
bzr revid: mma@tinyerp.com-20121008110549-zt946y9190avok3d
---
addons/account/account_invoice.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index c543b493831..71f37180848 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -206,7 +206,7 @@ class account_invoice(osv.osv):
('open','Open'),
('paid','Paid'),
('cancel','Cancelled'),
- ],'State', select=True, readonly=True,
+ ],'Status', select=True, readonly=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Invoice. \
\n* The \'Pro-forma\' when invoice is in Pro-forma state,invoice does not have an invoice number. \
\n* The \'Open\' state is used when user create invoice,a invoice number is generated.Its in open state till user does not pay invoice. \
From 0f2c1ef0df4cc84089a5b4982965065c3ec6e242 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Mon, 8 Oct 2012 18:50:14 +0530
Subject: [PATCH 050/372] [IMP]purchase,stock : improve string
bzr revid: mma@tinyerp.com-20121008132014-iv7zc5ux9raopaip
---
addons/purchase/purchase_view.xml | 6 +++---
addons/stock/stock.py | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 7702d182b09..fe69c952f4a 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -82,7 +82,7 @@
action="base.action_partner_supplier_form" sequence="15"/>
-
@@ -262,7 +262,7 @@
-
+
@@ -356,7 +356,7 @@
-
+
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 91e300eaa07..7538f76cebd 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -627,7 +627,7 @@ class stock_picking(osv.osv):
_columns = {
'name': fields.char('Reference', size=64, select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
- 'origin': fields.char('Source', size=64, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Reference of the document", select=True),
+ 'origin': fields.char('Source Document', size=64, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Reference of the document", select=True),
'backorder_id': fields.many2one('stock.picking', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], 'Shipping Type', required=True, select=True, readonly=True, help="Shipping type specify, goods coming in or going out."),
'note': fields.text('Notes', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
@@ -653,8 +653,8 @@ class stock_picking(osv.osv):
* Cancelled: has been cancelled, can't be confirmed anymore"""
),
'min_date': fields.function(get_min_max_date, fnct_inv=_set_minimum_date, multi="min_max_date",
- store=True, type='datetime', string='Scheduled Date', select=1, help="Scheduled date for the shipment to be processed"),
- 'date': fields.datetime('Date', help="Creation date, usually the date of the order.", select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
+ store=True, type='datetime', string='Scheduled Time', select=1, help="Scheduled date for the shipment to be processed"),
+ 'date': fields.datetime('Time', help="Creation date, usually the date of the order.", select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'date_done': fields.datetime('Date Done', help="Date of Completion", states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'max_date': fields.function(get_min_max_date, fnct_inv=_set_maximum_date, multi="min_max_date",
store=True, type='datetime', string='Max. Expected Date', select=2),
@@ -3047,7 +3047,7 @@ class stock_picking_in(osv.osv):
('assigned', 'Ready to Receive'),
('done', 'Received'),
('cancel', 'Cancelled'),],
- 'State', readonly=True, select=True,
+ 'Status', readonly=True, select=True,
help="""* Draft: not confirmed yet and will not be scheduled until confirmed\n
* Waiting Another Operation: waiting for another move to proceed before it becomes automatically available (e.g. in Make-To-Order flows)\n
* Waiting Availability: still waiting for the availability of products\n
From 82138688a2d27337fc30d0143d00bd7275754e00 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Mon, 8 Oct 2012 21:16:47 +0530
Subject: [PATCH 051/372] [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 052/372] [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 d430a8976dc3e86efb74a97c76f93a90d49b646d Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Tue, 9 Oct 2012 10:51:31 +0530
Subject: [PATCH 053/372] [IMP]purchase: improve menu string
bzr revid: mma@tinyerp.com-20121009052131-vwy6zp7xdtqv0780
---
addons/stock/stock_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index f5320a963c7..0f9cd0c817b 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -1482,7 +1482,7 @@
- Receive Products
+ Incoming Productsstock.moveir.actions.act_windowform
From d12acd17a0b5b82ed8a14432f5569f6393bed93e Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Tue, 9 Oct 2012 11:00:02 +0530
Subject: [PATCH 054/372] [IMP]membership : improve string
bzr revid: mma@tinyerp.com-20121009053002-188wqmud5wtywxjy
---
addons/membership/membership.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/membership/membership.py b/addons/membership/membership.py
index f3192948afc..c5e2ed3a0bc 100644
--- a/addons/membership/membership.py
+++ b/addons/membership/membership.py
@@ -150,7 +150,7 @@ class membership_line(osv.osv):
'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line', readonly=True),
'account_invoice_id': fields.related('account_invoice_line', 'invoice_id', type='many2one', relation='account.invoice', string='Invoice', readonly=True),
'state': fields.function(_state,
- string='Membership State', type='selection',
+ string='Membership Status', type='selection',
selection=STATE, store = {
'account.invoice': (_get_membership_lines, ['state'], 10),
'res.partner': (_get_partners, ['membership_state'], 12),
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 055/372] [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.
From 97329f23bf87421d89ec7dfafed4c9f47164d8e9 Mon Sep 17 00:00:00 2001
From: "Nimesh (Open ERP)"
Date: Tue, 9 Oct 2012 11:20:44 +0530
Subject: [PATCH 056/372] [ADD] add oe_highlight class to save button.
bzr revid: nco@tinyerp.com-20121009055044-2g8qj43otkx4euht
---
openerp/addons/base/res/res_users_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openerp/addons/base/res/res_users_view.xml b/openerp/addons/base/res/res_users_view.xml
index 78579fc66df..f09866b76ab 100644
--- a/openerp/addons/base/res/res_users_view.xml
+++ b/openerp/addons/base/res/res_users_view.xml
@@ -214,7 +214,7 @@
From d9a27d19024333de53ca5d435e9c0fb5c6f2b9b9 Mon Sep 17 00:00:00 2001
From: "Nimesh (Open ERP)"
Date: Tue, 9 Oct 2012 11:22:23 +0530
Subject: [PATCH 057/372] [REMOVE] remove change password button.
bzr revid: nco@tinyerp.com-20121009055223-vflb9wxzo3nvw310
---
openerp/addons/base/res/res_users.py | 7 -------
openerp/addons/base/res/res_users_view.xml | 1 -
2 files changed, 8 deletions(-)
diff --git a/openerp/addons/base/res/res_users.py b/openerp/addons/base/res/res_users.py
index 8bd5c3a0179..59c60b23dfd 100644
--- a/openerp/addons/base/res/res_users.py
+++ b/openerp/addons/base/res/res_users.py
@@ -488,13 +488,6 @@ class res_users(osv.osv):
'tag': 'reload',
}
- def preference_change_password(self, cr, uid, ids, context=None):
- return {
- 'type': 'ir.actions.client',
- 'tag': 'change_password',
- 'target': 'new',
- }
-
def has_group(self, cr, uid, group_ext_id):
"""Checks whether user belongs to given group.
diff --git a/openerp/addons/base/res/res_users_view.xml b/openerp/addons/base/res/res_users_view.xml
index f09866b76ab..7c4988bd1f0 100644
--- a/openerp/addons/base/res/res_users_view.xml
+++ b/openerp/addons/base/res/res_users_view.xml
@@ -213,7 +213,6 @@
From b5f0bc1257a0b782ebe212f1d32625c50f6a9926 Mon Sep 17 00:00:00 2001
From: "Nimesh (Open ERP)"
Date: Tue, 9 Oct 2012 11:46:40 +0530
Subject: [PATCH 059/372] [IMP] remove second blank option in laguage selection
in prefrences.
bzr revid: nco@tinyerp.com-20121009061640-dpf3q4m5ubdr5sch
---
openerp/addons/base/res/res_partner.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py
index c5c95276b16..0c0e3398f88 100644
--- a/openerp/addons/base/res/res_partner.py
+++ b/openerp/addons/base/res/res_partner.py
@@ -157,7 +157,7 @@ def _lang_get(self, cr, uid, context=None):
lang_pool = self.pool.get('res.lang')
ids = lang_pool.search(cr, uid, [], context=context)
res = lang_pool.read(cr, uid, ids, ['code', 'name'], context)
- return [(r['code'], r['name']) for r in res] + [('','')]
+ return [(r['code'], r['name']) for r in res]
POSTAL_ADDRESS_FIELDS = ('street', 'street2', 'zip', 'city', 'state_id', 'country_id')
ADDRESS_FIELDS = POSTAL_ADDRESS_FIELDS + ('email', 'phone', 'fax', 'mobile', 'website', 'ref', 'lang')
From 7edf7aa42071d658d4f960493819f54ee57281be Mon Sep 17 00:00:00 2001
From: "pankita shah (Open ERP)"
Date: Tue, 9 Oct 2012 12:08:14 +0530
Subject: [PATCH 060/372] [IMP] hide label when click in 'based on' except
'other pricelist' and improve 'Other Pricelist'
bzr revid: shp@tinyerp.com-20121009063814-qm2kh936zfssojck
---
addons/product/pricelist.py | 2 +-
addons/product/pricelist_view.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py
index 3bc6e6d6814..f5c69c7acf7 100644
--- a/addons/product/pricelist.py
+++ b/addons/product/pricelist.py
@@ -410,7 +410,7 @@ class product_pricelist_item(osv.osv):
'min_quantity': fields.integer('Min. Quantity', required=True, help="The rule only applies if the partner buys/sells equal to or more than this quantity."),
'sequence': fields.integer('Sequence', required=True, help="Gives the order in which the pricelist items will be checked. The evaluation gives highest priority to lowest sequence and stops as soon as a matching item is found."),
'base': fields.selection(_price_field_get, 'Based on', required=True, size=-1, help="The mode for computing the price for this rule."),
- 'base_pricelist_id': fields.many2one('product.pricelist', 'If Other Pricelist'),
+ 'base_pricelist_id': fields.many2one('product.pricelist', 'Other Pricelist'),
'price_surcharge': fields.float('Price Surcharge',
digits_compute= dp.get_precision('Product Price'), help='Specify the fixed amount to add or substract(if negative) to the amount calculated with the discount.'),
diff --git a/addons/product/pricelist_view.xml b/addons/product/pricelist_view.xml
index 01cb4dc54eb..a1b996b891b 100644
--- a/addons/product/pricelist_view.xml
+++ b/addons/product/pricelist_view.xml
@@ -92,7 +92,7 @@
-
+
From 917ae0ee8548a8749421b858dc267dd78def7cd8 Mon Sep 17 00:00:00 2001
From: "pankita shah (Open ERP)"
Date: Tue, 9 Oct 2012 12:32:38 +0530
Subject: [PATCH 061/372] [IMP] opportunity to the right of contact
bzr revid: shp@tinyerp.com-20121009070238-vyuen9nb8551p2ph
---
addons/crm/crm_phonecall_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml
index c610913febf..f1308556779 100644
--- a/addons/crm/crm_phonecall_view.xml
+++ b/addons/crm/crm_phonecall_view.xml
@@ -140,12 +140,12 @@
+
-
From f44f548f066e98d62b05ec762e46997d85a7a932 Mon Sep 17 00:00:00 2001
From: Vishmita
Date: Tue, 9 Oct 2012 12:49:54 +0530
Subject: [PATCH 062/372] [IMP]replace callenabled for on_write
bzr revid: vja@tinyerp.com-20121009071954-jojvmfs7cjuc0elg
---
addons/web_diagram/static/src/js/diagram.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/web_diagram/static/src/js/diagram.js b/addons/web_diagram/static/src/js/diagram.js
index 508aeb30563..35ce3277116 100644
--- a/addons/web_diagram/static/src/js/diagram.js
+++ b/addons/web_diagram/static/src/js/diagram.js
@@ -240,9 +240,9 @@ instance.web.DiagramView = instance.web.View.extend({
}
);
- pop.on_write.add(function() {
+ pop.on('on_write_complete',self,function() {
self.dataset.read_index(_.keys(self.fields_view.fields)).pipe(self.on_diagram_loaded);
- });
+ });
var form_fields = [self.parent_field];
var form_controller = pop.view_form;
@@ -303,7 +303,7 @@ instance.web.DiagramView = instance.web.View.extend({
title: _t("Open: ") + title
}
);
- pop.on_write.add(function() {
+ pop.on('on_write_complete',self,function() {
self.dataset.read_index(_.keys(self.fields_view.fields)).pipe(self.on_diagram_loaded);
});
},
From e84b3f24932fee41e00ba3605cab3b043351d2f4 Mon Sep 17 00:00:00 2001
From: "Harry (OpenERP)"
Date: Tue, 9 Oct 2012 13:23:40 +0530
Subject: [PATCH 063/372] [IMP] crm: demo data of action rule
bzr revid: hmo@tinyerp.com-20121009075340-ogm51x9z2irmzijt
---
addons/base_action_rule/base_action_rule.py | 14 ++--
.../base_action_rule_view.xml | 3 +-
addons/crm/__openerp__.py | 1 +
addons/crm/crm_action_rule_demo.xml | 73 +++++++++++++++++++
4 files changed, 85 insertions(+), 6 deletions(-)
create mode 100644 addons/crm/crm_action_rule_demo.xml
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index ebc4c02a938..8b56bb9c909 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -63,6 +63,7 @@ class base_action_rule(osv.osv):
_columns = {
'name': fields.char('Rule Name', size=64, required=True),
'model_id': fields.many2one('ir.model', 'Related Document Model', required=True, domain=[('osv_memory','=', False)]),
+ 'model': fields.related('model_id', 'model', type="char", size=256, string='Model'),
'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."),
@@ -71,6 +72,7 @@ when displaying a list of rules."),
'trg_date_type': fields.selection([
('none', 'None'),
('create', 'Creation Date'),
+ ('write', 'Last Modified Date'),
('action_last', 'Last Action Date'),
('date', 'Date'),
('deadline', 'Deadline'),
@@ -93,15 +95,15 @@ 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.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)]
+ 'server_action_ids': fields.one2many('ir.actions.server', 'action_rule_id', 'Server Action', help="Define Server actions.\neg:Email Reminders, Call Object Service, etc.."), #TODO: set domain [('model_id','=',model_id)]
+ 'filter_id':fields.many2one('ir.filters', 'Filter', required=False), #TODO: set domain [('model_id','=',model_id.model)]
'last_run': fields.datetime('Last Run', readonly=1),
}
_defaults = {
- 'active': lambda *a: True,
- 'trg_date_type': lambda *a: 'none',
- 'trg_date_range_type': lambda *a: 'day',
+ 'active': True,
+ 'trg_date_type': 'none',
+ 'trg_date_range_type': 'day',
}
_order = 'sequence'
@@ -200,6 +202,8 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
base = False
if rule.trg_date_type=='create' and hasattr(obj, 'create_date'):
base = obj.create_date
+ elif rule.trg_date_type=='write' and hasattr(obj, 'write_date'):
+ base = obj.write_date
elif (rule.trg_date_type=='action_last'
and hasattr(obj, 'create_date')):
if hasattr(obj, 'date_action_last') and obj.date_action_last:
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index 2bffbf5b92c..64b1dd4fe32 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -15,7 +15,8 @@
-
+
+
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py
index dd36aa19041..ddeded0926e 100644
--- a/addons/crm/__openerp__.py
+++ b/addons/crm/__openerp__.py
@@ -107,6 +107,7 @@ Dashboard for CRM will include:
'crm_demo.xml',
'crm_lead_demo.xml',
'crm_phonecall_demo.xml',
+ 'crm_action_rule_demo.xml',
],
'test': [
'test/process/communication_with_customer.yml',
diff --git a/addons/crm/crm_action_rule_demo.xml b/addons/crm/crm_action_rule_demo.xml
new file mode 100644
index 00000000000..e1cafbc76a6
--- /dev/null
+++ b/addons/crm/crm_action_rule_demo.xml
@@ -0,0 +1,73 @@
+
+
+
+
+
+ Reminder to User
+
+ True
+ ir.actions.server
+ email
+ object.user_id.email
+ Reminder on Lead: [[object.name ]] of [[object.partner_id.name]]
+ Hello [[object.user_id.name]],
+can you check following lead, it's inactive since 5 days ?
+
+Lead Id: [[object.id ]]
+Customer: [[object.partner_id.name]]
+
+ [[object.description]]
+
+Thanks,
+
+
+
+
+ Reminder to Customer
+
+ True
+ ir.actions.server
+ email
+ object.email_from
+ Reminder on Lead: [[object.name ]]
+ Hello [[object.partner_id.name]],
+your following lead inactive since 5 days.
+
+Lead Id: [[object.id ]]
+Customer: [[object.partner_id.name]]
+
+ [[object.description]]
+
+Thanks,
+
+
+
+
+
+ Set Auto Reminder on leads which are inactive since 5 days.
+
+ 1
+ write
+ 5
+ day
+
+
+
+
+ Filter on leads which come from USA.
+ crm.lead
+ [('country_id','=','United States')]
+
+
+
+ Set Auto Followers on leads which are come from USA.
+
+ 2
+ urgent.*
+
+
+
+
+
+
+
From 91b257b0e8cd27aa63ab86cf498b8c67ae1f4b47 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Tue, 9 Oct 2012 14:31:58 +0530
Subject: [PATCH 064/372] [IMP]event : improve kanban view tickets condition
bzr revid: mma@tinyerp.com-20121009090158-btfq6ypk6f7wio41
---
addons/event/event_view.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index e31e3c3d0cf..5f14c354f53 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -271,8 +271,8 @@
@ Organized by Only
- No ticket available.
-
+ No ticket available.
+ tickets
From 439e737cefa6e56c7f790af7e16b80b7858fc3e5 Mon Sep 17 00:00:00 2001
From: "pankita shah (Open ERP)"
Date: Tue, 9 Oct 2012 15:33:40 +0530
Subject: [PATCH 065/372] [IMP] Units of Measure Category should not be visible
bzr revid: shp@tinyerp.com-20121009100340-8g5ux8g58f53ufmp
---
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..2d0e61c3364 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -527,7 +527,7 @@
-
+
product.ul.form.view
From 76d93f251e679c14ab8d8d9a2a1b1a90f1961c06 Mon Sep 17 00:00:00 2001
From: "Harry (OpenERP)"
Date: Tue, 9 Oct 2012 16:13:14 +0530
Subject: [PATCH 066/372] [IMP] base_action_rule: clean _check function and
demo data.
bzr revid: hmo@tinyerp.com-20121009104314-ers6tznkwiyeb3v1
---
addons/base_action_rule/base_action_rule.py | 52 ++++++++++-----------
addons/crm/crm_action_rule.py | 5 +-
addons/crm/crm_action_rule_demo.xml | 13 ++++--
3 files changed, 37 insertions(+), 33 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index 8b56bb9c909..d749415f0d0 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -184,20 +184,24 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
"""
This Function is call by scheduler.
"""
- rule_pool = self.pool.get('base.action.rule')
- rule_ids = rule_pool.search(cr, uid, [], context=context)
+ rule_ids = self.search(cr, uid, [], context=context)
self._register_hook(cr, uid, rule_ids, context=context)
-
- rules = self.browse(cr, uid, rule_ids, context=context)
- for rule in rules:
+ if context is None:
+ context = {}
+ for rule in self.browse(cr, uid, rule_ids, context=context):
model = rule.model_id.model
model_pool = self.pool.get(model)
last_run = False
if rule.last_run:
last_run = get_datetime(rule.last_run)
now = datetime.now()
- for obj_id in model_pool.search(cr, uid, [], context=context):
- obj = model_pool.browse(cr, uid, obj_id, context=context)
+ ctx = dict(context)
+ if rule.filter_id and rule.model_id.model == rule.filter_id.model_id:
+ ctx.update(eval(rule.filter_id.context))
+ obj_ids = model_pool.search(cr, uid, eval(rule.filter_id.domain), context=ctx)
+ else:
+ obj_ids = model_pool.search(cr, uid, [], context=ctx)
+ for obj in model_pool.browse(cr, uid, obj_ids, context=ctx):
# Calculate when this action should next occur for this object
base = False
if rule.trg_date_type=='create' and hasattr(obj, 'create_date'):
@@ -229,23 +233,21 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
delay = fnct[rule.trg_date_range_type](rule.trg_date_range)
action_date = base + delay
if (not last_run or (last_run <= action_date < now)):
- self._action(cr, uid, [rule.id], [obj], context=context)
- rule_pool.write(cr, uid, [rule.id], {'last_run': now},
- context=context)
+ try:
+ self._action(cr, uid, rule, obj, context=ctx)
+ self.write(cr, uid, [rule.id], {'last_run': now}, context=context)
+ except Exception, e:
+ import traceback
+ print traceback.format_exc()
+
+
def do_check(self, cr, uid, action, obj, context=None):
""" check Action """
if context is None:
context = {}
ok = True
- if action.filter_id:
- if action.model_id.model == action.filter_id.model_id:
- context.update(eval(action.filter_id.context))
- obj_ids = obj._table.search(cr, uid, eval(action.filter_id.domain), context=context)
- if not obj.id in obj_ids:
- ok = False
- else:
- ok = False
+
if getattr(obj, 'user_id', False):
ok = ok and (not action.trg_user_id.id or action.trg_user_id.id==obj.user_id.id)
if getattr(obj, 'partner_id', False):
@@ -276,14 +278,15 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
ok = ok and regex_n
return ok
- def do_action(self, cr, uid, action, model_obj, obj, context=None):
+ def do_action(self, cr, uid, action, obj, context=None):
""" Do Action """
if context is None:
context = {}
ctx = dict(context)
+ model_obj = self.pool.get(action.model_id.model)
action_server_obj = self.pool.get('ir.actions.server')
if action.server_action_ids:
- ctx.update({'active_id':obj.id, 'active_ids':[obj.id]})
+ ctx.update({'active_model': action.model_id.model, '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 = {}
@@ -305,7 +308,7 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
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):
+ def _action(self, cr, uid, action, obj, scrit=None, context=None):
""" Do Action """
if context is None:
context = {}
@@ -314,11 +317,8 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
if not scrit:
scrit = []
- for action in self.browse(cr, uid, ids, context=context):
- for obj in objects:
- if self.do_check(cr, uid, action, obj, context=context):
- model_obj = self.pool.get(action.model_id.model)
- self.do_action(cr, uid, action, model_obj, obj, context=context)
+ if self.do_check(cr, uid, action, obj, context=context):
+ self.do_action(cr, uid, action, obj, context=context)
context.update({'action': False})
return True
diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py
index 49af2f74eeb..c923d37aa28 100644
--- a/addons/crm/crm_action_rule.py
+++ b/addons/crm/crm_action_rule.py
@@ -71,8 +71,9 @@ class base_action_rule(osv.osv):
ok = ok and res_count
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)
+ def do_action(self, cr, uid, action, obj, context=None):
+ res = super(base_action_rule, self).do_action(cr, uid, action, obj, context=context)
+ model_obj = self.pool.get(action.model_id.model)
write = {}
if hasattr(action, 'act_section_id') and action.act_section_id:
write['section_id'] = action.act_section_id.id
diff --git a/addons/crm/crm_action_rule_demo.xml b/addons/crm/crm_action_rule_demo.xml
index e1cafbc76a6..4adefee407d 100644
--- a/addons/crm/crm_action_rule_demo.xml
+++ b/addons/crm/crm_action_rule_demo.xml
@@ -9,11 +9,11 @@
ir.actions.serveremailobject.user_id.email
- Reminder on Lead: [[object.name ]] of [[object.partner_id.name]]
+ Reminder on Lead: [[object.id ]] of [[object.partner_id.name]]Hello [[object.user_id.name]],
can you check following lead, it's inactive since 5 days ?
-Lead Id: [[object.id ]]
+Lead: [[object.id ]]
Customer: [[object.partner_id.name]]
[[object.description]]
@@ -29,11 +29,11 @@ Thanks,
ir.actions.serveremailobject.email_from
- Reminder on Lead: [[object.name ]]
+ Reminder on Lead: [[object.id ]]Hello [[object.partner_id.name]],
your following lead inactive since 5 days.
-Lead Id: [[object.id ]]
+Lead: [[object.id ]]
Customer: [[object.partner_id.name]]
[[object.description]]
@@ -60,7 +60,7 @@ Thanks,
- Set Auto Followers on leads which are come from USA.
+ Set Auto Followers on leads which are urgent and come from USA.2urgent.*
@@ -68,6 +68,9 @@ Thanks,
+ create
+ 0
+ minutes
From fbe1e7f913571f8dbbaddeceb5d877d09bc5f6df Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Tue, 9 Oct 2012 16:18:42 +0530
Subject: [PATCH 067/372] [FIX]: analytic account onchange problem.
bzr revid: atp@tinyerp.com-20121009104842-njdr868dtc4ly1w9
---
addons/analytic_user_function/analytic_user_function.py | 2 +-
addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py
index 9233845f7eb..7ac947981fc 100644
--- a/addons/analytic_user_function/analytic_user_function.py
+++ b/addons/analytic_user_function/analytic_user_function.py
@@ -65,7 +65,7 @@ class hr_analytic_timesheet(osv.osv):
return False
- def on_change_account_id(self, cr, uid, ids, account_id, user_id=False, unit_amount=0):
+ def on_change_account_id(self, cr, uid, ids, account_id, user_id, unit_amount=0):
res = {}
if not (account_id):
#avoid a useless call to super
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
index b752ade8da0..95fa39a6eda 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
@@ -50,7 +50,7 @@
-
+
@@ -72,7 +72,7 @@
-
+
From 2bacc70085275b15b74a2b84038e1571d6f01367 Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Tue, 9 Oct 2012 16:41:24 +0530
Subject: [PATCH 068/372] [IMP] project_timesheet : Improved the code.
bzr revid: mdi@tinyerp.com-20121009111124-sdii9no8mui4zopz
---
addons/project_timesheet/project_timesheet.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py
index 6125d59c621..c6513e75942 100644
--- a/addons/project_timesheet/project_timesheet.py
+++ b/addons/project_timesheet/project_timesheet.py
@@ -62,8 +62,8 @@ class project_project(osv.osv):
# if the user do not have access rights on the partner
pass
- result = mod_obj.get_object_reference(cr, uid, 'hr_timesheet', 'act_hr_timesheet_line_evry1_all_form')
- id = result and result[1] or False
+ res = mod_obj.get_object_reference(cr, uid, 'hr_timesheet', 'act_hr_timesheet_line_evry1_all_form')
+ id = res and res[1] or False
result = act_obj.read(cr, uid, [id], context=context)[0]
result['name'] = _('Timesheets')
result['context'] = view_context
From 257b3974b55059e693b83eafb62f4e5ad8454669 Mon Sep 17 00:00:00 2001
From: "Harry (OpenERP)"
Date: Tue, 9 Oct 2012 16:42:21 +0530
Subject: [PATCH 069/372] [FIX] base_action_rule: argument in _action
bzr revid: hmo@tinyerp.com-20121009111221-dris93pcszjj11es
---
addons/base_action_rule/base_action_rule.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index d749415f0d0..9440716815c 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -234,7 +234,7 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
action_date = base + delay
if (not last_run or (last_run <= action_date < now)):
try:
- self._action(cr, uid, rule, obj, context=ctx)
+ self._action(cr, uid, [rule.id], obj, context=ctx)
self.write(cr, uid, [rule.id], {'last_run': now}, context=context)
except Exception, e:
import traceback
@@ -308,7 +308,7 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
model_obj.message_subscribe(cr, uid, [obj.id], new_followers, context=context)
return True
- def _action(self, cr, uid, action, obj, scrit=None, context=None):
+ def _action(self, cr, uid, ids, objects, scrit=None, context=None):
""" Do Action """
if context is None:
context = {}
@@ -316,9 +316,12 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
context.update({'action': True})
if not scrit:
scrit = []
-
- if self.do_check(cr, uid, action, obj, context=context):
- self.do_action(cr, uid, action, obj, context=context)
+ if not isinstance(objects, list):
+ objects = [objects]
+ for action in self.browse(cr, uid, ids, context=context):
+ for obj in objects:
+ if self.do_check(cr, uid, action, obj, context=context):
+ self.do_action(cr, uid, action, obj, context=context)
context.update({'action': False})
return True
From 2ac0273835c537f650f7bb7541d0baf99f2b730b Mon Sep 17 00:00:00 2001
From: "pankita shah (Open ERP)"
Date: Tue, 9 Oct 2012 17:19:52 +0530
Subject: [PATCH 070/372] [IMP] Packaging field
bzr revid: shp@tinyerp.com-20121009114952-2jlsxqi9popw12ny
---
addons/sale_stock/sale_stock_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/sale_stock/sale_stock_view.xml b/addons/sale_stock/sale_stock_view.xml
index 8962c21dc6e..c128bb9c565 100644
--- a/addons/sale_stock/sale_stock_view.xml
+++ b/addons/sale_stock/sale_stock_view.xml
@@ -92,7 +92,7 @@
groups="sale.group_mrp_properties"/>
-
+
From 4b8898028283e0f1893bce3e97e129d4671de602 Mon Sep 17 00:00:00 2001
From: "Jalpesh Patel (OpenERP)"
Date: Tue, 9 Oct 2012 17:29:28 +0530
Subject: [PATCH 071/372] [IMP]hr dashboard and fix problem of creating
timesheet lines (user is employee + partner manager + sales manager)
bzr revid: pja@tinyerp.com-20121009115928-t7cnt9pox8hy2cs6
---
.../board_hr_recruitment_statistical_view.xml | 7 ++++---
addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 13 ++++++++-----
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/addons/hr_recruitment/board_hr_recruitment_statistical_view.xml b/addons/hr_recruitment/board_hr_recruitment_statistical_view.xml
index 461ccdf0bbe..73168d27927 100644
--- a/addons/hr_recruitment/board_hr_recruitment_statistical_view.xml
+++ b/addons/hr_recruitment/board_hr_recruitment_statistical_view.xml
@@ -6,12 +6,13 @@
applicants.status.treehr.applicant
-
+
-
+
+
@@ -32,7 +33,7 @@
-
+
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index b9574b553d1..f2f1d2a0074 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -129,15 +129,18 @@ class account_analytic_line(osv.osv):
def _default_journal(self, cr, uid, context=None):
proxy = self.pool.get('hr.employee')
record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context)
- employee = proxy.browse(cr, uid, record_ids[0], context=context)
- return employee.journal_id and employee.journal_id.id or False
+ if record_ids:
+ employee = proxy.browse(cr, uid, record_ids[0], context=context)
+ return employee.journal_id and employee.journal_id.id or False
+ return False
def _default_general_account(self, cr, uid, context=None):
proxy = self.pool.get('hr.employee')
record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context)
- employee = proxy.browse(cr, uid, record_ids[0], context=context)
- if employee.product_id and employee.product_id.property_account_income:
- return employee.product_id.property_account_income.id
+ if record_ids:
+ employee = proxy.browse(cr, uid, record_ids[0], context=context)
+ if employee.product_id and employee.product_id.property_account_income:
+ return employee.product_id.property_account_income.id
return False
_defaults = {
From 239690244363afd54eeea1c1f776f2dd113d54b2 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Tue, 9 Oct 2012 17:34:17 +0530
Subject: [PATCH 072/372] [IMP] improve code
bzr revid: fka@tinyerp.com-20121009120417-ncg1zoqfnfkyi8cx
---
addons/survey/wizard/survey_answer.py | 43 +++++++++++++--------------
1 file changed, 20 insertions(+), 23 deletions(-)
diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py
index a75a08cc974..7e1417ecdb7 100644
--- a/addons/survey/wizard/survey_answer.py
+++ b/addons/survey/wizard/survey_answer.py
@@ -112,29 +112,26 @@ class survey_question_wiz(osv.osv_memory):
flag = False
fields = {}
if sur_name_read.page == "next" or sur_name_rec.page_no == -1:
- if total_pages:
- if total_pages > sur_name_rec.page_no + 1:
- if ((context.has_key('active') and not context.get('active', False)) \
- or not context.has_key('active')) and not sur_name_rec.page_no + 1:
- if sur_rec.state != "open" :
- raise osv.except_osv(_('Warning!'),_("You cannot answer because the survey is not open."))
- cr.execute('select count(id) from survey_history where user_id=%s\
- and survey_id=%s', (uid,survey_id))
- res = cr.fetchone()[0]
- user_limit = survey_obj.browse(cr, uid, survey_id)
- user_limit = user_limit.response_user
- if user_limit and res >= user_limit:
- raise osv.except_osv(_('Warning!'),_("You cannot answer this survey more than %s times.") % (user_limit))
-
- if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey and not sur_name_rec.page_no + 1:
- survey_obj.write(cr, uid, survey_id, {'state':'close', 'date_close':strftime("%Y-%m-%d %H:%M:%S")})
-
- p_id = p_id[sur_name_rec.page_no + 1]
- surv_name_wiz.write(cr, uid, [context['sur_name_id'],], {'page_no' : sur_name_rec.page_no + 1})
- flag = True
- page_number += 1
- else:
- raise osv.except_osv(_('Warning!'),_('This survey has no pages defined. Please define the pages first.'))
+ if total_pages > sur_name_rec.page_no + 1:
+ if ((context.has_key('active') and not context.get('active', False)) \
+ or not context.has_key('active')) and not sur_name_rec.page_no + 1:
+ if sur_rec.state != "open" :
+ raise osv.except_osv(_('Warning!'),_("You cannot answer because the survey is not open."))
+ cr.execute('select count(id) from survey_history where user_id=%s\
+ and survey_id=%s', (uid,survey_id))
+ res = cr.fetchone()[0]
+ user_limit = survey_obj.browse(cr, uid, survey_id)
+ user_limit = user_limit.response_user
+ if user_limit and res >= user_limit:
+ raise osv.except_osv(_('Warning!'),_("You cannot answer this survey more than %s times.") % (user_limit))
+
+ if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey and not sur_name_rec.page_no + 1:
+ survey_obj.write(cr, uid, survey_id, {'state':'close', 'date_close':strftime("%Y-%m-%d %H:%M:%S")})
+
+ p_id = p_id[sur_name_rec.page_no + 1]
+ surv_name_wiz.write(cr, uid, [context['sur_name_id'],], {'page_no' : sur_name_rec.page_no + 1})
+ flag = True
+ page_number += 1
if sur_name_rec.page_no > - 1:
pre_button = True
else:
From 1b319e527d7fdf7d617a438c3ff92441c1ef93ad Mon Sep 17 00:00:00 2001
From: "Harry (OpenERP)"
Date: Tue, 9 Oct 2012 17:47:12 +0530
Subject: [PATCH 073/372] [IMP] base_action_rule: improve demo data
bzr revid: hmo@tinyerp.com-20121009121712-r6to5oia4ikiutpi
---
addons/base_action_rule/base_action_rule.py | 6 ++++-
addons/crm/crm_action_rule_demo.xml | 25 +++++++++++++--------
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index 9440716815c..683a247c8d1 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -247,7 +247,11 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
if context is None:
context = {}
ok = True
-
+ if action.filter_id and action.model_id.model == action.filter_id.model_id:
+ ctx = dict(context)
+ ctx.update(eval(action.filter_id.context))
+ obj_ids = self.pool.get(action.model_id.model).search(cr, uid, eval(action.filter_id.domain), context=ctx)
+ ok = ok and obj.id in obj_ids
if getattr(obj, 'user_id', False):
ok = ok and (not action.trg_user_id.id or action.trg_user_id.id==obj.user_id.id)
if getattr(obj, 'partner_id', False):
diff --git a/addons/crm/crm_action_rule_demo.xml b/addons/crm/crm_action_rule_demo.xml
index 4adefee407d..85cb8de1ac9 100644
--- a/addons/crm/crm_action_rule_demo.xml
+++ b/addons/crm/crm_action_rule_demo.xml
@@ -9,17 +9,17 @@
ir.actions.serveremailobject.user_id.email
- Reminder on Lead: [[object.id ]] of [[object.partner_id.name]]
+ Reminder on Lead: [[object.id ]] [[object.partner_id and 'of ' +object.partner_id.name or '']]Hello [[object.user_id.name]],
-can you check following lead, it's inactive since 5 days ?
+can you check following lead, it's not open since 5 days ?
Lead: [[object.id ]]
-Customer: [[object.partner_id.name]]
+Description:
[[object.description]]
Thanks,
-
+
@@ -30,11 +30,11 @@ Thanks,
emailobject.email_fromReminder on Lead: [[object.id ]]
- Hello [[object.partner_id.name]],
-your following lead inactive since 5 days.
+ Hello [[object.partner_id and object.partner_id.name or '']],
+your following lead is not open since 5 days.
Lead: [[object.id ]]
-Customer: [[object.partner_id.name]]
+Description:
[[object.description]]
@@ -42,12 +42,19 @@ Thanks,
+
+ Filter on leads which are draft.
+ crm.lead
+ [('state','=','draft')]
+
+
- Set Auto Reminder on leads which are inactive since 5 days.
+ Set Auto Reminder on leads which are not open since 5 days.1
- write
+
+ create5day
From 5e4ddf78dacb9fa0349da31567b30b34f906a7c4 Mon Sep 17 00:00:00 2001
From: "Harry (OpenERP)"
Date: Tue, 9 Oct 2012 17:57:39 +0530
Subject: [PATCH 074/372] [IMP] base_action_rule: action rule view should in
sheet
bzr revid: hmo@tinyerp.com-20121009122739-89dolzmm73o1nar5
---
.../base_action_rule_view.xml | 100 +++++++++---------
1 file changed, 51 insertions(+), 49 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index 64b1dd4fe32..fe8ff9b181f 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -12,59 +12,61 @@
base.action.rule
From e16bd157d9bbe332aefd807a044949c451169cb6 Mon Sep 17 00:00:00 2001
From: "Nimesh (Open ERP)"
Date: Tue, 9 Oct 2012 18:39:43 +0530
Subject: [PATCH 075/372] [IMP] improve help.
bzr revid: nco@tinyerp.com-20121009130943-n4ru1qa5fdo1b84r
---
addons/portal_sale/portal_sale_view.xml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/addons/portal_sale/portal_sale_view.xml b/addons/portal_sale/portal_sale_view.xml
index 5786fbc52ad..6b25d87b791 100644
--- a/addons/portal_sale/portal_sale_view.xml
+++ b/addons/portal_sale/portal_sale_view.xml
@@ -13,7 +13,7 @@
tree,form,calendar,graph{"search_default_draft":1}
- You dont have any quotation.
+ You don't have any quotation.
@@ -23,7 +23,7 @@
tree,form,calendar,graph{"search_default_sales":1}
- You dont have any sale order.
+ You don't have any sale order.
@@ -34,7 +34,7 @@
[('type','=','out')]{'default_type': 'out', 'contact_display': 'partner_address'}
- You dont have any delivery order.
+ You don't have any delivery order.
@@ -55,7 +55,7 @@
[('type','=','out_invoice')]{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'}
- You dont have any invoice.
+ You don't have any invoice.
@@ -65,7 +65,7 @@
{'type':'receipt'}current
- You dont have any payment.
+ You don't have any payment.