bzr revid: christophe@tinyerp.com-20080902152822-7621v7ze0kvdj4ie
This commit is contained in:
Christophe Simonis 2008-09-02 17:28:22 +02:00
commit b148507b71
10 changed files with 148 additions and 124 deletions

View File

@ -173,7 +173,10 @@ def create_graph(module_list, force=None):
for module in module_list:
if module[-4:]=='.zip':
module = module[:-4]
mod_path = get_module_path(module)
try:
mod_path = get_module_path(module)
except IOError:
continue
terp_file = get_module_resource(module, '__terp__.py')
if os.path.isfile(terp_file) or zipfile.is_zipfile(mod_path):
try:

View File

@ -4,10 +4,12 @@
<menuitem groups="group_admin" icon="terp-administration" id="menu_administration" name="Administration" sequence="20"/>
<menuitem id="menu_custom" name="Custom" parent="base.menu_administration" sequence="2"/>
<menuitem id="menu_translation" name="Translations" parent="base.menu_administration" sequence="4"/>
<menuitem id="menu_translation_app" name="Application Terms" parent="base.menu_translation" sequence="4"/>
<menuitem id="menu_translation_export" name="Import / Export" parent="base.menu_translation" sequence="4"/>
<menuitem id="menu_users" name="Users" parent="base.menu_administration" sequence="6"/>
<menuitem id="menu_security" name="Security" parent="base.menu_administration" sequence="8"/>
<menuitem id="menu_management" name="Modules Management" parent="base.menu_administration" sequence="10"/>
</data>
</terp>
</terp>

View File

@ -6,26 +6,7 @@
Languages
======================
-->
<record id="view_lang" model="ir.ui.view">
<field name="name">Languages</field>
<field name="model">res.lang</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Language">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="translatable"/>
<field name="direction"/>
</form>
</field>
</record>
<record id="action_lang" model="ir.actions.act_window">
<field name="name">Languages</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.lang</field>
<field name="view_type">form</field>
</record>
<menuitem id="next_id_2" name="Interface" parent="base.menu_custom"/><menuitem action="action_lang" id="menu_action_lang" parent="next_id_2"/>
<menuitem id="next_id_2" name="Interface" parent="base.menu_custom"/>
<!--
======================

View File

@ -97,7 +97,8 @@
<field name="view_id" ref="sequence_view_tree"/>
<field name="context">{'active_test': False}</field>
</record>
<menuitem id="next_id_5" name="Sequences" parent="base.menu_custom"/><menuitem action="ir_sequence_form" id="menu_ir_sequence_form" parent="next_id_5"/>
<menuitem id="next_id_5" name="Sequences" parent="base.menu_custom"/>
<menuitem action="ir_sequence_form" id="menu_ir_sequence_form" parent="next_id_5"/>
<!-- Sequences Types -->
@ -157,7 +158,8 @@
<field name="view_type">form</field>
<field name="view_id" ref="action_view_tree"/>
</record>
<menuitem id="next_id_6" name="Actions" parent="base.next_id_4"/><menuitem action="ir_sequence_actions" id="menu_ir_sequence_actions" parent="next_id_6"/>
<menuitem id="next_id_6" name="Actions" parent="base.next_id_4"/>
<menuitem action="ir_sequence_actions" id="menu_ir_sequence_actions" parent="next_id_6"/>
<record id="act_report_custom_view" model="ir.ui.view">
<field name="name">ir.actions.report.custom</field>
@ -634,21 +636,32 @@
<field name="state"/>
</tree>
<form string="Fields Description">
<field name="name" select="1"/>
<field colspan="4" name="field_description" select="1"/>
<field name="ttype" select="1"/>
<field name="relation" select="1"/>
<field name="required" select="2"/>
<field name="readonly" select="2"/>
<field name="size" select="1"/>
<field name="on_delete" select="1"/>
<field name="select_level" select="2"/>
<field name="translate"/>
<field name="selection"/>
<field name="domain"/>
<field name="state" readonly="1"/>
<group colspan="4" col="4">
<field name="name" select="1"/>
<field colspan="4" name="field_description" select="2"/>
</group>
<group colspan="2" col="2">
<separator string="Field Type" colspan="2"/>
<field name="ttype" select="2"/>
<field name="relation" select="2"/>
<field name="selection"/>
<field name="size"/>
<field name="state"/>
<field name="domain"/>
</group>
<group colspan="2" col="2">
<separator string="Properties" colspan="2"/>
<field name="required" select="2"/>
<field name="readonly" select="2"/>
<field name="select_level"/>
<field name="translate"/>
<field name="relate"/>
<field name="on_delete"/>
</group>
<separator string="Security on Groups" colspan="4"/>
<field name="groups" colspan="4" nolabel="1"/>
</form>
</field>
<separator colspan="4" string="Status"/>
@ -686,22 +699,33 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Fields">
<field name="name" select="1"/>
<field name="model_id" readonly="1"/>
<field colspan="4" name="field_description" select="2"/>
<field name="ttype" select="2"/>
<field name="relation" select="2"/>
<field name="required" select="2"/>
<field name="readonly" select="2"/>
<field name="size" select="1"/>
<field name="on_delete" select="1"/>
<field name="select_level" select="2"/>
<field name="translate"/>
<field name="selection"/>
<field name="domain"/>
<field name="state" readonly="1"/>
<group colspan="4" col="6">
<field name="name" select="1"/>
<field colspan="4" name="field_description" select="2"/>
<field name="model_id" readonly="1"/>
</group>
<group colspan="2" col="2">
<separator string="Field Type" colspan="2"/>
<field name="ttype" select="2"/>
<field name="relation" select="2"/>
<field name="selection"/>
<field name="size"/>
<field name="state"/>
<field name="domain"/>
</group>
<group colspan="2" col="2">
<separator string="Properties" colspan="2"/>
<field name="required" select="2"/>
<field name="readonly" select="2"/>
<field name="select_level"/>
<field name="translate"/>
<field name="relate"/>
<field name="on_delete"/>
</group>
<separator string="Security on Groups" colspan="4"/>
<field name="groups" colspan="4" nolabel="1"/>
</form>
</field>
</record>
@ -776,8 +800,16 @@
<field name="view_type">form</field>
<field name="view_id" ref="view_translation_tree"/>
</record>
<menuitem action="action_translation" id="menu_action_translation" parent="base.menu_translation"/>
<menuitem action="action_translation" id="menu_action_translation" parent="base.menu_translation_app"/>
<record id="action_translation_untrans" model="ir.actions.act_window">
<field name="name">Untranslated terms</field>
<field name="res_model">ir.translation</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_translation_tree"/>
<field name="domain">[('value','=','')]</field>
</record>
<menuitem action="action_translation_untrans" id="menu_action_translation_untrans" parent="menu_action_translation"/>
<!--
=============================================================
Menu Edition
@ -895,7 +927,8 @@
<field name="context">{'active_test': False}</field>
<field name="view_id" ref="ir_cron_view_tree"/>
</record>
<menuitem id="next_id_10" name="Scheduler" parent="base.menu_custom"/><menuitem action="ir_cron_act" id="menu_ir_cron_act" parent="next_id_10"/>
<menuitem id="next_id_10" name="Scheduler" parent="base.menu_custom"/>
<menuitem action="ir_cron_act" id="menu_ir_cron_act" parent="next_id_10"/>
<record id="ir_access_view_tree" model="ir.ui.view">

View File

