diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 84dd2c90e7c..c599c7c4447 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -577,13 +577,16 @@ class account_move_line(osv.osv):
# writeoff; entry generated for the difference between the lines
#
- def reconcile_partial(self, cr, uid, ids, type='auto', context={}):
+ def reconcile_partial(self, cr, uid, ids, type='auto', context=None):
merges = []
unmerge = []
total = 0.0
merges_rec = []
company_list = []
+ if context is None:
+ context = {}
+
for line in self.browse(cr, uid, ids, context=context):
if company_list and not line.company_id.id in company_list:
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries'))
@@ -613,13 +616,15 @@ class account_move_line(osv.osv):
self.pool.get('account.move.reconcile').reconcile_partial_check(cr, uid, [r_id] + merges_rec, context=context)
return True
- def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context={}):
+ def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context=None):
lines = self.browse(cr, uid, ids, context=context)
unrec_lines = filter(lambda x: not x['reconcile_id'], lines)
credit = debit = 0.0
currency = 0.0
account_id = False
partner_id = False
+ if context is None:
+ context = {}
company_list = []
for line in self.browse(cr, uid, ids, context=context):
diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml
index 03037963ded..067fbd38ab1 100644
--- a/addons/account/project/project_view.xml
+++ b/addons/account/project/project_view.xml
@@ -312,23 +312,23 @@
[('journal_id','=',active_id)]
-
+
-
+
-
+
diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv
index 7458594d240..329135d29a7 100644
--- a/addons/account/security/ir.model.access.csv
+++ b/addons/account/security/ir.model.access.csv
@@ -1,4 +1,5 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_product_product_account_user","product.product.account.user","product.model_product_product","group_account_user",1,0,0,0
"access_account_payment_term","account.payment.term","model_account_payment_term","account.group_account_user",1,0,0,0
"access_account_payment_term_line","account.payment.term.line","model_account_payment_term_line","account.group_account_user",1,0,0,0
"access_account_account_type","account.account.type","model_account_account_type","account.group_account_user",1,0,0,0
diff --git a/addons/account/wizard/account_reconcile.py b/addons/account/wizard/account_reconcile.py
index be0ebc40677..e12ff69dc0a 100644
--- a/addons/account/wizard/account_reconcile.py
+++ b/addons/account/wizard/account_reconcile.py
@@ -56,11 +56,11 @@ class account_move_line_reconcile(osv.osv_memory):
if 'trans_nbr' in fields:
res.update({'trans_nbr':data['trans_nbr']})
if 'credit' in fields:
- res.update({'trans_nbr':data['credit']})
+ res.update({'credit':data['credit']})
if 'debit' in fields:
- res.update({'trans_nbr':data['debit']})
+ res.update({'debit':data['debit']})
if 'writeoff' in fields:
- res.update({'trans_nbr':data['writeoff']})
+ res.update({'writeoff':data['writeoff']})
return res
def partial_check(self, cr, uid, ids, context=None):
diff --git a/addons/account_payment/__init__.py b/addons/account_payment/__init__.py
index 3724590e5f5..82a05aa73e9 100644
--- a/addons/account_payment/__init__.py
+++ b/addons/account_payment/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# 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 .
#
##############################################################################
@@ -23,11 +23,10 @@
# Init Sales
#----------------------------------------------------------
-import payment
+import account_payment
import wizard
import account_move_line
import account_invoice
import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/account_payment/__openerp__.py b/addons/account_payment/__openerp__.py
index 98b76d05088..cd0e162df17 100644
--- a/addons/account_payment/__openerp__.py
+++ b/addons/account_payment/__openerp__.py
@@ -41,11 +41,11 @@
'wizard/account_payment_pay_view.xml',
'wizard/account_payment_populate_statement_view.xml',
'wizard/account_payment_create_order_view.xml',
- 'payment_view.xml',
- 'payment_workflow.xml',
- 'payment_sequence.xml',
+ 'account_payment_view.xml',
+ 'account_payment_workflow.xml',
+ 'account_payment_sequence.xml',
'account_invoice_view.xml',
- 'payment_report.xml',
+ 'account_payment_report.xml',
],
'demo_xml': [],
'test': ['test/account_payment.yml'],
diff --git a/addons/account_payment/payment.py b/addons/account_payment/account_payment.py
similarity index 98%
rename from addons/account_payment/payment.py
rename to addons/account_payment/account_payment.py
index 8e300f7072a..20d8ff1afd7 100644
--- a/addons/account_payment/payment.py
+++ b/addons/account_payment/account_payment.py
@@ -18,29 +18,25 @@
# along with this program. If not, see .
#
##############################################################################
-
-from osv import fields
-from osv import osv
import time
-import netsvc
-import pooler
+from osv import osv, fields
+import netsvc
class payment_type(osv.osv):
_name= 'payment.type'
_description= 'Payment Type'
_columns= {
- 'name': fields.char('Name', size=64, required=True,help='Payment Type'),
- 'code': fields.char('Code', size=64, required=True,help='Specifies the Code for Payment Type'),
+ 'name': fields.char('Name', size=64, required=True, help='Payment Type'),
+ 'code': fields.char('Code', size=64, required=True, help='Specifies the Code for Payment Type'),
'suitable_bank_types': fields.many2many('res.partner.bank.type',
'bank_type_payment_type_rel',
'pay_type_id','bank_type_id',
'Suitable bank types')
- }
+ }
payment_type()
-
class payment_mode(osv.osv):
_name= 'payment.mode'
_description= 'Payment Mode'
@@ -66,16 +62,14 @@ class payment_mode(osv.osv):
where pm.id = %s """, [payment_code])
return [x[0] for x in cr.fetchall()]
-
payment_mode()
-
class payment_order(osv.osv):
_name = 'payment.order'
_description = 'Payment Order'
_rec_name = 'reference'
- def get_wizard(self,type):
+ def get_wizard(self, type):
logger = netsvc.Logger()
logger.notifyChannel("warning", netsvc.LOG_WARNING,
"No wizard found for the payment type '%s'." % type)
@@ -146,7 +140,6 @@ class payment_order(osv.osv):
payment_order()
-
class payment_line(osv.osv):
_name = 'payment.line'
_description = 'Payment Line'
diff --git a/addons/account_payment/payment_report.xml b/addons/account_payment/account_payment_report.xml
similarity index 100%
rename from addons/account_payment/payment_report.xml
rename to addons/account_payment/account_payment_report.xml
diff --git a/addons/account_payment/payment_sequence.xml b/addons/account_payment/account_payment_sequence.xml
similarity index 100%
rename from addons/account_payment/payment_sequence.xml
rename to addons/account_payment/account_payment_sequence.xml
diff --git a/addons/account_payment/payment_view.xml b/addons/account_payment/account_payment_view.xml
similarity index 100%
rename from addons/account_payment/payment_view.xml
rename to addons/account_payment/account_payment_view.xml
diff --git a/addons/account_payment/payment_workflow.xml b/addons/account_payment/account_payment_workflow.xml
similarity index 100%
rename from addons/account_payment/payment_workflow.xml
rename to addons/account_payment/account_payment_workflow.xml
diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py
index 5e37bd79488..81f5e4a570f 100644
--- a/addons/account_payment/wizard/account_payment_order.py
+++ b/addons/account_payment/wizard/account_payment_order.py
@@ -110,8 +110,7 @@ class payment_order_create(osv.osv_memory):
context.update({'line_ids': line_ids})
model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_create_payment_order_lines')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
- return {
- 'name': ('Entrie Lines'),
+ return {'name': ('Entrie Lines'),
'context': context,
'view_type': 'form',
'view_mode': 'form',
diff --git a/addons/account_payment/wizard/account_payment_pay.py b/addons/account_payment/wizard/account_payment_pay.py
index 74e1566520c..20e1e10f882 100644
--- a/addons/account_payment/wizard/account_payment_pay.py
+++ b/addons/account_payment/wizard/account_payment_pay.py
@@ -18,16 +18,13 @@
# along with this program. If not, see .
#
##############################################################################
-import time
from osv import fields, osv
class account_payment_make_payment(osv.osv_memory):
_name = 'account.payment.make.payment'
_description = 'Account make payment'
- _columns = {
- }
- def launch_wizard(self, cr, uid, ids, context):
+ def launch_wizard(self, cr, uid, ids, context=None):
"""
Search for a wizard to launch according to the type.
If type is manual. just confirm the order.
@@ -35,8 +32,8 @@ class account_payment_make_payment(osv.osv_memory):
obj_payment_order = self.pool.get('payment.order')
obj_model = self.pool.get('ir.model.data')
obj_act = self.pool.get('ir.actions.act_window')
- order= obj_payment_order.browse(cr,uid,context['active_id'],context)
- t= order.mode and order.mode.type.code or 'manual'
+ order= obj_payment_order.browse(cr, uid, context['active_id'], context)
+ t = order.mode and order.mode.type.code or 'manual'
if t == 'manual' :
obj_payment_order.set_done(cr,uid,context['active_id'],context)
return {}
@@ -49,12 +46,10 @@ class account_payment_make_payment(osv.osv_memory):
module, wizard= gw
result = mod_obj._get_id(cr, uid, module, wizard)
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
- result = act_obj.read(cr, uid, [id])[0]
+ return act_obj.read(cr, uid, [id])[0]
#result['context'] = str({'fiscalyear': data['form']['fiscalyear']})
- return result
account_payment_make_payment()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/account_payment/wizard/account_payment_pay_view.xml b/addons/account_payment/wizard/account_payment_pay_view.xml
index 322c0a72e48..566359d8b32 100644
--- a/addons/account_payment/wizard/account_payment_pay_view.xml
+++ b/addons/account_payment/wizard/account_payment_pay_view.xml
@@ -8,7 +8,7 @@
form
-
+
calendar.attendee.search
@@ -108,47 +108,47 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
- Event Invitations
- ir.actions.act_window
- calendar.attendee
- form
- tree,form
-
- {'default_sent_by_uid': uid}
-
+
+ Event Invitations
+ ir.actions.act_window
+ calendar.attendee
+ form
+ tree,form
+
+ {'default_sent_by_uid': uid}
+
-
+
+ parent="base.menu_base_config" sequence="15" />
-
+
-
-
+
-
+
res.alarm.form
res.alarm
form
@@ -165,7 +165,7 @@
-
+
res.alarm.tree
@@ -189,198 +189,199 @@
tree,form
-
+
+
-
- Event Form
- calendar.event
- form
-
-
-
-
+
+ Event Form
+ calendar.event
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
- Event Tree
- calendar.event
- tree
-
-
-
-
-
-
-
-
-
-
-
+
+ Event Tree
+ calendar.event
+ tree
+
+
+
+
+
+
+
+
+
+
+
-
+
-
- Events Calendar
- calendar.event
- calendar
-
-
-
-
-
-
-
-
-
+
+ Events Calendar
+ calendar.event
+ calendar
+
+
+
+
+
+
+
+
+
-
+
-
- Calendar Events Search
- calendar.event
- search
-
+
+ Calendar Events Search
+ calendar.event
+ search
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
+
-
- Events
- ir.actions.act_window
- calendar.event
- form
- tree,form,calendar
-
-
+
+ Events
+ ir.actions.act_window
+ calendar.event
+ form
+ tree,form,calendar
+
+
-
+
-
diff --git a/addons/base_calendar/security/ir.model.access.csv b/addons/base_calendar/security/ir.model.access.csv
old mode 100755
new mode 100644
index eba4e092f14..a95b1e1a129
--- a/addons/base_calendar/security/ir.model.access.csv
+++ b/addons/base_calendar/security/ir.model.access.csv
@@ -1,9 +1,9 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_calendar_attendee","calendar.attendee","model_calendar_attendee",,1,1,1,1
-"access_calendar_alarm","calendar.alarm","model_calendar_alarm",,1,1,1,1
-"access_res_alarm","res.alarm","model_res_alarm",,1,1,1,1
-"access_calendar_event_all","calendar.event","model_calendar_event",,1,1,1,1
-"access_calendar_todo","calendar.todo","model_calendar_todo",,1,1,1,1
-"access_base_calendar_invite_attendee","base_calendar.invite.attendee","model_base_calendar_invite_attendee",,1,1,1,1
-"access_calendar_event_edit_all","calendar_event_edit_all","model_calendar_event_edit_all",,1,1,1,1
-"access_base_calendar_set_exrule","base.calendar.set.exrule","model_base_calendar_set_exrule",,1,1,1,1
+"access_calendar_attendee","calendar.attendee","model_calendar_attendee",base.group_user,1,1,1,1
+"access_calendar_alarm","calendar.alarm","model_calendar_alarm",base.group_user,1,1,1,1
+"access_res_alarm","res.alarm","model_res_alarm",base.group_user,1,1,1,1
+"access_calendar_event_all","calendar.event","model_calendar_event",base.group_user,1,1,1,1
+"access_calendar_todo","calendar.todo","model_calendar_todo",base.group_user,1,1,1,1
+"access_base_calendar_invite_attendee","base_calendar.invite.attendee","model_base_calendar_invite_attendee",base.group_user,1,1,1,1
+"access_calendar_event_edit_all","calendar_event_edit_all","model_calendar_event_edit_all",base.group_user,1,1,1,1
+"access_base_calendar_set_exrule","base.calendar.set.exrule","model_base_calendar_set_exrule",base.group_user,1,1,1,1
diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml
index 7a543f5466f..cbe4c9d24a2 100644
--- a/addons/base_setup/base_setup_installer.xml
+++ b/addons/base_setup/base_setup_installer.xml
@@ -18,10 +18,10 @@
If you don't think you need any of these right now, you can easily install them later on.
-
- 15
-
-
+
+ 15
+
+
Install Generic Modules
@@ -29,7 +29,7 @@ If you don't think you need any of these right now, you can easily install them
-
+
@@ -60,11 +60,11 @@ If you don't think you need any of these right now, you can easily install them
base_setup_installer_action_replace
tree
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index a3d7639076f..7765ba8fbe8 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -66,7 +66,7 @@
states="open,pending" type="object"
icon="gtk-go-forward" />
-
+
diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py
index 98e4c6f3ded..440033a2400 100644
--- a/addons/crm/crm_opportunity.py
+++ b/addons/crm/crm_opportunity.py
@@ -52,8 +52,9 @@ class crm_opportunity(osv.osv):
'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
'phone': fields.char("Phone", size=64),
'date_deadline': fields.date('Expected Closing'),
- 'date_action': fields.date('Next Action'),
- }
+ 'date_action': fields.date('Next Action Date'),
+ 'title_action': fields.char('Next Action', size=64),
+ }
def case_close(self, cr, uid, ids, *args):
"""Overrides close for crm_case for setting probability and close date
@param self: The object pointer
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index 5fbfa766cbf..da111cf9518 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -81,6 +81,7 @@
name="%(opportunity2phonecall_act)d" icon="gtk-redo" type="action" />
+
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index f854981858c..19e3f731606 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -2,22 +2,22 @@
+ parent="base.menu_base_config" sequence="1"/>
+ parent="base.menu_crm_config_sales" sequence="1"/>
+ parent="base.menu_base_config" sequence="4"/>
+ parent="base.menu_base_partner" sequence="8" />
@@ -57,7 +57,7 @@
-
+
crm.case.section.tree
@@ -73,7 +73,7 @@
-
+
Sales Team
@@ -82,7 +82,7 @@
-
+
crm.case.stage.tree
@@ -99,7 +99,7 @@
-
+
crm.case.stage.form
@@ -120,7 +120,7 @@
-
+
Stages
@@ -144,7 +144,7 @@
-
+
crm.case.categ.tree
@@ -158,7 +158,7 @@
-
+
Categories
@@ -173,7 +173,7 @@
-
+
crm.case.resource.type.tree
@@ -188,7 +188,7 @@
-
+
crm.case.resource.type.form
@@ -203,7 +203,7 @@
-
+
Resource Type
@@ -220,7 +220,7 @@
-
+
crm.case.log.tree
@@ -240,7 +240,7 @@
-
+
crm.segmentation.line.tree
@@ -257,7 +257,7 @@
-
+
crm.segmentation.line.form
@@ -277,7 +277,7 @@
-
+
crm.segmentation.form
@@ -322,7 +322,7 @@
-
+
crm.segmentation.tree
@@ -383,7 +383,7 @@
-
+
view.res.partner.form.crm.inherited1
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index f6ac9238b3c..0601cd47c71 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -232,11 +232,9 @@
-
diff --git a/addons/crm/report/crm_phonecall_report_view.xml b/addons/crm/report/crm_phonecall_report_view.xml
index ddc50460e31..597d06faf7d 100644
--- a/addons/crm/report/crm_phonecall_report_view.xml
+++ b/addons/crm/report/crm_phonecall_report_view.xml
@@ -189,7 +189,6 @@
diff --git a/addons/crm/res_partner_view.xml b/addons/crm/res_partner_view.xml
index 24523f7b072..769cb5d5c81 100644
--- a/addons/crm/res_partner_view.xml
+++ b/addons/crm/res_partner_view.xml
@@ -4,62 +4,62 @@
-
- res.partner.crm.info.inherit
- res.partner
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/security/ir.model.access.csv b/addons/crm/security/ir.model.access.csv
index bbd437dba47..a6935144e7e 100644
--- a/addons/crm/security/ir.model.access.csv
+++ b/addons/crm/security/ir.model.access.csv
@@ -1,19 +1,23 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_crm_segmentation_user","crm.segmentation user","model_crm_segmentation","crm.group_crm_user",1,0,0,0
+"access_crm_segmentation_line_user","crm.segmentation.line user","model_crm_segmentation_line","crm.group_crm_user",1,0,0,0
"access_crm_segmentation","crm.segmentation","model_crm_segmentation","crm.group_crm_manager",1,1,1,1
"access_crm_segmentation_line","crm.segmentation.line","model_crm_segmentation_line","crm.group_crm_manager",1,1,1,1
"access_crm_case_section","crm.case.section","model_crm_case_section","crm.group_crm_user",1,0,0,0
"access_crm_case_categ","crm.case.categ","model_crm_case_categ","crm.group_crm_user",1,0,0,0
-"access_crm_meeting","crm.meeting","model_crm_meeting","crm.group_crm_manager",1,1,1,1
-"access_crm_lead","crm.lead","model_crm_lead","crm.group_crm_manager",1,1,1,1
-"access_crm_phonecall","crm.phonecall","model_crm_phonecall","crm.group_crm_manager",1,1,1,1
+"access_crm_meeting","crm.meeting","model_crm_meeting","crm.group_crm_user",1,1,1,1
+"access_crm_lead","crm.lead","model_crm_lead","crm.group_crm_user",1,1,1,1
+"access_crm_phonecall","crm.phonecall","model_crm_phonecall","crm.group_crm_user",1,1,1,1
+"access_crm_case_section_user","crm.case.section.user","model_crm_case_section","crm.group_crm_user",1,0,0,0
"access_crm_case_section_manager","crm.case.section.manager","model_crm_case_section","crm.group_crm_manager",1,1,1,1
+"access_crm_case_categ_user","crm.case.categ.user","model_crm_case_categ","crm.group_crm_user",1,0,0,0
"access_crm_case_categ_manager","crm.case.categ.manager","model_crm_case_categ","crm.group_crm_manager",1,1,1,1
"access_crm_case_stage","crm.case.stage","model_crm_case_stage","crm.group_crm_user",1,0,0,0
"access_crm_case_stage_manager","crm.case.stage","model_crm_case_stage","crm.group_crm_manager",1,1,1,1
"access_crm_case_resource_type_user","crm_case_resource_type user","model_crm_case_resource_type","crm.group_crm_user",1,0,0,0
"access_crm_case_resource_type_manager","crm_case_resource_type manager","model_crm_case_resource_type","crm.group_crm_manager",1,1,1,1
-"access_crm_lead_report_user","crm.lead.report","model_crm_lead_report","crm.group_crm_user",1,0,0,0
-"access_crm_phonecall_report_user","crm.phonecall.report","model_crm_phonecall_report","crm.group_crm_user",1,0,0,0
+"access_crm_lead_report_manager","crm.lead.report","model_crm_lead_report","crm.group_crm_manager",1,0,0,0
+"access_crm_phonecall_report_manager","crm.phonecall.report","model_crm_phonecall_report","crm.group_crm_manager",1,0,0,0
"access_crm_lead2partner","crm.lead2partner","model_crm_lead2partner","crm.group_crm_user",1,1,1,1
"access_crm_lead2opportunity","crm.lead2opportunity","model_crm_lead2opportunity","crm.group_crm_user",1,1,1,1
"access_crm_opportunity2phonecall","crm.opportunity2phonecall","model_crm_opportunity2phonecall","crm.group_crm_user",1,1,1,1
@@ -24,6 +28,11 @@
"access_crm_send_mail_attachment","crm.send.mail.attachment","model_crm_send_mail_attachment","crm.group_crm_user",1,1,1,1
"access_crm_partner2opportunity","crm.partner2opportunity","model_crm_partner2opportunity","crm.group_crm_user",1,1,1,1
"access_crm_lead2opportunity_partner","crm.lead2opportunity.partner","model_crm_lead2opportunity_partner","crm.group_crm_user",1,1,1,1
-"access_crm_installer","crm.installer.rule","model_crm_installer","crm.group_crm_user",1,1,1,1
-"access_crm_lead_forward_to_partner","crm.lead.forward.to.partner","model_crm_lead_forward_to_partner","crm.group_crm_user",2,2,2,2
+"access_crm_installer","crm.installer.rule","model_crm_installer","base.group_system",1,1,1,1
+"access_crm_lead_forward_to_partner","crm.lead.forward.to.partner","model_crm_lead_forward_to_partner","crm.group_crm_user",1,1,1,1
"access_mailgate_thread","mailgate.thread","model_mailgate_thread","crm.group_crm_user",1,1,1,1
+"access_res_partner","res.partner.crm.user","base.model_res_partner","crm.group_crm_user",1,0,0,0
+"access_res_partner_address","res.partner.address.crm.user","base.model_res_partner_address","crm.group_crm_user",1,0,0,0
+"access_res_partner_category","res.partner.category.crm.user","base.model_res_partner_category","crm.group_crm_user",1,0,0,0
+"mail_gateway_mailgate_message","mail_gateway.mailgate.message","model_mailgate_message","crm.group_crm_user",1,1,1,1
+"mail_gateway_mailgate_thread","mail_gateway.mailgate.thread","model_mailgate_thread","crm.group_crm_user",1,1,1,1
diff --git a/addons/crm_profiling/wizard/open_questionnaire.py b/addons/crm_profiling/wizard/open_questionnaire.py
index 0fc50b9186a..91b82a02d1a 100644
--- a/addons/crm_profiling/wizard/open_questionnaire.py
+++ b/addons/crm_profiling/wizard/open_questionnaire.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# 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 pooler
@@ -50,11 +50,11 @@ class open_questionnaire(wizard.interface):
states = {
'init': {
'actions': [],
- 'result': {'type': 'form', 'arch': _questionnaire_choice_arch, 'fields': _questionnaire_choice_fields, 'state':[('end', 'Cancel'), ('open', 'Open Questionnaire')]}
+ 'result': {'type': 'form', 'arch': _questionnaire_choice_arch, 'fields': _questionnaire_choice_fields, 'state':[('end', 'Cancel','gtk-cancel'), ('open', 'Open Questionnaire','terp-camera_test')]}
},
'open': {
'actions': [build_form],
- 'result': {'type': 'form', 'arch':_QUEST_FORM, 'fields': _QUEST_FIELDS, 'state':[('end', 'Cancel'), ('compute', 'Save Data')]}
+ 'result': {'type': 'form', 'arch':_QUEST_FORM, 'fields': _QUEST_FIELDS, 'state':[('end', 'Cancel','gtk-cancel'), ('compute', 'Save Data','terp-stock_format-scientific')]}
},
'compute': {
'actions': [],
diff --git a/addons/document/document_view.xml b/addons/document/document_view.xml
index 0bab191d942..b1fa9a510c9 100644
--- a/addons/document/document_view.xml
+++ b/addons/document/document_view.xml
@@ -3,7 +3,7 @@
-
+
@@ -13,15 +13,15 @@
form
-
-
-
-
-
-
+
+
+
+
+
+
-
+
@@ -71,13 +71,13 @@
-
+
-
+
diff --git a/addons/email_template/__init__.py b/addons/email_template/__init__.py
old mode 100755
new mode 100644
diff --git a/addons/email_template/__openerp__.py b/addons/email_template/__openerp__.py
old mode 100755
new mode 100644
index 9c5f7bb5c70..ef50f631e3e
--- a/addons/email_template/__openerp__.py
+++ b/addons/email_template/__openerp__.py
@@ -16,6 +16,7 @@
'email_template_view.xml',
'email_template_mailbox_view.xml',
'wizard/email_template_send_wizard_view.xml',
+ 'security/ir.model.access.csv'
],
"installable": True,
"active": False,
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py
old mode 100755
new mode 100644
index 1cef7aac6e3..2d34a095ff5
--- a/addons/email_template/email_template.py
+++ b/addons/email_template/email_template.py
@@ -17,10 +17,10 @@ try:
TEMPLATE_ENGINES.append(('mako', 'Mako Templates'))
except:
LOGGER.notifyChannel(
- _("Email Template"),
- netsvc.LOG_ERROR,
- _("Mako templates not installed")
- )
+ _("Email Template"),
+ netsvc.LOG_WARNING,
+ _("Mako templates not installed")
+ )
try:
from django.template import Context, Template as DjangoTemplate
#Workaround for bug:
@@ -31,10 +31,10 @@ try:
TEMPLATE_ENGINES.append(('django', 'Django Template'))
except:
LOGGER.notifyChannel(
- _("Email Template"),
- netsvc.LOG_ERROR,
- _("Django templates not installed")
- )
+ _("Email Template"),
+ netsvc.LOG_WARNING,
+ _("Django templates not installed")
+ )
import email_template_engines
import tools
@@ -468,7 +468,7 @@ class email_template(osv.osv):
context)
return True
- def generate_mailbox_item_from_template(self,
+ def _generate_mailbox_item_from_template(self,
cursor,
user,
template,
@@ -559,6 +559,8 @@ class email_template(osv.osv):
'folder':'drafts',
'mail_type':'multipart/alternative'
}
+ if not mailbox_values['account_id']:
+ raise Exception("Unable to send the mail. No account linked to the template.")
#Use signatures if allowed
if template.use_sign:
sign = self.pool.get('res.users').read(cursor,
@@ -570,13 +572,17 @@ class email_template(osv.osv):
mailbox_values['body_text'] += sign
if mailbox_values['body_html']:
mailbox_values['body_html'] += sign
+ print 'Creating', mailbox_values
mailbox_id = self.pool.get('email_template.mailbox').create(
cursor,
user,
mailbox_values,
context)
+
+ print 'Sending', mailbox_id
+ self.pool.get('email_template.mailbox').send_this_mail(cursor, user, [mailbox_id], context)
return mailbox_id
-
+
def generate_mail(self,
cursor,
user,
@@ -588,6 +594,7 @@ class email_template(osv.osv):
template = self.browse(cursor, user, template_id, context=context)
if not template:
raise Exception("The requested template could not be loaded")
+ print 'loaded', record_ids
for record_id in record_ids:
mailbox_id = self._generate_mailbox_item_from_template(
cursor,
@@ -595,6 +602,7 @@ class email_template(osv.osv):
template,
record_id,
context)
+ print 'loaded'
mail = self.pool.get('email_template.mailbox').browse(
cursor,
user,
@@ -616,7 +624,7 @@ class email_template(osv.osv):
mailbox_id,
{'folder':'outbox'},
context=context
- )
+ )
return True
email_template()
diff --git a/addons/email_template/email_template_account.py b/addons/email_template/email_template_account.py
old mode 100755
new mode 100644
diff --git a/addons/email_template/email_template_account_view.xml b/addons/email_template/email_template_account_view.xml
old mode 100755
new mode 100644
diff --git a/addons/email_template/email_template_engines.py b/addons/email_template/email_template_engines.py
old mode 100755
new mode 100644
diff --git a/addons/email_template/email_template_mailbox.py b/addons/email_template/email_template_mailbox.py
old mode 100755
new mode 100644
index 45eef77729e..fe9ca334d21
--- a/addons/email_template/email_template_mailbox.py
+++ b/addons/email_template/email_template_mailbox.py
@@ -41,9 +41,7 @@ class email_template_mailbox(osv.osv):
return True
def send_this_mail(self, cr, uid, ids=None, context=None):
- if ids is None:
- ids = []
- for id in ids:
+ for id in (ids or []):
try:
account_obj = self.pool.get('email_template.account')
values = self.read(cr, uid, id, [], context)
diff --git a/addons/email_template/email_template_mailbox_view.xml b/addons/email_template/email_template_mailbox_view.xml
old mode 100755
new mode 100644
diff --git a/addons/email_template/email_template_scheduler_data.xml b/addons/email_template/email_template_scheduler_data.xml
old mode 100755
new mode 100644
diff --git a/addons/email_template/email_template_view.xml b/addons/email_template/email_template_view.xml
old mode 100755
new mode 100644
diff --git a/addons/email_template/email_template_workflow.xml b/addons/email_template/email_template_workflow.xml
old mode 100755
new mode 100644
diff --git a/addons/email_template/html2text.py b/addons/email_template/html2text.py
old mode 100755
new mode 100644
diff --git a/addons/email_template/security/email_template_security.xml b/addons/email_template/security/email_template_security.xml
index 90067252eca..1883ff793e6 100755
--- a/addons/email_template/security/email_template_security.xml
+++ b/addons/email_template/security/email_template_security.xml
@@ -2,6 +2,10 @@
+
+ Email Template / Admin
+
+
Email Template / Settings_Manager
diff --git a/addons/email_template/security/ir.model.access.csv b/addons/email_template/security/ir.model.access.csv
new file mode 100644
index 00000000000..958c43f42cd
--- /dev/null
+++ b/addons/email_template/security/ir.model.access.csv
@@ -0,0 +1,7 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_email_template_engines","email_template.engines","model_email_template_engines","email_template.res_groups_email_template_admin",1,1,1,1
+"access_email_template_account","email_template.account","model_email_template_account","email_template.res_groups_email_template_admin",1,1,1,1
+"access_email_template","email.template","model_email_template","email_template.res_groups_email_template_admin",1,1,1,1
+"access_email_template_preview","email_template.preview","model_email_template_preview","email_template.res_groups_email_template_admin",1,1,1,1
+"access_email_template_mailbox","email_template.mailbox","model_email_template_mailbox","email_template.res_groups_email_template_admin",1,1,1,1
+"access_email_template_send_wizard","email_template.send.wizard","model_email_template_send_wizard","email_template.res_groups_email_template_admin",1,1,1,1
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index 75da20cef20..5e862781408 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -10,6 +10,7 @@
id="menu_hr_configuration"
name="Configuration"
parent="hr.menu_hr_root"
+ groups="group_hr_manager"
sequence="50" />
\n\t\n'
- data['file_save'] = base64.encodestring(data_of_file)
- self.write(cr, uid, ids, {'file_save': data['file_save'], 'name': 'vat_declare.xml'}, context=context)
- return True
+ model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_vat_save')], context=context)
+ resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
+ context['file_save'] = data_of_file
+ return {
+ 'name': _('Save XML For Vat declaration'),
+ 'context': context,
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'l1on_be.vat.declaration',
+ 'views': [(resource_id,'form')],
+ 'view_id': 'view_vat_save',
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ }
+
l10n_be_vat_declaration()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/l10n_be/wizard/l10n_be_account_vat_declaration_view.xml b/addons/l10n_be/wizard/l10n_be_account_vat_declaration_view.xml
index 342226930ce..b8de24bf87e 100644
--- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration_view.xml
+++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration_view.xml
@@ -13,31 +13,46 @@
form
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+ Save XML
+ l1on_be.vat.declaration
+ form
+
+
+
+
-
-
-
-
+
+
+
+
-
+
-
+
Vat Declaraion
ir.actions.act_window
diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py
index 954b4675a49..d54d15e5b57 100644
--- a/addons/l10n_be/wizard/l10n_be_vat_intra.py
+++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py
@@ -31,6 +31,11 @@ class partner_vat_intra(osv.osv_memory):
_name = "partner.vat.intra"
_description = 'Partner VAT Intra'
+ def _get_xml_data(self, cr, uid, context=None):
+ if context.get('file_save', False):
+ return base64.encodestring(context['file_save'])
+ return ''
+
def _get_europe_country(self, cursor, user, context=None):
return self.pool.get('res.country').search(cursor, user, [('code', 'in', ['AT', 'BG', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB'])])
@@ -56,6 +61,8 @@ class partner_vat_intra(osv.osv_memory):
_defaults = {
'country_ids': _get_europe_country,
+ 'file_save': _get_xml_data,
+ 'name': 'vat_Intra.xml',
}
def create_xml(self, cursor, user, ids, context=None):
@@ -65,6 +72,7 @@ class partner_vat_intra(osv.osv_memory):
obj_partner = self.pool.get('res.partner')
obj_partner_add = self.pool.get('res.partner.address')
obj_country = self.pool.get('res.country')
+ mod_obj = self.pool.get('ir.model.data')
street = zip_city = country = p_list = data_clientinfo = ''
error_message = list_partner = []
seq = amount_sum = 0
@@ -132,14 +140,20 @@ class partner_vat_intra(osv.osv_memory):
amount_sum = int(amount_sum)
data_decl = '\n\t'
data_file += str(data_decl) + str(data_comp) + str(data_period) + str(data_clientinfo) + '\n\t\n'
- data = {
- 'msg': 'XML Flie has been Created. Save the File with '".xml"' extension.',
- 'file_save': base64.encodestring(data_file),
- 'name': 'vat_Intra.xml',
- 'country_ids': [[6, 0, obj_country.search(cursor, user, [('code', 'in', ['AT', 'BG', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB'])])]],
- }
- self.write(cursor, user, ids, {'file_save':data['file_save'], 'msg':data['msg'], 'name':data['name'], 'no_vat':p_list, 'country_ids':data['country_ids']}, context=context)
- return True
+ model_data_ids = mod_obj.search(cursor, user,[('model','=','ir.ui.view'),('name','=','view_vat_intra_save')], context=context)
+ resource_id = mod_obj.read(cursor, user, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
+ context['file_save'] = data_file
+ return {
+ 'name': _('Save'),
+ 'context': context,
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'partner.vat.intra',
+ 'views': [(resource_id,'form')],
+ 'view_id': 'view_vat_intra_save',
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ }
partner_vat_intra()
diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra_view.xml b/addons/l10n_be/wizard/l10n_be_vat_intra_view.xml
index 59fa21000a1..114a7f593d0 100644
--- a/addons/l10n_be/wizard/l10n_be_vat_intra_view.xml
+++ b/addons/l10n_be/wizard/l10n_be_vat_intra_view.xml
@@ -13,32 +13,48 @@
form
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+ Partner VAT intra Save
+ partner.vat.intra
+ form
+
+
+
+
+
-
-
-
-
-
@@ -46,6 +62,7 @@
+
Partner Vat Intra
ir.actions.act_window
diff --git a/addons/marketing/__openerp__.py b/addons/marketing/__openerp__.py
index ee6abca5355..6db46333985 100644
--- a/addons/marketing/__openerp__.py
+++ b/addons/marketing/__openerp__.py
@@ -29,7 +29,10 @@
"description": "Menu for Marketing",
'website': 'http://www.openerp.com',
'init_xml': [],
- 'update_xml': ['marketing_view.xml'],
+ 'update_xml': [
+ 'marketing_view.xml',
+ 'security/ir.model.access.csv'
+ ],
'demo_xml': [],
'installable': True,
'active': False,
diff --git a/addons/marketing/marketing_view.xml b/addons/marketing/marketing_view.xml
index 7d8a46a8a92..800b85f7c49 100644
--- a/addons/marketing/marketing_view.xml
+++ b/addons/marketing/marketing_view.xml
@@ -29,8 +29,9 @@
Configure
-
+
+
diff --git a/addons/marketing/marketing_wizard.py b/addons/marketing/marketing_wizard.py
index 8eb1d1a01f4..78b4e78ff6c 100644
--- a/addons/marketing/marketing_wizard.py
+++ b/addons/marketing/marketing_wizard.py
@@ -25,7 +25,8 @@ class marketing_installer(osv.osv_memory):
_name = 'marketing.installer'
_inherit = 'res.config.installer'
_columns = {
- # Generic modules
+ 'email_template':fields.boolean('Automated E-Mails',
+ help="Helps you to design templates of emails and integrate them in your different processes."),
'marketing_campaign':fields.boolean('Marketing Campaigns',
help="Helps you to manage marketing campaigns and automate actions and communication steps."),
'marketing_campaign_mailchimp':fields.boolean('Mailchimp Integration',
diff --git a/addons/marketing/security/ir.model.access.csv b/addons/marketing/security/ir.model.access.csv
new file mode 100644
index 00000000000..2a712aab4fd
--- /dev/null
+++ b/addons/marketing/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_marketing_installer","marketing.installer","model_marketing_installer","base.group_system",1,1,1,1
+"access_res_config_installer","access_marketing_installer","base.model_res_config_installer","base.group_system",1,1,1,1
diff --git a/addons/marketing_campaign/__init__.py b/addons/marketing_campaign/__init__.py
old mode 100755
new mode 100644
diff --git a/addons/marketing_campaign/__openerp__.py b/addons/marketing_campaign/__openerp__.py
old mode 100755
new mode 100644
index 992731c1332..8abbf9eb706
--- a/addons/marketing_campaign/__openerp__.py
+++ b/addons/marketing_campaign/__openerp__.py
@@ -39,6 +39,8 @@
'marketing_campaign_data.xml',
'marketing_campaign_workflow.xml',
'report/campaign_analysis_view.xml',
+ "security/marketing_campaign_security.xml",
+ "security/ir.model.access.csv"
],
'demo_xml': [
'marketing_campaign_demo.xml',
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
old mode 100755
new mode 100644
index 4773a190a41..7b1a6b3e441
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -101,7 +101,7 @@ class marketing_campaign_segment(osv.osv):
_columns = {
'name': fields.char('Name', size=64,required=True),
'campaign_id': fields.many2one('marketing.campaign', 'Campaign',
- required=True),
+ required=True, select=1),
'object_id': fields.related('campaign_id','object_id',
type='many2one', relation='ir.model',
string='Object'),
@@ -200,7 +200,7 @@ class marketing_campaign_activity(osv.osv):
_columns = {
'name': fields.char('Name', size=128, required=True),
'campaign_id': fields.many2one('marketing.campaign', 'Campaign',
- required = True, ondelete='cascade'),
+ required = True, ondelete='cascade', select=1),
'object_id': fields.related('campaign_id','object_id',
type='many2one', relation='ir.model',
string='Object'),
@@ -242,7 +242,7 @@ class marketing_campaign_activity(osv.osv):
self._actions = {'paper' : self.process_wi_report,
'email' : self.process_wi_email,
'server_action' : self.process_wi_action,
- }
+ }
return super(marketing_campaign_activity, self).__init__(*args)
def search(self, cr, uid, args, offset=0, limit=None, order=None,
@@ -259,7 +259,7 @@ class marketing_campaign_activity(osv.osv):
return super(marketing_campaign_activity, self).search(cr, uid, args,
offset, limit, order, context, count)
- def process_wi_report(self, cr, uid, activity, workitem):
+ def process_wi_report(self, cr, uid, activity, workitem, context={}):
service = netsvc.LocalService('report.%s'%activity.report_id.report_name)
(report_data, format) = service.create(cr, uid, [], {}, {})
attach_vals = {
@@ -274,46 +274,58 @@ class marketing_campaign_activity(osv.osv):
self.pool.get('ir.attachment').create(cr, uid, attach_vals)
return True
- def process_wi_email(self, cr, uid, activity, workitem):
- template = activity.email_template_id
- accounts = template.enforce_from_account
- if not template.enforce_from_account:
- return {'error_msg' : "There is no account defined for the email"}
- if not workitem.partner_id.email:
- return {'error_msg' : "There is no email defined for the partner"}
- vals = {
- 'email_from': tools.ustr(accounts.name) + "<" + tools.ustr(accounts.email_id) + ">",
- 'email_to': workitem.partner_id.email,
- 'subject': template.def_subject,
- 'body_text': template.def_body_text,
- 'body_html': template.def_body_html,
- 'account_id':accounts.id,
- 'state':'na',
- 'mail_type':'multipart/alternative' #Options:'multipart/mixed','multipart/alternative','text/plain','text/html'
- }
-# if accounts.use_sign:
-# signature = self.pool.get('res.users').read(cr, uid, uid, ['signature'], context)['signature']
-# if signature:
-# vals['pem_body_text'] = tools.ustr(vals['pem_body_text'] or '') + signature
-# vals['pem_body_html'] = tools.ustr(vals['pem_body_html'] or '') + signature
+ def process_wi_email(self, cr, uid, activity, workitem, context=None):
+ print 'Sending Email Init', activity.name
+ return self.pool.get('email.template').generate_mail(cr, uid, activity.email_template_id.id, [workitem.res_id], context=context)
- #Create partly the mail and later update attachments
- mail_id = self.pool.get('email_template.mailbox').create(cr, uid, vals, context)
+ #if not template.enforce_from_account:
+ # self.pool.get('marketing.campaign.workitem').write(cr, uid, [workitem.id], {
+ # 'error_msg': 'There is no account defined for the email',
+ # 'state': 'exception'
+ # })
+ # return False
+ #if not workitem.partner_id.email:
+ # self.pool.get('marketing.campaign.workitem').write(cr, uid, [workitem.id], {
+ # 'error_msg': "There is no email defined for the partner",
+ # 'state': 'exception'
+ # })
+ # return False
+ #vals = {
+ # 'email_from': tools.ustr(accounts.name) + "<" + tools.ustr(accounts.email_id) + ">",
+ # 'email_to': template.email_to,
+ # 'email_cc': template.email_cc,
+ # 'email_bcc': template.email_bcc,
+ # 'subject': template.def_subject,
+ # 'body_text': template.def_body_text,
+ # 'body_html': template.def_body_html,
+ # 'account_id': accounts.id,
+ # 'state':'na',
+ # 'mail_type':'multipart/alternative' #Options:'multipart/mixed','multipart/alternative','text/plain','text/html'
+ #}
+# # if accounts.use_sign:
+# # signature = self.pool.get('res.users').read(cr, uid, uid, ['signature'], context)['signature']
+# # if signature:
+# # vals['pem_body_text'] = tools.ustr(vals['pem_body_text'] or '') + signature
+# # vals['pem_body_html'] = tools.ustr(vals['pem_body_html'] or '') + signature
+
+ ##Create partly the mail and later update attachments
+ #print 'Sending Email', vals
+ #mail_id = self.pool.get('email_template.mailbox').create(cr, uid, vals, context)
return True
-
- def process_wi_action(self, cr, uid, activity, workitem):
+
+ def process_wi_action(self, cr, uid, activity, workitem, context={}):
context = {}
server_obj = self.pool.get('ir.actions.server')
- server_obj.run(cr, uid, [activity.server_action_id.id], context)
+ server_obj.run(cr, uid, [activity.server_action_id.id], context)
return True
-
def process(self, cr, uid, act_id, wi_id, context={}):
activity = self.browse(cr, uid, act_id)
+ print 'Process', activity.name
workitem_obj = self.pool.get('marketing.campaign.workitem')
- workitem = workitem_obj.browse(cr, uid, wi_id)
- self._actions[activity.type](cr, uid, activity, workitem)
- return True
+ workitem = workitem_obj.browse(cr, uid, wi_id, context=context)
+ print 'WI', workitem, activity.type
+ return self._actions[activity.type](cr, uid, activity, workitem, context)
marketing_campaign_activity()
@@ -324,7 +336,7 @@ class marketing_campaign_transition(osv.osv):
_columns = {
'activity_from_id': fields.many2one('marketing.campaign.activity',
- 'Source Activity'),
+ 'Source Activity', select=1),
'activity_to_id': fields.many2one('marketing.campaign.activity',
'Destination Activity'),
'interval_nbr': fields.integer('Interval No.'),
@@ -366,12 +378,12 @@ class marketing_campaign_workitem(osv.osv):
'campaign_id': fields.related('segment_id', 'campaign_id',
type='many2one', relation='marketing.campaign', string='Campaign', readonly=True),
'object_id': fields.related('segment_id', 'campaign_id', 'object_id',
- type='many2one', relation='ir.model', string='Object'),
- 'res_id': fields.integer('Resource ID'),
+ type='many2one', relation='ir.model', string='Object', select=1),
+ 'res_id': fields.integer('Resource ID', select=1),
'res_name': fields.function(_res_name_get, method=True, string='Resource Name', type="char", size=64),
'date': fields.datetime('Execution Date'),
- 'partner_id': fields.many2one('res.partner', 'Partner'),
- 'state': fields.selection([('todo', 'ToDo'), ('inprogress', 'In Progress'),
+ 'partner_id': fields.many2one('res.partner', 'Partner', select=1),
+ 'state': fields.selection([('todo', 'To Do'), ('inprogress', 'In Progress'),
('exception', 'Exception'), ('done', 'Done'),
('cancelled', 'Cancelled')], 'State'),
@@ -400,8 +412,14 @@ class marketing_campaign_workitem(osv.osv):
self.create(cr, uid, workitem_vals)
return True
+ def button_draft(self, cr, uid, workitem_ids, context={}):
+ for wi in self.browse(cr, uid, workitem_ids, context=context):
+ if wi.state=='exception':
+ self.write(cr, uid, [wi.id], {'state':'todo'}, context=context)
+ return True
+
def button_cancel(self, cr, uid, workitem_ids, context={}):
- for wi in self.browse(cr, uid, workitem_ids):
+ for wi in self.browse(cr, uid, workitem_ids, context=context):
if wi.state in ('todo','exception'):
self.write(cr, uid, [wi.id], {'state':'cancelled'}, context=context)
return True
@@ -419,14 +437,18 @@ class marketing_campaign_workitem(osv.osv):
}
expr = eval(str(wi.activity_id.condition), eval_context)
if expr:
- try :
+ try:
+ result = True
if wi.campaign_id.mode in ('manual','active'):
- self.pool.get('marketing.campaign.activity').process(
+ result = self.pool.get('marketing.campaign.activity').process(
cr, uid, wi.activity_id.id, wi.id, context)
- self.write(cr, uid, wi.id, {'state': 'done'})
- self.process_chain(cr, uid, wi.id, context)
+ if result:
+ self.write(cr, uid, wi.id, {'state': 'done'})
+ self.process_chain(cr, uid, wi.id, context)
+ else:
+ self.write(cr, uid, wi.id, {'state': 'exception'})
except Exception,e:
- self.write(cr, uid, wi.id, {'state': 'exception'})
+ self.write(cr, uid, wi.id, {'state': 'exception', 'error_msg': str(e)})
else :
self.write(cr, uid, wi.id, {'state': 'cancelled'})
@@ -444,7 +466,7 @@ class marketing_campaign_workitem(osv.osv):
workitem_ids = self.search(cr, uid, [('state', '=', 'todo')])
else:
# manual states are not processed automatically
- pass
+ workitem_ids = []
if workitem_ids:
self.process(cr, uid, workitem_ids, context)
diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml
old mode 100755
new mode 100644
index ea25e0d3163..0ab2add38ba
--- a/addons/marketing_campaign/marketing_campaign_view.xml
+++ b/addons/marketing_campaign/marketing_campaign_view.xml
@@ -182,15 +182,15 @@
-
+
-
-
+
+
@@ -397,11 +397,16 @@
+
+
+
+
+
-
+
diff --git a/addons/marketing_campaign/security/ir.model.access.csv b/addons/marketing_campaign/security/ir.model.access.csv
new file mode 100644
index 00000000000..dfafc2cd8a5
--- /dev/null
+++ b/addons/marketing_campaign/security/ir.model.access.csv
@@ -0,0 +1,7 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_marketing_campaign_admin","marketing.campaign","model_marketing_campaign","marketing_campaign.res_groups_marketing_campaign",1,1,1,1
+"access_marketing_campaign_segment_campaignadmin","marketing.campaign.segment","model_marketing_campaign_segment","marketing_campaign.res_groups_marketing_campaign",1,1,1,1
+"access_marketing_campaign_activity_campaignadmin","marketing.campaign.activity","model_marketing_campaign_activity","marketing_campaign.res_groups_marketing_campaign",1,1,1,1
+"access_marketing_campaign_workitem_campaignadmin","marketing.campaign.workitem","model_marketing_campaign_workitem","marketing_campaign.res_groups_marketing_campaign",1,1,1,1
+"access_marketing_campaign_transition_campaignadmin","marketing.campaign.transition","model_marketing_campaign_transition","marketing_campaign.res_groups_marketing_campaign",1,1,1,1
+"access_marketing_campaign_analysis_campaignadmin","campaign.analysis","model_campaign_analysis","marketing_campaign.res_groups_marketing_campaign",1,0,0,0
diff --git a/addons/marketing_campaign/security/marketing_campaign_security.xml b/addons/marketing_campaign/security/marketing_campaign_security.xml
new file mode 100644
index 00000000000..e28fd4867ce
--- /dev/null
+++ b/addons/marketing_campaign/security/marketing_campaign_security.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ Marketing / Campaign
+
+
+
+
\ No newline at end of file
diff --git a/addons/mrp_repair/__openerp__.py b/addons/mrp_repair/__openerp__.py
index 12a796b4f3b..fa01d7120fd 100644
--- a/addons/mrp_repair/__openerp__.py
+++ b/addons/mrp_repair/__openerp__.py
@@ -34,7 +34,7 @@
* Notes for the technician and for the final customer
""",
'author': 'Tiny',
- 'depends': ['base', 'sale', 'account'],
+ 'depends': ['mrp', 'sale', 'account'],
'update_xml': [
'security/ir.model.access.csv',
'mrp_repair_sequence.xml',
diff --git a/addons/procurement/board_mrp_procurement_view.xml b/addons/procurement/board_mrp_procurement_view.xml
index 0a236352538..d5f71f6d4bc 100644
--- a/addons/procurement/board_mrp_procurement_view.xml
+++ b/addons/procurement/board_mrp_procurement_view.xml
@@ -8,7 +8,7 @@
form
-
+
diff --git a/addons/product/security/ir.model.access.csv b/addons/product/security/ir.model.access.csv
index 062db9e34e8..f1c24509ac9 100644
--- a/addons/product/security/ir.model.access.csv
+++ b/addons/product/security/ir.model.access.csv
@@ -18,7 +18,6 @@
"access_product_ul_user","product.ul.user","model_product_ul","base.group_user",1,0,0,0
"access_product_category_user","product.category.user","model_product_category","base.group_user",1,0,0,0
"access_product_template_user","product.template.user","model_product_template","base.group_user",1,0,0,0
-"access_product_product_user","product.product.user","model_product_product","base.group_user",1,0,0,0
"access_product_packaging_user","product.packaging.user","model_product_packaging","base.group_user",1,0,0,0
"access_product_supplierinfo_user","product.supplierinfo.user","model_product_supplierinfo","base.group_user",1,0,0,0
"access_pricelist_partnerinfo_user","pricelist.partnerinfo.user","model_pricelist_partnerinfo","base.group_user",1,0,0,0
diff --git a/addons/sale/__openerp__.py b/addons/sale/__openerp__.py
index 9cac508b1b8..d60b132a827 100644
--- a/addons/sale/__openerp__.py
+++ b/addons/sale/__openerp__.py
@@ -48,7 +48,7 @@
""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
- 'depends': ['product', 'stock', 'mrp_procurement', 'process','board'],
+ 'depends': ['product', 'stock', 'procurement', 'process','board'],
'init_xml': [],
'update_xml': [
'wizard/sale_make_invoice_advance.xml',
diff --git a/addons/sale/security/ir.model.access.csv b/addons/sale/security/ir.model.access.csv
index de0f55b80b1..f2f3b36f1f4 100644
--- a/addons/sale/security/ir.model.access.csv
+++ b/addons/sale/security/ir.model.access.csv
@@ -16,12 +16,11 @@
"access_sale_order_line_stock_worker","sale.order.line stock worker","model_sale_order_line","stock.group_stock_user",1,1,0,0
"access_sale_order_manager","sale.order.manager","model_sale_order","group_sale_manager",1,1,1,1
"access_sale_order_line_manager","sale.order.line.manager","model_sale_order_line","group_sale_manager",1,1,1,1
-"access_sale_report","sale.report","model_sale_report","group_sale_user",1,1,1,0
-"access_sale_report_manager","sale.report","model_sale_report","group_sale_manager",1,1,1,1
+"access_sale_report_manager","sale.report","model_sale_report","group_sale_manager",1,0,0,0
"access_sale_order_line_make_invoice","sale.order.line.make.invoice","model_sale_order_line_make_invoice","group_sale_user",1,1,1,0
"access_sale_order_line_make_invoice_manager","sale.order.line.make.invoice","model_sale_order_line_make_invoice","group_sale_manager",1,1,1,1
"access_sale_advance_payment_inv","sale.advance.payment.inv","model_sale_advance_payment_inv","group_sale_user",1,1,1,0
"access_sale_advance_payment_inv_manager","sale.advance.payment.inv","model_sale_advance_payment_inv","group_sale_manager",1,1,1,1
"access_sale_open_invoice","sale.open.invoice","model_sale_open_invoice","group_sale_user",1,1,1,0
"access_sale_open_invoice_manager","sale.open.invoice","model_sale_open_invoice","group_sale_manager",1,1,1,1
-
+"access_product_product_sale_user","product.product.sale.user","model_product_product","group_sale_user",1,0,0,0
diff --git a/addons/stock/board_warehouse_view.xml b/addons/stock/board_warehouse_view.xml
index 08ece3f821d..0c13e83cd84 100644
--- a/addons/stock/board_warehouse_view.xml
+++ b/addons/stock/board_warehouse_view.xml
@@ -23,7 +23,6 @@
-