Date: Tue, 27 Jul 2010 14:41:48 +0530
Subject: [PATCH 3/8] [FIX] account: fixes abs() with formatLang() problem in
P&L and Balance sheet Reports
bzr revid: vra@tinyerp.com-20100727091148-cz9pp7xyin85tgw5
---
addons/account/report/report_balance_sheet.rml | 10 +++++-----
.../report/report_balance_sheet_horizontal.rml | 8 ++++----
addons/account/report/report_bs.py | 4 ++++
addons/account/report/report_pl.py | 6 +++++-
addons/account/report/report_pl_account.rml | 12 ++++++------
.../account/report/report_pl_account_horizontal.rml | 12 ++++++------
6 files changed, 30 insertions(+), 22 deletions(-)
diff --git a/addons/account/report/report_balance_sheet.rml b/addons/account/report/report_balance_sheet.rml
index c540e16f58e..20f52cdd2f2 100644
--- a/addons/account/report/report_balance_sheet.rml
+++ b/addons/account/report/report_balance_sheet.rml
@@ -186,7 +186,7 @@
[[ '. '*(a['level']-1) ]] [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]
- [[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]
+ [[ a['balance'] and formatLang(get_abs(a['balance'])) or 0.0 ]]
@@ -196,7 +196,7 @@
Balance:([[ get_currency(data['form']) ]])
- [[ sum_dr() and formatLang(sum_dr()) or 0.0 ]]
+ [[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]
@@ -221,10 +221,10 @@
[[ repeatIn(get_lines_another('asset'), 'a') ]] [[ a['code'] ]][[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]]
- [[ a['code'] ]][[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]
+ [[ '. '*(a['level']-1) ]] [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]
- [[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]
+ [[ a['balance'] and formatLang(get_abs(a['balance'])) or 0.0 ]]
@@ -234,7 +234,7 @@
Balance:([[ get_currency(data['form']) ]])
- [[ sum_cr() and formatLang(sum_cr()) or 0.0 ]]
+ [[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]
diff --git a/addons/account/report/report_balance_sheet_horizontal.rml b/addons/account/report/report_balance_sheet_horizontal.rml
index d9b92da3856..3e60f7bfd2c 100644
--- a/addons/account/report/report_balance_sheet_horizontal.rml
+++ b/addons/account/report/report_balance_sheet_horizontal.rml
@@ -197,7 +197,7 @@
[[ '. '*(a['level']-1) ]] [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]
- [[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]
+ [[ a['balance'] and formatLang(get_abs(a['balance'])) or 0.0 ]]
[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]] [[ a['code1'] ]]
@@ -206,7 +206,7 @@
[[ '. '*(a['level1']-1) ]] [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name1'] ]]
- [[ a['balance1'] and formatLang(abs(a['balance1'])) or 0.0 ]]
+ [[ a['balance1'] and formatLang(get_abs(a['balance1'])) or 0.0 ]]
@@ -216,13 +216,13 @@
Balance:([[ get_currency(data['form']) ]])
- [[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]]
+ [[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]
Balance:([[ get_currency(data['form']) ]])
- [[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]]
+ [[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]
diff --git a/addons/account/report/report_bs.py b/addons/account/report/report_bs.py
index 5a7294338c5..04fafd7ed30 100644
--- a/addons/account/report/report_bs.py
+++ b/addons/account/report/report_bs.py
@@ -37,6 +37,7 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
self.result_temp=[]
self.localcontext.update({
'time': time,
+ 'get_abs' : self.get_abs,
'get_lines' : self.get_lines,
'get_lines_another' : self.get_lines_another,
'get_company': self.get_company,
@@ -48,6 +49,9 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
})
self.context = context
+
+ def get_abs(self,amount):
+ return abs(amount)
def sum_dr(self):
if self.res_pl['type'] == 'Net Profit':
diff --git a/addons/account/report/report_pl.py b/addons/account/report/report_pl.py
index c693b9940c9..e78639cff83 100644
--- a/addons/account/report/report_pl.py
+++ b/addons/account/report/report_pl.py
@@ -35,6 +35,7 @@ class report_pl_account_horizontal(rml_parse.rml_parse):
self.result_temp=[]
self.localcontext.update( {
'time': time,
+ 'get_abs' : self.get_abs,
'get_lines' : self.get_lines,
'get_lines_another' : self.get_lines_another,
'get_company': self.get_company,
@@ -45,7 +46,10 @@ class report_pl_account_horizontal(rml_parse.rml_parse):
'final_result' : self.final_result,
})
self.context = context
-
+
+ def get_abs(self,amount):
+ return abs(amount)
+
def final_result(self):
return self.res_pl
diff --git a/addons/account/report/report_pl_account.rml b/addons/account/report/report_pl_account.rml
index 6e72a198115..80aa4b97701 100644
--- a/addons/account/report/report_pl_account.rml
+++ b/addons/account/report/report_pl_account.rml
@@ -201,7 +201,7 @@
- [[ a.balance and formatLang(abs(a.balance)) or 0.0 ]]
+ [[ a.balance and formatLang(get_abs(a.balance)) or 0.0 ]]
@@ -214,7 +214,7 @@
[[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or removeParentNode('blockTable') ]]
- [[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]
+ [[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(get_abs(final_result()['balance'])) or 0.0 ]]
@@ -224,7 +224,7 @@
Total:([[ get_currency(data['form']) ]])
- [[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]]
+ [[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]
@@ -256,7 +256,7 @@
- [[ a.balance and formatLang(abs(a.balance)) or 0.0 ]]
+ [[ a.balance and formatLang(get_abs(a.balance)) or 0.0 ]]
@@ -269,7 +269,7 @@
[[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or removeParentNode('blockTable') ]]
- [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]
+ [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(get_abs(final_result()['balance'])) or 0.0 ]]
@@ -279,7 +279,7 @@
Total:([[ get_currency(data['form']) ]])
- [[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]]
+ [[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]
diff --git a/addons/account/report/report_pl_account_horizontal.rml b/addons/account/report/report_pl_account_horizontal.rml
index b68d375d3be..35e4ff47268 100644
--- a/addons/account/report/report_pl_account_horizontal.rml
+++ b/addons/account/report/report_pl_account_horizontal.rml
@@ -214,7 +214,7 @@
- [[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]
+ [[ a['balance'] and formatLang(get_abs(a['balance'])) or 0.0 ]]
@@ -227,7 +227,7 @@
- [[ a['balance1'] and formatLang(abs(a['balance1'])) or 0.0 ]]
+ [[ a['balance1'] and formatLang(get_abs(a['balance1'])) or 0.0 ]]
@@ -240,7 +240,7 @@
[[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or '' ]]
- [[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]
+ [[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(get_abs(final_result()['balance'])) or 0.0 ]]
@@ -249,7 +249,7 @@
[[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or '' ]]
- [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]
+ [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(get_abs(final_result()['balance'])) or 0.0 ]]
@@ -260,13 +260,13 @@
Total:([[ get_currency(data['form']) ]])
- [[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]]
+ [[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]
Total:([[ get_currency(data['form']) ]])
- [[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]]
+ [[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]
From 5f3a32a17bfbdb53580c85e31e0b727cc05960f0 Mon Sep 17 00:00:00 2001
From: vra
Date: Tue, 27 Jul 2010 15:04:20 +0530
Subject: [PATCH 4/8] [IMP] account: p&L and BS reports wizard.
bzr revid: vra@tinyerp.com-20100727093420-vuqg0i8yrbxk9gp3
---
addons/account/wizard/account_bs_report.py | 2 --
addons/account/wizard/account_pl_report.py | 2 --
2 files changed, 4 deletions(-)
diff --git a/addons/account/wizard/account_bs_report.py b/addons/account/wizard/account_bs_report.py
index 27c50b4b880..dfd035680f2 100644
--- a/addons/account/wizard/account_bs_report.py
+++ b/addons/account/wizard/account_bs_report.py
@@ -114,14 +114,12 @@ class account_bs_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.balancesheet.horizontal',
'datas': data,
- 'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balancesheet',
'datas': data,
- 'nodestroy':True,
}
def _check_date(self, cr, uid, data, context=None):
diff --git a/addons/account/wizard/account_pl_report.py b/addons/account/wizard/account_pl_report.py
index 79b701b6fb9..9ae7a4dbedf 100644
--- a/addons/account/wizard/account_pl_report.py
+++ b/addons/account/wizard/account_pl_report.py
@@ -111,14 +111,12 @@ class account_pl_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'pl.account.horizontal',
'datas': data,
- 'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'pl.account',
'datas': data,
- 'nodestroy':True,
}
def _check_date(self, cr, uid, data, context=None):
From 406c37c2f8842797683957690c976ae8b773e065 Mon Sep 17 00:00:00 2001
From: "AMP(Open ERP)" <>
Date: Tue, 27 Jul 2010 15:06:48 +0530
Subject: [PATCH 5/8] [MOD] Configuration wizard : small changes
bzr revid: vir@tinyerp.com-20100727093648-fneruqalpbvoxxum
---
addons/base_contact/base_contact_installer.py | 57 ++++++++++---------
.../base_contact_installer_view.xml | 8 ++-
addons/base_setup/base_setup_todo.xml | 2 +-
addons/crm/crm_installer_view.xml | 2 +-
addons/hr/hr_installer.xml | 2 +-
addons/knowledge/knowledge_installer.xml | 2 +-
addons/marketing/marketing_view.xml | 2 +-
addons/profile_tools/misc_tools_installer.xml | 2 +-
addons/project/project_installer.xml | 2 +-
addons/thunderbird/installer.py | 6 +-
10 files changed, 46 insertions(+), 39 deletions(-)
diff --git a/addons/base_contact/base_contact_installer.py b/addons/base_contact/base_contact_installer.py
index 3cb32017111..e1ed709dd11 100644
--- a/addons/base_contact/base_contact_installer.py
+++ b/addons/base_contact/base_contact_installer.py
@@ -25,41 +25,44 @@ from osv import fields, osv
class base_contact_installer(osv.osv_memory):
_name = 'base.contact.installer'
_inherit = 'res.config.installer'
-
+
_columns = {
- 'name': fields.char('Name', size=64),
- 'migrate': fields.boolean('Migrate', help="If you select this, all addresses will be migrated."),
+ 'name': fields.char('Name', size=64),
+ 'migrate': fields.boolean('Migrate', help="If you select this, all addresses will be migrated."),
+ 'nomigrate': fields.boolean('NoMigrate', help="If you select this, all addresses will be not migrated."),
}
def execute(self, cr, uid, ids, context=None):
"""
- This function is used to create contact and address from existing partner address
+ This function is used to create contact and address from existing partner address
"""
- cr.execute("""DROP TRIGGER IF EXISTS contactjob on res_partner_contact;
- DROP LANGUAGE IF EXISTS plpgsql CASCADE;
- CREATE LANGUAGE plpgsql ;
- CREATE OR REPLACE FUNCTION add_to_job() RETURNS TRIGGER AS $contactjob$
- DECLARE
- new_name varchar;
- new_phonenum varchar;
- BEGIN
- IF(TG_OP='INSERT') THEN
- INSERT INTO res_partner_job(contact_id, address_id, function, state) VALUES(NEW.id, NEW.website::integer,NEW.first_name, 'current');
- UPDATE res_partner_contact set first_name=Null, website=Null, active=True where id=NEW.id;
- END IF;
- RETURN NEW;
- END;
- $contactjob$ LANGUAGE plpgsql;
- CREATE TRIGGER contactjob AFTER INSERT ON res_partner_contact FOR EACH ROW EXECUTE PROCEDURE add_to_job();""")
- cr.commit()
+ obj = self.pool.get("base.contact.installer").browse(cr, uid, uid)
+ if obj.migrate:
+ cr.execute("""DROP TRIGGER IF EXISTS contactjob on res_partner_contact;
+ DROP LANGUAGE IF EXISTS plpgsql CASCADE;
+ CREATE LANGUAGE plpgsql ;
+ CREATE OR REPLACE FUNCTION add_to_job() RETURNS TRIGGER AS $contactjob$
+ DECLARE
+ new_name varchar;
+ new_phonenum varchar;
+ BEGIN
+ IF(TG_OP='INSERT') THEN
+ INSERT INTO res_partner_job(contact_id, address_id, function, state) VALUES(NEW.id, NEW.website::integer,NEW.first_name, 'current');
+ UPDATE res_partner_contact set first_name=Null, website=Null, active=True where id=NEW.id;
+ END IF;
+ RETURN NEW;
+ END;
+ $contactjob$ LANGUAGE plpgsql;
+ CREATE TRIGGER contactjob AFTER INSERT ON res_partner_contact FOR EACH ROW EXECUTE PROCEDURE add_to_job();""")
+ cr.commit()
- cr.execute("INSERT into res_partner_contact (name, title, email, first_name, website) (SELECT coalesce(name, 'Noname'), title, email, function , to_char(id, '99999999') from res_partner_address)")
- cr.commit()
+ cr.execute("INSERT into res_partner_contact (name, title, email, first_name, website) (SELECT coalesce(name, 'Noname'), title, email, function , to_char(id, '99999999') from res_partner_address)")
+ cr.commit()
- cr.execute("DROP TRIGGER IF EXISTS contactjob on res_partner_contact")
- cr.execute("DROP LANGUAGE IF EXISTS plpgsql CASCADE;")
- cr.execute("DROP FUNCTION IF EXISTS add_to_job()")
- cr.commit()
+ cr.execute("DROP TRIGGER IF EXISTS contactjob on res_partner_contact")
+ cr.execute("DROP LANGUAGE IF EXISTS plpgsql CASCADE;")
+ cr.execute("DROP FUNCTION IF EXISTS add_to_job()")
+ cr.commit()
base_contact_installer()
diff --git a/addons/base_contact/base_contact_installer_view.xml b/addons/base_contact/base_contact_installer_view.xml
index 3d93faa5728..646d3918e9f 100644
--- a/addons/base_contact/base_contact_installer_view.xml
+++ b/addons/base_contact/base_contact_installer_view.xml
@@ -23,14 +23,18 @@
- Migrate
+ Configure
-
+
+
+
+
+
diff --git a/addons/base_setup/base_setup_todo.xml b/addons/base_setup/base_setup_todo.xml
index cfe815fb94e..ceb915e1212 100644
--- a/addons/base_setup/base_setup_todo.xml
+++ b/addons/base_setup/base_setup_todo.xml
@@ -11,7 +11,7 @@
Main Company Setup
- Information of your company will be used to custiomise your documents like Invoices, Sale Orders and many more.
+ Information of your company will be used to customize your documents like Invoices, Sale Orders and many more.
Configure Your Company
diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml
index 20e430b5e88..322f9425122 100644
--- a/addons/crm/crm_installer_view.xml
+++ b/addons/crm/crm_installer_view.xml
@@ -8,7 +8,7 @@
diff --git a/addons/hr/hr_installer.xml b/addons/hr/hr_installer.xml
index dc985f97d8a..a81954bc51b 100644
--- a/addons/hr/hr_installer.xml
+++ b/addons/hr/hr_installer.xml
@@ -10,7 +10,7 @@
Select Human Resources Modules To Install
diff --git a/addons/knowledge/knowledge_installer.xml b/addons/knowledge/knowledge_installer.xml
index fb5d14e6e75..081d0734005 100644
--- a/addons/knowledge/knowledge_installer.xml
+++ b/addons/knowledge/knowledge_installer.xml
@@ -8,7 +8,7 @@
diff --git a/addons/marketing/marketing_view.xml b/addons/marketing/marketing_view.xml
index a3288fb471f..1b144a14729 100644
--- a/addons/marketing/marketing_view.xml
+++ b/addons/marketing/marketing_view.xml
@@ -13,7 +13,7 @@
Select Marketing Modules to Install
diff --git a/addons/profile_tools/misc_tools_installer.xml b/addons/profile_tools/misc_tools_installer.xml
index 84b47128fff..69250f0dcf1 100644
--- a/addons/profile_tools/misc_tools_installer.xml
+++ b/addons/profile_tools/misc_tools_installer.xml
@@ -8,7 +8,7 @@
diff --git a/addons/project/project_installer.xml b/addons/project/project_installer.xml
index 6c760bc65d1..320b3302241 100644
--- a/addons/project/project_installer.xml
+++ b/addons/project/project_installer.xml
@@ -9,7 +9,7 @@
Project Management
diff --git a/addons/thunderbird/installer.py b/addons/thunderbird/installer.py
index 2c9140fa767..b2284a02c5c 100644
--- a/addons/thunderbird/installer.py
+++ b/addons/thunderbird/installer.py
@@ -33,7 +33,7 @@ class thunderbird_installer(osv.osv_memory):
data = super(thunderbird_installer, self).default_get(cr, uid, fields, context)
pdf_file = open(config['addons_path'] + "/thunderbird/doc/Installation Guide to OpenERP Thunderbid Plug-in.pdf", 'r')
data['pdf_file'] = base64.encodestring(pdf_file.read())
- file = open(config['addons_path'] + "/thunderbird/plugin/tiny_plugin-2.0.xpi", 'r')
+ file = open(config['addons_path'] + "/thunderbird/plugin/OpenERP_plugin-2.0.xpi", 'r')
data['plugin_file'] = base64.encodestring(file.read())
return data
@@ -48,9 +48,9 @@ class thunderbird_installer(osv.osv_memory):
_defaults = {
'thunderbird' : True,
- 'name' : 'tiny_plugin-2.0.xpi',
+ 'name' : 'OpenERP_plugin-2.0.xpi',
'pdf_name' : 'Installation Guide to OpenERP Thunderbid Plug-in.pdf',
- 'description' : """ * Save the Thunderbird plugin. \n * Follows the step to install Thunderbird plugin. \n -> 1.From Menu Bar of Thunderbird, open Tools > Add ons. \n -> 2. Click on install button and a browser window appears. \n -> 3. Select the plug-in(.xpi file) and click Ok. \n -> 4. Software installation window appears and within a short time “Install Now” button will be enabled \n -> 5. Click "Install Now". \n -> 6. Restart Thunderbird."""
+ 'description' : """ * Save the Thunderbird plugin. \n * Follow the Steps to configure OpenERP in Thunderbird. \n -> 1. Go to Tools > OpenERP Synchronization. \n -> 2. check data (configured by default). \n -> 3. Click Test Connection. \n -> 4. A message appears with state of your connection. \n -> 5. If your connection failed, check if your database is open, and check your data. \n -> 6. If you have a good connection, click Ok and start to archive mail in OpenERP.
}
thunderbird_installer()
From 8cfbb441d21e7a6fa95d1b9fb8e39853904a9bfe Mon Sep 17 00:00:00 2001
From: "JMA(OpenERP)" <>
Date: Tue, 27 Jul 2010 15:14:59 +0530
Subject: [PATCH 6/8] [FIX] account_payment : Wizard(Invoices to Pay)
corrected.
lp bug: https://launchpad.net/bugs/608426 fixed
bzr revid: vra@tinyerp.com-20100727094459-rdgo54cbfp2eknn8
---
addons/account_payment/wizard/account_payment_order.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py
index 81f5e4a570f..74409cab3fa 100644
--- a/addons/account_payment/wizard/account_payment_order.py
+++ b/addons/account_payment/wizard/account_payment_order.py
@@ -88,7 +88,7 @@ class payment_order_create(osv.osv_memory):
'date': date_to_pay,
'currency': line.invoice and line.invoice.currency_id.id or False,
}, context=context)
- return {'nodestroy':True,}
+ return {}
def search_entries(self, cr, uid, ids, context=None):
order_obj = self.pool.get('payment.order')
From 016a061b1be2da79b619d17f6a44d39d0564e8bb Mon Sep 17 00:00:00 2001
From: Christophe Simonis
Date: Tue, 27 Jul 2010 12:03:19 +0200
Subject: [PATCH 7/8] [FIX] marketing_campaign_crm_demo: use a dummy action
bzr revid: chs@openerp.com-20100727100319-t01tf58sr0oylm38
---
.../marketing_campaign_demo.xml | 30 ++++++++++++-------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml b/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml
index f67a747e518..6b78a82c977 100644
--- a/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml
+++ b/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml
@@ -1,6 +1,16 @@
+
+ Dummy Action
+
+ dummy
+
+
+
+
+
+
@@ -178,7 +188,7 @@
Propose a 1 month free trial for an OnDemand offer
-
+
paper
@@ -187,27 +197,27 @@
Thanks for showing interest
-
+
Propose to subscribe to the Open ERP Discovery Day on May 2010
-
+
Thanks for subscribing to the Open ERP Discovery Day
-
+
Propose to buy the Open ERP Book
-
+
paper
@@ -216,33 +226,33 @@
Thanks for buying the Open ERP book
-
+
Propose a free technical training to Gold partners
-
+
Propose paid training to Silver partners
-
+
Propose gold partnership to silver partners
-
+
Thanks for subscribing to technical training
-
+
From d67d7487e5801bfb78ef22f41409d9a4c86a5489 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Tue, 27 Jul 2010 13:33:21 +0200
Subject: [PATCH 8/8] [FIX] email_template: check if context is None
bzr revid: olt@tinyerp.com-20100727113321-n65pyrn7di0krwi1
---
addons/email_template/wizard/email_template_send_wizard.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/addons/email_template/wizard/email_template_send_wizard.py b/addons/email_template/wizard/email_template_send_wizard.py
index 5e0f0619c1b..4b1aba3a2aa 100755
--- a/addons/email_template/wizard/email_template_send_wizard.py
+++ b/addons/email_template/wizard/email_template_send_wizard.py
@@ -68,6 +68,8 @@ class email_template_send_wizard(osv.osv_memory):
return template
def _get_template_value(self, cr, uid, field, context=None):
+ if context is None:
+ context = {}
template = self._get_template(cr, uid, context)
if not template:
return False
@@ -119,6 +121,8 @@ class email_template_send_wizard(osv.osv_memory):
}
def fields_get(self, cr, uid, fields=None, context=None, write_access=True):
+ if context is None:
+ context = {}
result = super(email_template_send_wizard, self).fields_get(cr, uid, fields, context, write_access)
if 'attachment_ids' in result and 'src_model' in context:
result['attachment_ids']['domain'] = [('res_model','=',context['src_model']),('res_id','=',context['active_id'])]
@@ -165,6 +169,8 @@ class email_template_send_wizard(osv.osv_memory):
else:
return value
+ if context is None:
+ context = {}
mail_ids = []
template = self._get_template(cr, uid, context)
for id in context['src_rec_ids']: