[MERGE] Sync with 7.0
bzr revid: odo@openerp.com-20130415181836-cmq936wu0w7alwky
This commit is contained in:
+994
-63
File diff suppressed because it is too large
Load Diff
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-server\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:36+0000\n"
|
||||
"PO-Revision-Date: 2013-04-07 18:50+0000\n"
|
||||
"PO-Revision-Date: 2013-04-13 15:04+0000\n"
|
||||
"Last-Translator: Dorin <dhongu@gmail.com>\n"
|
||||
"Language-Team: Romanian <ro@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-04-08 06:19+0000\n"
|
||||
"X-Generator: Launchpad (build 16550)\n"
|
||||
"X-Launchpad-Export-Date: 2013-04-14 05:49+0000\n"
|
||||
"X-Generator: Launchpad (build 16564)\n"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.module.module,description:base.module_account_check_writing
|
||||
@@ -8951,7 +8951,7 @@ msgstr "Modul de Instalare Imediata"
|
||||
#. module: base
|
||||
#: view:ir.actions.server:0
|
||||
msgid "Field Mapping"
|
||||
msgstr "Mapare camp"
|
||||
msgstr "Mapare câmp"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.model.fields,ttype:0
|
||||
@@ -11748,7 +11748,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: model:ir.module.module,shortdesc:base.module_plugin
|
||||
msgid "CRM Plugins"
|
||||
msgstr "Aplicatie MRC"
|
||||
msgstr "Aplicație MRC"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.actions.act_window,name:base.action_model_model
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-server\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:36+0000\n"
|
||||
"PO-Revision-Date: 2013-02-05 11:56+0000\n"
|
||||
"Last-Translator: Denis Karataev <dskarataev@gmail.com>\n"
|
||||
"PO-Revision-Date: 2013-04-12 11:45+0000\n"
|
||||
"Last-Translator: Rinat Karimov <Unknown>\n"
|
||||
"Language-Team: Russian <ru@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-03-08 05:20+0000\n"
|
||||
"X-Generator: Launchpad (build 16523)\n"
|
||||
"X-Launchpad-Export-Date: 2013-04-13 06:31+0000\n"
|
||||
"X-Generator: Launchpad (build 16564)\n"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.module.module,description:base.module_account_check_writing
|
||||
@@ -893,7 +893,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: help:ir.cron,nextcall:0
|
||||
msgid "Next planned execution date for this job."
|
||||
msgstr "Следующая запланированная дата выполнения для данной работы."
|
||||
msgstr "Следующая дата выполнения задачи планировщиком."
|
||||
|
||||
#. module: base
|
||||
#: model:ir.model,name:base.model_ir_ui_view
|
||||
@@ -11103,7 +11103,7 @@ msgstr ""
|
||||
#: model:ir.actions.act_window,name:base.action_view_base_module_upgrade
|
||||
#, python-format
|
||||
msgid "Apply Schedule Upgrade"
|
||||
msgstr "Применить запланированные обновления"
|
||||
msgstr "Выполнить обновление"
|
||||
|
||||
#. module: base
|
||||
#: view:workflow.activity:0
|
||||
@@ -14941,7 +14941,7 @@ msgstr "Файл веб-значка"
|
||||
#. module: base
|
||||
#: model:ir.ui.menu,name:base.menu_view_base_module_upgrade
|
||||
msgid "Apply Scheduled Upgrades"
|
||||
msgstr "Выполнить запланированные обновления"
|
||||
msgstr "Выполнить обновления"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.module.module,shortdesc:base.module_sale_journal
|
||||
@@ -15266,7 +15266,7 @@ msgstr "Лимит"
|
||||
#. module: base
|
||||
#: model:res.groups,name:base.group_hr_user
|
||||
msgid "Officer"
|
||||
msgstr "Сотрудник"
|
||||
msgstr "Кадровик"
|
||||
|
||||
#. module: base
|
||||
#: code:addons/orm.py:787
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-server\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:36+0000\n"
|
||||
"PO-Revision-Date: 2013-04-07 04:17+0000\n"
|
||||
"Last-Translator: Ediz Duman <neps1192@gmail.com>\n"
|
||||
"PO-Revision-Date: 2013-04-14 17:36+0000\n"
|
||||
"Last-Translator: Ayhan KIZILTAN <Unknown>\n"
|
||||
"Language-Team: Turkish <tr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-04-08 06:20+0000\n"
|
||||
"X-Generator: Launchpad (build 16550)\n"
|
||||
"X-Launchpad-Export-Date: 2013-04-15 06:06+0000\n"
|
||||
"X-Generator: Launchpad (build 16564)\n"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.module.module,description:base.module_account_check_writing
|
||||
@@ -146,7 +146,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: field:ir.actions.client,params:0
|
||||
msgid "Supplementary arguments"
|
||||
msgstr "Tedarik argümanlar"
|
||||
msgstr "Tedarik argümanları"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.module.module,description:base.module_google_base_account
|
||||
@@ -2359,7 +2359,7 @@ msgstr "Yöntem"
|
||||
#. module: base
|
||||
#: model:ir.module.module,shortdesc:base.module_auth_crypt
|
||||
msgid "Password Encryption"
|
||||
msgstr ""
|
||||
msgstr "Parola Şifreleme"
|
||||
|
||||
#. module: base
|
||||
#: view:workflow.activity:0
|
||||
@@ -4987,7 +4987,7 @@ msgid ""
|
||||
"object.partner_id.name ]]`"
|
||||
msgstr ""
|
||||
"E-posta içeriği, Mesajın içinde çift parantez içine alınmış ifadeler "
|
||||
"içerebilir ör. `Sevgili [[object.partner_id.name]]`"
|
||||
"içerebilir ör. `Sayın [[object.partner_id.name]]`"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.actions.act_window,name:base.action_workflow_form
|
||||
@@ -8080,12 +8080,12 @@ msgstr "Firma Banka Hesapları"
|
||||
#: code:addons/base/res/res_users.py:473
|
||||
#, python-format
|
||||
msgid "Setting empty passwords is not allowed for security reasons!"
|
||||
msgstr "Güvenlik sebebiyle boş şifrelere izin verilmemektedir!"
|
||||
msgstr "Güvenlik nedeniyle boş parolalara izin verilmemektedir!"
|
||||
|
||||
#. module: base
|
||||
#: help:ir.mail_server,smtp_pass:0
|
||||
msgid "Optional password for SMTP authentication"
|
||||
msgstr "SMTP kimlik doğrulaması için şifre (opsiyonel)"
|
||||
msgstr "SMTP kimlik doğrulaması için seçmeli parola"
|
||||
|
||||
#. module: base
|
||||
#: code:addons/base/ir/ir_model.py:728
|
||||
@@ -11113,7 +11113,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: field:ir.attachment,res_model:0
|
||||
msgid "Resource Model"
|
||||
msgstr "Kayanak Model"
|
||||
msgstr "Kaynak Model"
|
||||
|
||||
#. module: base
|
||||
#: code:addons/custom.py:555
|
||||
@@ -12505,7 +12505,7 @@ msgstr "Bordro Muhasebesi"
|
||||
#. module: base
|
||||
#: view:res.users:0
|
||||
msgid "Change password"
|
||||
msgstr "Şifreyi değiştir"
|
||||
msgstr "Parolayı değiştir"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.sr
|
||||
@@ -12560,7 +12560,7 @@ msgstr "Adres Biçimi"
|
||||
#. module: base
|
||||
#: model:ir.model,name:base.model_change_password_user
|
||||
msgid "Change Password Wizard User"
|
||||
msgstr ""
|
||||
msgstr "Parola Değiştirme Sihirbazı Kullanıcısı"
|
||||
|
||||
#. module: base
|
||||
#: model:res.groups,name:base.group_no_one
|
||||
@@ -12865,7 +12865,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: selection:base.language.export,state:0
|
||||
msgid "choose"
|
||||
msgstr "seçme"
|
||||
msgstr "seç"
|
||||
|
||||
#. module: base
|
||||
#: code:addons/base/ir/ir_mail_server.py:445
|
||||
@@ -12994,7 +12994,7 @@ msgstr "Kıbrıs"
|
||||
#. module: base
|
||||
#: field:res.users,new_password:0
|
||||
msgid "Set Password"
|
||||
msgstr "Parola Ayarlama"
|
||||
msgstr "Parola Ayarla"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.actions.server,subject:0
|
||||
@@ -14203,7 +14203,7 @@ msgstr "Tayland"
|
||||
#. module: base
|
||||
#: model:ir.model,name:base.model_change_password_wizard
|
||||
msgid "Change Password Wizard"
|
||||
msgstr ""
|
||||
msgstr "Parola Değiştirme Sihirbazı"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.module.module,summary:base.module_account_voucher
|
||||
@@ -14644,7 +14644,7 @@ msgstr "Erişim"
|
||||
#: field:res.partner,vat:0
|
||||
#, python-format
|
||||
msgid "TIN"
|
||||
msgstr "V.No"
|
||||
msgstr "Vergi N°"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.aw
|
||||
|
||||
@@ -100,7 +100,7 @@ class view(osv.osv):
|
||||
else:
|
||||
inferred_type = etree.fromstring(values['arch'].encode('utf8')).tag
|
||||
values['name'] = "%s %s" % (values['model'], inferred_type)
|
||||
return super(osv.osv, self).create(cr, uid, values, context)
|
||||
return super(view, self).create(cr, uid, values, context)
|
||||
|
||||
def _relaxng(self):
|
||||
if not self._relaxng_validator:
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
<para style="P1">[[ repeatIn(findflds(object.model), 'field') ]]</para>
|
||||
<para style="P1">[[ repeatIn(findflds(object.model, module.name), 'field') ]]</para>
|
||||
<blockTable colWidths="113.0,397.0" repeatRows="1" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
@@ -71,10 +71,17 @@ class ir_module_reference_print(report_sxw.rml_parse):
|
||||
modobj = self.pool.get('ir.model')
|
||||
return modobj.browse(self.cr, self.uid, ids)
|
||||
|
||||
def _fields_find(self, obj):
|
||||
def _fields_find(self, obj, module):
|
||||
res = []
|
||||
data_obj = self.pool.get('ir.model.data')
|
||||
modobj = self.pool.get(obj)
|
||||
res = modobj.fields_get(self.cr, self.uid).items()
|
||||
res.sort()
|
||||
fname_wildcard = 'field_' + modobj._name.replace('.', '_') + '_%'
|
||||
module_fields_ids = data_obj.search(self.cr, self.uid, [('model', '=', 'ir.model.fields'), ('module', '=', module), ('name', 'like', fname_wildcard)])
|
||||
if module_fields_ids:
|
||||
module_fields_res_ids = [x['res_id'] for x in data_obj.read(self.cr, self.uid, module_fields_ids, ['res_id'])]
|
||||
module_fields_names = [x['name'] for x in self.pool.get('ir.model.fields').read(self.cr, self.uid, module_fields_res_ids, ['name'])]
|
||||
res = modobj.fields_get(self.cr, self.uid, allfields=module_fields_names).items()
|
||||
res.sort()
|
||||
return res
|
||||
|
||||
report_sxw.report_sxw('report.ir.module.reference', 'ir.module.module',
|
||||
|
||||
@@ -158,8 +158,8 @@ class res_partner_bank(osv.osv):
|
||||
'name': '/'
|
||||
}
|
||||
|
||||
def fields_get(self, cr, uid, fields=None, context=None):
|
||||
res = super(res_partner_bank, self).fields_get(cr, uid, fields, context)
|
||||
def fields_get(self, cr, uid, allfields=None, context=None):
|
||||
res = super(res_partner_bank, self).fields_get(cr, uid, allfields=allfields, context=context)
|
||||
bank_type_obj = self.pool.get('res.partner.bank.type')
|
||||
type_ids = bank_type_obj.search(cr, uid, [])
|
||||
types = bank_type_obj.browse(cr, uid, type_ids)
|
||||
|
||||
@@ -324,6 +324,10 @@ class res_partner(osv.osv, format_address):
|
||||
'image': False,
|
||||
}
|
||||
|
||||
_constraints = [
|
||||
(osv.osv._check_recursion, 'You cannot create recursive Partner hierarchies.', ['parent_id']),
|
||||
]
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
</group>
|
||||
|
||||
<notebook colspan="4">
|
||||
<page string="Contacts" attrs="{'invisible': [('is_company','=',False)]}">
|
||||
<page string="Contacts" attrs="{'invisible': [('is_company','=',False)]}" autofocus="autofocus">
|
||||
<field name="child_ids" mode="kanban" context="{'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id}">
|
||||
<kanban>
|
||||
<field name="color"/>
|
||||
|
||||
@@ -44,7 +44,7 @@ openerp.base = function(instance) {
|
||||
} else {
|
||||
sessionStorage.removeItem('apps.login');
|
||||
sessionStorage.removeItem('apps.access_token');
|
||||
client.bind_crendentials(client.dbname, 'anonymous', 'anonymous');
|
||||
client.bind_credentials(client.dbname, 'anonymous', 'anonymous');
|
||||
client.authenticate().then(
|
||||
function() { /* done */
|
||||
d.resolve(client);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import unittest2
|
||||
|
||||
import openerp.tests.common as common
|
||||
from openerp.osv.orm import except_orm
|
||||
|
||||
class test_base(common.TransactionCase):
|
||||
|
||||
@@ -249,5 +250,41 @@ class test_base(common.TransactionCase):
|
||||
p0.refresh()
|
||||
self.assertEquals(p0.vat, sunhelmvat2, 'Commercial fields must be automatically synced')
|
||||
|
||||
class test_partner_recursion(common.TransactionCase):
|
||||
|
||||
def setUp(self):
|
||||
super(test_partner_recursion,self).setUp()
|
||||
self.res_partner = self.registry('res.partner')
|
||||
cr, uid = self.cr, self.uid
|
||||
self.p1 = self.res_partner.name_create(cr, uid, 'Elmtree')[0]
|
||||
self.p2 = self.res_partner.create(cr, uid, {'name': 'Elmtree Child 1', 'parent_id': self.p1})
|
||||
self.p3 = self.res_partner.create(cr, uid, {'name': 'Elmtree Grand-Child 1.1', 'parent_id': self.p2})
|
||||
|
||||
# split 101, 102, 103 tests to force SQL rollback between them
|
||||
|
||||
def test_101_res_partner_recursion(self):
|
||||
cr, uid, p1, p3 = self.cr, self.uid, self.p1, self.p3
|
||||
self.assertRaises(except_orm, self.res_partner.write, cr, uid, [p1], {'parent_id': p3})
|
||||
|
||||
def test_102_res_partner_recursion(self):
|
||||
cr, uid, p2, p3 = self.cr, self.uid, self.p2, self.p3
|
||||
self.assertRaises(except_orm, self.res_partner.write, cr, uid, [p2], {'parent_id': p3})
|
||||
|
||||
def test_103_res_partner_recursion(self):
|
||||
cr, uid, p3 = self.cr, self.uid, self.p3
|
||||
self.assertRaises(except_orm, self.res_partner.write, cr, uid, [p3], {'parent_id': p3})
|
||||
|
||||
def test_104_res_partner_recursion_indirect_cycle(self):
|
||||
""" Indirect hacky write to create cycle in children """
|
||||
cr, uid, p2, p3 = self.cr, self.uid, self.p2, self.p3
|
||||
p3b = self.res_partner.create(cr, uid, {'name': 'Elmtree Grand-Child 1.2', 'parent_id': self.p2})
|
||||
self.assertRaises(except_orm, self.res_partner.write, cr, uid, [p2],
|
||||
{'child_ids': [(1, p3, {'parent_id': p3b}), (1, p3b, {'parent_id': p3})]})
|
||||
|
||||
def test_110_res_partner_recursion_multi_update(self):
|
||||
""" multi-write on several partners in same hierarchy must not trigger a false cycle detection """
|
||||
cr, uid, p1, p2, p3 = self.cr, self.uid, self.p1, self.p2, self.p3
|
||||
self.assertTrue(self.res_partner.write(cr, uid, [p1,p2,p3], {'phone': '123456'}))
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest2.main()
|
||||
unittest2.main()
|
||||
|
||||
+10
-12
@@ -5063,20 +5063,18 @@ class BaseModel(object):
|
||||
:param parent: optional parent field name (default: ``self._parent_name = parent_id``)
|
||||
:return: **True** if the operation can proceed safely, or **False** if an infinite loop is detected.
|
||||
"""
|
||||
|
||||
if not parent:
|
||||
parent = self._parent_name
|
||||
ids_parent = ids[:]
|
||||
query = 'SELECT distinct "%s" FROM "%s" WHERE id IN %%s' % (parent, self._table)
|
||||
while ids_parent:
|
||||
ids_parent2 = []
|
||||
for i in range(0, len(ids), cr.IN_MAX):
|
||||
sub_ids_parent = ids_parent[i:i+cr.IN_MAX]
|
||||
cr.execute(query, (tuple(sub_ids_parent),))
|
||||
ids_parent2.extend(filter(None, map(lambda x: x[0], cr.fetchall())))
|
||||
ids_parent = ids_parent2
|
||||
for i in ids_parent:
|
||||
if i in ids:
|
||||
|
||||
# must ignore 'active' flag, ir.rules, etc. => direct SQL query
|
||||
query = 'SELECT "%s" FROM "%s" WHERE id = %%s' % (parent, self._table)
|
||||
for id in ids:
|
||||
current_id = id
|
||||
while current_id is not None:
|
||||
cr.execute(query, (current_id,))
|
||||
result = cr.fetchone()
|
||||
current_id = result[0] if result else None
|
||||
if current_id == id:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ class _rml_canvas(object):
|
||||
self.canvas.circle(x_cen=utils.unit_get(node.get('x')), y_cen=utils.unit_get(node.get('y')), r=utils.unit_get(node.get('radius')), **utils.attr_get(node, [], {'fill':'bool','stroke':'bool'}))
|
||||
|
||||
def _place(self, node):
|
||||
flows = _rml_flowable(self.doc, self.localcontext, images=self.images, path=self.path, title=self.title).render(node)
|
||||
flows = _rml_flowable(self.doc, self.localcontext, images=self.images, path=self.path, title=self.title, canvas=self.canvas).render(node)
|
||||
infos = utils.attr_get(node, ['x','y','width','height'])
|
||||
|
||||
infos['y']+=infos['height']
|
||||
@@ -616,7 +616,7 @@ class _rml_Illustration(platypus.flowables.Flowable):
|
||||
drw.render(self.canv, None)
|
||||
|
||||
class _rml_flowable(object):
|
||||
def __init__(self, doc, localcontext, images=None, path='.', title=None):
|
||||
def __init__(self, doc, localcontext, images=None, path='.', title=None, canvas=None):
|
||||
if images is None:
|
||||
images = {}
|
||||
self.localcontext = localcontext
|
||||
@@ -625,6 +625,7 @@ class _rml_flowable(object):
|
||||
self.images = images
|
||||
self.path = path
|
||||
self.title = title
|
||||
self.canvas = canvas
|
||||
|
||||
def _textual(self, node):
|
||||
rc1 = utils._process_text(self, node.text or '')
|
||||
@@ -634,7 +635,10 @@ class _rml_flowable(object):
|
||||
if key in ('rml_except', 'rml_loop', 'rml_tag'):
|
||||
del txt_n.attrib[key]
|
||||
if not n.tag == 'bullet':
|
||||
txt_n.text = utils.xml2str(self._textual(n))
|
||||
if n.tag == 'pageNumber':
|
||||
txt_n.text = self.canvas and str(self.canvas.getPageNumber()) or ''
|
||||
else:
|
||||
txt_n.text = utils.xml2str(self._textual(n))
|
||||
txt_n.tail = n.tail and utils.xml2str(utils._process_text(self, n.tail.replace('\n',''))) or ''
|
||||
rc1 += etree.tostring(txt_n)
|
||||
return rc1
|
||||
@@ -983,7 +987,7 @@ class _rml_template(object):
|
||||
if self.localcontext and not self.localcontext.get('internal_header',False):
|
||||
del self.localcontext['internal_header']
|
||||
fis = []
|
||||
r = _rml_flowable(self.doc,self.localcontext, images=self.images, path=self.path, title=self.title)
|
||||
r = _rml_flowable(self.doc,self.localcontext, images=self.images, path=self.path, title=self.title, canvas=None)
|
||||
story_cnt = 0
|
||||
for node_story in node_stories:
|
||||
if story_cnt > 0:
|
||||
|
||||
Reference in New Issue
Block a user