[MERGE] forward port of branch 7.0 up to revid b09b6a0

This commit is contained in:
Christophe Simonis
2014-05-20 18:57:04 +02:00
5 changed files with 13 additions and 6 deletions
+2 -2
View File
@@ -21,7 +21,7 @@
from openerp.osv import osv, fields from openerp.osv import osv, fields
from openerp.addons.edi import EDIMixin from openerp.addons.edi import EDIMixin
from urllib import urlencode from werkzeug import url_encode
INVOICE_LINE_EDI_STRUCT = { INVOICE_LINE_EDI_STRUCT = {
'name': True, 'name': True,
@@ -274,7 +274,7 @@ class account_invoice(osv.osv, EDIMixin):
"no_note": "1", "no_note": "1",
"bn": "OpenERP_Invoice_PayNow_" + inv.currency_id.name, "bn": "OpenERP_Invoice_PayNow_" + inv.currency_id.name,
} }
res[inv.id] = "https://www.paypal.com/cgi-bin/webscr?" + urlencode(params) res[inv.id] = "https://www.paypal.com/cgi-bin/webscr?" + url_encode(params)
return res return res
_columns = { _columns = {
+2 -2
View File
@@ -22,7 +22,7 @@ from openerp.osv import osv, fields
from openerp.addons.edi import EDIMixin from openerp.addons.edi import EDIMixin
from openerp.tools.translate import _ from openerp.tools.translate import _
from urllib import urlencode from werkzeug import url_encode
SALE_ORDER_LINE_EDI_STRUCT = { SALE_ORDER_LINE_EDI_STRUCT = {
'sequence': True, 'sequence': True,
@@ -197,7 +197,7 @@ class sale_order(osv.osv, EDIMixin):
"no_note": "1", "no_note": "1",
"bn": "OpenERP_Order_PayNow_" + order.pricelist_id.currency_id.name, "bn": "OpenERP_Order_PayNow_" + order.pricelist_id.currency_id.name,
} }
res[order.id] = "https://www.paypal.com/cgi-bin/webscr?" + urlencode(params) res[order.id] = "https://www.paypal.com/cgi-bin/webscr?" + url_encode(params)
return res return res
_columns = { _columns = {
+2
View File
@@ -351,6 +351,8 @@ class ir_model_fields(osv.osv):
raise except_orm(_('Error'), _("Model %s does not exist!") % vals['relation']) raise except_orm(_('Error'), _("Model %s does not exist!") % vals['relation'])
if vals['model'] in self.pool: if vals['model'] in self.pool:
if vals['model'].startswith('x_') and vals['name'] == 'x_name':
self.pool[vals['model']]._rec_name = 'x_name'
self.pool[vals['model']].__init__(self.pool, cr) self.pool[vals['model']].__init__(self.pool, cr)
#Added context to _auto_init for special treatment to custom field for select_level #Added context to _auto_init for special treatment to custom field for select_level
ctx = dict(context, ctx = dict(context,
+6 -2
View File
@@ -3711,9 +3711,13 @@ class BaseModel(object):
ir_values_obj.unlink(cr, uid, ir_value_ids, context=context) ir_values_obj.unlink(cr, uid, ir_value_ids, context=context)
for order, obj_name, store_ids, fields in result_store: for order, obj_name, store_ids, fields in result_store:
if obj_name != self._name: if obj_name == self._name:
effective_store_ids = list(set(store_ids) - set(ids))
else:
effective_store_ids = store_ids
if effective_store_ids:
obj = self.pool[obj_name] obj = self.pool[obj_name]
cr.execute('select id from '+obj._table+' where id IN %s', (tuple(store_ids),)) cr.execute('select id from '+obj._table+' where id IN %s', (tuple(effective_store_ids),))
rids = map(lambda x: x[0], cr.fetchall()) rids = map(lambda x: x[0], cr.fetchall())
if rids: if rids:
obj._store_set_values(cr, uid, rids, fields, context) obj._store_set_values(cr, uid, rids, fields, context)
+1
View File
@@ -475,6 +475,7 @@ ALL_LANGUAGES = {
'lo_LA': u'Lao / ພາສາລາວ', 'lo_LA': u'Lao / ພາສາລາວ',
'lt_LT': u'Lithuanian / Lietuvių kalba', 'lt_LT': u'Lithuanian / Lietuvių kalba',
'lv_LV': u'Latvian / latviešu valoda', 'lv_LV': u'Latvian / latviešu valoda',
'mk_MK': u'Macedonian / македонски јазик',
'ml_IN': u'Malayalam / മലയാളം', 'ml_IN': u'Malayalam / മലയാളം',
'mn_MN': u'Mongolian / монгол', 'mn_MN': u'Mongolian / монгол',
'nb_NO': u'Norwegian Bokmål / Norsk bokmål', 'nb_NO': u'Norwegian Bokmål / Norsk bokmål',