bzr revid: nch@tinyerp.com-20091215052402-zyhzpvwqzlb370wc
This commit is contained in:
nch@tinyerp.com
2009-12-15 10:54:02 +05:30
83 changed files with 33547 additions and 187832 deletions
+1
View File
@@ -46,6 +46,7 @@
'module/module_report.xml',
'res/res_request_view.xml',
'res/res_lang_view.xml',
'res/res_company_view.xml',
'res/partner/partner_report.xml',
'res/partner/partner_view.xml',
'res/partner/partner_wizard.xml',
+1 -1
View File
@@ -78,7 +78,7 @@
<form string="Users">
<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="company"/>
<field name="company_id" widget="selection"/>
<field name="context_lang" completion="1" readonly="0"/>
<field name="context_tz" completion="1" readonly="0" colspan="4"/>
<newline/>
+542 -4266
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+619 -4331
View File
File diff suppressed because it is too large Load Diff
+799 -783
View File
File diff suppressed because it is too large Load Diff
+844 -4419
View File
File diff suppressed because it is too large Load Diff
+589 -4310
View File
File diff suppressed because it is too large Load Diff
+540 -4264
View File
File diff suppressed because it is too large Load Diff
+798 -4444
View File
File diff suppressed because it is too large Load Diff
+842 -4506
View File
File diff suppressed because it is too large Load Diff
+1218 -4447
View File
File diff suppressed because it is too large Load Diff
+2 -16
View File
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-18 15:36+0000\n"
"POT-Creation-Date: 2009-12-10 16:01+0000\n"
"PO-Revision-Date: 2009-12-10 07:54+0000\n"
"Last-Translator: Silvana Herrera <sherrera@thymbra.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -715,12 +715,6 @@ msgstr "STOCK_GO_DOWN"
msgid "STOCK_OK"
msgstr "STOCK_OK"
#. module: base
#: code:addons/addons/l10n_ch/wizard/bvr_import.py:0
#, python-format
msgid "The properties account payable account receivable"
msgstr ""
#. module: base
#: field:ir.actions.act_window.view,act_window_id:0
#: view:ir.actions.actions:0
@@ -2142,7 +2136,6 @@ msgstr "terp-account"
#. module: base
#: code:addons/addons/base/module/module.py:0
#: code:addons/addons/base_module_merge/wizard/base_module_merge.py:0
#, python-format
msgid "Recursion error in modules dependencies !"
msgstr "Error de recursión en dependencias de módulos!"
@@ -4966,7 +4959,6 @@ msgid "STOCK_GO_BACK"
msgstr "STOCK_GO_BACK"
#. module: base
#: code:addons/addons/account_analytic_analysis/account_analytic_analysis.py:0
#: code:addons/addons/base/ir/ir_model.py:0
#: code:addons/osv/orm.py:0
#, python-format
@@ -6371,12 +6363,6 @@ msgstr "STOCK_DND"
msgid "Heard and McDonald Islands"
msgstr "Islas Heard y McDonald"
#. module: base
#: code:addons/addons/point_of_sale/pos.py:0
#, python-format
msgid "No valid pricelist line found !"
msgstr ""
#. module: base
#: field:ir.actions.act_window,view_id:0
msgid "View Ref."
File diff suppressed because it is too large Load Diff
+678 -4366
View File
File diff suppressed because it is too large Load Diff
+922 -4537
View File
File diff suppressed because it is too large Load Diff
+846 -4432
View File
File diff suppressed because it is too large Load Diff
+541 -4204
View File
File diff suppressed because it is too large Load Diff
+812 -4374
View File
File diff suppressed because it is too large Load Diff
+552 -4262
View File
File diff suppressed because it is too large Load Diff
+783 -783
View File
File diff suppressed because it is too large Load Diff
+777 -751
View File
File diff suppressed because it is too large Load Diff
+540 -4264
View File
File diff suppressed because it is too large Load Diff
+667 -4350
View File
File diff suppressed because it is too large Load Diff
+540 -4203
View File
File diff suppressed because it is too large Load Diff
+781 -4346
View File
File diff suppressed because it is too large Load Diff
+540 -4264
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 15:45:27+0000\n"
"PO-Revision-Date: 2009-08-28 15:45:27+0000\n"
"PO-Revision-Date: 2009-12-10 07:54+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
+843 -4386
View File
File diff suppressed because it is too large Load Diff
+540 -4264
View File
File diff suppressed because it is too large Load Diff
+989 -4629
View File
File diff suppressed because it is too large Load Diff
+2 -8
View File
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-08 15:33+0000\n"
"POT-Creation-Date: 2009-12-09 16:01+0000\n"
"PO-Revision-Date: 2009-12-10 07:54+0000\n"
"Last-Translator: Mark van Deursen (Neobis) <mark@neobis.nl>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -3827,12 +3827,6 @@ msgstr "ir.rule.group"
msgid "Installed modules"
msgstr "Geïnstalleerde modules"
#. module: base
#: code:addons/addons/crm/crm.py:0
#, python-format
msgid "Case"
msgstr ""
#. module: base
#: code:addons/osv/orm.py:0
#, python-format
File diff suppressed because it is too large Load Diff
+2308 -5144
View File
File diff suppressed because it is too large Load Diff
+1262 -4866
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+557 -4281
View File
File diff suppressed because it is too large Load Diff
+619 -4327
View File
File diff suppressed because it is too large Load Diff
+579 -4288
View File
File diff suppressed because it is too large Load Diff
+771 -4374
View File
File diff suppressed because it is too large Load Diff
+540 -4264
View File
File diff suppressed because it is too large Load Diff
+833 -4380
View File
File diff suppressed because it is too large Load Diff
+557 -4220
View File
File diff suppressed because it is too large Load Diff
+540 -4264
View File
File diff suppressed because it is too large Load Diff
+540 -4264
View File
File diff suppressed because it is too large Load Diff
+567 -4279
View File
File diff suppressed because it is too large Load Diff
+817 -4379
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+541 -4204
View File
File diff suppressed because it is too large Load Diff
+2162 -4469
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+14 -5
View File
@@ -150,8 +150,12 @@
<tree string="Sequences">
<field name="name"/>
<field name="code"/>
<field name="active"/>
<field name="company_id"/>
<field name="number_next"/>
<field name="number_increment"/>
<field name="prefix"/>
<field name="padding"/>
<field name="active"/>
</tree>
</field>
</record>
@@ -428,6 +432,11 @@
<menuitem action="ir_action_wizard" id="menu_ir_action_wizard" parent="base.next_id_6"/>
<!-- Companies -->
<menuitem id="menu_res_company_global"
parent="base.menu_administration"
name="Companies"
sequence="5"/>
<record id="action_res_company_tree" model="ir.actions.act_window">
<field name="name">Company's Structure</field>
<field name="type">ir.actions.act_window</field>
@@ -435,7 +444,7 @@
<field name="domain">[('parent_id','=',False)]</field>
<field name="view_type">tree</field>
</record>
<menuitem action="action_res_company_tree" id="menu_action_res_company_tree" parent="base.menu_users" sequence="16"/>
<menuitem action="action_res_company_tree" id="menu_action_res_company_tree" parent="base.menu_res_company_global" sequence="16"/>
<record id="action_res_company_form" model="ir.actions.act_window">
<field name="name">Companies</field>
@@ -443,7 +452,7 @@
<field name="res_model">res.company</field>
<field name="view_type">form</field>
</record>
<menuitem action="action_res_company_form" id="menu_action_res_company_form" parent="menu_action_res_company_tree"/>
<menuitem action="action_res_company_form" id="menu_action_res_company_form" parent="base.menu_res_company_global"/>
<!-- User Roles -->
<record id="action_res_users" model="ir.actions.act_window">
@@ -1128,8 +1137,8 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Record rules">
<field name="model_id"/>
<field name="global"/>
<field name="model_id" select="1"/>
<field name="global" select="1"/>
<field colspan="4" name="name"/>
<group col="6" colspan="4" expand="1">
<field colspan="6" name="rules" nolabel="1"/>
+2 -7
View File
@@ -29,12 +29,7 @@ import re
import copy
import sys
try:
from xml import dom, xpath
except ImportError:
sys.stderr.write("ERROR: Import xpath module\n")
sys.stderr.write("ERROR: Try to install the old python-xml package\n")
sys.exit(2)
from xml import dom
class actions(osv.osv):
_name = 'ir.actions.actions'
@@ -350,7 +345,7 @@ class ir_model_fields(osv.osv):
'complete_name': fields.char('Complete Name', size=64, select=1),
}
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
return super(ir_model_fields, self).name_search(cr, uid, name, args, operator, context, limit)
# def get_fields(cr, uid, field, rel):
# result = []
+2 -2
View File
@@ -40,7 +40,7 @@ class Country(osv.osv):
]
def name_search(self, cr, user, name='', args=None, operator='ilike',
context=None, limit=80):
context=None, limit=100):
if not args:
args=[]
if not context:
@@ -81,7 +81,7 @@ class CountryState(osv.osv):
help='The state code in three chars.\n', required=True),
}
def name_search(self, cr, user, name='', args=None, operator='ilike',
context=None, limit=80):
context=None, limit=100):
if not args:
args = []
if not context:
+2 -2
View File
@@ -199,7 +199,7 @@ class res_partner(osv.osv):
res = [(r['id'], r[rec_name]) for r in self.read(cr, uid, ids, [rec_name], context)]
return res
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:
@@ -317,7 +317,7 @@ class res_partner_address(osv.osv):
res.append((r['id'], addr.strip() or '/'))
return res
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:
+8 -6
View File
@@ -96,7 +96,6 @@
<field name="function"/>
<newline/>
<group string="Postal Address" colspan="2" col="2">
<field name="type" select="2" />
<field name="street" select="2"/>
<field name="street2"/>
<field name="zip" select="2"/>
@@ -105,6 +104,7 @@
<field name="state_id" select="2"/>
</group>
<group string="Communication" colspan="2" col="2">
<field name="type" select="2" />
<field name="phone"/>
<field name="fax"/>
<field name="mobile" select="2"/>
@@ -255,12 +255,14 @@
<page string="General">
<field colspan="4" mode="form,tree" name="address" nolabel="1" select="1" height="260">
<form string="Partner Contacts">
<field name="name" select="2"/>
<field domain="[('domain', '=', 'contact')]" name="title" string="Type"/>
<field name="function"/>
<group colspan="4" col="4">
<field name="name" select="2"/>
<field domain="[('domain', '=', 'contact')]" name="title" string="Type"/>
<field name="function"/>
<field name="type" select="2" colspan="4"/>
</group>
<newline/>
<group string="Postal Address" colspan="2" col="4">
<field name="type" select="2" colspan="4"/>
<field name="street" select="2" colspan="4"/>
<field name="street2" colspan="4"/>
<field name="zip" select="2"/>
@@ -295,7 +297,7 @@
<field name="website" widget="url"/>
<field name="date" select="2"/>
<field name="parent_id"/>
<field name="company_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<newline/>
</page>
<page string="History">
+66 -10
View File
@@ -19,13 +19,58 @@
#
##############################################################################
from osv import fields,osv
from osv import osv
from osv import fields
import os
import tools
from tools.translate import _
class multi_company_default(osv.osv):
"""
Manage multi company default value
"""
_name = 'multi_company.default'
_description = 'Default multi company'
_order = 'company_id,sequence,id'
_columns = {
'sequence': fields.integer('Sequence'),
'name': fields.char('Name', size=32, required=True, help='Name it to easily find a record'),
'company_id': fields.many2one('res.company', 'Main Company', required=True,
help='Company where the user is connected'),
'company_dest_id': fields.many2one('res.company', 'Default Company', required=True,
help='Company to store the current record'),
'object_id': fields.many2one('ir.model', 'Object', required=True,
help='Object affect by this rules'),
'expression': fields.char('Expression', size=32, required=True,
help='Expression, must be True to match'),
}
_defaults = {
'expression': lambda *a: 'True',
'sequence': lambda *a: 100,
}
def copy(self, cr, uid, id, default=None, context=None):
"""
Add (copy) in the name when duplicate record
"""
if not context:
context = {}
if not default:
default = {}
company = self.browse(cr, uid, id, context=context)
default = default.copy()
default['name'] = company.name + _(' (copy)')
return super(multi_company_default, self).copy(cr, uid, id, default, context=context)
multi_company_default()
class res_company(osv.osv):
_name = "res.company"
_description = 'Companies'
_columns = {
'name': fields.char('Company Name', size=64, required=True),
'parent_id': fields.many2one('res.company', 'Parent Company', select=True),
@@ -38,13 +83,25 @@ class res_company(osv.osv):
'rml_header2' : fields.text('RML Internal Header'),
'logo' : fields.binary('Logo'),
'currency_id': fields.many2one('res.currency', 'Currency', required=True),
'currency_ids': fields.one2many('res.currency', 'company_id', 'Currency')
'currency_ids': fields.one2many('res.currency', 'company_id', 'Currency'),
'user_ids': fields.many2many('res.users', 'res_company_users_rel', 'cid', 'user_id', 'Accepted Users')
}
def _company_default_get(self, cr, uid, object=False, context={}):
def _company_default_get(self, cr, uid, object=False, context=None):
"""
Check if the object for this company have a default value
"""
if not context:
context = {}
proxy = self.pool.get('multi_company.default')
ids = proxy.search(cr, uid, [('object_id.model', '=', object)])
for rule in proxy.browse(cr, uid, ids, context):
user = self.pool.get('res.users').browse(cr, uid, uid)
if eval(rule.expression, {'context': context, 'user': user}):
return rule.company_dest_id.id
return self.pool.get('res.users').browse(cr, uid, uid).company_id.id
def _get_child_ids(self, cr, uid, uid2, context={}):
company = self.pool.get('res.users').company_get(cr, uid, uid2)
ids = self._get_company_children(cr, uid, company)
@@ -94,7 +151,7 @@ class res_company(osv.osv):
return self.pool.get('res.currency').search(cr, uid, [])[0]
except:
return False
def _check_recursion(self, cr, uid, ids):
level = 100
while len(ids):
@@ -104,7 +161,7 @@ class res_company(osv.osv):
return False
level -= 1
return True
def _get_header2(self,cr,uid,ids):
return """
<header>
@@ -175,6 +232,5 @@ class res_company(osv.osv):
res_company()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+75
View File
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="view_inventory_tree" model="ir.ui.view">
<field name="name">multi_company.default.tree</field>
<field name="model">multi_company.default</field>
<field name="type">tree</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<tree string="Multi Company">
<field name="company_id" groups="base.group_multi_company"/>
<field name="object_id"/>
<field name="expression" />
<field name="sequence"/>
<field name="company_dest_id"/>
<field name="name"/>
</tree>
</field>
</record>
<record id="view_inventory_form" model="ir.ui.view">
<field name="name">multi_company.default.form</field>
<field name="model">multi_company.default</field>
<field name="type">form</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<form string="Multi Company">
<group col="6" colspan="4">
<field name="name" colspan="6"/>
<separator string="Matching" colspan="6"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="object_id"/>
<field name="company_dest_id"/>
<separator string="Condition" colspan="6"/>
<field name="expression" colspan="4"/>
<field name="sequence"/>
</group>
</form>
</field>
</record>
<record id="view_inventory_search" model="ir.ui.view">
<field name="name">multi_company.default.search</field>
<field name="model">multi_company.default</field>
<field name="type">search</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<search string="Multi Company">
<field name="name" select="1"/>
<field name="company_id" select="1" widget="selection"/>
<field name="company_dest_id" select="1" widget="selection"/>
<field name="object_id" select="1"/>
</search>
</field>
</record>
<record id="action_inventory_form" model="ir.actions.act_window">
<field name="name">Default Company per Object</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">multi_company.default</field>
<field name="view_type">form</field>
<field name="search_view_id" ref="view_inventory_search"/>
</record>
<menuitem id="menu_custom_multicompany"
name="Multi company"
parent="base.menu_custom"
sequence="50"/>
<menuitem id="menu_action_inventory_form"
action="action_inventory_form"
parent="menu_custom_multicompany"/>
</data>
</openerp>
+1 -1
View File
@@ -123,7 +123,7 @@ class res_currency(osv.osv):
else:
return (from_amount * rate)
def name_search(self, cr, uid, name, args=[], operator='ilike', context={}, limit=80):
def name_search(self, cr, uid, name, args=[], operator='ilike', context={}, limit=100):
args2 = args[:]
if name:
args += [('name', operator, name)]
+12 -2
View File
@@ -57,12 +57,22 @@
</field>
</record>
<record id="res_request-act" model="ir.actions.act_window">
<field name="name">Requests</field>
<field name="name">My Requests</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.request</field>
<field name="view_id" eval="False"/>
</record>
<menuitem id="next_id_12" name="Requests" parent="base.next_id_4"/><menuitem action="res_request-act" id="menu_res_request_act" parent="next_id_12"/>
<menuitem id="next_id_12" name="Requests" parent="base.next_id_4"/>
<menuitem action="res_request-act" id="menu_res_request_act" parent="next_id_12"/>
<record id="res_request-closed" model="ir.actions.act_window">
<field name="name">My Closed Requests</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.request</field>
<field name="domain">[('active','=',False)]</field>
<field name="view_id" eval="False"/>
</record>
<menuitem action="res_request-closed" id="next_id_12_close" parent="menu_res_request_act"/>
<record id="res_request_link-view" model="ir.ui.view">
<field name="name">res.request.link.form</field>
+13 -6
View File
@@ -140,8 +140,8 @@ class users(osv.osv):
'groups_id': fields.many2many('res.groups', 'res_groups_users_rel', 'uid', 'gid', 'Groups'),
'roles_id': fields.many2many('res.roles', 'res_roles_users_rel', 'uid', 'rid', 'Roles'),
'rules_id': fields.many2many('ir.rule.group', 'user_rule_group_rel', 'user_id', 'rule_group_id', 'Rules'),
'company_id': fields.many2one('res.company', 'Company'),
'company_ids':fields.many2many('res.company','res_company_users_rel','user_id','cid','Accepted Companies'),
'company_id': fields.many2one('res.company', 'Company', help="The company this user is currently working on.", required=True),
'company_ids':fields.many2many('res.company','res_company_users_rel','user_id','cid','Accepted Companies'),
'context_lang': fields.selection(_lang_get, 'Language', required=True),
'context_tz': fields.selection(_tz_get, 'Timezone', size=64),
'company': fields.selection(_companies_get, 'Company', size=64),
@@ -209,9 +209,6 @@ class users(osv.osv):
ok=False
if ok:
uid = 1
context_company=values.get('company',False)
if context_company:
values.update({'company_id':context_company})
res = super(users, self).write(cr, uid, ids, values, *args, **argv)
self.company_get.clear_cache(cr.dbname)
# Restart the cache on the company_get method
@@ -224,7 +221,7 @@ class users(osv.osv):
raise osv.except_osv(_('Can not remove root user!'), _('You can not remove the admin user as it is used internally for resources created by OpenERP (updates, module installation, ...)'))
return super(users, self).unlink(cr, uid, ids, context=context)
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:
@@ -280,6 +277,16 @@ class users(osv.osv):
'type': 'ir.actions.act_window',
'target':'new',
}
def _check_company(self, cursor, user, ids):
for user in self.browse(cursor, user, ids):
if user.company_ids and (user.company_id.id not in map(lambda x: x.id, user.company_ids)):
return False
return True
_constraints = [
(_check_company, 'This user can not connect using this company !', ['company_id']),
]
users()
class groups2(osv.osv): ##FIXME: Is there a reason to inherit this object ?
+61 -26
View File
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="0">
<data noupdate="0">
<!--
Users Groups
@@ -30,7 +30,7 @@
</record>
<record model="res.groups" id="group_multi_company">
<field name="name">MultiCompany/Manager</field>
<field name="name">Multi Companies</field>
</record>
<!--
@@ -45,36 +45,71 @@
</record>
<!-- Set accesses to menu -->
<record model="ir.ui.menu" id="base.menu_administration">
<field name="groups_id" eval="[(6,0, [ref('group_system'), ref('group_erp_manager')])]"/>
</record>
<!-- Set accesses to menu -->
<record model="ir.ui.menu" id="base.menu_administration">
<field name="groups_id" eval="[(6,0, [ref('group_system'), ref('group_erp_manager')])]"/>
</record>
<record id="base.menu_security" model="ir.ui.menu">
<field eval="[(6,0,[ref('base.group_erp_manager')])]" name="groups_id"/>
</record>
<record id="base.menu_security" model="ir.ui.menu">
<field eval="[(6,0,[ref('base.group_erp_manager')])]" name="groups_id"/>
</record>
<record id="base.menu_users" model="ir.ui.menu">
<field eval="[(6,0,[ref('base.group_erp_manager')])]" name="groups_id"/>
</record>
<record id="base.menu_users" model="ir.ui.menu">
<field eval="[(6,0,[ref('base.group_erp_manager')])]" name="groups_id"/>
</record>
<record id="base.menu_action_currency_form" model="ir.ui.menu">
<field eval="[(6,0,[ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="base.menu_action_currency_form" model="ir.ui.menu">
<field eval="[(6,0,[ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="base.menu_custom" model="ir.ui.menu">
<field eval="[(6,0,[ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="base.menu_custom" model="ir.ui.menu">
<field eval="[(6,0,[ref('base.group_system')])]" name="groups_id"/>
</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>
<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>
<record id="base.menu_management" model="ir.ui.menu">
<field eval="[(6,0,[ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="base.menu_management" model="ir.ui.menu">
<field eval="[(6,0,[ref('base.group_system')])]" name="groups_id"/>
</record>
</data>
<record model="ir.rule.group" id="res_partner_address_rule_group">
<field name="name">res.partner.address company</field>
<field name="model_id" ref="model_res_partner_address"/>
<field name="global" eval="True"/>
</record>
<record model="ir.rule" id="res_partner_address_comp_rule">
<field name="field_id" search="[('model','=','res.partner.address'),('name','=','company_id')]" model="ir.model.fields"/>
<field name="rule_group" ref="res_partner_address_rule_group"/>
<field name="domain_force">[('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule.group" id="res_partner_rule_group">
<field name="name">res.partner company</field>
<field name="model_id" ref="model_res_partner"/>
<field name="global" eval="True"/>
</record>
<record model="ir.rule" id="res_partner_comp_rule">
<field name="field_id" search="[('model','=','res.partner'),('name','=','company_id')]" model="ir.model.fields"/>
<field name="rule_group" ref="res_partner_rule_group"/>
<field name="domain_force">[('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule.group" id="multi_company_default_rule_group">
<field name="name">Multi_company_default company</field>
<field name="model_id" ref="model_multi_company_default"/>
<field name="global" eval="True"/>
</record>
<record model="ir.rule" id="multi_company_default_comp_rule">
<field name="field_id" search="[('model','=','multi_company.default'),('name','=','company_id')]" model="ir.model.fields"/>
<field name="rule_group" ref="multi_company_default_rule_group"/>
<field name="domain_force">[('company_id','child_of',[user.company_id.id])]</field>
</record>
</data>
</openerp>
@@ -132,3 +132,5 @@
"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_multi_company_default user","multi_company_default User","model_multi_company_default","group_user",1,0,0,0
"access_multi_company_default manager","multi_company_default Manager","model_multi_company_default","group_erp_manager",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
132 access_maintenance_group_user maintenance_contract group_user model_maintenance_contract group_maintenance_manager 1 1 1 1
133 access_maintenance_contract_module maintenance.contract.module model_maintenance_contract_module group_maintenance_manager 1 1 1 1
134 access_maintenance_contract_wizard maintenance.contract.wizard model_maintenance_contract_wizard group_maintenance_manager 1 1 1 1
135 access_multi_company_default user multi_company_default User model_multi_company_default group_user 1 0 0 0
136 access_multi_company_default manager multi_company_default Manager model_multi_company_default group_erp_manager 1 1 1 1
@@ -208,20 +208,19 @@ def drop_db(uri, dbname):
def make_links(uri, uid, dbname, source, destination, module, user, pwd):
if module in ('base','quality_integration_server'):
return True
if not os.path.islink(destination + '/' + module):
if not os.path.isdir(destination + '/' + module):
for path in source:
if os.path.isdir(path + '/' + module):
os.symlink(path + '/' + module, destination + '/' + module)
obj_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object')
execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'update_list')
module_ids = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'search', [('name','=',module)])
if len(module_ids):
data = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'read', module_ids[0],['name','dependencies_id'])
dep_datas = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module.dependency', 'read', data['dependencies_id'],['name'])
for dep_data in dep_datas:
make_links(uri, uid, dbname, source, destination, dep_data['name'], user, pwd)
return True
if os.path.islink(destination + '/' + module):
os.unlink(destination + '/' + module)
for path in source:
if os.path.isdir(path + '/' + module):
os.symlink(path + '/' + module, destination + '/' + module)
obj_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object')
execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'update_list')
module_ids = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'search', [('name','=',module)])
if len(module_ids):
data = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'read', module_ids[0],['name','dependencies_id'])
dep_datas = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module.dependency', 'read', data['dependencies_id'],['name'])
for dep_data in dep_datas:
make_links(uri, uid, dbname, source, destination, dep_data['name'], user, pwd)
return False
def install_module(uri, dbname, modules, addons='', extra_addons='', user='admin', pwd='admin'):
+1 -1
View File
@@ -225,7 +225,7 @@ class Logger(object):
try:
msg = tools.ustr(msg).strip()
if level in (LOG_ERROR,LOG_CRITICAL) and tools.config.get_misc('debug','env_info',True):
if level in (LOG_ERROR,LOG_CRITICAL) and tools.config.get_misc('debug','env_info',False):
msg = common().exp_get_server_environment() + "\n" + msg
result = msg.split('\n')
+3
View File
@@ -785,6 +785,9 @@ class related(function):
self.arg = arg
self._relations = []
super(related, self).__init__(self._fnct_read, arg, self._fnct_write, fnct_inv_arg=arg, method=True, fnct_search=self._fnct_search, **args)
if self.store is True:
# TODO: improve here to change self.store = {...} according to related objects
pass
def _field_get2(self, cr, uid, obj, context={}):
if self._relations:
+7 -5
View File
@@ -1051,9 +1051,10 @@ class orm_template(object):
attrs = {'views': views}
if node.get('widget') and node.get('widget') == 'selection':
# We can not use the 'string' domain has it is defined according to the record !
dom = None
dom = []
if column._domain and not isinstance(column._domain, (str, unicode)):
dom = column._domain
dom += eval(node.get('domain','[]'), {'uid':user, 'time':time})
attrs['selection'] = self.pool.get(relation).name_search(cr, user, '', dom, context=context)
if (node.get('required') and not int(node.get('required'))) or not column.required:
attrs['selection'].append((False,''))
@@ -1453,7 +1454,7 @@ class orm_template(object):
def name_get(self, cr, user, ids, context=None):
raise _('The name_get method is not implemented on this object !')
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100):
raise _('The name_search method is not implemented on this object !')
def copy(self, cr, uid, id, default=None, context=None):
@@ -2317,7 +2318,7 @@ class orm(orm_template):
if isinstance(ids, (int, long)):
select = [ids]
else:
select = map(int,ids)
select = ids
select = map(lambda x: isinstance(x,dict) and x['id'] or x, select)
result = self._read_flat(cr, user, select, fields, context, load)
@@ -2350,7 +2351,7 @@ class orm(orm_template):
context = {}
if not ids:
return []
ids = map(lambda x:int(x), ids)
if fields_to_read == None:
fields_to_read = self._columns.keys()
@@ -3165,6 +3166,7 @@ class orm(orm_template):
','.join(tables) +qu1 + limit_str + offset_str, qu2)
res = cr.fetchall()
return res[0][0]
# execute the "main" query to fetch the ids we were searching for
cr.execute('select %s.id from ' % self._table + ','.join(tables) +qu1+' order by '+order_by+limit_str+offset_str, qu2)
res = cr.fetchall()
@@ -3191,7 +3193,7 @@ class orm(orm_template):
return [(r['id'], tools.ustr(r[self._rec_name])) for r in self.read(cr, user, ids,
[self._rec_name], context, load='_classic_write')]
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100):
if not args:
args = []
if not context:
+43
View File
@@ -0,0 +1,43 @@
# Catalan translation for openobject-server
# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
# This file is distributed under the same license as the openobject-server package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-server\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
"PO-Revision-Date: 2009-12-14 06:11+0000\n"
"Last-Translator: Jordi Esteve - http://www.zikzakmedia.com "
"<jesteve@zikzakmedia.com>\n"
"Language-Team: Catalan <ca@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: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
#. Description
#: ../openerp-server.templates:1001
msgid "Dedicated system account for the Open ERP server:"
msgstr "Compte del sistema dedicat pel servidor OpenERP:"
#. Type: string
#. Description
#: ../openerp-server.templates:1001
msgid ""
"The Open ERP server must use a dedicated account for its operation so that "
"the system's security is not compromised by running it with superuser "
"privileges."
msgstr ""
"El servidor OpenERP ha d'utilitzar un compte dedicat pel seu funcionament, "
"de tal manera que la seguretat del sistema no es vegi compromesa per la seva "
"utilització amb privilegis d'administració."
#. Type: string
#. Description
#: ../openerp-server.templates:1001
msgid "Please choose that account's username."
msgstr "Esculliu un nom d'usuari pel compte."
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
+7 -6
View File
@@ -8,20 +8,21 @@ msgstr ""
"Project-Id-Version: openerp-server 5.0.1-0-2\n"
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
"Last-Translator: Fernando González de Requena <Unknown>\n"
"PO-Revision-Date: 2009-12-14 06:11+0000\n"
"Last-Translator: Jordi Esteve - http://www.zikzakmedia.com "
"<jesteve@zikzakmedia.com>\n"
"Language-Team: Spanish <debian-l10n-spanish@lists.debian.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
#. Description
#: ../openerp-server.templates:1001
msgid "Dedicated system account for the Open ERP server:"
msgstr "Cuenta del sistema dedicada para el servidor Open ERP:"
msgstr "Cuenta del sistema dedicada para el servidor OpenERP:"
#. Type: string
#. Description
@@ -31,7 +32,7 @@ msgid ""
"the system's security is not compromised by running it with superuser "
"privileges."
msgstr ""
"El servidor de Open ERP debe utilizar una cuenta dedicada para su "
"El servidor OpenERP debe utilizar una cuenta dedicada para su "
"funcionamiento, de tal modo que la seguridad del sistema no se vea "
"comprometida por su utilización con privilegios de administración."
@@ -39,4 +40,4 @@ msgstr ""
#. Description
#: ../openerp-server.templates:1001
msgid "Please choose that account's username."
msgstr "Elija un nombre de usuario para esa cuenta."
msgstr "Elija un nombre de usuario para la cuenta."
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-28 04:56+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
+41
View File
@@ -0,0 +1,41 @@
# Polish translation for openobject-server
# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
# This file is distributed under the same license as the openobject-server package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-server\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
"PO-Revision-Date: 2009-12-08 06:13+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"Language-Team: Polish <pl@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: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
#. Description
#: ../openerp-server.templates:1001
msgid "Dedicated system account for the Open ERP server:"
msgstr "Konto dedykowane serwerowi OpenERP"
#. Type: string
#. Description
#: ../openerp-server.templates:1001
msgid ""
"The Open ERP server must use a dedicated account for its operation so that "
"the system's security is not compromised by running it with superuser "
"privileges."
msgstr ""
"Serwer OpenERP musi używać dedykowanego konta do swoich operacji, aby nie "
"obniżać bezpieczeństwa systemu przez stosowanie uprawnień superusera."
#. Type: string
#. Description
#: ../openerp-server.templates:1001
msgid "Please choose that account's username."
msgstr "Wybierz nazę użytkownika dla konta."
+7 -7
View File
@@ -7,20 +7,20 @@ msgstr ""
"Project-Id-Version: openerp-server 5.0.1-0-2\n"
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
"Last-Translator: Américo Monteiro <Unknown>\n"
"PO-Revision-Date: 2009-12-10 06:04+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"Language-Team: Portuguese <traduz@debianpt.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
#. Description
#: ../openerp-server.templates:1001
msgid "Dedicated system account for the Open ERP server:"
msgstr "Conta dedicada do sistema para o servidor Open ERP:"
msgstr "Conta de sistema dedicada para o servidor Open ERP:"
#. Type: string
#. Description
@@ -30,12 +30,12 @@ msgid ""
"the system's security is not compromised by running it with superuser "
"privileges."
msgstr ""
"O servidor Open ERP tem que usar uma conta dedicada para as suas operações, "
"isto para que a segurança do sistema não seja comprometida ao corrê-lo com "
"O servidor Open ERP tem de usar uma conta dedicada para as suas operações, "
"para que a segurança do sistema não seja comprometida ao corrê-lo com "
"privilégios de superutilizador."
#. Type: string
#. Description
#: ../openerp-server.templates:1001
msgid "Please choose that account's username."
msgstr "Por favor escolha o nome dessa conta."
msgstr "Por favor escolha o nome de utilizador para essa conta."
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"X-Poedit-Language: Swedish\n"
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
"X-Launchpad-Export-Date: 2009-12-15 05:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
+5 -3
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
@@ -16,7 +16,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -60,6 +60,7 @@ required_modules = [
('pychart', 'pychart module'),
('pydot', 'pydot module'),
('lxml', 'lxml module: pythonic libxml2 and libxslt bindings'),
('mako','Mako templating library'),
]
def check_modules():
@@ -185,7 +186,7 @@ options = {
"packages": ["lxml", "lxml.builder", "lxml._elementpath", "lxml.etree",
"lxml.objectify", "decimal", "xml", "xml.dom", "xml.xpath",
"encodings","mx.DateTime","wizard","pychart","PIL", "pyparsing",
"pydot","asyncore","asynchat", "reportlab", "vobject",
"pydot","asyncore","asynchat", "reportlab", "vobject","mako",
"HTMLParser", "select"],
"excludes" : ["Tkconstants","Tkinter","tcl"],
}
@@ -219,6 +220,7 @@ setup(name = name,
'openerp-server.report.render.rml2html',
'openerp-server.report.render.rml2txt',
'openerp-server.report.render.html2html',
'openerp-server.report.render.makohtml2html',
'openerp-server.wizard',
'openerp-server.report.render.odt2odt',
'openerp-server.workflow'] + \