[MERGE] Merged from the main trunk server.
bzr revid: ach@tinyerp.com-20100614101458-xaoyx90hf7ee5zu5
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
'base_menu.xml',
|
||||
'res/res_security.xml',
|
||||
'res/res_config.xml',
|
||||
'maintenance/maintenance_security.xml',
|
||||
'data/res.country.state.csv'
|
||||
],
|
||||
'update_xml': [
|
||||
|
||||
@@ -85,12 +85,15 @@
|
||||
</page>
|
||||
<page string="Preferences">
|
||||
<field name="password" password="True" readonly="0"/>
|
||||
<label colspan="4" string="Please note that you will have to logout and relog if you change your password."/>
|
||||
<field name="context_lang" completion="1" readonly="0"/>
|
||||
<field name="context_tz" completion="1" readonly="0" colspan="4"/>
|
||||
<field name="view" colspan="4" readonly="0" />
|
||||
<newline/>
|
||||
<field colspan="4" name="signature" readonly="0"/>
|
||||
<label string="" colspan="1"/>
|
||||
<label colspan="3" string="Please note that you will have to logout and relog if you change your password."/>
|
||||
<field name="context_lang" completion="1" readonly="0"/>
|
||||
<field name="context_tz" completion="1" readonly="0"/>
|
||||
<field name="view" readonly="0"/>
|
||||
<newline/>
|
||||
<separator string="Signature" colspan="4"/>
|
||||
<field colspan="4" name="signature" readonly="0" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
@@ -288,22 +291,22 @@
|
||||
<form position="attributes">
|
||||
<attribute name="string">Choose Your Interface</attribute>
|
||||
</form>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">Choose between the simplified interface and the extended one. We suggest you use the simplified interface. It has less options and fields but is easier to understand. You will be able to switch to the extended interface later.</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="title"]' position='attributes'>
|
||||
<attribute name='string'>Choose Your Interface</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='string'></attribute>
|
||||
<attribute name='rowspan'>12</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">Choose between the simplified interface and the extended one. We suggest you use the simplified interface. It has less options and fields but is easier to understand. You will be able to switch to the extended interface later.</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="title"]' position='attributes'>
|
||||
<attribute name='string'>Choose Your Interface</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='string'></attribute>
|
||||
<attribute name='rowspan'>12</attribute>
|
||||
</xpath>
|
||||
<group string="res_config_contents" position="replace">
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="view" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="view" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<xpath expr='//button[@name="action_skip"]' position='replace'/>
|
||||
<xpath expr='//button[@name="action_next"]' position='attributes'>
|
||||
<attribute name='string'>Set</attribute>
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-06-10 07:58+0000\n"
|
||||
"PO-Revision-Date: 2010-06-13 04:08+0000\n"
|
||||
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
|
||||
"Language-Team: openerp-translators\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-14 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"Language: hr\n"
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-server\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-06-10 04:00+0000\n"
|
||||
"PO-Revision-Date: 2010-06-13 04:07+0000\n"
|
||||
"Last-Translator: Harry (Open ERP) <hmo@tinyerp.com>\n"
|
||||
"Language-Team: Japanese <ja@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: 2010-06-11 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-14 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-06-10 04:02+0000\n"
|
||||
"PO-Revision-Date: 2010-06-13 04:10+0000\n"
|
||||
"Last-Translator: Anders Wallenquist <anders.wallenquist@vertel.se>\n"
|
||||
"Language-Team: <>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-14 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-06-10 03:58+0000\n"
|
||||
"PO-Revision-Date: 2010-06-13 04:06+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-14 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-06-10 03:59+0000\n"
|
||||
"PO-Revision-Date: 2010-06-13 04:08+0000\n"
|
||||
"Last-Translator: Eleanor Chen <chenyueg@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-14 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
@@ -1244,11 +1244,6 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Record rules">
|
||||
<separator colspan="4" string="Combination of rules"/>
|
||||
<label align="0.0" angle="2" colspan="4" string="1. Global rules are combined together with a logical AND operator, and with the result of the following steps"/>
|
||||
<label align="0.0" angle="2" colspan="4" string="2. Group-specific rules are combined together with a logical AND operator"/>
|
||||
<label align="0.0" angle="2" colspan="4" string="3. If user belongs to several groups, the results from step 2 are combined with logical OR operator"/>
|
||||
<label align="0.0" angle="2" colspan="4" string="Example: GLOBAL_RULE_1 AND GLOBAL_RULE_2 AND ( (GROUP_A_RULE_1 AND GROUP_A_RULE_2) OR (GROUP_B_RULE_1 AND GROUP_B_RULE_2) )"/>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="General"/>
|
||||
<field colspan="4" name="name"/>
|
||||
@@ -1269,7 +1264,16 @@
|
||||
<group colspan="4" expand="1">
|
||||
<field name="global" select="1"/>
|
||||
<field name="groups" select="1" nolabel="1" colspan="4"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator colspan="4" string="Combination of rules"/>
|
||||
<label align="0.0" colspan="4"
|
||||
string="1. Global rules are combined together with a logical AND operator, and with the result of the following steps"/>
|
||||
<label align="0.0" colspan="4"
|
||||
string="2. Group-specific rules are combined together with a logical AND operator"/>
|
||||
<label align="0.0" colspan="4"
|
||||
string="3. If user belongs to several groups, the results from step 2 are combined with logical OR operator"/>
|
||||
<label align="0.0" colspan="4"
|
||||
string="Example: GLOBAL_RULE_1 AND GLOBAL_RULE_2 AND ( (GROUP_A_RULE_1 AND GROUP_A_RULE_2) OR (GROUP_B_RULE_1 AND GROUP_B_RULE_2) )"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -68,15 +68,15 @@ class ir_ui_menu(osv.osv):
|
||||
self._cache = {}
|
||||
|
||||
def search(self, cr, uid, args, offset=0, limit=None, order=None,
|
||||
context=None, count=False):
|
||||
context=None, count=False):
|
||||
|
||||
super_offset = cond(uid == 1, offset, 0)
|
||||
super_limit = cond(uid == 1, limit, None)
|
||||
super_count = cond(uid == 1, count, False)
|
||||
|
||||
ids = super(ir_ui_menu, self).search(cr, uid, args, super_offset,
|
||||
super_limit, order,
|
||||
context=context, count=super_count)
|
||||
super_limit, order, context=context, count=super_count)
|
||||
|
||||
if uid == 1:
|
||||
return ids
|
||||
|
||||
@@ -104,9 +104,9 @@ class ir_ui_menu(osv.osv):
|
||||
restrict_to_groups = [g.id for g in menu.groups_id]
|
||||
if not user_groups.intersection(restrict_to_groups):
|
||||
continue
|
||||
result.append(menu.id)
|
||||
self._cache[key] = True
|
||||
continue
|
||||
#result.append(menu.id)
|
||||
#self._cache[key] = True
|
||||
#continue
|
||||
|
||||
if menu.action:
|
||||
# we check if the user has access to the action of the menu
|
||||
|
||||
@@ -233,7 +233,7 @@ class ir_values(osv.osv):
|
||||
pos+=1
|
||||
try:
|
||||
datas = self.pool.get(model).read(cr, uid, [id], fields, context)
|
||||
except except_orm:
|
||||
except except_orm, e:
|
||||
return False
|
||||
datas= datas and datas[0] or None
|
||||
if not datas:
|
||||
@@ -260,9 +260,6 @@ class ir_values(osv.osv):
|
||||
res2.remove(r)
|
||||
if r[1]=='Menuitem' and not res2:
|
||||
raise osv.except_osv('Error !','You do not have the permission to perform this operation !!!')
|
||||
# else:
|
||||
# #raise osv.except_osv('Error !','You have not permission to perform operation !!!')
|
||||
# res2.remove(r)
|
||||
return res2
|
||||
ir_values()
|
||||
|
||||
|
||||
@@ -2,13 +2,5 @@
|
||||
<openerp>
|
||||
<data noupdate="0">
|
||||
|
||||
<record model="res.groups" id="group_maintenance_manager">
|
||||
<field name="name">Maintenance Manager</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.menu" id="menu_maintenance_contract">
|
||||
<field eval="[(6,0,[ref('group_maintenance_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -29,13 +29,6 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_module_category_tree" model="ir.actions.act_window">
|
||||
<field name="name">Categories of Modules</field>
|
||||
<field name="res_model">ir.module.category</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
</record>
|
||||
<menuitem action="action_module_category_tree" id="menu_action_module_category_tree" parent="base.menu_management"/>
|
||||
|
||||
<!-- Click on a category -->
|
||||
|
||||
@@ -52,11 +45,16 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-camera_test" string="Certified" domain="[('certificate','<>', False)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="state" readonly="1" select="1"/>
|
||||
|
||||
<field name="name"/>
|
||||
<field name="category_id"/>
|
||||
<field name="state"/>
|
||||
</group>
|
||||
<group expand="0" string="Group By..." colspan="11" col="11" groups="base.group_extended">
|
||||
<filter string="Category" icon="terp-personal" domain="[]" context="{'group_by':'category_id'}"/>
|
||||
<filter string="Author" icon="terp-personal" domain="[]" context="{'group_by':'author'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
<field name="name">Partner Manager</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.menu" id="menu_base_partner">
|
||||
<field eval="[(6,0,[ref('group_system'), ref('group_partner_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.menu" id="menu_base_config">
|
||||
<field eval="[(6,0,[ref('group_system'), ref('group_partner_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
Users Groups
|
||||
-->
|
||||
<record model="res.groups" id="group_system">
|
||||
<field name="name">Administrator / Configuration</field>
|
||||
<field name="name">Administration / Configuration</field>
|
||||
</record>
|
||||
|
||||
<record model="res.groups" id="group_erp_manager">
|
||||
<field name="name">Administrator / Access Rights</field>
|
||||
<field name="name">Administration / Access Rights</field>
|
||||
</record>
|
||||
|
||||
<record model="res.groups" id="group_user">
|
||||
@@ -18,7 +18,7 @@
|
||||
</record>
|
||||
|
||||
<record model="res.groups" context="{'noadmin':True}" id="group_multi_company">
|
||||
<field name="name">Multi Companies</field>
|
||||
<field name="name">Useability / Multi Companies</field>
|
||||
</record>
|
||||
|
||||
<record model="res.groups" context="{'noadmin':True}" id="group_extended">
|
||||
@@ -51,7 +51,6 @@
|
||||
</record>
|
||||
|
||||
<record id="base.menu_translation" model="ir.ui.menu">
|
||||
<!-- FIXME: a "Usability / Translations" group ?? -->
|
||||
<field eval="[(6,0,[ref('base.group_system')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"access_ir_cron_group_cron","ir_cron group_cron","model_ir_cron","group_system",1,1,1,1
|
||||
"access_ir_cron_user","ir_cron user","model_ir_cron","group_user",1,0,0,0
|
||||
"access_ir_default_group_system","ir_default group_system","model_ir_default",,1,1,1,1
|
||||
"access_ir_exports_group_system","ir_exports group_system","model_ir_exports",,1,1,1,1
|
||||
"access_ir_exports_line_group_system","ir_exports_line group_system","model_ir_exports_line",,1,1,1,1
|
||||
"access_ir_exports_group_system","ir_exports group_system","model_ir_exports",base.group_user,1,1,1,1
|
||||
"access_ir_exports_line_group_system","ir_exports_line group_system","model_ir_exports_line",base.group_user,1,1,1,1
|
||||
"access_ir_model_group_erp_manager","ir_model group_erp_manager","model_ir_model","group_erp_manager",1,1,1,1
|
||||
"access_ir_model_access_group_erp_manager","ir_model_access_group_erp_manager","model_ir_model_access","group_erp_manager",1,1,1,1
|
||||
"access_ir_model_grid_group_erp_manager","ir_model_access_grid_group_erp_manager","model_ir_model_grid","group_erp_manager",1,1,1,1
|
||||
@@ -25,7 +25,7 @@
|
||||
"access_ir_report_custom_fields_group_system","ir_report_custom_fields group_system","model_ir_report_custom_fields",,1,0,0,0
|
||||
"access_ir_rule_group_user","ir_rule group_user","model_ir_rule",,1,0,0,0
|
||||
"access_ir_rule_group_erp_manager","ir_rule group_erp_manager","model_ir_rule","group_erp_manager",1,1,1,1
|
||||
"access_ir_sequence_group_user","ir_sequence group_user","model_ir_sequence",,1,1,1,1
|
||||
"access_ir_sequence_group_user","ir_sequence group_user","model_ir_sequence",,1,0,0,0
|
||||
"access_ir_sequence_type_group_user","ir_sequence_type group_user","model_ir_sequence_type",,1,0,0,0
|
||||
"access_ir_translation_all","ir_translation all","model_ir_translation",,1,0,0,0
|
||||
"access_ir_translation_group_system","ir_translation group_system","model_ir_translation","group_system",1,1,1,1
|
||||
@@ -43,8 +43,8 @@
|
||||
"access_wizard_module_lang_export_group_system","wizard_module_lang_export group_system","model_wizard_module_lang_export","group_system",1,1,1,1
|
||||
"access_res_company_group_erp_manager","res_company group_erp_manager","model_res_company","group_erp_manager",1,1,1,1
|
||||
"access_res_company_group_user","res_company group_user","model_res_company",,1,0,0,0
|
||||
"access_res_config_all","res_config all","model_res_config",,1,0,0,0
|
||||
"access_res_config_users_all","res_config_users all","model_res_config_users",,1,0,0,0
|
||||
"access_res_config_all","res_config all","model_res_config",group_system,1,1,1,1
|
||||
"access_res_config_users_all","res_config_users all","model_res_config_users",group_system,1,1,1,1
|
||||
"access_res_country_group_all","res_country group_user_all","model_res_country",,1,0,0,0
|
||||
"access_res_country_state_group_all","res_country_state group_user_all","model_res_country_state",,1,0,0,0
|
||||
"access_res_country_group_user","res_country group_user","model_res_country","group_partner_manager",1,1,1,1
|
||||
@@ -71,21 +71,23 @@
|
||||
"access_res_partner_canal_group_partner_manager","res_partner_canal group_partner_manager","model_res_partner_canal","group_partner_manager",1,1,1,1
|
||||
"access_res_partner_category_group_user","res_partner_category group_user","model_res_partner_category","group_user",1,0,0,0
|
||||
"access_res_partner_category_group_partner_manager","res_partner_category group_partner_manager","model_res_partner_category","group_partner_manager",1,1,1,1
|
||||
"access_res_partner_event_group_user","res_partner_event group_user","model_res_partner_event","group_user",1,1,1,1
|
||||
"access_res_partner_event_group_user","res_partner_event group_user","model_res_partner_event","group_user",1,0,0,0
|
||||
"access_res_partner_event_group_partner_manager","res_partner_event group_partner_manager","model_res_partner_event","group_partner_manager",1,1,1,1
|
||||
"access_res_partner_som_group_user","res_partner_som group_user","model_res_partner_som","group_partner_manager",1,1,1,1
|
||||
"access_res_partner_som_group_partner_manager","res_partner_som group_partner_manager","model_res_partner_som","group_user",1,0,0,0
|
||||
"access_res_partner_title_group_user","res_partner_title group_user","model_res_partner_title","group_partner_manager",1,1,1,1
|
||||
"access_res_partner_title_group_partner_manager","res_partner_title group_partner_manager","model_res_partner_title","group_user",1,0,0,0
|
||||
"access_res_request_group_user","res_request group_user","model_res_request",,1,1,1,1
|
||||
"access_res_request_history_group_user","res_request_history group_user","model_res_request_history",,1,1,1,1
|
||||
"access_res_partner_title_group_partner_manager","res_partner_title group_partner_manager","model_res_partner_title",,1,0,0,0
|
||||
"access_res_request_group_user","res_request group_user","model_res_request",base.group_user,1,1,1,1
|
||||
"access_res_request_history_group_user","res_request_history group_user","model_res_request_history",base.group_user,1,1,1,1
|
||||
"access_res_request_group_user_all","res_request group_user all","model_res_request",,1,0,0,0
|
||||
"access_res_request_history_group_user_all","res_request_history group_user all","model_res_request_history",,1,0,0,0
|
||||
"access_res_request_link_group_system","res_request_link group_system","model_res_request_link","group_system",1,1,1,1
|
||||
"access_res_request_link_group_user","res_request_link group_user","model_res_request_link",,1,0,0,0
|
||||
"access_res_users_all","res_users all","model_res_users",,1,0,0,0
|
||||
"access_res_users_group_erp_manager","res_users group_erp_manager","model_res_users","group_erp_manager",1,1,1,1
|
||||
"access_ir_actions_all","ir_actions_all","model_ir_actions_actions",,1,0,0,0
|
||||
"access_ir_actions_group_system","ir_actions_group_system","model_ir_actions_actions","group_system",1,1,1,1
|
||||
"access_ir_actions_act_window_all","ir_actions_act_window_all","model_ir_actions_act_window",,1,0,1,0
|
||||
"access_ir_actions_act_window_all","ir_actions_act_window_all","model_ir_actions_act_window",,1,0,0,0
|
||||
"access_ir_actions_act_window_system","ir_actions_act_window_system","model_ir_actions_act_window","group_system",1,1,1,1
|
||||
"access_ir_actions_act_window_close_all","ir_actions_act_window_close_all","model_ir_actions_act_window_close",,1,0,0,0
|
||||
"access_ir_actions_act_window_close_group_system","ir_actions_act_window_close_group_system","model_ir_actions_act_window_close","group_system",1,1,1,1
|
||||
@@ -119,13 +121,16 @@
|
||||
"access_res_bank_group_system","res_bank_group_system","model_res_bank","group_system",1,1,1,1
|
||||
"access_res_payterm_group_system","res_payterm_group_system","model_res_payterm","group_system",1,1,1,1
|
||||
"access_res_roles_group_erpmanager","res_roles_group_erp_manager","model_res_roles","group_erp_manager",1,1,1,1
|
||||
"access_res_config_view_group_erpmanager","res_config_view_erp_manager","model_res_config_view","group_erp_manager",1,1,1,1
|
||||
"access_res_config_view_group_erpmanager","res_config_view_erp_manager","model_res_config_view","group_system",1,1,1,1
|
||||
"access_res_roles_all","res_roles_all","model_res_roles",,1,0,0,0
|
||||
"access_res_config_view_all","res_config_view_all","model_res_config_view",,1,0,0,0
|
||||
"access_res_config_view_all","res_config_view_all","model_res_config_view",group_system,1,0,0,0
|
||||
"access_res_bank_group_partner_manager","res_bank_group_partner_manager","model_res_bank","group_partner_manager",1,1,1,1
|
||||
"access_res_bank_user","res_bank user","model_res_bank","group_user",1,0,0,0
|
||||
"access_maintenance_group_user","maintenance_contract group_user","model_maintenance_contract","group_maintenance_manager",1,1,1,1
|
||||
"access_maintenance_contract_module","maintenance.contract.module","model_maintenance_contract_module","group_maintenance_manager",1,1,1,1
|
||||
"access_maintenance_contract_wizard","maintenance.contract.wizard","model_maintenance_contract_wizard","group_maintenance_manager",1,1,1,1
|
||||
"access_maintenance_group_user","maintenance_contract group_user","model_maintenance_contract","group_system",1,1,1,1
|
||||
"access_maintenance_contract_module","maintenance.contract.module","model_maintenance_contract_module","group_system",1,1,1,1
|
||||
"access_maintenance_contract_wizard","maintenance.contract.wizard","model_maintenance_contract_wizard","group_system",1,1,1,1
|
||||
"access_multi_company_default user","multi_company_default all","model_multi_company_default",,1,0,0,0
|
||||
"access_multi_company_default manager","multi_company_default Manager","model_multi_company_default","group_erp_manager",1,1,1,1
|
||||
"access_ir_filter all","ir_filters all","model_ir_filters",,1,0,0,0
|
||||
"access_ir_filter employee","ir_filters employee","model_ir_filters","group_user",1,1,1,1
|
||||
"access_res_log all","res_log all","model_res_log",,1,0,1,1
|
||||
|
||||
|
+8
-7
@@ -31,6 +31,7 @@
|
||||
# required
|
||||
# size
|
||||
#
|
||||
from collections import defaultdict
|
||||
import string
|
||||
import netsvc
|
||||
import sys
|
||||
@@ -430,10 +431,10 @@ class one2many(_column):
|
||||
context.update(self._context)
|
||||
if not values:
|
||||
values = {}
|
||||
res = {}
|
||||
for id in ids:
|
||||
res[id] = []
|
||||
ids2 = obj.pool.get(self._obj).search(cr, user, [(self._fields_id, 'in', ids)], limit=self._limit, context=context)
|
||||
|
||||
res = defaultdict(list)
|
||||
|
||||
ids2 = obj.pool.get(self._obj).search(cr, user, self._domain + [(self._fields_id, 'in', ids)], limit=self._limit, context=context)
|
||||
for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2, [self._fields_id], context=context, load='_classic_write'):
|
||||
res[r[self._fields_id]].append(r['id'])
|
||||
return res
|
||||
@@ -779,7 +780,7 @@ class related(function):
|
||||
relation = obj._name
|
||||
res = {}.fromkeys(ids, False)
|
||||
|
||||
objlst = obj.browse(cr, uid, ids, context=context)
|
||||
objlst = obj.browse(cr, 1, ids, context=context)
|
||||
for data in objlst:
|
||||
if not data:
|
||||
continue
|
||||
@@ -806,7 +807,7 @@ class related(function):
|
||||
if self._type=='many2one':
|
||||
ids = filter(None, res.values())
|
||||
if ids:
|
||||
ng = dict(obj.pool.get(self._obj).name_get(cr, uid, ids, context=context))
|
||||
ng = dict(obj.pool.get(self._obj).name_get(cr, 1, ids, context=context))
|
||||
for r in res:
|
||||
if res[r]:
|
||||
res[r] = (res[r], ng[res[r]])
|
||||
@@ -884,7 +885,7 @@ class property(function):
|
||||
default_value = prop.get_by_id(cr, uid, ids, context=context)
|
||||
if isinstance(default_value, browse_record):
|
||||
return default_value.id
|
||||
return default_value
|
||||
return default_value or False
|
||||
|
||||
def _get_by_id(self, obj, cr, uid, prop_name, ids, context=None):
|
||||
prop = obj.pool.get('ir.property')
|
||||
|
||||
+27
-2
@@ -1224,7 +1224,6 @@ class orm_template(object):
|
||||
attrs = {'views': views}
|
||||
if node.get('widget') and node.get('widget') == 'selection':
|
||||
if not check_group(node):
|
||||
# the field is just invisible. default value must be in the selection
|
||||
name = node.get('name')
|
||||
default = self.default_get(cr, user, [name], context=context).get(name)
|
||||
if default:
|
||||
@@ -1244,7 +1243,7 @@ class orm_template(object):
|
||||
search_context = dict(context)
|
||||
if column._context and not isinstance(column._context, basestring):
|
||||
search_context.update(column._context)
|
||||
attrs['selection'] = relation._name_search(cr, user, '', dom, context=search_context, limit=None, name_get_uid=1)
|
||||
attrs['selection'] = relation._name_search(cr, 1, '', dom, context=search_context, limit=None, name_get_uid=1)
|
||||
if (node.get('required') and not int(node.get('required'))) or not column.required:
|
||||
attrs['selection'].append((False,''))
|
||||
fields[node.get('name')] = attrs
|
||||
@@ -2694,6 +2693,32 @@ class orm(orm_template):
|
||||
self._inherit_fields = res
|
||||
self._inherits_reload_src()
|
||||
|
||||
def __getattr__(self, name):
|
||||
"""
|
||||
Proxies attribute accesses to the `inherits` parent so we can call methods defined on the inherited parent
|
||||
(though inherits doesn't use Python inheritance).
|
||||
Handles translating between local ids and remote ids.
|
||||
Known issue: doesn't work correctly when using python's own super(), don't involve inherit-based inheritance
|
||||
when you have inherits.
|
||||
"""
|
||||
for model, field in self._inherits.iteritems():
|
||||
proxy = self.pool.get(model)
|
||||
if hasattr(proxy, name):
|
||||
attribute = getattr(proxy, name)
|
||||
if not hasattr(attribute, '__call__'):
|
||||
return attribute
|
||||
break
|
||||
else:
|
||||
return super(orm, self).__getattr__(name)
|
||||
|
||||
def _proxy(cr, uid, ids, *args, **kwargs):
|
||||
objects = self.browse(cr, uid, ids, kwargs.get('context', None))
|
||||
lst = [obj[field].id for obj in objects if obj[field]]
|
||||
return getattr(proxy, name)(cr, uid, lst, *args, **kwargs)
|
||||
|
||||
return _proxy
|
||||
|
||||
|
||||
def fields_get(self, cr, user, fields=None, context=None):
|
||||
"""
|
||||
Get the description of list of fields
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@ class osv_pool(netsvc.Service):
|
||||
raise except_osv('Access Denied', 'Private methods (such as %s) cannot be called remotely.' % (method,))
|
||||
res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
|
||||
if res is None:
|
||||
self.logger.warning('RPC methods cannot return `None` at the moment!')
|
||||
self.logger.warning('The method %s of the object %s can not return `None` !', method, obj)
|
||||
cr.commit()
|
||||
except Exception:
|
||||
cr.rollback()
|
||||
|
||||
Reference in New Issue
Block a user