diff --git a/addons/account/account.py b/addons/account/account.py
index 14e5bb26e34..589730c9ca7 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -2057,7 +2057,6 @@ class account_add_tmpl_wizard(osv.osv_memory):
def _get_def_cparent(self, cr, uid, context):
acc_obj=self.pool.get('account.account')
tmpl_obj=self.pool.get('account.account.template')
- #print "Searching for ",context
tids=tmpl_obj.read(cr, uid, [context['tmpl_ids']], ['parent_id'])
if not tids or not tids[0]['parent_id']:
return False
@@ -2099,7 +2098,6 @@ class account_add_tmpl_wizard(osv.osv_memory):
# 'tax_ids': [(6,0,tax_ids)], todo!!
'company_id': company_id,
}
- # print "Creating:", vals
new_account = acc_obj.create(cr, uid, vals)
return {'type':'state', 'state': 'end' }
diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml
index 879fd18583d..308de35e316 100644
--- a/addons/account/demo/account_minimal.xml
+++ b/addons/account/demo/account_minimal.xml
@@ -18,42 +18,42 @@
balance
- Receivable
+ Receivable
receivable
asset
unreconciled
- Liability
+ Liability
liability
liability
balance
- Payable
+ Payable
payable
liability
unreconciled
- Income
+ Income
income
income
none
- Expense
+ Expense
expense
expense
none
- Equity
+ Equity
equity
balance
- Cash
+ Cash
cash
asset
balance
@@ -179,6 +179,7 @@ your own chart of account.
sale
+
@@ -201,6 +202,7 @@ your own chart of account.
purchase
+
@@ -241,7 +243,7 @@ your own chart of account.
-
+
property_account_expense
diff --git a/addons/account/report/rml_parse.py b/addons/account/report/rml_parse.py
index 1b38b930b2b..07e7a02f37f 100644
--- a/addons/account/report/rml_parse.py
+++ b/addons/account/report/rml_parse.py
@@ -41,7 +41,6 @@ class rml_parse(report_sxw.rml_parse):
})
def comma_me(self,amount):
- #print "#" + str(amount) + "#"
if not amount:
amount = 0.0
if type(amount) is float :
@@ -98,7 +97,6 @@ class rml_parse(report_sxw.rml_parse):
try:
Stringer = str.encode("utf-16")
except UnicodeDecodeError:
- print "UTF_16 Error"
Stringer = str
else:
return Stringer
@@ -120,14 +118,12 @@ class rml_parse(report_sxw.rml_parse):
UnicodeAst = []
_previouslyfound = False
i = 0
- #print str(ast)
while i < len(ast):
elem = ast[i]
try:
Stringer = elem.encode("utf-8")
except UnicodeDecodeError:
to_reencode = elem + ast[i+1]
- print str(to_reencode)
Good_char = to_reencode.decode('utf-8')
UnicodeAst.append(Good_char)
i += i +2
@@ -139,14 +135,11 @@ class rml_parse(report_sxw.rml_parse):
return "".join(UnicodeAst)
def ReencodeAscii(self,str):
- print sys.stdin.encoding
try:
Stringer = str.decode("ascii")
except UnicodeEncodeError:
- print "REENCODING ERROR"
return str.encode("ascii")
except UnicodeDecodeError:
- print "DECODING ERROR"
return str.encode("ascii")
else:
diff --git a/addons/account_report/report/print_indicator.py b/addons/account_report/report/print_indicator.py
index ef94c9161f9..4245bf40415 100644
--- a/addons/account_report/report/print_indicator.py
+++ b/addons/account_report/report/print_indicator.py
@@ -113,7 +113,6 @@ class accounting_report_indicator(report_sxw.rml_parse):
else:
temp_head = [str(x[0:3]) for x in self.header_name]
head_dict = dict(zip(temp_head,temp_head))
- print "head_dict",head_dict
return [head_dict]
def getarray(self,data,object,array_header=''):
diff --git a/addons/account_voucher/report/rml_parse.py b/addons/account_voucher/report/rml_parse.py
index dc29ee9f404..721c87fbcf5 100644
--- a/addons/account_voucher/report/rml_parse.py
+++ b/addons/account_voucher/report/rml_parse.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 .
#
##############################################################################
@@ -41,7 +41,6 @@ class rml_parse(report_sxw.rml_parse):
})
def comma_me(self,amount):
- #print "#" + str(amount) + "#"
if not amount:
amount = 0.0
if type(amount) is float :
@@ -56,14 +55,14 @@ class rml_parse(report_sxw.rml_parse):
return new
else:
return self.comma_me(new)
-
+
def _ellipsis(self, string, maxlen=100, ellipsis = '...'):
ellipsis = ellipsis or ''
try:
return string[:maxlen - len(ellipsis) ] + (ellipsis, '')[len(string) < maxlen]
except Exception, e:
return False
-
+
def _strip_name(self, name, maxlen=50):
return self._ellipsis(name, maxlen, '...')
@@ -100,14 +99,13 @@ class rml_parse(report_sxw.rml_parse):
try:
Stringer = str.encode("utf-16")
except UnicodeDecodeError:
- print "UTF_16 Error"
Stringer = str
else:
return Stringer
else:
return Stringer
return Stringer
-
+
def explode_this(self,chaine,length):
#chaine = self.repair_string(chaine)
chaine = rstrip(chaine)
@@ -118,20 +116,18 @@ class rml_parse(report_sxw.rml_parse):
i = i + length
chaine = str("".join(ast))
return chaine
-
+
def repair_string(self,chaine):
ast = list(chaine)
UnicodeAst = []
_previouslyfound = False
i = 0
- #print str(ast)
while i < len(ast):
elem = ast[i]
try:
Stringer = elem.encode("utf-8")
except UnicodeDecodeError:
to_reencode = elem + ast[i+1]
- print str(to_reencode)
Good_char = to_reencode.decode('utf-8')
UnicodeAst.append(Good_char)
i += i +2
@@ -141,17 +137,13 @@ class rml_parse(report_sxw.rml_parse):
return "".join(UnicodeAst)
def ReencodeAscii(self,str):
- print sys.stdin.encoding
try:
Stringer = str.decode("ascii")
except UnicodeEncodeError:
- print "REENCODING ERROR"
return str.encode("ascii")
except UnicodeDecodeError:
- print "DECODING ERROR"
return str.encode("ascii")
else:
- print Stringer
return Stringer
def _add_header(self, node, header=1):
diff --git a/addons/auction/barcode/code128.py b/addons/auction/barcode/code128.py
index 0cd75e2ddcc..e19193bf6c6 100644
--- a/addons/auction/barcode/code128.py
+++ b/addons/auction/barcode/code128.py
@@ -177,7 +177,7 @@ class Code128(MultiWidthBarcode):
Code 128 can also encode digits at double density (2 per byte)
and has a mandatory checksum. Code 128 is well supported and
commonly used -- for example, by UPS for tracking labels.
-
+
Because of these qualities, Code 128 is probably the best choice
for a linear symbology today (assuming you have a choice).
@@ -185,11 +185,11 @@ class Code128(MultiWidthBarcode):
value (int, or numeric string. required.):
The value to encode.
-
+
xdim (float, default .0075):
X-Dimension, or width of the smallest element
Minumum is .0075 inch (7.5 mils).
-
+
height (float, see default below):
Height of the symbol. Default is the height of the two
bearer bars (if they exist) plus the greater of .25 inch
@@ -197,14 +197,14 @@ class Code128(MultiWidthBarcode):
quiet (bool, default 1):
Wether to include quiet zones in the symbol.
-
+
lquiet (float, see default below):
Quiet zone size to left of code, if quiet is true.
Default is the greater of .25 inch, or 10 xdim
-
+
rquiet (float, defaults as above):
Quiet zone size to right left of code, if quiet is true.
-
+
Sources of Information on Code 128:
http://www.semiconductor.agilent.com/barcode/sg/Misc/code_128.html
@@ -223,7 +223,7 @@ class Code128(MultiWidthBarcode):
if type(value) is type(1):
value = str(value)
-
+
for (k, v) in args.items():
setattr(self, k, v)
@@ -288,12 +288,11 @@ class Code128(MultiWidthBarcode):
if l[1] in tos:
l[:2] = ['START_' + l[1][-1]]
-# print `l`
# encode into numbers
start, set, shset = setmap[l[0]]
e = [start]
-
+
l = l[1:-1]
while l:
c = l[0]
diff --git a/addons/auction/barcode/test.py b/addons/auction/barcode/test.py
index 135f4ae2641..068562c75bd 100644
--- a/addons/auction/barcode/test.py
+++ b/addons/auction/barcode/test.py
@@ -34,8 +34,6 @@ def run():
story.append(Extended93("L@@K! Code 93 :-)")) #, xdim=0.005 * inch))
story.append(Paragraph('Code 128', styleN))
c=Code128("AB-12345678") #, xdim=0.005 * inch)
- #print 'WIDTH =', (c.width / inch), 'XDIM =', (c.xdim / inch)
- #print 'LQ =', (c.lquiet / inch), 'RQ =', (c.rquiet / inch)
story.append(c)
story.append(Paragraph('USPS FIM', styleN))
story.append(FIM("A"))
diff --git a/addons/auction/report/total.py b/addons/auction/report/total.py
index 0d87709cbee..fe6ce584339 100644
--- a/addons/auction/report/total.py
+++ b/addons/auction/report/total.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 .
#
##############################################################################
@@ -132,12 +132,6 @@ class report_custom(report_rml):
# file('/tmp/terp.xml','wb+').write(xml)
# end_time = time.clock()
-# print "db:", mid_time-start_time
-# print "addition:", mid_time2-mid_time
-# print "buyer costs:", mid_time3-mid_time2
-# print "seller costs:", mid_time4-mid_time3
-# print "rest:", end_time-mid_time4
-# print "total:", end_time-start_time
return self.post_process_xml_data(cr, uid, xml, context)
report_custom('report.auction.total', 'auction.lots', '', 'addons/auction/report/total.xsl')
diff --git a/addons/base_calendar/__openerp__.py b/addons/base_calendar/__openerp__.py
index 2c6c8bf3f9b..2d18f675c6f 100644
--- a/addons/base_calendar/__openerp__.py
+++ b/addons/base_calendar/__openerp__.py
@@ -24,10 +24,10 @@
"version" : "1.0",
"depends" : ["base"],
'description': """Full featured calendar system that supports:
-
+ - Calendar of events
- Alerts (create requests)
- - Recurring events (*)
- - Invitations to others people""",
+ - Recurring events
+ - Invitations to people""",
"author" : "Tiny",
'category': 'Generic Modules/Others',
'website': 'http://www.openerp.com',
@@ -42,7 +42,7 @@
'wizard/base_calendar_set_exrule_view.xml',
'base_calendar_view.xml'
],
- # "test" : ['test/base_calendar_test.yml'],
+ "test" : ['test/base_calendar_test.yml'],
"installable" : True,
"active" : False,
}
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index 167fb0f44d2..d7cbabc6283 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -375,7 +375,7 @@ property or property parameter."),
'availability': fields.selection([('free', 'Free'), ('busy', 'Busy')], 'Free/Busy', readonly="True"),
}
_defaults = {
- 'state': lambda *x: 'needs-action',
+ 'state': 'needs-action',
}
def copy(self, cr, uid, id, default=None, context=None):
@@ -524,8 +524,7 @@ property or property parameter."),
@param *args: Get Tupple value
@param context: A standard dictionary for contextual values
"""
-
- self.write(cr, uid, ids, {'state': 'tentative'}, context)
+ return self.write(cr, uid, ids, {'state': 'tentative'}, context)
def do_accept(self, cr, uid, ids, context=None, *args):
"""
@@ -561,7 +560,7 @@ property or property parameter."),
@param *args: Get Tupple value
@param context: A standard dictionary for contextual values """
- self.write(cr, uid, ids, {'state': 'declined'}, context)
+ return self.write(cr, uid, ids, {'state': 'declined'}, context)
def create(self, cr, uid, vals, context=None):
""" Overrides orm create method.
@@ -608,11 +607,11 @@ are both optional, but if one occurs, so MUST the other"""),
true, it will allow you to hide the event alarm information without removing it.")
}
_defaults = {
- 'trigger_interval': lambda *x: 'minutes',
- 'trigger_duration': lambda *x: 5,
- 'trigger_occurs': lambda *x: 'before',
- 'trigger_related': lambda *x: 'start',
- 'active': lambda *x: 1,
+ 'trigger_interval': 'minutes',
+ 'trigger_duration': 5,
+ 'trigger_occurs': 'before',
+ 'trigger_related': 'start',
+ 'active': 1,
}
def do_alarm_create(self, cr, uid, ids, model, date, context=None):
@@ -753,8 +752,8 @@ class calendar_alarm(osv.osv):
}
_defaults = {
- 'action': lambda *x: 'email',
- 'state': lambda *x: 'run',
+ 'action': 'email',
+ 'state': 'run',
}
def create(self, cr, uid, vals, context=None):
@@ -1043,7 +1042,10 @@ class calendar_event(osv.osv):
'location': fields.char('Location', size=264, help="Location of Event", states={'done': [('readonly', True)]}),
'show_as': fields.selection([('free', 'Free'), ('busy', 'Busy')], \
'Show as', states={'done': [('readonly', True)]}),
- 'base_calendar_url': fields.char('Caldav URL', size=264),
+ 'base_calendar_url': fields.char('Caldav URL', size=264),
+ 'state': fields.selection([('tentative', 'Tentative'),
+ ('confirmed', 'Confirmed'),
+ ('cancelled', 'Cancelled')], 'State', readonly=True),
'exdate': fields.text('Exception Date/Times', help="This property \
defines the list of date/time exceptions for arecurring calendar component."),
'exrule': fields.char('Exception Rule', size=352, help="defines a \
@@ -1101,13 +1103,14 @@ true, it will allow you to hide the event alarm information without removing it.
}
_defaults = {
- 'class': lambda *a: 'public',
- 'show_as': lambda *a: 'busy',
- 'freq': lambda *x: 'None',
- 'select1': lambda *x: 'date',
- 'interval': lambda *x: 1,
- 'active': lambda *x: 1,
- }
+ 'state': 'tentative',
+ 'class': 'public',
+ 'show_as': 'busy',
+ 'freq': 'None',
+ 'select1': 'date',
+ 'interval': 1,
+ 'active': 1,
+ }
def open_event(self, cr, uid, ids, context=None):
"""
@@ -1535,6 +1538,39 @@ true, it will allow you to hide the event alarm information without removing it.
alarm_obj = self.pool.get('res.alarm')
alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context)
return res
+
+ def do_tentative(self, cr, uid, ids, context=None, *args):
+ """ Makes event invitation as Tentative
+ @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 Event IDs
+ @param *args: Get Tupple value
+ @param context: A standard dictionary for contextual values
+ """
+ return self.write(cr, uid, ids, {'state': 'tentative'}, context)
+
+ def do_cancel(self, cr, uid, ids, context=None, *args):
+ """ Makes event invitation as Tentative
+ @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 Event IDs
+ @param *args: Get Tupple value
+ @param context: A standard dictionary for contextual values
+ """
+ return self.write(cr, uid, ids, {'state': 'cancelled'}, context)
+
+ def do_confirm(self, cr, uid, ids, context=None, *args):
+ """ Makes event invitation as Tentative
+ @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 Event IDs
+ @param *args: Get Tupple value
+ @param context: A standard dictionary for contextual values
+ """
+ return self.write(cr, uid, ids, {'state': 'confirmed'}, context)
calendar_event()
diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml
index 5f79e0f2681..7e2368658df 100644
--- a/addons/base_calendar/base_calendar_view.xml
+++ b/addons/base_calendar/base_calendar_view.xml
@@ -206,7 +206,7 @@
@@ -393,6 +412,10 @@
domain="[('user_id','=',uid)]"
help="My Events" />
+
+
@@ -403,6 +426,8 @@
+
+
+
+
+
+
@@ -97,6 +102,10 @@
+
+
+
+
@@ -129,7 +138,8 @@
-
+
+
diff --git a/addons/scrum/scrum.py b/addons/scrum/scrum.py
index bcd67c757c4..614ef493e96 100644
--- a/addons/scrum/scrum.py
+++ b/addons/scrum/scrum.py
@@ -310,7 +310,9 @@ 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, meeting_id.sprint_id.scrum_master_id.user_email)
+ res = self.email_send(cr, uid, ids, meeting_id.sprint_id.scrum_master_id.user_email)
+ if not res:
+ raise osv.except_osv(_('Error !'), _(' Email Not send to the scrum master %s!' % meeting_id.sprint_id.scrum_master_id.name))
else:
raise osv.except_osv(_('Error !'), _('Please provide email address for scrum master defined on sprint.'))
return True
@@ -321,7 +323,9 @@ class scrum_meeting(osv.osv):
context.update({'button_send_product_owner': True})
meeting_id = self.browse(cr, uid, ids)[0]
if meeting_id.sprint_id.product_owner_id.user_email:
- self.email_send(cr,uid,ids,meeting_id.sprint_id.product_owner_id.user_email)
+ res = self.email_send(cr,uid,ids,meeting_id.sprint_id.product_owner_id.user_email)
+ if not res:
+ raise osv.except_osv(_('Error !'), _(' Email Not send to the product owner %s!' % meeting_id.sprint_id.product_owner_id.name))
else:
raise osv.except_osv(_('Error !'), _('Please provide email address for product owner defined on sprint.'))
return True
@@ -339,12 +343,7 @@ class scrum_meeting(osv.osv):
sub_name = meeting_id.name or 'Scrum Meeting of %s '%meeting_id.date
flag = tools.email_send(user_email , [email], sub_name, body, reply_to=None, openobject_id=str(meeting_id.id))
if not flag:
- if context.get('button_send_product_owner', False):
- raise osv.except_osv(_('Error !'), _(' Email Not send to the product owner %s!' % meeting_id.sprint_id.product_owner_id.name))
- raise osv.except_osv(_('Error !'), _(' Email Not send to the scrum master %s!' % meeting_id.sprint_id.scrum_master_id.name))
- if context.get('button_send_product_owner', False):
- raise osv.except_osv(_('Information !'), _(' Email send successfully to product owner %s!' % meeting_id.sprint_id.product_owner_id.name))
- raise osv.except_osv(_('Information!'), _(' Email send successfully to scrum master %s!'% meeting_id.sprint_id.scrum_master_id.name))
+ return False
return True
scrum_meeting()
diff --git a/addons/subscription/subscription.py b/addons/subscription/subscription.py
index b05bf099d09..934f1a42707 100644
--- a/addons/subscription/subscription.py
+++ b/addons/subscription/subscription.py
@@ -79,7 +79,8 @@ class subscription_subscription(osv.osv):
'state': fields.selection([('draft','Draft'),('running','Running'),('done','Done')], 'State'),
'doc_source': fields.reference('Source Document', required=True, selection=_get_document_types, size=128),
'doc_lines': fields.one2many('subscription.subscription.history', 'subscription_id', 'Documents created', readonly=True),
- 'cron_id': fields.many2one('ir.cron', 'Cron Job')
+ 'cron_id': fields.many2one('ir.cron', 'Cron Job'),
+ 'note': fields.text('Notes', help="Description or Summary of Subscription"),
}
_defaults = {
'date_init': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
diff --git a/addons/subscription/subscription_view.xml b/addons/subscription/subscription_view.xml
index 695f9b00895..f13565b56a6 100644
--- a/addons/subscription/subscription_view.xml
+++ b/addons/subscription/subscription_view.xml
@@ -42,6 +42,10 @@
+
+
+
+