diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index aa3bf57da31..066c5bee06c 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1620,8 +1620,6 @@
-
-
diff --git a/addons/account/board_account_demo.xml b/addons/account/board_account_demo.xml
index 59eb304691a..f2c6139dc48 100644
--- a/addons/account/board_account_demo.xml
+++ b/addons/account/board_account_demo.xml
@@ -1,10 +1,21 @@
+
+
-
+
diff --git a/addons/account/report/account_balance_landscape.rml b/addons/account/report/account_balance_landscape.rml
old mode 100755
new mode 100644
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index 448f2abaf6d..e3f1321d02f 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -18,8 +18,6 @@
-
-
@@ -29,6 +27,8 @@
+
+
@@ -57,31 +57,31 @@
-
-
-
-
+
+
+
+
-
-
-
+
+
+
@@ -89,14 +89,14 @@
+ string="My Invoices"
+ help="My Invoices"
+ domain="[('user_id','=',uid)]"/>
-
-
+
+
-
+
@@ -111,9 +111,9 @@
-
-
-
+
+
+
@@ -139,11 +139,19 @@
account.invoice.report
form
tree,graph
- {'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}
+ {'search_default_month':1,'search_default_product':1,'group_by_no_leaf':1,'group_by':[]}
+
+
diff --git a/addons/account/report/compare_account_balance.rml b/addons/account/report/compare_account_balance.rml
old mode 100755
new mode 100644
diff --git a/addons/account/report/voucher_print.py b/addons/account/report/voucher_print.py
old mode 100755
new mode 100644
diff --git a/addons/account/report/voucher_print.rml b/addons/account/report/voucher_print.rml
old mode 100755
new mode 100644
diff --git a/addons/analytic/project.py b/addons/analytic/project.py
index f52dd23caa0..77a881744bc 100644
--- a/addons/analytic/project.py
+++ b/addons/analytic/project.py
@@ -153,13 +153,15 @@ class account_analytic_account(osv.osv):
def name_get(self, cr, uid, ids, context={}):
if not len(ids):
return []
- reads = self.read(cr, uid, ids, ['name','parent_id'], context)
res = []
- for record in reads:
- name = record['name']
- if record['parent_id']:
- name = record['parent_id'][1]+' / '+name
- res.append((record['id'], name))
+ for account in self.browse(cr, uid, ids, context=context):
+ data = []
+ acc = account
+ while acc:
+ data.insert(0, acc.name)
+ acc = acc.parent_id
+ data = ' / '.join(data)
+ res.append((account.id, data))
return res
def _complete_name_calc(self, cr, uid, ids, prop, unknow_none, unknow_dict):
@@ -197,7 +199,7 @@ class account_analytic_account(osv.osv):
'date': fields.date('Date End'),
'company_id': fields.many2one('res.company', 'Company', required=True),
'company_currency_id': fields.function(_get_company_currency, method=True, type='many2one', relation='res.currency', string='Currency'),
- 'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,readonly=True,
+ 'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,
help='* When an account is created its in \'Draft\' state.\
\n* If any associated partner is there, it can be in \'Open\' state.\
\n* If any pending balance is there it can be in \'Pending\'. \
@@ -314,7 +316,7 @@ class account_analytic_line(osv.osv):
_columns = {
'name' : fields.char('Description', size=256, required=True),
- 'date' : fields.date('Date', required=True),
+ 'date' : fields.date('Date', required=True, select=1),
'amount' : fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price.'),
'unit_amount' : fields.float('Quantity', help='Specifies the amount of quantity to count.'),
'account_id' : fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True),
diff --git a/addons/auction/board_auction_demo.xml b/addons/auction/board_auction_demo.xml
index 1727d6a3522..f260f8bb1fc 100644
--- a/addons/auction/board_auction_demo.xml
+++ b/addons/auction/board_auction_demo.xml
@@ -2,6 +2,13 @@
+
+
+
+
+
+
+
diff --git a/addons/base_contact/base_contact_demo.xml b/addons/base_contact/base_contact_demo.xml
index 6acdd08cf14..2c76b1844e8 100644
--- a/addons/base_contact/base_contact_demo.xml
+++ b/addons/base_contact/base_contact_demo.xml
@@ -179,7 +179,7 @@
CTO
-
+
diff --git a/addons/crm/board_crm_view.xml b/addons/crm/board_crm_view.xml
index 69ca8e964e9..4729ab7283d 100644
--- a/addons/crm/board_crm_view.xml
+++ b/addons/crm/board_crm_view.xml
@@ -19,15 +19,16 @@
crm.lead
form
tree,form
-
+
[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]
+
crm.meeting
form
tree,form
- [('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]
+ [('user_id','=',uid),('state','!=','cancel'),('date','ilike',time.strftime("%Y-%m"))]
@@ -53,34 +54,28 @@
@@ -105,7 +100,5 @@
action="open_board_crm"
sequence="1"
id="menu_board_crm" icon="terp-graph"/>
-
-
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index feb49ba7ae7..c46519cdb97 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -118,20 +118,18 @@ class crm_case(object):
@param context: A standard dictionary for contextual values"""
if not context:
context = {}
-
s = self.get_stage_dict(cr, uid, ids, context=context)
section = self._name
+ stage = False
stage_pool = self.pool.get('crm.case.stage')
for case in self.browse(cr, uid, ids, context):
if section in s:
st = case.stage_id.id or False
if st in s[section]:
data = {'stage_id': s[section][st]}
- stage = stage_pool.browse(cr, uid, s[section][st], context=context)
- if stage.on_change:
- data.update({'probability': stage.probability})
+ stage = s[section][st]
self.write(cr, uid, [case.id], data)
- return True
+ return stage
def get_stage_dict(self, cr, uid, ids, context=None):
"""This function gives dictionary for stage according to stage levels
@@ -174,9 +172,10 @@ class crm_case(object):
s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
if st in s[section]:
data = {'stage_id': s[section][st]}
- stage = stage_pool.browse(cr, uid, s[section][st], context=context)
- if stage.on_change:
- data.update({'probability': stage.probability})
+ if s[section][st]:
+ stage = stage_pool.browse(cr, uid, s[section][st], context=context)
+ if stage.on_change:
+ data.update({'probability': stage.probability})
self.write(cr, uid, [case.id], data)
return True
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 2700581d6cc..491784682f2 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -120,8 +120,8 @@ and users by email"),
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]"),
'partner_name': fields.char("Partner Name", size=64),
- 'optin': fields.selection([('yes','Yes'),('no','No'),('unknown','/')],'Opt-In'),
- 'optout': fields.selection([('yes','Yes'),('no','No'),('unknown','/')],'Opt-Out'),
+ 'optin': fields.boolean('Opt-In'),
+ 'optout': fields.boolean('Opt-Out'),
'type':fields.selection([
('lead','Lead'),
('opportunity','Opportunity'),
@@ -153,8 +153,6 @@ and users by email"),
'user_id': crm_case._get_default_user,
'email_from': crm_case._get_default_email,
'state': lambda *a: 'draft',
- 'optin': lambda *a: 'unknown',
- 'optout': lambda *a: 'unknown',
'section_id': crm_case._get_section,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
@@ -238,10 +236,19 @@ and users by email"),
}
return value
+ def stage_next(self, cr, uid, ids, context=None):
+ stage = super(crm_lead, self).stage_next(cr, uid, ids, context)
+ if stage:
+ stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context)
+ if stage_obj.on_change:
+ data = {'probability': stage_obj.probability}
+ self.write(cr, uid, ids, data)
+ return stage
+
def message_new(self, cr, uid, msg, context):
"""
Automatically calls when new email message arrives
-
+
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks
@@ -253,7 +260,7 @@ and users by email"),
body = msg.get('body')
msg_from = msg.get('from')
priority = msg.get('priority')
-
+
vals = {
'name': subject,
'email_from': msg_from,
@@ -263,13 +270,13 @@ and users by email"),
}
if msg.get('priority', False):
vals['priority'] = priority
-
- res = mailgate_pool.get_partner(cr, uid, msg.get('from'))
+
+ res = mailgate_pool.get_partner(cr, uid, msg.get('from') or msg.get_unixfrom())
if res:
vals.update(res)
res = self.create(cr, uid, vals, context)
-
-
+
+
attachents = msg.get('attachments', [])
for attactment in attachents or []:
data_attach = {
@@ -285,21 +292,18 @@ and users by email"),
return res
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}):
- """
+ """
@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 update mail’s IDs
"""
-
+
if isinstance(ids, (str, int, long)):
ids = [ids]
-
+
msg_from = msg['from']
- vals.update({
- 'description': msg['body']
- })
- if msg.get('priority', False):
+ if msg.get('priority'):
vals['priority'] = msg.get('priority')
maps = {
@@ -307,14 +311,14 @@ and users by email"),
'revenue': 'planned_revenue',
'probability':'probability'
}
- vls = { }
+ vls = {}
for line in msg['body'].split('\n'):
line = line.strip()
res = tools.misc.command_re.match(line)
- if res and maps.get(res.group(1).lower(), False):
+ if res and maps.get(res.group(1).lower()):
key = maps.get(res.group(1).lower())
vls[key] = res.group(2).lower()
-
+
vals.update(vls)
res = self.write(cr, uid, ids, vals)
return res
@@ -361,7 +365,6 @@ and users by email"),
@param **args: Return Dictionary of Keyword Value
"""
return True
-
crm_lead()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/crm_opportunity_demo.xml b/addons/crm/crm_opportunity_demo.xml
index aa965a07594..3c06d16dc19 100644
--- a/addons/crm/crm_opportunity_demo.xml
+++ b/addons/crm/crm_opportunity_demo.xml
@@ -55,7 +55,7 @@
-
+
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index 4060337bdd7..23d3ffcbe58 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -154,6 +154,8 @@
+
+
diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml
index 790debb007f..ef068e122a3 100644
--- a/addons/crm/crm_phonecall_view.xml
+++ b/addons/crm/crm_phonecall_view.xml
@@ -38,7 +38,6 @@
crm.phonecall
tree
-
diff --git a/addons/crm/report/crm_lead_report.py b/addons/crm/report/crm_lead_report.py
index a70bd45875d..f9c39c92403 100644
--- a/addons/crm/report/crm_lead_report.py
+++ b/addons/crm/report/crm_lead_report.py
@@ -77,7 +77,6 @@ class crm_lead_report(osv.osv):
'name': fields.char('Year', size=64, required=False, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
- 'nbr': fields.integer('# of Cases', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
'avg_answers': fields.function(_get_data, string='Avg. Answers', method=True, type="integer"),
'perc_done': fields.function(_get_data, string='%Done', method=True, type="float"),
@@ -92,10 +91,10 @@ class crm_lead_report(osv.osv):
'create_date': fields.datetime('Create Date', readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'email': fields.integer('# of Emails', size=128, readonly=True),
- 'delay_open': fields.float('Delay to open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"),
+ 'delay_open': fields.float('Delay to Open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"),
+ 'delay_close': fields.float('Delay to Close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
'delay_expected': fields.float('Overpassed Deadline',digits=(16,2),readonly=True, group_operator="avg"),
- 'delay_close': fields.float('Delay to close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
- 'probability': fields.float('Probability',digits=(16,2),readonly=True),
+ 'probability': fields.float('Probability',digits=(16,2),readonly=True, group_operator="avg"),
'planned_revenue': fields.float('Planned Revenue',digits=(16,2),readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category',\
domain="[('section_id','=',section_id),\
@@ -107,6 +106,7 @@ class crm_lead_report(osv.osv):
'opening_date': fields.date('Opening Date', readonly=True),
'creation_date': fields.date('Creation Date', readonly=True),
'date_closed': fields.date('Close Date', readonly=True),
+ 'nbr': fields.integer('# of Cases', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'type':fields.selection([
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index 5292b297c89..43092ccd6c6 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -23,35 +23,15 @@
-
-
-
+
+
+
-
-
-
- crm.lead.report.form
- crm.lead.report
- form
-
-
-
-
-
@@ -59,9 +39,9 @@
crm.lead.report
graph
-
-
-
+
+
+
@@ -75,37 +55,49 @@
search
-
-
-
+
+
+
+
+
+
-
+ domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
+
-
-
-
-
-
+
+
+
+
+
+
-
+
-
@@ -133,19 +125,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -187,10 +179,9 @@
Leads Analysis
crm.lead.report
form
- {"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}
+ {'search_default_opportunity':1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}
tree,graph
- ['|',('type', '=', 'lead'),('type', '=', False)]
-
+ []
@@ -211,10 +202,9 @@
Opportunities Analysis
crm.lead.report
form
- {"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}
+ {"search_default_opportunity": 1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}
tree,graph
- [('type', '=', 'opportunity')]
-
+ []
diff --git a/addons/crm/res_partner_view.xml b/addons/crm/res_partner_view.xml
index 769cb5d5c81..5f3fa8472c0 100644
--- a/addons/crm/res_partner_view.xml
+++ b/addons/crm/res_partner_view.xml
@@ -4,62 +4,92 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ res.partner.crm.info.inherit1
+ res.partner
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ res.partner.crm.info.inherit2
+ res.partner
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ res.partner.crm.info.inherit3
+ res.partner
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
index 12edf5edc6d..00a2fb761f1 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity.py
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -81,9 +81,7 @@ class crm_lead2opportunity(osv.osv_memory):
'partner_id': this.partner_id.id,
'type': 'opportunity'
}
-
lead_obj.write(cr, uid, lead.id, vals, context=context)
-
lead_obj._history(cr, uid, [lead], _('Opportunity'), details='Converted to Opportunity', context=context)
value = {
diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py
index 480ea0f10a1..3f6aacc0f39 100644
--- a/addons/crm/wizard/crm_send_email.py
+++ b/addons/crm/wizard/crm_send_email.py
@@ -99,8 +99,7 @@ class crm_send_new_email(osv.osv_memory):
message_id = hist.message_id
model = hist.model
model_pool = self.pool.get(model)
- res_ids = model_pool.search(cr, uid, [('thread_id','=', hist.thread_id.id)])
- res_id = res_ids and res_ids[0] or False
+ res_id = hist.res_id
case = model_pool.browse(cr, uid, res_id)
emails = [obj.email_to]
email_cc = (obj.email_cc or '').split(',')
@@ -108,12 +107,7 @@ class crm_send_new_email(osv.osv_memory):
body = obj.text
body = case_pool.format_body(body)
- email_from = getattr(obj, 'email_from', False)
-
- x_headers = {
- 'model': model,
- 'resource-id': res_id
- }
+ email_from = getattr(obj, 'email_from', False)
if message_id:
x_headers['References'] = "%s" % (message_id)
@@ -206,8 +200,7 @@ class crm_send_new_email(osv.osv_memory):
return {}
model_pool = self.pool.get(model)
- res_ids = model_pool.search(cr, uid, [('thread_id','=', hist.thread_id.id)])
- res_id = res_ids and res_ids[0] or False
+ res_id = hist.res_id
case = model_pool.browse(cr, uid, res_id)
if 'email_to' in fields:
res.update({'email_to': case.email_from or hist.email_from or False})
diff --git a/addons/document/board_document_demo.xml b/addons/document/board_document_demo.xml
index 4ad751c7733..f9af3e449c3 100644
--- a/addons/document/board_document_demo.xml
+++ b/addons/document/board_document_demo.xml
@@ -2,5 +2,17 @@
+
+
+
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py
index 133a47563a8..a015ef81418 100644
--- a/addons/email_template/email_template.py
+++ b/addons/email_template/email_template.py
@@ -222,39 +222,41 @@ class email_template(osv.osv):
'template_language' : lambda *a:'mako',
}
+
_sql_constraints = [
('name', 'unique (name)', _('The template name must be unique !'))
]
- def create(self, cr, uid, vals, context=None):
- id = super(email_template, self).create(cr, uid, vals, context)
- src_obj = self.pool.get('ir.model').read(cr, uid, vals['object_name'], ['model'], context)['model']
+ def create_action(self, cr, uid, ids, context):
+ vals = {}
+ template_obj = self.browse(cr, uid, ids)[0]
+ src_obj = template_obj.object_name.model
vals['ref_ir_act_window'] = self.pool.get('ir.actions.act_window').create(cr, uid, {
- 'name': _("%s Mail Form") % vals['name'],
+ 'name': _("%s Mail Form") % template_obj.name,
'type': 'ir.actions.act_window',
'res_model': 'email_template.send.wizard',
'src_model': src_obj,
'view_type': 'form',
- 'context': "{'src_model':'%s','template_id':'%d','src_rec_id':active_id,'src_rec_ids':active_ids}" % (src_obj, id),
+ 'context': "{'src_model':'%s','template_id':'%d','src_rec_id':active_id,'src_rec_ids':active_ids}" % (src_obj, template_obj.id),
'view_mode':'form,tree',
'view_id': self.pool.get('ir.ui.view').search(cr, uid, [('name', '=', 'email_template.send.wizard.form')], context=context)[0],
'target': 'new',
'auto_refresh':1
}, context)
vals['ref_ir_value'] = self.pool.get('ir.values').create(cr, uid, {
- 'name': _('Send Mail (%s)') % vals['name'],
+ 'name': _('Send Mail (%s)') % template_obj.name,
'model': src_obj,
'key2': 'client_action_multi',
'value': "ir.actions.act_window," + str(vals['ref_ir_act_window']),
'object': True,
}, context)
- self.write(cr, uid, id, {
+ self.write(cr, uid, ids, {
'ref_ir_act_window': vals['ref_ir_act_window'],
'ref_ir_value': vals['ref_ir_value'],
}, context)
- return id
+ return True
- def unlink(self, cr, uid, ids, context=None):
+ def unlink_action(self, cr, uid, ids, context):
for template in self.browse(cr, uid, ids, context):
obj = self.pool.get(template.object_name.model)
try:
@@ -264,6 +266,13 @@ class email_template(osv.osv):
self.pool.get('ir.values').unlink(cr, uid, template.ref_ir_value.id, context)
except:
raise osv.except_osv(_("Warning"), _("Deletion of Record failed"))
+
+ def delete_action(self, cr, uid, ids, context):
+ self.unlink_action(cr, uid, ids, context)
+ return True
+
+ def unlink(self, cr, uid, ids, context=None):
+ self.unlink_action(cr, uid, ids, context)
return super(email_template, self).unlink(cr, uid, ids, context)
def copy(self, cr, uid, id, default=None, context=None):
diff --git a/addons/email_template/email_template_mailbox.py b/addons/email_template/email_template_mailbox.py
index b89a9aeda26..b20fa9f76bf 100644
--- a/addons/email_template/email_template_mailbox.py
+++ b/addons/email_template/email_template_mailbox.py
@@ -41,6 +41,7 @@ class email_template_mailbox(osv.osv):
return True
def send_this_mail(self, cr, uid, ids=None, context=None):
+ result = True
for id in (ids or []):
try:
account_obj = self.pool.get('email_template.account')
diff --git a/addons/email_template/email_template_view.xml b/addons/email_template/email_template_view.xml
index 1d574ff8675..c6eb3757604 100644
--- a/addons/email_template/email_template_view.xml
+++ b/addons/email_template/email_template_view.xml
@@ -114,6 +114,10 @@
+
+
+
+
diff --git a/addons/event/board_association_demo.xml b/addons/event/board_association_demo.xml
index 38fb77e5500..2396c7f3c0a 100644
--- a/addons/event/board_association_demo.xml
+++ b/addons/event/board_association_demo.xml
@@ -1,6 +1,19 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py
index 14981c13837..947434052ae 100644
--- a/addons/fetchmail/fetchmail.py
+++ b/addons/fetchmail/fetchmail.py
@@ -50,7 +50,7 @@ class email_server(osv.osv):
'type':fields.selection([
('pop', 'POP Server'),
('imap', 'IMAP Server'),
- ], 'State', select=True, readonly=False),
+ ], 'Server Type', select=True, readonly=False),
'is_ssl':fields.boolean('SSL ?', required=False),
'attach':fields.boolean('Add Attachments ?', required=False),
'date': fields.date('Date', readonly=True, states={'draft':[('readonly', False)]}),
@@ -107,11 +107,13 @@ class email_server(osv.osv):
ids = self.search(cr, uid, [])
return self.fetch_mail(cr, uid, ids, context)
- def fetch_mail(self, cr, uid, ids, context={}):
+ def fetch_mail(self, cr, uid, ids, context=None):
+ if not context:
+ context = {}
email_tool = self.pool.get('email.server.tools')
for server in self.browse(cr, uid, ids, context):
logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail start checking for new emails on %s' % (server.name))
-
+ context.update({'server_id': server.id, 'server_type': server.type})
count = 0
try:
if server.type == 'imap':
@@ -123,10 +125,10 @@ class email_server(osv.osv):
imap_server.login(server.user, server.password)
imap_server.select()
- result, data = imap_server.search(None, '(UNSEEN)')
+ result, data = imap_server.search(None, '(UNSEEN)')
for num in data[0].split():
result, data = imap_server.fetch(num, '(RFC822)')
- res_id = email_tool.process_email(cr, uid, server.object_id.model, data[0][1], attach=server.attach, server_id=server.id, server_type=server.type, context=context)
+ res_id = email_tool.process_email(cr, uid, server.object_id.model, data[0][1], attach=server.attach, context=context)
if res_id and server.action_id:
action_pool = self.pool.get('ir.actions.server')
action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
@@ -154,7 +156,7 @@ class email_server(osv.osv):
for num in range(1, numMsgs + 1):
(header, msges, octets) = pop_server.retr(num)
msg = '\n'.join(msges)
- res_id = email_tool.process_email(cr, uid, server.object_id.model, data[0][1], attach=server.attach, server_id=server.id, server_type=server.type, context=context)
+ res_id = email_tool.process_email(cr, uid, server.object_id.model, data[0][1], attach=server.attach, context=context)
if res_id and server.action_id:
action_pool = self.pool.get('ir.actions.server')
action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
@@ -182,10 +184,34 @@ class mailgate_message(osv.osv):
'type':fields.selection([
('pop', 'POP Server'),
('imap', 'IMAP Server'),
- ], 'State', select=True, readonly=True),
+ ], 'Server Type', select=True, readonly=True),
}
_order = 'id desc'
+ def create(self, cr, uid, values, context=None):
+ if not context:
+ context={}
+ server_id = context.get('server_id',False)
+ server_type = context.get('server_type',False)
+ if server_id:
+ values['server_id'] = server_id
+ if server_type:
+ values['server_type'] = server_type
+ res = super(mailgate_message,self).create(cr, uid, values, context=context)
+ return res
+
+ def write(self, cr, uid, ids, values, context=None):
+ if not context:
+ context={}
+ server_id = context.get('server_id',False)
+ server_type = context.get('server_type',False)
+ if server_id:
+ values['server_id'] = server_id
+ if server_type:
+ values['server_type'] = server_type
+ res = super(mailgate_message,self).write(cr, uid, ids, values, context=context)
+ return res
+
mailgate_message()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py
index 9f5846601ef..e14a91df084 100644
--- a/addons/hr_attendance/hr_attendance.py
+++ b/addons/hr_attendance/hr_attendance.py
@@ -54,7 +54,7 @@ class hr_attendance(osv.osv):
return res
_columns = {
- 'name' : fields.datetime('Date', required=True),
+ 'name' : fields.datetime('Date', required=True, select=1),
'action' : fields.selection([('sign_in', 'Sign In'), ('sign_out', 'Sign Out'),('action','Action')], 'Action', required=True),
'action_desc' : fields.many2one("hr.action.reason", "Action reason", domain="[('action_type', '=', action)]", help='Specifies the reason for Signing In/Signing Out in case of extra hours.'),
'employee_id' : fields.many2one('hr.employee', "Employee's Name", required=True, select=True),
diff --git a/addons/hr_timesheet/__openerp__.py b/addons/hr_timesheet/__openerp__.py
index 930877b77c2..601bf134598 100644
--- a/addons/hr_timesheet/__openerp__.py
+++ b/addons/hr_timesheet/__openerp__.py
@@ -42,6 +42,7 @@ to set up a management by affair.
'update_xml': [
'security/ir.model.access.csv',
'hr_timesheet_view.xml',
+ 'report/hr_timesheet_report_view.xml',
'hr_timesheet_report.xml',
'hr_timesheet_wizard.xml',
'process/hr_timesheet_process.xml',
diff --git a/addons/hr_timesheet/report/__init__.py b/addons/hr_timesheet/report/__init__.py
index 156a4b83c63..d54615fbd0b 100644
--- a/addons/hr_timesheet/report/__init__.py
+++ b/addons/hr_timesheet/report/__init__.py
@@ -19,8 +19,7 @@
#
##############################################################################
+import hr_timesheet_report
import user_timesheet
import users_timesheet
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/hr_timesheet/report/hr_timesheet_report.py b/addons/hr_timesheet/report/hr_timesheet_report.py
new file mode 100644
index 00000000000..100041ca35a
--- /dev/null
+++ b/addons/hr_timesheet/report/hr_timesheet_report.py
@@ -0,0 +1,78 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import tools
+from osv import fields,osv
+
+class hr_timesheet_report(osv.osv):
+ _name = "hr.timesheet.report"
+ _description = "Timesheet"
+ _auto = False
+ _columns = {
+ 'year': fields.char('Year',size=64,required=False, readonly=True),
+ 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
+ ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
+ ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
+ 'date': fields.date('Date', readonly=True),
+ 'name': fields.char('Description', size=64,readonly=True),
+ 'product_id' : fields.many2one('product.product', 'Product',readonly=True),
+ 'journal_id' : fields.many2one('account.analytic.journal', 'Journal',readonly=True),
+ 'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True),
+ 'user_id': fields.many2one('res.users', 'User',readonly=True),
+ 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
+ 'company_id': fields.many2one('res.company', 'Company',readonly=True),
+ 'cost': fields.float('Cost',readonly=True),
+ 'quantity': fields.float('Quantity',readonly=True),
+ }
+
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'hr_timesheet_report')
+ cr.execute("""
+ create or replace view hr_timesheet_report as (
+ select
+ min(t.id) as id,
+ l.date as date,
+ to_char(l.date,'YYYY') as year,
+ to_char(l.date,'MM') as month,
+ sum(l.amount) as cost,
+ sum(l.unit_amount) as quantity,
+ l.account_id as account_id,
+ l.journal_id as journal_id,
+ l.product_id as product_id,
+ l.general_account_id as general_account_id,
+ l.user_id as user_id,
+ l.company_id as company_id,
+ l.currency_id as currency_id
+ from
+ hr_analytic_timesheet as t
+ left join account_analytic_line as l ON (t.line_id=l.id)
+ group by
+ l.date,
+ l.account_id,
+ l.product_id,
+ l.general_account_id,
+ l.journal_id,
+ l.user_id,
+ l.company_id,
+ l.currency_id
+ )
+ """)
+hr_timesheet_report()
diff --git a/addons/hr_timesheet/report/hr_timesheet_report_view.xml b/addons/hr_timesheet/report/hr_timesheet_report_view.xml
new file mode 100644
index 00000000000..7f2df2e815e
--- /dev/null
+++ b/addons/hr_timesheet/report/hr_timesheet_report_view.xml
@@ -0,0 +1,99 @@
+
+
+
+
+ hr.timesheet.report.graph
+ hr.timesheet.report
+ graph
+
+
+
+
+
+
+
+
+ hr.timesheet.report.tree
+ hr.timesheet.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hr.timesheet.report.search
+ hr.timesheet.report
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timesheet Analysis
+ hr.timesheet.report
+ form
+ tree,graph
+ {'search_default_month':1,'search_default_group_user_id':1,'group_by_no_leaf':1,'group_by':[]}
+
+
+
+
diff --git a/addons/hr_timesheet/report/user_timesheet.py b/addons/hr_timesheet/report/user_timesheet.py
index 8dbda07ea76..d444e4a19bc 100644
--- a/addons/hr_timesheet/report/user_timesheet.py
+++ b/addons/hr_timesheet/report/user_timesheet.py
@@ -101,6 +101,3 @@ class report_custom(report_rml):
report_custom('report.hr.analytical.timesheet', 'hr.employee', '', 'addons/hr_timesheet/report/user_timesheet.xsl')
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/hr_timesheet/security/ir.model.access.csv b/addons/hr_timesheet/security/ir.model.access.csv
index ce340fb4eb9..d0573745208 100644
--- a/addons/hr_timesheet/security/ir.model.access.csv
+++ b/addons/hr_timesheet/security/ir.model.access.csv
@@ -6,3 +6,4 @@
"access_hr_sign_out_project","hr.sign.out.project","model_hr_sign_out_project","hr.group_hr_user",1,1,1,1
"access_hr_analytal_timesheet_employee","hr.analytical.timesheet.employee","model_hr_analytical_timesheet_employee","hr.group_hr_manager",1,1,1,1
"access_hr_analytal_timesheet_user","hr.analytical.timesheet.user","model_hr_analytical_timesheet_users","hr.group_hr_user",1,1,1,1
+"access_hr_timesheet_report","hr.timesheet.report","model_hr_timesheet_report","hr.group_hr_manager",1,0,0,0
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
index 487e3687b36..050b798f16d 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
@@ -96,12 +96,15 @@
form
@@ -50,71 +50,71 @@
-
-
-
-
-
-
-
-
+ domain="[('date_current','<=', time.strftime('%%Y-%%m-%%d')),('date_current','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
+ help="Timesheet in this year"/>
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
- Timesheet
+ Timesheet Sheet Analysis
timesheet.report
form
tree,graph
diff --git a/addons/mail_gateway/__init__.py b/addons/mail_gateway/__init__.py
index 7380514e45a..6526541a068 100644
--- a/addons/mail_gateway/__init__.py
+++ b/addons/mail_gateway/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,11 +15,12 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
import mail_gateway
+import res_partner
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mail_gateway/__openerp__.py b/addons/mail_gateway/__openerp__.py
index 1584067ea38..aa08c7f190d 100644
--- a/addons/mail_gateway/__openerp__.py
+++ b/addons/mail_gateway/__openerp__.py
@@ -32,6 +32,7 @@
'init_xml': [],
'update_xml': [
"mail_gateway_view.xml",
+ "res_partner_view.xml",
'security/ir.model.access.csv'
],
'demo_xml': [],
diff --git a/addons/mail_gateway/mail_gateway.py b/addons/mail_gateway/mail_gateway.py
index edb723a3ba0..404049880cd 100644
--- a/addons/mail_gateway/mail_gateway.py
+++ b/addons/mail_gateway/mail_gateway.py
@@ -35,7 +35,6 @@ class mailgate_thread(osv.osv):
'''
_name = 'mailgate.thread'
_description = 'Mailgateway Thread'
- _rec_name = 'thread'
_columns = {
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True)]),
@@ -176,7 +175,7 @@ class mailgate_tool(osv.osv_memory):
bits = _email.sub(record, text)
return bits
- def history(self, cr, uid, model, res_ids, msg, attach):
+ def history(self, cr, uid, model, res_ids, msg, attach, context=None):
"""This function creates history for mails fetched
@param self: The object pointer
@param cr: the current row, from the database cursor,
@@ -206,7 +205,7 @@ class mailgate_tool(osv.osv_memory):
'user_id': uid,
'attachment_ids': [(6, 0, attach)]
}
- msg_id = msg_pool.create(cr, uid, msg_data)
+ msg_id = msg_pool.create(cr, uid, msg_data, context=context)
return True
def email_send(self, cr, uid, model, res_id, msg, from_email=False, email_default=False):
@@ -424,7 +423,8 @@ Thanks
if not len(res_ids):
new_res_id = create_record(msg)
res_ids = [new_res_id]
- # Store messages
+ # Store messages
+ context.update({'model' : model})
if hasattr(model_pool, '_history'):
model_pool._history(cr, uid, res_ids, _('Receive'), history=True,
subject = msg.get('subject'),
@@ -434,9 +434,9 @@ Thanks
message_id = msg.get('message-id'),
references = msg.get('references', False),
attach = msg.get('attachments', {}).items(),
- context = {'model' : model})
+ context = context)
else:
- self.history(cr, uid, model, res_ids, msg, att_ids)
+ self.history(cr, uid, model, res_ids, msg, att_ids, context=context)
return new_res_id
def get_partner(self, cr, uid, from_email, context=None):
diff --git a/addons/mail_gateway/res_partner.py b/addons/mail_gateway/res_partner.py
new file mode 100644
index 00000000000..02a55fa45fe
--- /dev/null
+++ b/addons/mail_gateway/res_partner.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+from osv import fields,osv
+
+class res_partner(osv.osv):
+ """ Inherits partner and adds CRM information in the partner form """
+ _inherit = 'res.partner'
+
+ _columns = {
+ 'emails': fields.one2many('mailgate.message', 'partner_id',\
+ 'Emails', readonly=True),
+ }
+
+res_partner()
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/mail_gateway/res_partner_view.xml b/addons/mail_gateway/res_partner_view.xml
new file mode 100644
index 00000000000..c81b47e6bf1
--- /dev/null
+++ b/addons/mail_gateway/res_partner_view.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+ res.partner.emails.info.inherit
+ res.partner
+ form
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/marketing_campaign/__init__.py b/addons/marketing_campaign/__init__.py
index d37d8604380..23796d1baaf 100644
--- a/addons/marketing_campaign/__init__.py
+++ b/addons/marketing_campaign/__init__.py
@@ -20,6 +20,7 @@
##############################################################################
import marketing_campaign
+import res_partner
import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign/__openerp__.py b/addons/marketing_campaign/__openerp__.py
index 16e45a36c96..1044030df7e 100644
--- a/addons/marketing_campaign/__openerp__.py
+++ b/addons/marketing_campaign/__openerp__.py
@@ -24,7 +24,7 @@
"name" : "",
"version" : "1.1",
"depends" : ["marketing",
- "crm",
+ "crm",
"document",
"email_template"
],
@@ -42,8 +42,9 @@ are dynamic and multi-channels. The process:
'init_xml': [],
'update_xml': [
'marketing_campaign_view.xml',
- 'marketing_campaign_data.xml',
- 'marketing_campaign_workflow.xml',
+ 'marketing_campaign_data.xml',
+ 'marketing_campaign_workflow.xml',
+ 'res_partner_view.xml',
'report/campaign_analysis_view.xml',
"security/marketing_campaign_security.xml",
"security/ir.model.access.csv"
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index 386e5639dd7..efe2cde460f 100644
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -289,7 +289,9 @@ class marketing_campaign_activity(osv.osv):
context = {}
server_obj = self.pool.get('ir.actions.server')
context['active_id'] = workitem.res_id
- return server_obj.run(cr, uid, [activity.server_action_id.id], context)
+ res = server_obj.run(cr, uid, [activity.server_action_id.id], context)
+ #server action return False if the action is perfomed except client_action,other and python code
+ return res==False and True or res
def process(self, cr, uid, act_id, wi_id, context={}):
activity = self.browse(cr, uid, act_id)
diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml
index 62cb4a9cf50..bb186b65f92 100644
--- a/addons/marketing_campaign/marketing_campaign_view.xml
+++ b/addons/marketing_campaign/marketing_campaign_view.xml
@@ -2,6 +2,8 @@
+
+
+
+
+ res.partner.workitem.info.inherit
+ res.partner
+ form
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/mrp/board_manufacturing_demo.xml b/addons/mrp/board_manufacturing_demo.xml
index af8f07d2871..aea87558a1c 100644
--- a/addons/mrp/board_manufacturing_demo.xml
+++ b/addons/mrp/board_manufacturing_demo.xml
@@ -1,6 +1,13 @@
+
diff --git a/addons/project/__init__.py b/addons/project/__init__.py
index 6347cd9dd29..44154c8ae05 100644
--- a/addons/project/__init__.py
+++ b/addons/project/__init__.py
@@ -25,6 +25,7 @@ import installer
import project_mailgate
import report
import wizard
+import res_partner
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project/__openerp__.py b/addons/project/__openerp__.py
index 5d535963422..03b72e09e38 100644
--- a/addons/project/__openerp__.py
+++ b/addons/project/__openerp__.py
@@ -46,6 +46,7 @@ work done on tasks, eso. It is able to render planning, order tasks, eso.
"project_report.xml",
"process/task_process.xml",
"project_installer.xml",
+ "res_partner_view.xml",
"report/project_report_view.xml",
"wizard/project_close_task_view.xml",
"board_project_view.xml",
diff --git a/addons/project/board_project_demo.xml b/addons/project/board_project_demo.xml
index 0b9ec465a14..2a160b4454f 100644
--- a/addons/project/board_project_demo.xml
+++ b/addons/project/board_project_demo.xml
@@ -2,6 +2,18 @@
+
+
+
diff --git a/addons/project/res_partner.py b/addons/project/res_partner.py
new file mode 100644
index 00000000000..ac9c646ed82
--- /dev/null
+++ b/addons/project/res_partner.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+from osv import fields,osv
+
+class res_partner(osv.osv):
+ """ Inherits partner and adds CRM information in the partner form """
+ _inherit = 'res.partner'
+
+ _columns = {
+ 'task_ids': fields.one2many('project.task', 'partner_id',\
+ 'Tasks', readonly=True),
+ }
+
+res_partner()
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/project/res_partner_view.xml b/addons/project/res_partner_view.xml
new file mode 100644
index 00000000000..92e74c920b5
--- /dev/null
+++ b/addons/project/res_partner_view.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+ res.partner.task.info.inherit
+ res.partner
+ form
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/project_issue/__openerp__.py b/addons/project_issue/__openerp__.py
index 7339399cc08..97f9e96afa0 100644
--- a/addons/project_issue/__openerp__.py
+++ b/addons/project_issue/__openerp__.py
@@ -34,7 +34,7 @@
'crm',
'project',
'hr_timesheet_sheet',
- 'project_long_term',
+ 'resource'
],
'init_xml': [
'project_issue_data.xml'
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 3523485f542..a2fb7c21150 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -332,7 +332,7 @@ class project_issue(osv.osv, crm.crm_case):
if res:
vals.update(res)
res = self.create(cr, uid, vals, context)
-
+ self.convert_to_bug(cr, uid, [res], context=context)
attachents = msg.get('attachments', [])
for attactment in attachents or []:
@@ -428,3 +428,11 @@ class project_issue(osv.osv, crm.crm_case):
project_issue()
+class project(osv.osv):
+ _inherit = "project.project"
+ _columns = {
+ 'resource_calendar_id': fields.many2one('resource.calendar', 'Working Time', help="Timetable working hours to adjust the gantt diagram report"),
+ }
+project()
+
+
diff --git a/addons/project_issue/project_issue_demo.xml b/addons/project_issue/project_issue_demo.xml
index ed031672360..aee12ccf01e 100644
--- a/addons/project_issue/project_issue_demo.xml
+++ b/addons/project_issue/project_issue_demo.xml
@@ -1,290 +1,278 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index 973e0a1a20c..fd523ad7774 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -95,7 +95,7 @@
diff --git a/addons/sale/board_sale_demo.xml b/addons/sale/board_sale_demo.xml
index 39f923a895b..09419de206c 100644
--- a/addons/sale/board_sale_demo.xml
+++ b/addons/sale/board_sale_demo.xml
@@ -2,5 +2,16 @@
+
+
diff --git a/addons/sale_crm/__openerp__.py b/addons/sale_crm/__openerp__.py
index 9464db91b6f..f293b6ee436 100644
--- a/addons/sale_crm/__openerp__.py
+++ b/addons/sale_crm/__openerp__.py
@@ -40,6 +40,7 @@ crm modules.
'init_xml': [],
'update_xml': ['sale_crm_wizard.xml',
'sale_crm_view.xml',
+ 'board_sale_crm_view.xml',
'process/sale_crm_process.xml',
'security/sale_crm_security.xml',
],
diff --git a/addons/sale_crm/board_sale_crm_view.xml b/addons/sale_crm/board_sale_crm_view.xml
new file mode 100644
index 00000000000..42b7cc1cd47
--- /dev/null
+++ b/addons/sale_crm/board_sale_crm_view.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+ Quotations
+ sale.order
+ form
+ tree,form
+ [('state','=','draft'),('user_id','=',uid)]
+
+
+
+
+ turnover.by.month.tree
+ account.invoice.report
+ tree
+
+
+
+
+
+
+
+
+
+ turnover.by.month.graph
+ account.invoice.report
+ graph
+
+
+
+
+
+
+
+
+
+ account.invoice.report
+ form
+ graph,tree
+
+ [('year','ilike',time.strftime('%Y')),('user_id','=',uid)]
+ {'group_by_no_leaf':1,'group_by':['month']}
+
+
+
+
+ CRM - Dashboard Form
+ board.board
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/sale_crm/wizard/makesale.py b/addons/sale_crm/wizard/makesale.py
index e4aacce1044..42050e680c5 100644
--- a/addons/sale_crm/wizard/makesale.py
+++ b/addons/sale_crm/wizard/makesale.py
@@ -28,9 +28,9 @@ import pooler
from tools.translate import _
sale_form = """
-
+
-
+
diff --git a/addons/scrum/scrum.py b/addons/scrum/scrum.py
index b734473dce8..ef126618f84 100644
--- a/addons/scrum/scrum.py
+++ b/addons/scrum/scrum.py
@@ -108,7 +108,7 @@ class scrum_sprint(osv.osv):
'date_stop': fields.date('Ending Date', required=True),
'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)], help="If you have [?] in the project name, it means there are no analytic account linked to this project."),
'product_owner_id': fields.many2one('res.users', 'Product Owner', required=True,help="The person who is responsible for the product"),
- 'scrum_master_id': fields.many2one('res.users', 'Scrum Manager', required=True,help="The person who is maintains the processes for the product"),
+ 'scrum_master_id': fields.many2one('res.users', 'Scrum Master', required=True,help="The person who is maintains the processes for the product"),
'meeting_ids': fields.one2many('scrum.meeting', 'sprint_id', 'Daily Scrum'),
'review': fields.text('Sprint Review'),
'retrospective': fields.text('Sprint Retrospective'),
@@ -308,7 +308,7 @@ class scrum_meeting(osv.osv):
meeting_id = self.browse(cr, uid, ids)[0]
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if meeting_id and meeting_id.sprint_id.scrum_master_id.user_email:
- self.email_send(cr, uid, ids, email)
+ self.email_send(cr, uid, ids, meeting_id.sprint_id.scrum_master_id.user_email)
else:
raise osv.except_osv(_('Error !'), _('Please provide email address for scrum master defined on sprint.'))
return True
@@ -316,7 +316,7 @@ class scrum_meeting(osv.osv):
def button_send_product_owner(self, cr, uid, ids, context=None):
meeting_id = self.browse(cr, uid, ids)[0]
if meeting_id.sprint_id.product_owner_id.user_email:
- self.email_send(cr,uid,ids,email)
+ self.email_send(cr,uid,ids,meeting_id.sprint_id.product_owner_id.user_email)
else:
raise osv.except_osv(_('Error !'), _('Please provide email address for product owner defined on sprint.'))
return True