Automated merge with ssh://tycho.b2ck.org///home/hg/trytond
This commit is contained in:
commit
0c7ebb6abb
5 files changed
+31
-4
No files matched your search
@@ -679,10 +679,23 @@ class ModuleInstallUpgrade(Wizard):
|
||||
'type': 'form',
|
||||
'object': 'ir.module.module.install_upgrade.start',
|
||||
'state': [
|
||||
('end', 'Close', 'gtk-close', True),
|
||||
('config', 'Ok', 'gtk-ok', True),
|
||||
],
|
||||
},
|
||||
},
|
||||
'config': {
|
||||
'result': {
|
||||
'type': 'action',
|
||||
'action': '_config',
|
||||
'state': 'end',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
def _config(self, cursor, user, data, context=None):
|
||||
return {
|
||||
'type': 'ir.action.wizard',
|
||||
'wiz_name': 'ir.module.module.config_wizard',
|
||||
}
|
||||
|
||||
ModuleInstallUpgrade()
|
||||
@@ -1903,6 +1903,8 @@ class ORM(object):
|
||||
xml = '''<?xml version="1.0" encoding="utf-8"?>''' \
|
||||
'''<form string="%s">''' % (self._description,)
|
||||
for i in res:
|
||||
if i in ('create_uid', 'create_date', 'write_uid', 'write_date'):
|
||||
continue
|
||||
if res[i]['type'] not in ('one2many', 'many2many'):
|
||||
xml += '<label name="%s"/>' % (i,)
|
||||
xml += '<field name="%s"/>' % (i,)
|
||||
|
||||
+6
-1
@@ -65,7 +65,12 @@ class PySocket:
|
||||
self.disconnect()
|
||||
familly = socket.AF_INET
|
||||
if socket.has_ipv6:
|
||||
familly = socket.AF_INET6
|
||||
try:
|
||||
socket.getaddrinfo(self.host, int(self.port),
|
||||
socket.AF_INET6)
|
||||
familly = socket.AF_INET6
|
||||
except:
|
||||
pass
|
||||
self.sock = socket.socket(
|
||||
familly, socket.SOCK_STREAM)
|
||||
self.sock.settimeout(120)
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
<record model="res.group" id="group_admin">
|
||||
<field name="name">admin</field>
|
||||
</record>
|
||||
<record model="ir.ui.menu" id="ir.menu_administration">
|
||||
<field name="groups" eval="[(6, 0, [ref('group_admin')])]"/>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="group_view_form">
|
||||
<field name="model">res.group</field>
|
||||
<field name="type">form</field>
|
||||
|
||||
@@ -144,6 +144,8 @@ class RecordTagHandler:
|
||||
def __init__(self, master_handler):
|
||||
# Remind reference of parent handler
|
||||
self.mh = master_handler
|
||||
# stock xml_id parsed in one module
|
||||
self.xml_ids = []
|
||||
|
||||
|
||||
def startElement(self, name, attributes):
|
||||
@@ -258,9 +260,11 @@ class RecordTagHandler:
|
||||
return self
|
||||
|
||||
elif name == "record":
|
||||
if self.xml_id in self.xml_ids:
|
||||
raise Exception('Duplicate id: "%s".' % (self.xml_id,))
|
||||
res = self.mh.import_record(
|
||||
self.model._name, self.values, self.xml_id)
|
||||
|
||||
self.xml_ids.append(self.xml_id)
|
||||
return None
|
||||
else:
|
||||
raise Exception("Unexpected closing tag '%s'"% (name,))
|
||||
@@ -584,7 +588,7 @@ class TrytondXmlHandler(sax.handler.ContentHandler):
|
||||
|
||||
# Remove this record from the to_delete list. This means that
|
||||
# the corresponding record have been found.
|
||||
if module == self.module:
|
||||
if module == self.module and fs_id in self.to_delete:
|
||||
self.to_delete.remove(fs_id)
|
||||
else:
|
||||
# this record is new, create it in the db:
|
||||
|
||||
Reference in new issue
Block a user