From 229c057f3bdeacb4c646e217734030fc2f3ef7f4 Mon Sep 17 00:00:00 2001
From: "Jignesh Rathod (OpenERP)"
Date: Mon, 2 Dec 2013 11:23:31 +0530
Subject: [PATCH 001/126] [IMP] Add colors in tree view of components..
bzr revid: jir@tinyerp.com-20131202055331-jk00a7cgpu55vnwf
---
addons/mrp/mrp_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 2576235586f..5c2b45cc900 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -680,7 +680,7 @@
-
+
From baa430d237a51c2fd05aa6d66f2661f44274bd1d Mon Sep 17 00:00:00 2001
From: "Bharat R. Devnani (OpenERP)"
Date: Mon, 2 Dec 2013 14:12:04 +0530
Subject: [PATCH 002/126] [IMP] improved warning messages
bzr revid: bde@tinyerp.com-20131202084204-r0br5ytoc12ysjrl
---
addons/delivery/delivery.py | 2 +-
addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 4 ++--
addons/purchase/purchase.py | 5 ++---
.../wizard/purchase_requisition_partner.py | 2 +-
addons/sale_stock/sale_stock.py | 2 +-
addons/stock/stock.py | 2 +-
6 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/addons/delivery/delivery.py b/addons/delivery/delivery.py
index 76750212edd..c388b1dffaa 100644
--- a/addons/delivery/delivery.py
+++ b/addons/delivery/delivery.py
@@ -217,7 +217,7 @@ class delivery_grid(osv.osv):
ok = True
break
if not ok:
- raise osv.except_osv(_('No price available!'), _('No line matched this product or order in the chosen delivery grid.'))
+ raise osv.except_osv(_("Unable to fetch delivery method!"), _("Selected product in the delivery method doesn't fulfill any of the delivery grid(s) criteria."))
return price
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
index 9226787e908..12eae4e6ba2 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
@@ -65,7 +65,7 @@ class hr_timesheet_sheet(osv.osv):
def create(self, cr, uid, vals, *args, **argv):
if 'employee_id' in vals:
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id:
- raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must assign it to a user.'))
+ raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must relate a user to it.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must link the employee to a product, like \'Consultant\'.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).journal_id:
@@ -76,7 +76,7 @@ class hr_timesheet_sheet(osv.osv):
if 'employee_id' in vals:
new_user_id = self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id.id or False
if not new_user_id:
- raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must assign it to a user.'))
+ raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must relate a user to it.'))
if not self._sheet_date(cr, uid, ids, forced_user_id=new_user_id):
raise osv.except_osv(_('Error!'), _('You cannot have 2 timesheets that overlap!\nYou should use the menu \'My Timesheet\' to avoid this problem.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 75f6856709b..1befe7c693d 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -476,7 +476,7 @@ class purchase_order(osv.osv):
if not acc_id:
acc_id = po_line.product_id.categ_id.property_account_expense_categ.id
if not acc_id:
- raise osv.except_osv(_('Error!'), _('Define expense account for this company: "%s" (id:%d).') % (po_line.product_id.name, po_line.product_id.id,))
+ raise osv.except_osv(_('Error!'), _('Define expense account for this product: "%s" (id:%d).') % (po_line.product_id.name, po_line.product_id.id,))
else:
acc_id = property_obj.get(cr, uid, 'property_account_expense_categ', 'product.category', context=context).id
fpos = po_line.order_id.fiscal_position or False
@@ -597,8 +597,7 @@ class purchase_order(osv.osv):
for inv in purchase.invoice_ids:
if inv and inv.state not in ('cancel','draft'):
raise osv.except_osv(
- _('Unable to cancel this purchase order.'),
- _('You must first cancel all receptions related to this purchase order.'))
+ _('You must first cancel all invoices related to this purchase order.'))
self.pool.get('account.invoice') \
.signal_invoice_cancel(cr, uid, map(attrgetter('id'), purchase.invoice_ids))
self.write(cr,uid,ids,{'state':'cancel'})
diff --git a/addons/purchase_requisition/wizard/purchase_requisition_partner.py b/addons/purchase_requisition/wizard/purchase_requisition_partner.py
index 0fee8745931..5aeb2c82ab6 100644
--- a/addons/purchase_requisition/wizard/purchase_requisition_partner.py
+++ b/addons/purchase_requisition/wizard/purchase_requisition_partner.py
@@ -38,7 +38,7 @@ class purchase_requisition_partner(osv.osv_memory):
record_id = context and context.get('active_id', False) or False
tender = self.pool.get('purchase.requisition').browse(cr, uid, record_id, context=context)
if not tender.line_ids:
- raise osv.except_osv(_('Error!'), _('No Product in Tender.'))
+ raise osv.except_osv(_('Error!'), _('No Product in Requisition.'))
return res
def create_order(self, cr, uid, ids, context=None):
diff --git a/addons/sale_stock/sale_stock.py b/addons/sale_stock/sale_stock.py
index 341aaef8ca8..6135e439347 100644
--- a/addons/sale_stock/sale_stock.py
+++ b/addons/sale_stock/sale_stock.py
@@ -160,7 +160,7 @@ class sale_order(osv.osv):
if s['state'] in ['draft', 'cancel']:
unlink_ids.append(s['id'])
else:
- raise osv.except_osv(_('Invalid Action!'), _('In order to delete a confirmed sales order, you must cancel it.\nTo do so, you must first cancel related picking for delivery orders.'))
+ raise osv.except_osv(_('Invalid Action!'), _('In order to delete a confirmed sales order, you must cancel it. \nTo do so, you must first cancel all related delivery order(s).'))
return osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 69d2c6e4791..524a516ba0e 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1195,7 +1195,7 @@ class stock_picking(osv.osv):
return True
for move in pick.move_lines:
if move.state == 'done':
- raise osv.except_osv(_('Error!'), _('You cannot cancel the picking as some moves have been done. You should cancel the picking lines.'))
+ raise osv.except_osv(_('Error!'), _('You cannot cancel the picking as some moves have been done. You should cancel remaining moves of this picking.'))
return True
def unlink(self, cr, uid, ids, context=None):
From 77fa521db55bca297955a2781daef513eeac894c Mon Sep 17 00:00:00 2001
From: "Bharat R. Devnani (OpenERP)"
Date: Mon, 2 Dec 2013 14:12:44 +0530
Subject: [PATCH 003/126] [IMP] improve warning message
bzr revid: bde@tinyerp.com-20131202084244-oc0gs75vwix3wgv3
---
openerp/addons/base/res/res_currency.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py
index 94a5f538b25..9b638c706a4 100644
--- a/openerp/addons/base/res/res_currency.py
+++ b/openerp/addons/base/res/res_currency.py
@@ -49,6 +49,7 @@ class res_currency(osv.osv):
currency_rate_type = context.get('currency_rate_type_id') or None
# ... and use 'is NULL' instead of '= some-id'.
operator = '=' if currency_rate_type else 'is'
+ currency_name = self.browse(cr, uid, ids, context=context)[0].name
for id in ids:
cr.execute("SELECT currency_id, rate FROM res_currency_rate WHERE currency_id = %s AND name <= %s AND currency_rate_type_id " + operator +" %s ORDER BY name desc LIMIT 1" ,(id, date, currency_rate_type))
if cr.rowcount:
@@ -57,7 +58,7 @@ class res_currency(osv.osv):
elif not raise_on_no_rate:
res[id] = 0
else:
- raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (id)))
+ raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (currency_name)))
return res
_name = "res.currency"
From ead427265235d06894edcedc8fc78c71a90f0d5f Mon Sep 17 00:00:00 2001
From: "Bharat R. Devnani (OpenERP)"
Date: Mon, 2 Dec 2013 14:28:33 +0530
Subject: [PATCH 004/126] [IMP] improved the code
bzr revid: bde@tinyerp.com-20131202085833-sp33bs3syiqaybsg
---
openerp/addons/base/res/res_currency.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py
index 9b638c706a4..558f7d98770 100644
--- a/openerp/addons/base/res/res_currency.py
+++ b/openerp/addons/base/res/res_currency.py
@@ -58,7 +58,7 @@ class res_currency(osv.osv):
elif not raise_on_no_rate:
res[id] = 0
else:
- raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (currency_name)))
+ raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %s for the given period" % (currency_name)))
return res
_name = "res.currency"
From 953c8d7633d2d516e00f048f788e3347f903c33e Mon Sep 17 00:00:00 2001
From: "Bharat R. Devnani (OpenERP)"
Date: Mon, 2 Dec 2013 14:29:30 +0530
Subject: [PATCH 005/126] [IMP] improved the code
bzr revid: bde@tinyerp.com-20131202085930-zinqv4q332iuqql0
---
openerp/addons/base/res/res_currency.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py
index 558f7d98770..b8c0e1378ad 100644
--- a/openerp/addons/base/res/res_currency.py
+++ b/openerp/addons/base/res/res_currency.py
@@ -58,7 +58,7 @@ class res_currency(osv.osv):
elif not raise_on_no_rate:
res[id] = 0
else:
- raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %s for the given period" % (currency_name)))
+ raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency_name)))
return res
_name = "res.currency"
From c88dbc8b013c47f5559a98f900d2972ba34c4187 Mon Sep 17 00:00:00 2001
From: "Bharat R. Devnani (OpenERP)"
Date: Tue, 3 Dec 2013 12:04:23 +0530
Subject: [PATCH 006/126] [IMP] improved warning message
bzr revid: bde@tinyerp.com-20131203063423-ne1dwsy4q0vp53hj
---
addons/purchase/purchase.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 1befe7c693d..f3e4af92f3a 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -596,7 +596,7 @@ class purchase_order(osv.osv):
.signal_button_cancel(cr, uid, map(attrgetter('id'), purchase.picking_ids))
for inv in purchase.invoice_ids:
if inv and inv.state not in ('cancel','draft'):
- raise osv.except_osv(
+ raise osv.except_osv(_('Unable to cancel this purchase order.'),
_('You must first cancel all invoices related to this purchase order.'))
self.pool.get('account.invoice') \
.signal_invoice_cancel(cr, uid, map(attrgetter('id'), purchase.invoice_ids))
From 598d42036566f6cf35b7baf00b822dc500b9486e Mon Sep 17 00:00:00 2001
From: "Bharat R. Devnani (OpenERP)"
Date: Tue, 3 Dec 2013 12:08:06 +0530
Subject: [PATCH 007/126] [IMP] improved the code
bzr revid: bde@tinyerp.com-20131203063806-vpu7ofijvaio1m79
---
addons/purchase/purchase.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index f3e4af92f3a..d390bb62fe5 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -596,7 +596,8 @@ class purchase_order(osv.osv):
.signal_button_cancel(cr, uid, map(attrgetter('id'), purchase.picking_ids))
for inv in purchase.invoice_ids:
if inv and inv.state not in ('cancel','draft'):
- raise osv.except_osv(_('Unable to cancel this purchase order.'),
+ raise osv.except_osv(
+ _('Unable to cancel this purchase order.'),
_('You must first cancel all invoices related to this purchase order.'))
self.pool.get('account.invoice') \
.signal_invoice_cancel(cr, uid, map(attrgetter('id'), purchase.invoice_ids))
From 2a8182a07fc5480c1e355c387fdf6354458afd05 Mon Sep 17 00:00:00 2001
From: "Bharat R. Devnani (OpenERP)"
Date: Tue, 3 Dec 2013 14:50:56 +0530
Subject: [PATCH 008/126] [IMP] improved the code
bzr revid: bde@tinyerp.com-20131203092056-l6c8x116iwv9oax6
---
openerp/addons/base/res/res_currency.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py
index b8c0e1378ad..e53a1e87842 100644
--- a/openerp/addons/base/res/res_currency.py
+++ b/openerp/addons/base/res/res_currency.py
@@ -49,16 +49,15 @@ class res_currency(osv.osv):
currency_rate_type = context.get('currency_rate_type_id') or None
# ... and use 'is NULL' instead of '= some-id'.
operator = '=' if currency_rate_type else 'is'
- currency_name = self.browse(cr, uid, ids, context=context)[0].name
- for id in ids:
- cr.execute("SELECT currency_id, rate FROM res_currency_rate WHERE currency_id = %s AND name <= %s AND currency_rate_type_id " + operator +" %s ORDER BY name desc LIMIT 1" ,(id, date, currency_rate_type))
+ for currency in self.browse(cr, uid, ids, context=context):
+ cr.execute("SELECT currency_id, rate FROM res_currency_rate WHERE currency_id = %s AND name <= %s AND currency_rate_type_id " + operator +" %s ORDER BY name desc LIMIT 1" ,(currency.id, date, currency_rate_type))
if cr.rowcount:
id, rate = cr.fetchall()[0]
res[id] = rate
elif not raise_on_no_rate:
- res[id] = 0
+ res[currency.id] = 0
else:
- raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency_name)))
+ raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency.name)))
return res
_name = "res.currency"
From 3abf050afc33a4baa16431e236801b1999546a7f Mon Sep 17 00:00:00 2001
From: "Pooja Zankhariya (OpenERP)"
Date: Mon, 9 Dec 2013 14:49:48 +0500
Subject: [PATCH 009/126] [IMP]Improved colors for components
bzr revid: pza@tinyerp.com-20131209094948-4zne4efiijzm2ly6
---
addons/mrp/mrp_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 5c2b45cc900..55973d6f47c 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -680,7 +680,7 @@
-
+
From 28a33f3a8d66b198262a05b1cb18fad28676cdf6 Mon Sep 17 00:00:00 2001
From: "Bharat R. Devnani (OpenERP)"
Date: Fri, 24 Jan 2014 18:00:45 +0530
Subject: [PATCH 010/126] [IMP] improved some warning messages
bzr revid: bde@tinyerp.com-20140124123045-kgovbmuhkovax068
---
addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 4 ++--
addons/purchase/purchase.py | 2 +-
.../wizard/purchase_requisition_partner.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
index 12eae4e6ba2..c62bbfb2b57 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
@@ -65,7 +65,7 @@ class hr_timesheet_sheet(osv.osv):
def create(self, cr, uid, vals, *args, **argv):
if 'employee_id' in vals:
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id:
- raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must relate a user to it.'))
+ raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must link an employee to a user.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must link the employee to a product, like \'Consultant\'.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).journal_id:
@@ -76,7 +76,7 @@ class hr_timesheet_sheet(osv.osv):
if 'employee_id' in vals:
new_user_id = self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id.id or False
if not new_user_id:
- raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must relate a user to it.'))
+ raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must link an employee to a user.'))
if not self._sheet_date(cr, uid, ids, forced_user_id=new_user_id):
raise osv.except_osv(_('Error!'), _('You cannot have 2 timesheets that overlap!\nYou should use the menu \'My Timesheet\' to avoid this problem.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index e570a73a539..09cdcd4e4d5 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -476,7 +476,7 @@ class purchase_order(osv.osv):
if not acc_id:
acc_id = po_line.product_id.categ_id.property_account_expense_categ.id
if not acc_id:
- raise osv.except_osv(_('Error!'), _('Define expense account for this product: "%s" (id:%d).') % (po_line.product_id.name, po_line.product_id.id,))
+ raise osv.except_osv(_('Error!'), _('Define an expense account for this product: "%s" (id:%d).') % (po_line.product_id.name, po_line.product_id.id,))
else:
acc_id = property_obj.get(cr, uid, 'property_account_expense_categ', 'product.category', context=context).id
fpos = po_line.order_id.fiscal_position or False
diff --git a/addons/purchase_requisition/wizard/purchase_requisition_partner.py b/addons/purchase_requisition/wizard/purchase_requisition_partner.py
index 5aeb2c82ab6..a71b53e5ee9 100644
--- a/addons/purchase_requisition/wizard/purchase_requisition_partner.py
+++ b/addons/purchase_requisition/wizard/purchase_requisition_partner.py
@@ -38,7 +38,7 @@ class purchase_requisition_partner(osv.osv_memory):
record_id = context and context.get('active_id', False) or False
tender = self.pool.get('purchase.requisition').browse(cr, uid, record_id, context=context)
if not tender.line_ids:
- raise osv.except_osv(_('Error!'), _('No Product in Requisition.'))
+ raise osv.except_osv(_('Error!'), _('Define products you want include in the call for bids.'))
return res
def create_order(self, cr, uid, ids, context=None):
From f9226c63a20effce36a229fcde7baca8cce761fa Mon Sep 17 00:00:00 2001
From: "Bharat R. Devnani (OpenERP)"
Date: Fri, 24 Jan 2014 18:33:27 +0530
Subject: [PATCH 011/126] [IMP] improved message
bzr revid: bde@tinyerp.com-20140124130327-l1cvpcy7cpkl32bs
---
.../purchase_requisition/wizard/purchase_requisition_partner.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/purchase_requisition/wizard/purchase_requisition_partner.py b/addons/purchase_requisition/wizard/purchase_requisition_partner.py
index a71b53e5ee9..fb88a21027f 100644
--- a/addons/purchase_requisition/wizard/purchase_requisition_partner.py
+++ b/addons/purchase_requisition/wizard/purchase_requisition_partner.py
@@ -38,7 +38,7 @@ class purchase_requisition_partner(osv.osv_memory):
record_id = context and context.get('active_id', False) or False
tender = self.pool.get('purchase.requisition').browse(cr, uid, record_id, context=context)
if not tender.line_ids:
- raise osv.except_osv(_('Error!'), _('Define products you want include in the call for bids.'))
+ raise osv.except_osv(_('Error!'), _('Define product(s) you want to include in the call for bids.'))
return res
def create_order(self, cr, uid, ids, context=None):
From e2410358cd28cdf3e9e3a157ece9f7d367c6008f Mon Sep 17 00:00:00 2001
From: "Bharat R. Devnani (OpenERP)"
Date: Wed, 12 Feb 2014 15:42:45 +0530
Subject: [PATCH 012/126] [IMP] improved
bzr revid: bde@tinyerp.com-20140212101245-bhp1ncpuvckvex4m
---
openerp/addons/base/res/res_currency.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py
index 931666f3d7f..0a50631f50b 100644
--- a/openerp/addons/base/res/res_currency.py
+++ b/openerp/addons/base/res/res_currency.py
@@ -56,9 +56,9 @@ class res_currency(osv.osv):
if cr.rowcount:
res[id] = cr.fetchone()[0]
elif not raise_on_no_rate:
- res[currency.id] = 0
+ res[id] = 0
else:
- raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency.name)))
+ raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%d' for the given period" % (id)))
return res
_name = "res.currency"
From 7a672f0bb5dd2e4cbb400b3a8db2733be250686b Mon Sep 17 00:00:00 2001
From: "Bharat R. Devnani (OpenERP)"
Date: Wed, 12 Feb 2014 15:43:34 +0530
Subject: [PATCH 013/126] [IMP] improved
bzr revid: bde@tinyerp.com-20140212101334-mdhimtwrjn98d6g6
---
openerp/addons/base/res/res_currency.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py
index 0a50631f50b..1419cc7ccb4 100644
--- a/openerp/addons/base/res/res_currency.py
+++ b/openerp/addons/base/res/res_currency.py
@@ -58,7 +58,7 @@ class res_currency(osv.osv):
elif not raise_on_no_rate:
res[id] = 0
else:
- raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%d' for the given period" % (id)))
+ raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (id)))
return res
_name = "res.currency"
From b0c17397df7b3255a4bc9e500c9837f9fc82696e Mon Sep 17 00:00:00 2001
From: "Bharat R. Devnani (OpenERP)"
Date: Wed, 12 Feb 2014 17:16:11 +0530
Subject: [PATCH 014/126] [IMP] improved the code to get the name of currency
instead of id
bzr revid: bde@tinyerp.com-20140212114611-et0fw2dlwwjuq39p
---
openerp/addons/base/res/res_currency.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py
index 1419cc7ccb4..b62ed300439 100644
--- a/openerp/addons/base/res/res_currency.py
+++ b/openerp/addons/base/res/res_currency.py
@@ -46,19 +46,19 @@ class res_currency(osv.osv):
currency_rate_type = context.get('currency_rate_type_id') or None
# ... and use 'is NULL' instead of '= some-id'.
operator = '=' if currency_rate_type else 'is'
- for id in ids:
+ for currency in self.browse(cr, uid, ids, context=context):
cr.execute('SELECT rate FROM res_currency_rate '
'WHERE currency_id = %s '
'AND name <= %s '
'AND currency_rate_type_id ' + operator + ' %s '
'ORDER BY name desc LIMIT 1',
- (id, date, currency_rate_type))
+ (currency.id, date, currency_rate_type))
if cr.rowcount:
- res[id] = cr.fetchone()[0]
+ res[currency.id] = cr.fetchone()[0]
elif not raise_on_no_rate:
- res[id] = 0
+ res[currency.id] = 0
else:
- raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (id)))
+ raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency.name)))
return res
_name = "res.currency"
From 1daeaed37646208f5f1f94afe900c6f78edd621d Mon Sep 17 00:00:00 2001
From: Guewen Baconnier
Date: Tue, 18 Feb 2014 13:32:11 +0100
Subject: [PATCH 015/126] [FIX] use copy_data rather than doing a write after
that the moves are created
lp bug: https://launchpad.net/bugs/1281558 fixed
bzr revid: guewen.baconnier@camptocamp.com-20140218123211-3l3bvi3at1s91lfi
---
addons/stock/stock.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 02fd28611e6..53f43f73083 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -727,10 +727,6 @@ class stock_picking(osv.osv):
if 'invoice_state' not in default and picking_obj.invoice_state == 'invoiced':
default['invoice_state'] = '2binvoiced'
res = super(stock_picking, self).copy(cr, uid, id, default, context)
- if res:
- picking_obj = self.browse(cr, uid, res, context=context)
- for move in picking_obj.move_lines:
- move_obj.write(cr, uid, [move.id], {'tracking_id': False, 'prodlot_id': False, 'move_history_ids2': [(6, 0, [])], 'move_history_ids': [(6, 0, [])]})
return res
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
@@ -1806,12 +1802,17 @@ class stock_move(osv.osv):
_('Quantities, Units of Measure, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator).'))
return super(stock_move, self).write(cr, uid, ids, vals, context=context)
- def copy(self, cr, uid, id, default=None, context=None):
+ def copy_data(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default = default.copy()
- default.update({'move_history_ids2': [], 'move_history_ids': []})
- return super(stock_move, self).copy(cr, uid, id, default, context=context)
+ default.update({
+ 'tracking_id': False,
+ 'prodlot_id': False,
+ 'move_history_ids2': [],
+ 'move_history_ids': []
+ })
+ return super(stock_move, self).copy_data(cr, uid, id, default, context=context)
def _auto_init(self, cursor, context=None):
res = super(stock_move, self)._auto_init(cursor, context=context)
From 0ff86218f617f210495832b5145c40009f8fc3f0 Mon Sep 17 00:00:00 2001
From: Guewen Baconnier
Date: Mon, 24 Feb 2014 10:03:54 +0100
Subject: [PATCH 016/126] Use setdefault to allow a copy with one of this field
with a value
bzr revid: guewen.baconnier@camptocamp.com-20140224090354-wcsnd4wzs91w553e
---
addons/stock/stock.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 53f43f73083..1e6291b739c 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1806,12 +1806,10 @@ class stock_move(osv.osv):
if default is None:
default = {}
default = default.copy()
- default.update({
- 'tracking_id': False,
- 'prodlot_id': False,
- 'move_history_ids2': [],
- 'move_history_ids': []
- })
+ default.setdefault('tracking_id', False)
+ default.setdefault('prodlot_id', False)
+ default.setdefault('move_history_ids', [])
+ default.setdefault('move_history_ids2', [])
return super(stock_move, self).copy_data(cr, uid, id, default, context=context)
def _auto_init(self, cursor, context=None):
From 0d3d0e95636cf8ae0d52c650a28f505a89c3dc89 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?=
Date: Wed, 5 Mar 2014 18:36:10 +0100
Subject: [PATCH 017/126] [IMP] mail: improved link in notification, now of
form Sent from using , about ,
access in
bzr revid: tde@openerp.com-20140305173610-yw71rophyt3iyfi4
---
addons/mail/mail_followers.py | 5 ++---
addons/mail/mail_mail.py | 17 ++++++++++++++---
addons/portal/mail_mail.py | 6 +++---
3 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/addons/mail/mail_followers.py b/addons/mail/mail_followers.py
index 0059df90530..260d4849040 100644
--- a/addons/mail/mail_followers.py
+++ b/addons/mail/mail_followers.py
@@ -115,8 +115,7 @@ class mail_notification(osv.Model):
Administrator