@ -566,7 +566,7 @@ class module_config_wizard_step(osv.osv):
'note':fields.text('Text'),
'action_id':fields.many2one('ir.actions.act_window', 'Action', select=True,required=True, ondelete='cascade'),
'sequence':fields.integer('Sequence'),
'state':fields.selection([('open', 'Open'),('done', 'Done'),('skip','Skip')], string='State', required=True)
'state':fields.selection([('open', 'Not Started'),('done', 'Done'),('skip','Skipped')], string='State', required=True)
}
_defaults={
'state': lambda *a: 'open',

View File

@ -5,100 +5,106 @@
<field name="name">Import module</field>
<field name="wiz_name">base.module.import</field>
</record>
<menuitem action="wizard_base_module_import" id="menu_wizard_module_import" parent="base.menu_management" type="wizard"/>
<menuitem action="wizard_base_module_import" id="menu_wizard_module_import" parent="menu_management" type="wizard"/>
<record id="wizard_update" model="ir.actions.wizard">
<field name="name">Download module list</field>
<field name="name">Update Modules List</field>
<field name="wiz_name">module.module.update</field>
</record>
<menuitem action="wizard_update" groups="group_admin" icon="STOCK_CONVERT" id="menu_module_update" parent="base.menu_management" type="wizard"/>
<menuitem action="wizard_update" groups="group_admin" icon="STOCK_CONVERT" id="menu_module_update" parent="menu_management" type="wizard"/>
<wizard id="wizard_upgrade" model="ir.module.module" name="module.upgrade" string="Apply Scheduled Upgrades"/>
<menuitem action="wizard_upgrade" id="menu_wizard_upgrade" parent="base.menu_management" type="wizard"/>
<menuitem action="wizard_upgrade" id="menu_wizard_upgrade" parent="menu_management" type="wizard"/>
<record id="wizard_lang_install" model="ir.actions.wizard">
<field name="name">Install new language file</field>
<field name="wiz_name">module.lang.install</field>
</record>
<menuitem action="wizard_lang_install" id="menu_wizard_lang_install" parent="base.menu_translation" type="wizard"/>
<menuitem action="wizard_lang_install" id="menu_wizard_lang_install" parent="menu_translation" type="wizard"/>
<record id="wizard_lang_export" model="ir.ui.view">
<field name="name">Export Language</field>
<record id="wizard_lang_export" model="ir.ui.view">
<field name="name">Export a Translation File</field>
<field name="model">wizard.module.lang.export</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form col="3" string="Export language">
<image name="gtk-dialog-info"/>
<group col="2" states="choose" fill="0" height="500">
<separator string="Export translation file" colspan="2"/>
<field name="lang" width="300"/>
<field name="format" required="1"/>
<field name="modules" width="500" height="200"/>
<field name="state" invisible="1"/>
<newline/><label/>
</group>
<group col="1" states="get" fill="0">
<separator string="Export done"/>
<field name="data" readonly="1" nolabel="1"/>
<field name="advice" nolabel="1" height="80"/>
<field name="name" invisible="True"/>
</group>
<group col="2" colspan="3" fill="0">
<button states="choose" icon="gtk-cancel" name="act_cancel" special="cancel" string="Cancel" type="object"/>
<button states="choose" icon="gtk-ok" name="act_getfile" string="Get file" type="object"/>
<button states="get" icon="gtk-close" name="act_destroy" special="cancel" string="Close" type="object"/>
</group>
</form>
</field>
<field name="arch" type="xml">
<form col="3" string="Export language">
<image name="gtk-dialog-info"/>
<group col="2" states="choose" fill="0" height="500">
<separator string="Export translation file" colspan="2"/>
<field name="lang" width="300" required="1"/>
<field name="format" required="1"/>
<field name="modules" width="500" height="200"/>
<label colspan="2" string="The official translations pack of all OpenERP/OpenObjects module are
managed through launchpad. We use their online interface to synchronize
all translations efforts.
To improve some terms of the official translations of OpenERP, you should
modify the terms directly on the launchpad interface. If you made lots
of translations for your own module, you can also publish all your
translation at once. To do this, you must:
If you created a new module, you must send the generated .pot file by email to
the translation group: ... They will review and integrate." align="0.0"/>
<field name="state" invisible="1"/>
<newline/>
</group>
<group col="1" states="get" fill="0">
<separator string="Export done"/>
<field name="data" readonly="1" nolabel="1"/>
<field name="advice" nolabel="1" height="80"/>
</group>
<group col="2" colspan="3" fill="0">
<button states="choose" icon="gtk-cancel" name="act_cancel" special="cancel" string="Cancel" type="object"/>
<button states="choose" icon="gtk-ok" name="act_getfile" string="Get file" type="object"/>
<button states="get" icon="gtk-close" name="act_destroy" special="cancel" string="Close" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_wizard_lang_export" model="ir.actions.act_window">
<field name="name">Export language</field>
<record id="action_wizard_lang_export" model="ir.actions.act_window">
<field name="name">Export a Translation File</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">wizard.module.lang.export</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem action="action_wizard_lang_export" id="menu_wizard_lang_export" parent="base.menu_translation"/>
<menuitem action="action_wizard_lang_export" id="menu_wizard_lang_export" parent="menu_translation_export"/>
<record id="wizard_lang_import" model="ir.actions.wizard">
<field name="name">Import language</field>
<field name="name">Import a Translation File</field>
<field name="wiz_name">module.lang.import</field>
</record>
<menuitem action="wizard_lang_import" id="menu_wizard_lang_import" parent="base.menu_translation" type="wizard"/>
<record id="wizard_lang_import" model="ir.actions.wizard">
<field name="name">Import language</field>
<field name="wiz_name">module.lang.import</field>
</record>
<menuitem action="wizard_lang_import" id="menu_wizard_lang_import" parent="base.menu_translation" type="wizard"/>
<record id="wizard_update_translations" model="ir.ui.view">
<menuitem action="wizard_lang_import" id="menu_wizard_lang_import" parent="menu_translation_export" type="wizard"/>
<record id="wizard_update_translations" model="ir.ui.view">
<field name="name">Update Translations</field>
<field name="model">wizard.module.update_translations</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form col="3" string="Update Translations">
<image name="gtk-dialog-info"/>
<group col="2" fill="0" height="500">
<field name="lang" width="300"/>
</group>
<group col="2" colspan="3" fill="0">
<button icon="gtk-cancel" name="act_cancel" special="cancel" string="Cancel" type="object"/>
<button icon="gtk-ok" name="act_update" string="Update" type="object"/>
</group>
</form>
</field>
<field name="arch" type="xml">
<form col="3" string="Update Translations">
<image name="gtk-dialog-info"/>
<group col="2" fill="0" height="500">
<field name="lang" width="300"/>
</group>
<label align="0.0" colspan="4" string="This wizard will detect new terms in the application so that you can update them manually."/>
<separator colspan="4"/>
<group col="2" colspan="4" fill="0">
<button icon="gtk-cancel" name="act_cancel" special="cancel" string="Cancel" type="object"/>
<button icon="gtk-ok" name="act_update" string="Update" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_wizard_update_translations" model="ir.actions.act_window">
<field name="name">Update Translations</field>
<record id="action_wizard_update_translations" model="ir.actions.act_window">
<field name="name">Reload Official Translations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">wizard.module.update_translations</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem action="action_wizard_update_translations" id="menu_wizard_update_translations" parent="base.menu_translation"/>
<menuitem action="action_wizard_update_translations" id="menu_wizard_update_translations" parent="menu_translation_app"/>
</data>
</terp>

View File

@ -142,7 +142,6 @@ class res_partner(osv.osv):
'user_id': fields.many2one('res.users', 'Dedicated Salesman', help='The internal user that is in charge of communicating with this partner if any.'),
'responsible': fields.many2one('res.users', 'Users'),
'vat': fields.char('VAT',size=32 ,help="Value Added Tax number"),
'vat_subject': fields.boolean('Subjected to the VAT'),
'bank_ids': fields.one2many('res.partner.bank', 'partner_id', 'Banks'),
'website': fields.char('Website',size=64),
'comment': fields.text('Notes'),
@ -277,7 +276,7 @@ class res_partner_address(osv.osv):
_name = 'res.partner.address'
_order = 'id'
_columns = {
'partner_id': fields.many2one('res.partner', 'Partner', required=True, ondelete='cascade', select=True),
'partner_id': fields.many2one('res.partner', 'Partner', ondelete='cascade', select=True),
'type': fields.selection( [ ('default','Default'),('invoice','Invoice'), ('delivery','Delivery'), ('contact','Contact'), ('other','Other') ],'Address Type'),
'function': fields.many2one('res.partner.function', 'Function'),
'title': fields.selection(_contact_title_get, 'Title', size=32),

View File

@ -21,6 +21,6 @@
<field name="view_type">form</field>
<field name="context">{'active_test': False}</field>
</record>
<menuitem action="res_lang_act_window" id="menu_res_lang_act_window" parent="base.menu_translation"/>
<menuitem action="res_lang_act_window" id="menu_res_lang_act_window" parent="base.menu_translation_app"/>
</data>
</terp>
</terp>

View File

@ -70,7 +70,7 @@ class expression(object):
return []
ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context)
return ids+rg(ids2, table, parent)
return [(left, 'in', rg(ids2, table, parent))]
return [(left, 'in', rg(ids, table, parent))]
self.__main_table = table

View File

@ -2247,9 +2247,9 @@ class orm(orm_template):
else:
cr.execute('select max(parent_right) from '+self._table)
pleft = cr.fetchone()[0] or 0
cr.execute('update '+self._table+' set parent_left=%d,parent_right=%d', (pleft+1,pleft+2))
cr.execute('update '+self._table+' set parent_left=parent_left+2 where parent_left>%d', (pleft,))
cr.execute('update '+self._table+' set parent_right=parent_right+2 where parent_right>%d', (pleft,))
cr.execute('update '+self._table+' set parent_left=%d,parent_right=%d where id=%d', (pleft+1,pleft+2,id_new))
wf_service = netsvc.LocalService("workflow")
wf_service.trg_create(user, self._name, id_new, cr)