- [[ repeatIn(objects, 'p') ]]
+ [[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]
| [[ p.ref ]] - [[ p.name ]] |
From a6641dffcec583ecfeb05ff4b2bb76713f590ac4 Mon Sep 17 00:00:00 2001
From: "HDA (OpenERP)"
Date: Mon, 26 Oct 2009 15:57:05 +0530
Subject: [PATCH 12/26] Fixed Indent problem
bzr revid: hda@tinyerp.com-20091026102705-lv3baidhq9taalyz
---
addons/l10n_ch/wizard/dta_wizard.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/l10n_ch/wizard/dta_wizard.py b/addons/l10n_ch/wizard/dta_wizard.py
index 53bd0d94405..4a0a8582a0a 100755
--- a/addons/l10n_ch/wizard/dta_wizard.py
+++ b/addons/l10n_ch/wizard/dta_wizard.py
@@ -529,7 +529,7 @@ def _create_dta(obj, cr, uid, data, context):
if not v['reference'] \
or (mod10r(v['reference'][:-1]) != v['reference'] and \
not len(v['reference']) == 15):
- raise wizard.except_wizard(_('Error'), _('You must provide ' \
+ raise wizard.except_wizard(_('Error'), _('You must provide ' \
'a valid BVR reference number \n' \
'for the line: %s') % pline.name)
if not v['partner_bvr']:
From be63c95cb212dacdef0f1a0279ccd25ce087ac59 Mon Sep 17 00:00:00 2001
From: "ACH,VRA" <>
Date: Mon, 26 Oct 2009 19:20:06 +0530
Subject: [PATCH 13/26] [FIX] Account_voucher : Typo corrected for Voucher
type.
bzr revid: jvo@tinyerp.com-20091026135006-81oxfwxcw6e3sugm
---
addons/account_voucher/voucher.py | 7 +++----
addons/account_voucher/voucher_view.xml | 4 ++--
addons/account_voucher/wizard/open_voucher.py | 4 ++--
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index d1dc30c6b67..6fd5204d318 100755
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -214,7 +214,7 @@ class account_voucher(osv.osv):
for il in iml:
if il['account_analytic_id']:
- if inv.type in ('pay_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_voucher','journal_pur_voucher'):
+ if inv.type in ('pay_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_vou','journal_pur_voucher'):
ref = inv.reference
else:
ref = self._convert_ref(cr, uid, inv.number)
@@ -244,7 +244,7 @@ class account_voucher(osv.osv):
diff_currency_p = inv.currency_id.id <> company_currency
total = 0
- if inv.type in ('pay_voucher', 'journal_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_voucher','journal_pur_voucher'):
+ if inv.type in ('pay_voucher', 'journal_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_vou','journal_pur_voucher'):
ref = inv.reference
else:
ref = self._convert_ref(cr, uid, inv.number)
@@ -508,12 +508,11 @@ class VoucherLine(osv.osv):
res.append(self.move_line_get_item(cr, uid, line, context))
return res
- def onchange_partner(self, cr, uid, ids, partner_id, ttype,type1):
+ def onchange_partner(self, cr, uid, ids, partner_id, ttype ,type1):
if not partner_id:
return {'value' : {'account_id' : False, 'type' : False ,'amount':False}}
obj = self.pool.get('res.partner')
account_id = False
-
if type1 in ('rec_voucher','bank_rec_voucher', 'journal_voucher'):
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
balance = obj.browse(cr,uid,partner_id).credit
diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml
index 089ec8d1614..28233ad6f8c 100755
--- a/addons/account_voucher/voucher_view.xml
+++ b/addons/account_voucher/voucher_view.xml
@@ -231,8 +231,8 @@
form
form,tree
- [('type','=','journal_sale_voucher')]
- {'type':'journal_sale_voucher'}
+ [('type','=','journal_sale_vou')]
+ {'type':'journal_sale_vou'}
diff --git a/addons/account_voucher/wizard/open_voucher.py b/addons/account_voucher/wizard/open_voucher.py
index 253d220dbb9..c88819df315 100644
--- a/addons/account_voucher/wizard/open_voucher.py
+++ b/addons/account_voucher/wizard/open_voucher.py
@@ -45,7 +45,7 @@ _types = {
'rec_voucher':'Cash Receipt Voucher',
'bank_rec_voucher':'Bank Receipt Voucher',
'cont_voucher':'Contra Voucher',
- 'journal_sale_voucher':'Journal Sale Voucher',
+ 'journal_sale_vou':'Journal Sale Voucher',
'journal_pur_voucher':'Journal Purchase Voucher'
}
_states = {
@@ -62,7 +62,7 @@ _voucher_fields = {
('rec_voucher','Cash Receipt Voucher'),
('bank_rec_voucher','Bank Receipt Voucher'),
('cont_voucher','Contra Voucher'),
- ('journal_sale_voucher','Journal Sale Voucher'),
+ ('journal_sale_vou','Journal Sale Voucher'),
('journal_pur_voucher','Journal Purchase Voucher')], 'required':True},
'state': {'string':'State', 'type':'selection', 'selection':[
('draft','Draft'),
From ba53d85a07a36040a4110a01db6c9c1d7ed6043e Mon Sep 17 00:00:00 2001
From: Albert Cervera i Areny <>
Date: Mon, 26 Oct 2009 21:08:17 +0530
Subject: [PATCH 14/26] [FIX] Document : Attachment with document can now be
deleted
lp bug: https://launchpad.net/bugs/460701 fixed
bzr revid: jvo@tinyerp.com-20091026153817-cn3mmj43ng90ymyp
---
addons/document/document.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/addons/document/document.py b/addons/document/document.py
index 460c52a9698..338c6e69255 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -531,17 +531,21 @@ class document_file(osv.osv):
result[id] = base64.encodestring(value)
except:
result[id]=''
-
- if context.get('bin_size', False):
- result[id] = tools.human_size(len(result[id]))
-
+# if context.get('bin_size', False):
+# result[id] = tools.human_size(result[id])
return result
#
# This code can be improved
#
- def _data_set(self, cr, obj, id, name, value, uid=None, context={}):
+ def _data_set(self, cr, uid, id, name, value, args=None, context={}):
if not value:
+ filename = self.browse(cr, uid, id, context).store_fname
+ try:
+ os.unlink(os.path.join(self._get_filestore(cr), filename))
+ except:
+ pass
+ cr.execute('update ir_attachment set store_fname=NULL WHERE id=%s', (id,) )
return True
#if (not context) or context.get('store_method','fs')=='fs':
try:
From 7c26523b0acb2073b0c34d35adeac6758e062a45 Mon Sep 17 00:00:00 2001
From: "Jay (Open ERP)"
Date: Tue, 27 Oct 2009 12:37:15 +0530
Subject: [PATCH 15/26] [FIX] Account_date_check : correction on a method
bzr revid: jvo@tinyerp.com-20091027070715-mut1j0f0jvxaweqy
---
addons/account_date_check/account_date_check.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/addons/account_date_check/account_date_check.py b/addons/account_date_check/account_date_check.py
index 4ee33dbef85..0471fa34ff7 100644
--- a/addons/account_date_check/account_date_check.py
+++ b/addons/account_date_check/account_date_check.py
@@ -47,6 +47,8 @@ class account_move_line(osv.osv):
_name='account.move.line'
def check_date(self, cr, uid, vals, context=None, check=True):
+ if not context:
+ context = {}
if 'date' in vals.keys():
if 'journal_id' in vals and 'journal_id' not in context:
journal_id = vals['journal_id']
From 58fe9c62e673a3695afb3c0a983f6ec53c2a8a88 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Tue, 27 Oct 2009 09:32:21 +0100
Subject: [PATCH 16/26] [IMP] better python2.5/2.6 compatibility handling
bzr revid: olt@tinyerp.com-20091027083221-37mv4k6lei43xfla
---
addons/document/ftpserver/ftpserver.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/addons/document/ftpserver/ftpserver.py b/addons/document/ftpserver/ftpserver.py
index 13c44287303..94bc5b3d90c 100644
--- a/addons/document/ftpserver/ftpserver.py
+++ b/addons/document/ftpserver/ftpserver.py
@@ -1412,10 +1412,7 @@ class FTPHandler(asynchat.async_chat):
established connection.
- (instance) server: the ftp server class instance.
"""
- try:
- asynchat.async_chat.__init__(self, conn=conn) # python2.5
- except TypeError, e:
- asynchat.async_chat.__init__(self, sock=conn) # python2.6
+ asynchat.async_chat.__init__(self, conn)
self.server = server
self.remote_ip, self.remote_port = self.socket.getpeername()[:2]
self.in_buffer = []
From 0ad84d2cad4fc681bcf079a6415646f9e4828eab Mon Sep 17 00:00:00 2001
From: "VRA(OpenERP)" <>
Date: Wed, 28 Oct 2009 15:16:04 +0530
Subject: [PATCH 17/26] [FIX] Account : Partner Ledger Report formatting
problem solved
lp bug: https://launchpad.net/bugs/459196 fixed
bzr revid: jvo@tinyerp.com-20091028094604-z7h98zwdxwquyqrh
---
addons/account/report/third_party_ledger.rml | 325 +++++++++--------
.../report/third_party_ledger_other.rml | 329 ++++++++++--------
2 files changed, 358 insertions(+), 296 deletions(-)
diff --git a/addons/account/report/third_party_ledger.rml b/addons/account/report/third_party_ledger.rml
index 71488665f57..df6d1c239b0 100644
--- a/addons/account/report/third_party_ledger.rml
+++ b/addons/account/report/third_party_ledger.rml
@@ -2,176 +2,203 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- [[ company.name ]]
- Third Party Ledger [[ data['form']['result_selection'] == 'customer' and '/ Débiteur' ]] [[ data['form']['result_selection'] == 'supplier' and '/ Créancier' ]] [[ data['form']['result_selection'] == 'all' and '/ Créancier et Débiteur' ]]
-
-
-
-
-
- [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]
- Page
-
-
-
-
- 1cm 27.7cm 20cm 27.7cm
-
-
-
-
+
-
+
+
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- [[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]
-
-
- | Date |
- JNRL |
- Ref. |
- Entry label |
- Debit |
- Credit |
- Balance |
-
-
-
-
-
- | Balance brought forward |
- [[ formatLang((sum_debit(data))) ]] |
- [[ formatLang((sum_credit(data))) ]] |
- [[ formatLang((sum_debit(data) - sum_credit(data))) ]] |
-
-
- |
-
-
-
-
-
- | [[ p.ref ]] - [[ p.name ]] |
- |
- [[ formatLang((sum_debit_partner(p,data))) ]] |
- [[ formatLang((sum_credit_partner(p,data))) ]] |
- [[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]] |
-
-
-
-
- | [[ repeatIn(lines(p,data), 'line') ]][[ formatLang(line['date'],date=True) ]] |
- [[ line['code'] ]] |
- [[ line['ref'] ]] / [[ line['name'] ]] |
- |
- [[ formatLang((line['debit'])) ]] |
- [[ formatLang((line['credit'])) ]] |
- [[ formatLang((line['progress'])) ]] |
-
-
- |
-
+
+
+ |
+ Third Party Ledger
+ |
+
+ [[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]
+
+
+ |
+ Date
+ |
+
+ JNRL
+ |
+
+ Ref.
+ |
+
+ Entry Label
+ |
+
+ Debit
+ |
+
+ Credit
+ |
+
+ Balance
+ |
+
+
+
+
+
+
+
+ |
+ Balance Brought Forward
+ |
+
+ [[ formatLang((sum_debit(data))) ]]
+ |
+
+ [[ formatLang((sum_credit(data))) ]]
+ |
+
+ [[ formatLang((sum_debit(data) - sum_credit(data))) ]]
+ |
+
+
+
+
+
+
+
+ |
+ [[ p.ref ]] - [[ p.name ]]
+ |
+
+ [[ formatLang((sum_debit_partner(p,data))) ]]
+ |
+
+ [[ formatLang((sum_credit_partner(p,data))) ]]
+ |
+
+ [[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]]
+ |
+
+
+
+
+
+
+ [[ repeatIn(lines(p,data), 'line') ]]
+
+
+ |
+ [[ formatLang(line['date'],date=True) ]]
+ |
+
+ [[ line['code'] ]]
+ |
+
+ [[ line['ref'] ]]
+ |
+
+ [[ line['name'] ]]
+ |
+
+ [[ formatLang((line['debit'])) ]]
+ |
+
+ [[ formatLang((line['credit'])) ]]
+ |
+
+ [[ formatLang((line['progress'])) ]]
+ |
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/account/report/third_party_ledger_other.rml b/addons/account/report/third_party_ledger_other.rml
index e22da1d66d5..296d310fcd9 100644
--- a/addons/account/report/third_party_ledger_other.rml
+++ b/addons/account/report/third_party_ledger_other.rml
@@ -2,176 +2,211 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- [[ company.name ]]
- Third Party Ledger [[ data['form']['result_selection'] == 'customer' and '/ Débiteur' ]] [[ data['form']['result_selection'] == 'supplier' and '/ Créancier' ]] [[ data['form']['result_selection'] == 'all' and '/ Créancier et Débiteur' ]]
-
-
-
-
-
- [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]
- Page
-
-
-
-
- 1cm 27.7cm 20cm 27.7cm
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- | Date |
- JNRL |
- Ref. |
- Entry label |
- Debit |
- Credit |
- Balance |
-
-
-
-
-
- | Balance brought forward |
- [[ formatLang((sum_debit(data))) ]] |
- [[ formatLang((sum_credit(data))) ]] |
- [[ formatLang((sum_debit(data) - sum_credit(data))) ]] |
-
-
- |
-
-
-
- [[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]
-
-
- | [[ p.ref ]] - [[ p.name ]] |
- |
- [[ formatLang((sum_debit_partner(p,data))) ]] |
- [[ formatLang((sum_credit_partner(p,data))) ]] |
- [[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]] |
-
-
-
-
- | [[ repeatIn(lines(p,data), 'line') ]][[ formatLang(line['date'],date=True) ]] |
- [[ line['code'] ]] |
- [[ line['ref'] ]] / [[ line['name'] ]] |
- |
- [[ formatLang((line['debit'])) ]] |
- [[ formatLang((line['credit'])) ]] |
- [[ formatLang((line['progress'])) ]] |
-
-
- |
-
+
+
+ |
+ Third Party Ledger
+ |
+
+
+
+
+
+
+ |
+ Date
+ |
+
+ JNRL
+ |
+
+ Ref.
+ |
+
+ Entry Label
+ |
+
+ Debit
+ |
+
+ Credit
+ |
+
+ Balance
+ |
+
+
+
+
+
+
+
+ |
+ Balance Brought Forward
+ |
+
+ [[ formatLang((sum_debit(data))) ]]
+ |
+
+ [[ formatLang((sum_credit(data))) ]]
+ |
+
+ [[ formatLang((sum_debit(data) - sum_credit(data))) ]]
+ |
+
+
+
+
+
+
+ [[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]
+
+
+ |
+ [[ p.ref ]] - [[ p.name ]]
+ |
+
+ [[ formatLang((sum_debit_partner(p,data))) ]]
+ |
+
+ [[ formatLang((sum_credit_partner(p,data))) ]]
+ |
+
+ [[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]]
+ |
+
+
+
+
+
+
+ [[ repeatIn(lines(p,data), 'line') ]]
+
+
+ |
+ [[ formatLang(line['date'],date=True) ]]
+ |
+
+ [[ line['code'] ]]
+ |
+
+ [[ line['ref'] ]]
+ |
+
+ [[ line['name'] ]]
+ |
+
+ [[ formatLang((line['debit'])) ]]
+ |
+
+ [[ formatLang((line['credit'])) ]]
+ |
+
+ [[ formatLang((line['progress'])) ]]
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From e1e9aae8ac20f36a8ded160db11c0d01ef6b1452 Mon Sep 17 00:00:00 2001
From: "Jay (Open ERP)"
Date: Wed, 28 Oct 2009 20:39:40 +0530
Subject: [PATCH 18/26] [FIX] Warning : Onchange Methods were
malfunctioned.Corrected and made messages available for translations
lp bug: https://launchpad.net/bugs/454536 fixed
bzr revid: jvo@tinyerp.com-20091028150940-04nvtjkwk6htithx
---
addons/warning/warning.py | 89 +++++++++++++++++++++++++--------------
1 file changed, 58 insertions(+), 31 deletions(-)
diff --git a/addons/warning/warning.py b/addons/warning/warning.py
index c5ee7106851..3a8d9f53fb9 100644
--- a/addons/warning/warning.py
+++ b/addons/warning/warning.py
@@ -29,7 +29,7 @@ WARNING_MESSAGE = [
('block','Blocking Message')
]
-WARNING_HELP = 'Selecting the "Warning" option will notify user with the message, Selecting "Blocking Message" will throw an exception with the message and block the flow. The Message has to be written in the next field.'
+WARNING_HELP = _('Selecting the "Warning" option will notify user with the message, Selecting "Blocking Message" will throw an exception with the message and block the flow. The Message has to be written in the next field.')
class res_partner(osv.osv):
_inherit = 'res.partner'
@@ -64,20 +64,21 @@ class sale_order(osv.osv):
partner = self.pool.get('res.partner').browse(cr, uid, part)
if partner.sale_warn != 'no-message':
if partner.sale_warn == 'block':
- raise osv.except_osv(_('Alert for ' + partner.name +' !'), partner.sale_warn_msg)
-
+ raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.sale_warn_msg)
+ title = _("Warning for %s") % partner.name
+ message = partner.sale_warn_msg
warning = {
- 'title': "Warning for " + partner.name,
- 'message': partner.sale_warn_msg
+ 'title': title,
+ 'message': message,
}
- result = super(sale_order, self).onchange_partner_id(cr, uid, ids, part)['value']
+ result = super(sale_order, self).onchange_partner_id(cr, uid, ids, part)
if result.get('warning',False):
warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title']
warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message']
- return {'value': result, 'warning':warning}
+ return {'value': result['value'], 'warning':warning}
sale_order()
@@ -87,17 +88,25 @@ class purchase_order(osv.osv):
if not part:
return {'value':{'partner_address_id': False}}
warning = {}
+ title = False
+ message = False
partner = self.pool.get('res.partner').browse(cr, uid, part)
if partner.purchase_warn != 'no-message':
if partner.purchase_warn == 'block':
- raise osv.except_osv(_('Alert for ' + partner.name +' !'), partner.purchase_warn_msg)
-
+ raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.purchase_warn_msg)
+ title = _("Warning for %s") % partner.name
+ message = partner.purchase_warn_msg
warning = {
- 'title': "Warning for " + partner.name,
- 'message': partner.purchase_warn_msg
+ 'title': title,
+ 'message': message
}
- result = super(purchase_order, self).onchange_partner_id(cr, uid, ids, part)['value']
- return {'value': result, 'warning':warning}
+ result = super(purchase_order, self).onchange_partner_id(cr, uid, ids, part)
+
+ if result.get('warning',False):
+ warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title']
+ warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message']
+
+ return {'value': result['value'], 'warning':warning}
purchase_order()
@@ -116,17 +125,27 @@ class account_invoice(osv.osv):
}
}
warning = {}
+ title = False
+ message = False
partner = self.pool.get('res.partner').browse(cr, uid, partner_id)
if partner.invoice_warn != 'no-message':
if partner.invoice_warn == 'block':
- raise osv.except_osv(_('Alert for ' + partner.name +' !'), partner.invoice_warn_msg)
+ raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.invoice_warn_msg)
+
+ title = _("Warning for %s") % partner.name
+ message = partner.invoice_warn_msg
warning = {
- 'title': "Warning for " + partner.name,
- 'message': partner.invoice_warn_msg
+ 'title': title,
+ 'message': message
}
result = super(account_invoice, self).onchange_partner_id(cr, uid, ids, type, partner_id,
- date_invoice=False, payment_term=False, partner_bank_id=False)['value']
- return {'value': result, 'warning':warning}
+ date_invoice=False, payment_term=False, partner_bank_id=False)
+
+ if result.get('warning',False):
+ warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title']
+ warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message']
+
+ return {'value': result['value'], 'warning':warning}
account_invoice()
@@ -138,15 +157,23 @@ class stock_picking(osv.osv):
return {}
partner = self.pool.get('res.partner.address').browse(cr, uid, [partner_id])[0].partner_id
warning = {}
+ title = False
+ message = False
if partner.picking_warn != 'no-message':
if partner.picking_warn == 'block':
- raise osv.except_osv(_('Alert for ' + partner.name +' !'), partner.picking_warn_msg)
+ raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.picking_warn_msg)
+ title = _("Warning for %s") % partner.name
+ message = partner.picking_warn_msg
warning = {
- 'title': "Warning for " + partner.name,
- 'message': partner.picking_warn_msg
+ 'title': title,
+ 'message': message
}
result = super(stock_picking, self).onchange_partner_in(cr, uid, context, partner_id)
- return {'value': result, 'warning':warning}
+ if result.get('warning',False):
+ warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title']
+ warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message']
+
+ return {'value': result['value'], 'warning':warning}
stock_picking()
@@ -184,8 +211,8 @@ class sale_order_line(osv.osv):
if product_info.sale_line_warn != 'no-message':
if product_info.sale_line_warn == 'block':
- raise osv.except_osv(_('Alert for ' + product_info.name +' !'), product_info.sale_line_warn_msg)
- title = "Warning for " + product_info.name
+ raise osv.except_osv(_('Alert for %s !') % (product_info.name), product_info.sale_line_warn_msg)
+ title = _("Warning for %s") % product_info.name
message = product_info.sale_line_warn_msg
warning['title'] = title
warning['message'] = message
@@ -193,12 +220,12 @@ class sale_order_line(osv.osv):
result = super(sale_order_line, self).product_id_change( cr, uid, ids, pricelist, product, qty,
uom, qty_uos, uos, name, partner_id,
lang, update_tax, date_order, packaging, fiscal_position, flag)
- if title and message:
- warning['title']=title[0]
- warning['message']=message
+# if title and message:
+# warning['title'] = title
+# warning['message']= message
if result.get('warning',False):
- warning['title'] = title and title[0]+' & '+result['warning']['title'] or result['warning']['title']
+ warning['title'] = title and title +' & '+result['warning']['title'] or result['warning']['title']
warning['message'] = message and message +'\n\n'+result['warning']['message'] or result['warning']['message']
return {'value': result['value'], 'warning':warning}
@@ -219,8 +246,8 @@ class purchase_order_line(osv.osv):
if product_info.purchase_line_warn != 'no-message':
if product_info.purchase_line_warn == 'block':
- raise osv.except_osv(_('Alert for ' + product_info.name +' !'), product_info.purchase_line_warn_msg)
- title = "Warning for " + product_info.name
+ raise osv.except_osv(_('Alert for %s !') % (product_info.name), product_info.purchase_line_warn_msg)
+ title = _("Warning for %s") % product_info.name
message = product_info.purchase_line_warn_msg
warning['title'] = title
warning['message'] = message
@@ -229,7 +256,7 @@ class purchase_order_line(osv.osv):
partner_id, date_order, fiscal_position)
if result.get('warning',False):
- warning['title'] = title and title[0]+' & '+result['warning']['title'] or result['warning']['title']
+ warning['title'] = title and title +' & '+result['warning']['title'] or result['warning']['title']
warning['message'] = message and message +'\n\n'+result['warning']['message'] or result['warning']['message']
return {'value': result['value'], 'warning':warning}
From d421389da9671293f66b36196aa33d5c2516741d Mon Sep 17 00:00:00 2001
From: "GPA,JVO" <>
Date: Thu, 29 Oct 2009 19:13:48 +0530
Subject: [PATCH 19/26] [FIX] Sale : Workflow behaviour fixed when order is set
to draft
lp bug: https://launchpad.net/bugs/461801 fixed
bzr revid: jvo@tinyerp.com-20091029134348-f44814d758scekrz
---
addons/sale/sale.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 6a9572b547c..d43c7533e86 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -505,12 +505,13 @@ class sale_order(osv.osv):
write_done_ids = []
write_cancel_ids = []
stock_move_obj = self.pool.get('stock.move')
-
for order in self.browse(cr, uid, ids, context={}):
#check for pending deliveries
pending_deliveries = False
-
+ # check => if order_lines do not exist,don't proceed for any mode.
+ if not order.order_line:
+ return False
for line in order.order_line:
move_ids = stock_move_obj.search(cr, uid, [('sale_line_id','=', line.id)])
for move in stock_move_obj.browse( cr, uid, move_ids ):
@@ -518,8 +519,9 @@ class sale_order(osv.osv):
#this order line is not yet delivered
if move.state in ('draft', 'auto', 'confirmed'):
pending_deliveries = True
-
- if ((not line.procurement_id) or (line.procurement_id.state=='done')) and not pending_deliveries:
+ # Reason => if there are no move lines,the following condition will always set to be true,and will set SO to 'DONE'.
+ # Added move_ids check to SOLVE.
+ if move_ids and ((not line.procurement_id) or (line.procurement_id.state=='done')) and not pending_deliveries:
# finished = True
if line.state != 'done':
write_done_ids.append(line.id)
@@ -532,7 +534,6 @@ class sale_order(osv.osv):
write_cancel_ids.append(line.id)
else:
notcanceled = True
-
if write_done_ids:
self.pool.get('sale.order.line').write(cr, uid, write_done_ids, {'state': 'done'})
if write_cancel_ids:
From 549bc3b290698a2c4d83b365d339f06cfb150992 Mon Sep 17 00:00:00 2001
From: "GPA,JVO" <>
Date: Fri, 30 Oct 2009 11:55:26 +0530
Subject: [PATCH 20/26] [FIX] Scrum : Wrong view,widgetless fields on scrum
view made correct
lp bug: https://launchpad.net/bugs/461720 fixed
bzr revid: jvo@tinyerp.com-20091030062526-50m1mhofe5dz9y8s
---
addons/scrum/scrum_view.xml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/addons/scrum/scrum_view.xml b/addons/scrum/scrum_view.xml
index 9133f40d242..f4ca15a902a 100644
--- a/addons/scrum/scrum_view.xml
+++ b/addons/scrum/scrum_view.xml
@@ -398,8 +398,24 @@
All Tasks
scrum.task
form
+ tree,form
[('scrum','=',1)]
+
+
+
+ tree
+
+
+
+
+
+
+ form
+
+
+
+
From 858222d4964d9469748d8a7bae517017abf1df1b Mon Sep 17 00:00:00 2001
From: "VRA(OpenERP)" <>
Date: Mon, 2 Nov 2009 10:42:51 +0530
Subject: [PATCH 21/26] [FIX] Account : Refund wizard wasnt calculating taxes
for new invoices
lp bug: https://launchpad.net/bugs/448591 fixed
bzr revid: jvo@tinyerp.com-20091102051251-rpt29iur2ccpb0ni
---
addons/account/wizard/wizard_refund.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/addons/account/wizard/wizard_refund.py b/addons/account/wizard/wizard_refund.py
index 2f93b0e3459..9635821d9a1 100644
--- a/addons/account/wizard/wizard_refund.py
+++ b/addons/account/wizard/wizard_refund.py
@@ -110,7 +110,9 @@ class wiz_refund(wizard.interface):
# we compute due date
#!!!due date = date inv date on formdate
pool.get('account.invoice').write(cr, uid, [refund.id],{'date_due':date,'check_total':inv.check_total})
-
+ # to make the taxes calculated
+ pool.get('account.invoice').button_compute(cr, uid, refund_id)
+
created_inv.append(refund_id[0])
#if inv is paid we unreconcile
if mode in ('cancel','modify'):
From 2e7381178a188fba927d086a19cc5f97bdc3cc15 Mon Sep 17 00:00:00 2001
From: "Jay (Open ERP)"
Date: Mon, 2 Nov 2009 10:47:28 +0530
Subject: [PATCH 22/26] [FIX] Account : Action window of anlytic entries was
missing name
lp bug: https://launchpad.net/bugs/466658 fixed
bzr revid: jvo@tinyerp.com-20091102051728-uf5nfq67tbz153f2
---
addons/account/project/project_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml
index 02842c47333..0273b1b3837 100644
--- a/addons/account/project/project_view.xml
+++ b/addons/account/project/project_view.xml
@@ -163,7 +163,7 @@
-
+ Analytic Entries
account.analytic.line
form
tree,form
From e364cf15b3c52cf04c9178f1cf53bb7591e61293 Mon Sep 17 00:00:00 2001
From: "Jay (Open ERP)"
Date: Mon, 2 Nov 2009 10:58:20 +0530
Subject: [PATCH 23/26] [FIX] Stock : Notification Message made translatable
lp bug: https://launchpad.net/bugs/465010 fixed
bzr revid: jvo@tinyerp.com-20091102052820-2mrfh9vuoyr60uj0
---
addons/stock/wizard/wizard_partial_picking.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/stock/wizard/wizard_partial_picking.py b/addons/stock/wizard/wizard_partial_picking.py
index 89d34605dcd..a93a8981a18 100644
--- a/addons/stock/wizard/wizard_partial_picking.py
+++ b/addons/stock/wizard/wizard_partial_picking.py
@@ -209,7 +209,7 @@ def _do_split(self, cr, uid, data, context):
def _get_default(self, cr, uid, data, context):
if data['form']['back_order']:
- data['form']['back_order_notification'] = 'Back Order ' + tools.ustr(data['form']['back_order']) + ' Assigned to this Packing.'
+ data['form']['back_order_notification'] = _('Back Order %s Assigned to this Packing.') % (tools.ustr(data['form']['back_order']),)
return data['form']
class partial_picking(wizard.interface):
From e7a50c6a8f5c11adac5a2c05c6db86c5dc62bef9 Mon Sep 17 00:00:00 2001
From: Mantavya Gajjar
Date: Mon, 2 Nov 2009 15:44:15 +0530
Subject: [PATCH 24/26] [FIX]: fix the problem of the reports account voucher
bzr revid: mga@tinyerp.com-20091102101415-vfasqbyb0ytomjjh
---
addons/account_voucher/report/report_voucher.py | 2 +-
addons/account_voucher/report/report_voucher.rml | 5 +++--
addons/account_voucher/report/report_voucher_amount.py | 4 ++--
addons/account_voucher/report/rml_parse.py | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
mode change 100644 => 100755 addons/account_voucher/report/rml_parse.py
diff --git a/addons/account_voucher/report/report_voucher.py b/addons/account_voucher/report/report_voucher.py
index 9f40c6ad920..27ba2efd488 100755
--- a/addons/account_voucher/report/report_voucher.py
+++ b/addons/account_voucher/report/report_voucher.py
@@ -32,7 +32,7 @@ from tools import amount_to_text_en
class report_voucher(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(report_voucher, self).__init__(cr, uid, name, context=context)
+ super(report_voucher, self).__init__(cr, uid, name, context)
self.localcontext.update({
'time': time,
'convert':self.convert,
diff --git a/addons/account_voucher/report/report_voucher.rml b/addons/account_voucher/report/report_voucher.rml
index abd22ecc428..9be52c064d7 100755
--- a/addons/account_voucher/report/report_voucher.rml
+++ b/addons/account_voucher/report/report_voucher.rml
@@ -104,7 +104,7 @@
Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]
Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]
Bank Payment Voucher [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]
-
+
@@ -171,13 +171,14 @@
- [[ repeatIn(voucher.move_ids,'move_ids') ]] [[ (not move_ids) and removeParentNode('blockTable') ]]
+ [[ repeatIn(voucher.move_ids,'move_ids') ]]
|
[[ (move_ids.partner_id and move_ids.partner_id.name) or 'Account']] :
[[ move_ids.account_id.name ]]
[[ move_ids.name ]] - [[ get_ref(voucher.id,move_ids) ]]
+
|
[[ move_ids.debit ]]
diff --git a/addons/account_voucher/report/report_voucher_amount.py b/addons/account_voucher/report/report_voucher_amount.py
index 246782e433e..3b67ff7a9ac 100755
--- a/addons/account_voucher/report/report_voucher_amount.py
+++ b/addons/account_voucher/report/report_voucher_amount.py
@@ -32,7 +32,7 @@ from tools import amount_to_text_en
class report_voucher_amount(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(report_voucher_amount, self).__init__(cr, uid, name, context=context)
+ super(report_voucher_amount, self).__init__(cr, uid, name, context)
self.localcontext.update({
'time': time,
'convert':self.convert
@@ -48,4 +48,4 @@ report_sxw.report_sxw(
'account.voucher',
'addons/account_voucher/report/report_voucher_amount.rml',
parser=report_voucher_amount,header=False
-)
+)
\ No newline at end of file
diff --git a/addons/account_voucher/report/rml_parse.py b/addons/account_voucher/report/rml_parse.py
old mode 100644
new mode 100755
index 9f4b8e6bfb9..31bd26617cd
--- a/addons/account_voucher/report/rml_parse.py
+++ b/addons/account_voucher/report/rml_parse.py
@@ -32,7 +32,7 @@ import sys
class rml_parse(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(rml_parse, self).__init__(cr, uid, name, context=context)
+ super(rml_parse, self).__init__(cr, uid, name, context=None)
self.localcontext.update({
'comma_me': self.comma_me,
'format_date': self._get_and_change_date_format_for_swiss,
From 7022a6016f826c2c5d475aec6fc079e3e82ba8bc Mon Sep 17 00:00:00 2001
From: "GPA(OpenERP)" <>
Date: Tue, 3 Nov 2009 10:16:55 +0530
Subject: [PATCH 25/26] [FIX] MRP : Procurement can only be confirmed when
qty>0.0
lp bug: https://launchpad.net/bugs/467880 fixed
bzr revid: jvo@tinyerp.com-20091103044655-4y4qust3n1u2xdm0
---
addons/mrp/mrp.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index 5e7658b69eb..0288081148d 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -978,6 +978,8 @@ class mrp_procurement(osv.osv):
def action_confirm(self, cr, uid, ids, context={}):
for procurement in self.browse(cr, uid, ids):
+ if procurement.product_qty <= 0.00:
+ raise osv.except_osv(_('Data Insufficient !'), _('Please check the Quantity of Procurement Order(s), it should not be less than 1!'))
if procurement.product_id.type in ('product', 'consu'):
if not procurement.move_id:
source = procurement.location_id.id
From a1933eaba7259335ce8e2fbb3cf527a37954a3da Mon Sep 17 00:00:00 2001
From: "Harry (Open ERP)"
Date: Thu, 5 Nov 2009 11:22:23 +0530
Subject: [PATCH 26/26] [FIX]warning: critical bug,missing import statment for
"_"
bzr revid: hmo@tinyerp.com-20091105055223-5d8g2befwdc1xz1n
---
addons/warning/warning.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/addons/warning/warning.py b/addons/warning/warning.py
index 859dec8e1a2..927281a203a 100644
--- a/addons/warning/warning.py
+++ b/addons/warning/warning.py
@@ -21,6 +21,7 @@
import time
from osv import fields,osv
+from tools.translate import _
WARNING_MESSAGE = [
('no-message','No Message'),
| | | |