[MERGE]:from trunk server

bzr revid: nch@tinyerp.com-20100707110543-ayczu9j7ris3iby3
This commit is contained in:
nch@tinyerp.com
2010-07-07 16:35:43 +05:30
176 changed files with 12426 additions and 2135 deletions
+2 -1
View File
@@ -9,7 +9,8 @@ include bin/server.pkey
include bin/gpl.txt
include man/openerp-server.1
include man/openerp_serverrc.5
recursive-include pixmaps
recursive-include pixmaps *
recursive-include win32 *
recursive-include doc *
recursive-include bin *xml *xsl *sql *rml *sxw *csv *rng
graft bin/addons/
+44 -45
View File
@@ -3,6 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -27,12 +28,11 @@ import zipimport
import osv
import tools
import tools.osutil
from tools.safe_eval import safe_eval as eval
import pooler
import netsvc
from osv import fields
import addons
import zipfile
import release
@@ -63,9 +63,6 @@ ad_paths.append(_ad) # for get_module_path
# Modules already loaded
loaded = []
#Modules whch raised error
not_loaded = []
class Graph(dict):
def addNode(self, name, deps):
@@ -80,14 +77,15 @@ class Graph(dict):
Node(name, self)
def update_from_db(self, cr):
if not len(self):
return
# update the graph with values from the database (if exist)
## First, we set the default values for each package in graph
additional_data = dict.fromkeys(self.keys(), {'id': 0, 'state': 'uninstalled', 'dbdemo': False, 'installed_version': None})
## Then we get the values from the database
cr.execute('SELECT name, id, state, demo AS dbdemo, latest_version AS installed_version'
' FROM ir_module_module'
' WHERE name in (%s)' % (','.join(['%s'] * len(self))),
additional_data.keys()
' WHERE name IN %s',(tuple(additional_data),)
)
## and we update the default values with values from the database
@@ -97,8 +95,6 @@ class Graph(dict):
for k, v in additional_data[package.name].items():
setattr(package, k, v)
def __iter__(self):
level = 0
done = set(self.keys())
@@ -302,7 +298,7 @@ def load_information_from_description_file(module):
:param module: The name of the module (sale, purchase, ...)
"""
for filename in ['__openerp__.py', '__terp__.py']:
description_file = addons.get_module_resource(module, filename)
description_file = get_module_resource(module, filename)
if os.path.isfile(description_file):
return eval(tools.file_open(description_file).read())
@@ -340,11 +336,8 @@ def upgrade_graph(graph, cr, module_list, force=None):
terp_file = get_module_resource(module, '__terp__.py')
if not mod_path or not terp_file:
global not_loaded
not_loaded.append(module)
logger.notifyChannel('init', netsvc.LOG_WARNING, 'module %s: not installable' % (module))
raise osv.osv.except_osv('Error!',"Module '%s' was not found" % (module,))
logger.notifyChannel('init', netsvc.LOG_WARNING, 'module %s: not found, skipped' % (module))
continue
if os.path.isfile(terp_file) or zipfile.is_zipfile(mod_path+'.zip'):
try:
@@ -354,7 +347,8 @@ def upgrade_graph(graph, cr, module_list, force=None):
raise
if info.get('installable', True):
packages.append((module, info.get('depends', []), info))
else:
logger.notifyChannel('init', netsvc.LOG_WARNING, 'module %s: not installable, skipped' % (module))
dependencies = dict([(p, deps) for p, deps, data in packages])
current, later = set([p for p, dep, data in packages]), set()
@@ -644,16 +638,13 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs):
try:
_load_data(cr, module_name, id_map, mode, 'test')
except Exception, e:
if tools.config.options['test-continue']:
logger.notifyChannel('ERROR', netsvc.LOG_TEST, e)
pass
else:
raise
logger.notifyChannel('ERROR', netsvc.LOG_TEST, e)
pass
finally:
if tools.config.options['test-rollback']:
cr.rollback()
else:
if tools.config.options['test-commit']:
cr.commit()
else:
cr.rollback()
def _load_data(cr, module_name, id_map, mode, kind):
noupdate = (kind == 'demo')
@@ -665,6 +656,9 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs):
# TODO manage .csv file with noupdate == (kind == 'init')
if ext == '.sql':
process_sql_file(cr, fp)
elif ext == '.csv':
noupdate = (kind == 'init')
tools.convert_csv_import(cr, module_name, pathname, file.read(), id_map, mode, noupdate)
elif ext == '.yml':
tools.convert_yaml_import(cr, module_name, file, id_map, mode, noupdate)
else:
@@ -719,14 +713,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs):
for kind in ('init', 'update'):
if package.state=='to upgrade':
# upgrading the module information
modobj.write(cr, 1, [mid], {
'description': package.data.get('description', ''),
'shortdesc': package.data.get('name', ''),
'author': package.data.get('author', 'Unknown'),
'website': package.data.get('website', ''),
'license': package.data.get('license', 'GPL-2'),
'certificate': package.data.get('certificate') or None,
})
modobj.write(cr, 1, [mid], modobj.get_values_from_terp(package.data))
load_init_update_xml(cr, m, idref, mode, kind)
load_data(cr, m, idref, mode)
if hasattr(package, 'demo') or (package.dbdemo and package.state != 'installed'):
@@ -735,7 +722,11 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs):
load_demo(cr, m, idref, mode)
cr.execute('update ir_module_module set demo=%s where id=%s', (True, mid))
load_test(cr, m, idref, mode)
# launch tests only in demo mode, as most tests will depend
# on demo data. Other tests can be added into the regular
# 'data' section, but should probably not alter the data,
# as there is no rollback.
load_test(cr, m, idref, mode)
package_todo.append(package.name)
@@ -797,13 +788,11 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
# NOTE: Try to also load the modules that have been marked as uninstallable previously...
STATES_TO_LOAD = ['installed', 'to upgrade', 'uninstallable']
graph = create_graph(cr, ['base'], force)
if not graph:
logger.notifyChannel('init', netsvc.LOG_CRITICAL, 'module base cannot be loaded! (hint: verify addons-path)')
raise osv.osv.except_osv('Could not load base module', 'module base cannot be loaded! (hint: verify addons-path)')
has_updates = load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report)
global not_loaded
if not_loaded:
#If some module is not loaded don't proceed further
not_loaded = []
return
if update_module:
modobj = pool.get('ir.module.module')
states = {'installed': 'button_upgrade', 'uninstalled': 'button_install'}
@@ -825,8 +814,8 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
while True:
loop_guardrail += 1
if loop_guardrail > 100:
raise ProgrammingError()
cr.execute("SELECT name from ir_module_module WHERE state in (%s)" % ','.join(['%s']*len(STATES_TO_LOAD)), STATES_TO_LOAD)
raise ValueError('Possible recursive module tree detected, aborting.')
cr.execute("SELECT name from ir_module_module WHERE state IN %s" ,(tuple(STATES_TO_LOAD),))
module_list = [name for (name,) in cr.fetchall() if name not in graph]
if not module_list:
@@ -842,9 +831,19 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
has_updates = has_updates or r
if has_updates:
cr.execute("""select model,name from ir_model where id not in (select model_id from ir_model_access)""")
cr.execute("""select model,name from ir_model where id NOT IN (select distinct model_id from ir_model_access)""")
for (model, name) in cr.fetchall():
logger.notifyChannel('init', netsvc.LOG_WARNING, 'object %s (%s) has no access rules!' % (model, name))
model_obj = pool.get(model)
if not isinstance(model_obj, osv.osv.osv_memory):
logger.notifyChannel('init', netsvc.LOG_WARNING, 'object %s (%s) has no access rules!' % (model, name))
# Temporary warning while we remove access rights on osv_memory objects, as they have
# been replaced by owner-only access rights
cr.execute("""select distinct mod.model, mod.name from ir_model_access acc, ir_model mod where acc.model_id = mod.id""")
for (model, name) in cr.fetchall():
model_obj = pool.get(model)
if isinstance(model_obj, osv.osv.osv_memory):
logger.notifyChannel('init', netsvc.LOG_WARNING, 'In-memory object %s (%s) should not have explicit access rules!' % (model, name))
cr.execute("SELECT model from ir_model")
for (model,) in cr.fetchall():
@@ -879,11 +878,11 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
cr.execute('''delete from
ir_ui_menu
where
(id not in (select parent_id from ir_ui_menu where parent_id is not null))
(id not IN (select parent_id from ir_ui_menu where parent_id is not null))
and
(id not in (select res_id from ir_values where model='ir.ui.menu'))
(id not IN (select res_id from ir_values where model='ir.ui.menu'))
and
(id not in (select res_id from ir_model_data where model='ir.ui.menu'))''')
(id not IN (select res_id from ir_model_data where model='ir.ui.menu'))''')
cr.commit()
if not cr.rowcount:
break
@@ -3,6 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -25,7 +26,8 @@
'version': '1.2',
'category': 'Generic Modules/Base',
'description': """The kernel of OpenERP, needed for all installation.""",
'author': 'Tiny',
'author': 'OpenERP s.a.',
'maintainer': 'OpenERP s.a.',
'website': 'http://www.openerp.com',
'depends': [],
'init_xml': [
@@ -34,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': [
@@ -49,14 +50,15 @@
'module/module_report.xml',
'res/res_request_view.xml',
'res/res_lang_view.xml',
'res/res_company_view.xml',
'res/res_log_view.xml',
'res/partner/partner_report.xml',
'res/partner/partner_view.xml',
'res/partner/partner_wizard.xml',
'res/bank_view.xml',
'res/country_view.xml',
'res/res_currency_view.xml',
'res/res_currency_view.xml',
'res/partner/crm_view.xml',
'res/partner/wizard/partner_sms_send_view.xml',
'res/partner/partner_data.xml',
'res/ir_property_view.xml',
'security/base_security.xml',
@@ -64,7 +66,17 @@
'security/ir.model.access.csv'
],
'demo_xml': ['base_demo.xml', 'res/partner/partner_demo.xml', 'res/partner/crm_demo.xml','test/base_test.xml'],
'demo_xml': [
'base_demo.xml',
'res/partner/partner_demo.xml',
'res/partner/crm_demo.xml',
],
'test': [
'test/base_test.xml',
#'test/base_test.yml'
'test/test_context.xml',
'bug_lp541545.xml',
],
'installable': True,
'active': True,
'certificate': '0076807797149',
+12 -1
View File
@@ -1293,7 +1293,18 @@
<field name="currency_id" ref="INR"/>
<field eval="time.strftime('%Y-01-01')" name="name"/>
</record>
<record id="rateINR2001" model="res.currency.rate">
<field name="rate">0.631</field>
<field name="currency_id" ref="INR"/>
<field name="name">2001-01-01</field>
</record>
<record id="rateINR2002" model="res.currency.rate">
<field name="rate">0.632</field>
<field name="currency_id" ref="INR"/>
<field name="name">2002-01-01</field>
</record>
<record id="AUD" model="res.currency">
<field name="name">AUD</field>
<field name="code">AUD</field>
+3 -3
View File
@@ -1,17 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem icon="terp-administration" id="menu_administration" name="Administration" sequence="20"/>
<menuitem icon="terp-administration" id="menu_administration" name="Administration" sequence="50"/>
<menuitem icon="terp-administration" id="menu_administration_shortcut" parent="menu_administration" name="Custom Shortcuts" sequence="50"/>
<menuitem id="next_id_4" name="Low Level Objects"
parent="base.menu_administration" sequence="3"
groups="base.group_extended"/>
<menuitem id="menu_low_workflow" name="Workflow Items" parent="base.next_id_4"/>
<menuitem id="menu_custom" name="Customization"
parent="base.menu_administration" sequence="2"
groups="base.group_extended"/>
<menuitem id="menu_custom_action" name="Actions" parent="base.menu_custom" sequence="20"/>
<menuitem id="menu_custom_action" name="Actions" parent="base.menu_custom" groups="base.group_extended" sequence="20"/>
<menuitem id="menu_config" name="Configuration" parent="base.menu_administration" sequence="1"/>
<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"/>
@@ -23,5 +22,6 @@
groups="base.group_extended"/>
<menuitem id="menu_management" name="Modules Management" parent="base.menu_administration" sequence="10"
groups="base.group_extended"/>
<menuitem icon="terp-graph" id="reporting_menu" name="Reporting" sequence="45"/>
</data>
</openerp>
+31 -26
View File
@@ -6,7 +6,7 @@
Languages
======================
-->
<menuitem id="next_id_2" name="User Interface" parent="base.menu_custom"/>
<menuitem id="next_id_2" name="User Interface" parent="base.menu_custom" groups="base.group_extended"/>
<!--
======================
@@ -19,7 +19,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Groups">
<field colspan="4" name="name" select="1"/>
<field name="name" select="1"/>
<notebook colspan="4">
<page string="Users">
<field colspan="4" name="users" nolabel="1"/>
@@ -78,18 +78,21 @@
<form string="Users">
<notebook colspan="4">
<page string="Current Activity">
<field name="company_id" widget="selection" readonly="0" context="{'user_preference':True}"/>
<field name="company_id" widget="selection" readonly="0"
context="{'user_id': self, 'user_preference': 1}"/>
<field name="view" readonly="0"/>
<newline/>
<separator colspan="4" string="Preferences"/>
</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="password" password="True" readonly="0" colspan="4"/>
<label string="" colspan="1"/>
<label colspan="3" string="You must logout and login again after changing 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"/>
<field name="context_tz" completion="1" readonly="0"/>
<separator string="Email &amp; Signature" colspan="4"/>
<group colspan="4"><field name="user_email" widget="email"/></group>
<field colspan="4" name="signature" readonly="0" nolabel="1"/>
</page>
</notebook>
</form>
@@ -106,11 +109,12 @@
<field name="active"/>
<field name="login" select="1"/>
<field name="password" password="True"/>
<newline/>
<notebook colspan="4">
<page string="User">
<field name="address_id" select="1"/>
<field name="user_email" widget="email"/>
<field name="company_id" required="1"/>
<field name="company_id" required="1" context="{'user_id': self, 'user_preference': 1}"/>
<field name="action_id" required="True"/>
<field domain="[('usage','=','menu')]" name="menu_id" required="True"/>
<field name="context_lang"/>
@@ -143,6 +147,7 @@
<tree string="Users">
<field name="name"/>
<field name="login"/>
<field name="address_id" string="Address" />
<field name="company_id"/>
</tree>
</field>
@@ -156,7 +161,7 @@
<search string="Users">
<field name="name" select="1"/>
<field name="login" select="1"/>
<field name="address_id" select="1" string="Partner"/>
<field name="address_id" select="1" string="Address"/>
<field name="company_ids" select="1" string="Company"/>
</search>
</field>
@@ -285,22 +290,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>
+52 -52
View File
@@ -1,52 +1,52 @@
"country_id:id","name","code"
us,"Alabama","AL"
us,"Alaska","AK"
us,"Arizona","AZ"
us,"Arkansas","AR"
us,"California","CA"
us,"Colorado","CO"
us,"Connecticut","CT"
us,"Delaware","DE"
us,"District of Columbia","DC"
us,"Florida","FL"
us,"Georgia","GA"
us,"Hawaii","HI"
us,"Idaho","ID"
us,"Illinois","IL"
us,"Indiana","IN"
us,"Iowa","IA"
us,"Kansas","KS"
us,"Kentucky","KY"
us,"Louisiana","LA"
us,"Maine","ME"
us,"Montana","MT"
us,"Nebraska","NE"
us,"Nevada","NV"
us,"New Hampshire","NH"
us,"New Jersey","NJ"
us,"New Mexico","NM"
us,"New York","NY"
us,"North Carolina","NC"
us,"North Dakota","ND"
us,"Ohio","OH"
us,"Oklahoma","OK"
us,"Oregon","OR"
us,"Maryland","MD"
us,"Massachusetts","MA"
us,"Michigan","MI"
us,"Minnesota","MN"
us,"Mississippi","MS"
us,"Missouri","MO"
us,"Pennsylvania","PA"
us,"Rhode Island","RI"
us,"South Carolina","SC"
us,"South Dakota","SD"
us,"Tennessee","TN"
us,"Texas","TX"
us,"Utah","UT"
us,"Vermont","VT"
us,"Virginia","VA"
us,"Washington","WA"
us,"West Virginia","WV"
us,"Wisconsin","WI"
us,"Wyoming","WY"
"id","country_id:id","name","code"
state_us_1,us,"Alabama","AL"
state_us_2,us,"Alaska","AK"
state_us_3,us,"Arizona","AZ"
state_us_4,us,"Arkansas","AR"
state_us_5,us,"California","CA"
state_us_6,us,"Colorado","CO"
state_us_7,us,"Connecticut","CT"
state_us_8,us,"Delaware","DE"
state_us_9,us,"District of Columbia","DC"
state_us_10,us,"Florida","FL"
state_us_11,us,"Georgia","GA"
state_us_12,us,"Hawaii","HI"
state_us_13,us,"Idaho","ID"
state_us_14,us,"Illinois","IL"
state_us_15,us,"Indiana","IN"
state_us_16,us,"Iowa","IA"
state_us_17,us,"Kansas","KS"
state_us_18,us,"Kentucky","KY"
state_us_19,us,"Louisiana","LA"
state_us_20,us,"Maine","ME"
state_us_21,us,"Montana","MT"
state_us_22,us,"Nebraska","NE"
state_us_23,us,"Nevada","NV"
state_us_24,us,"New Hampshire","NH"
state_us_25,us,"New Jersey","NJ"
state_us_26,us,"New Mexico","NM"
state_us_27,us,"New York","NY"
state_us_28,us,"North Carolina","NC"
state_us_29,us,"North Dakota","ND"
state_us_30,us,"Ohio","OH"
state_us_31,us,"Oklahoma","OK"
state_us_32,us,"Oregon","OR"
state_us_33,us,"Maryland","MD"
state_us_34,us,"Massachusetts","MA"
state_us_35,us,"Michigan","MI"
state_us_36,us,"Minnesota","MN"
state_us_37,us,"Mississippi","MS"
state_us_38,us,"Missouri","MO"
state_us_39,us,"Pennsylvania","PA"
state_us_40,us,"Rhode Island","RI"
state_us_41,us,"South Carolina","SC"
state_us_42,us,"South Dakota","SD"
state_us_43,us,"Tennessee","TN"
state_us_44,us,"Texas","TX"
state_us_45,us,"Utah","UT"
state_us_46,us,"Vermont","VT"
state_us_47,us,"Virginia","VA"
state_us_48,us,"Washington","WA"
state_us_49,us,"West Virginia","WV"
state_us_50,us,"Wisconsin","WI"
state_us_51,us,"Wyoming","WY"
1 id country_id:id name code
2 state_us_1 us Alabama AL
3 state_us_2 us Alaska AK
4 state_us_3 us Arizona AZ
5 state_us_4 us Arkansas AR
6 state_us_5 us California CA
7 state_us_6 us Colorado CO
8 state_us_7 us Connecticut CT
9 state_us_8 us Delaware DE
10 state_us_9 us District of Columbia DC
11 state_us_10 us Florida FL
12 state_us_11 us Georgia GA
13 state_us_12 us Hawaii HI
14 state_us_13 us Idaho ID
15 state_us_14 us Illinois IL
16 state_us_15 us Indiana IN
17 state_us_16 us Iowa IA
18 state_us_17 us Kansas KS
19 state_us_18 us Kentucky KY
20 state_us_19 us Louisiana LA
21 state_us_20 us Maine ME
22 state_us_21 us Montana MT
23 state_us_22 us Nebraska NE
24 state_us_23 us Nevada NV
25 state_us_24 us New Hampshire NH
26 state_us_25 us New Jersey NJ
27 state_us_26 us New Mexico NM
28 state_us_27 us New York NY
29 state_us_28 us North Carolina NC
30 state_us_29 us North Dakota ND
31 state_us_30 us Ohio OH
32 state_us_31 us Oklahoma OK
33 state_us_32 us Oregon OR
34 state_us_33 us Maryland MD
35 state_us_34 us Massachusetts MA
36 state_us_35 us Michigan MI
37 state_us_36 us Minnesota MN
38 state_us_37 us Mississippi MS
39 state_us_38 us Missouri MO
40 state_us_39 us Pennsylvania PA
41 state_us_40 us Rhode Island RI
42 state_us_41 us South Carolina SC
43 state_us_42 us South Dakota SD
44 state_us_43 us Tennessee TN
45 state_us_44 us Texas TX
46 state_us_45 us Utah UT
47 state_us_46 us Vermont VT
48 state_us_47 us Virginia VA
49 state_us_48 us Washington WA
50 state_us_49 us West Virginia WV
51 state_us_50 us Wisconsin WI
52 state_us_51 us Wyoming WY
+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: 2010-04-17 03:49+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:49+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+16 -16
View File
@@ -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-04-21 04:53+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"PO-Revision-Date: 2010-05-17 05:31+0000\n"
"Last-Translator: Boris <boris.t.ivanov@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-04-22 03:42+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -83,7 +83,7 @@ msgstr "Създадени изгледи"
#. module: base
#: view:workflow.activity:0
msgid "Outgoing transitions"
msgstr "Изходящи промени"
msgstr "Изходящи преходи"
#. module: base
#: selection:ir.report.custom,frequency:0
@@ -1754,7 +1754,7 @@ msgstr "XSL"
#: code:addons/base/module/module.py:0
#, python-format
msgid "Can not upgrade module '%s'. It is not installed."
msgstr "Не може да бъде обновен модул '%s'. Той не е инсталиран."
msgstr "Модул '%s' не може да бъде обновен. Той не е инсталиран."
#. module: base
#: model:res.country,name:base.cu
@@ -2039,7 +2039,7 @@ msgstr "Извличане на език"
#. module: base
#: selection:maintenance.contract.wizard,state:0
msgid "Unvalidated"
msgstr "Непроверен"
msgstr "Невалидирано"
#. module: base
#: model:ir.ui.menu,name:base.next_id_9
@@ -2066,7 +2066,7 @@ msgstr "Също така може да вмъкнете \".po\" файлове.
#: code:addons/base/maintenance/maintenance.py:0
#, python-format
msgid "Unable to find a valid contract"
msgstr "Не може да се намери валиден договор"
msgstr "Не е намерeн валиден договор"
#. module: base
#: code:addons/base/ir/ir_actions.py:0
@@ -5002,7 +5002,7 @@ msgstr "Python код"
#: code:addons/base/module/wizard/wizard_module_import.py:0
#, python-format
msgid "Can not create the module file: %s !"
msgstr "Модулния файл: %s, не можеда да бъде създаден !"
msgstr "Модулния файл: %s, не можеда да бъде създаден !"
#. module: base
#: model:ir.module.module,description:base.module_meta_information
@@ -5028,7 +5028,7 @@ msgstr "Откажи"
#: code:addons/base/ir/ir_actions.py:0
#, python-format
msgid "Please specify server option --smtp-from !"
msgstr "Моля укажете опцията на сървъра --smtp-from !"
msgstr "Моля укажете опция на сървъра --smtp-from !"
#. module: base
#: selection:wizard.module.lang.export,format:0
@@ -6225,7 +6225,7 @@ msgstr "Извличане на файл с превод"
#. module: base
#: field:ir.ui.view_sc,user_id:0
msgid "User Ref."
msgstr "Справка за потребител"
msgstr "Потребителска справка"
#. module: base
#: model:ir.ui.menu,name:base.menu_base_config
@@ -6812,7 +6812,7 @@ msgstr "RML съдържание"
#. module: base
#: view:workflow.activity:0
msgid "Incoming transitions"
msgstr "Входящи промени"
msgstr "Входящи преходи"
#. module: base
#: model:res.country,name:base.cn
@@ -7277,7 +7277,7 @@ msgstr "Оригинал"
#. module: base
#: help:res.partner.address,partner_id:0
msgid "Keep empty for a private address, not related to partner."
msgstr "Оставете празно за личен адрес несвързан с партньора"
msgstr "Оставете празно за личен адрес нямащ отношение към партньора."
#. module: base
#: model:res.country,name:base.vu
@@ -7296,8 +7296,8 @@ msgid ""
"Save this document to a .tgz file. This archive containt UTF-8 %s files and "
"may be uploaded to launchpad."
msgstr ""
"Запази документа като .tgz файл. Този архив съдържа %s UTF-8 файлове и може "
"да бъде качен в launchpad."
"Запазете документа като .tgz файл. Този архив съдържа %s UTF-8 файлове и "
"може да бъде качен в launchpad."
#. module: base
#: wizard_button:module.upgrade,end,config:0
@@ -7728,7 +7728,7 @@ msgid ""
"invoice, then `object.invoice_address_id.mobile` is the field which gives "
"the correct mobile number"
msgstr ""
"Оказва полетата които ще се използват за доставяне на мобилен номер, напр., "
"Указва полетата които ще се използват за доставяне на мобилен номер, напр., "
"когато изберете фактура, тогава 'object.invoice_address_id.mobile' е полето "
"което дава правилния мобилен номер"
@@ -8080,7 +8080,7 @@ msgstr "полски / Język polski"
#. module: base
#: field:ir.exports,name:0
msgid "Export Name"
msgstr "Име на извлечането"
msgstr "Име на изнасянето"
#. module: base
#: help:res.partner.address,type:0
+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: 2010-04-17 03:49+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+2 -2
View File
@@ -8,13 +8,13 @@ msgstr ""
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
"PO-Revision-Date: 2010-05-02 05:54+0000\n"
"Last-Translator: Jordi Esteve - http://www.zikzakmedia.com "
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
"<jesteve@zikzakmedia.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-05-03 04:02+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+4 -4
View File
@@ -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-01-04 06:02+0000\n"
"Last-Translator: Kuvaly [LCT] <kuvaly@seznam.cz>\n"
"PO-Revision-Date: 2010-06-06 04:19+0000\n"
"Last-Translator: Vladimír Burian <vladimir.burian@email.cz>\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-04-17 03:49+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -3880,7 +3880,7 @@ msgstr "Kontakty"
#. module: base
#: model:res.country,name:base.fo
msgid "Faroe Islands"
msgstr "Farské ostrovy"
msgstr "Faerské ostrovy"
#. module: base
#: model:ir.actions.wizard,name:base.wizard_upgrade
+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: 2010-04-17 03:49+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:50+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+1 -1
View File
@@ -12,7 +12,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 03:50+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"X-Poedit-Country: GREECE\n"
"X-Poedit-Language: Greek\n"
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -8,13 +8,13 @@ msgstr ""
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
"PO-Revision-Date: 2010-05-02 05:52+0000\n"
"Last-Translator: Jordi Esteve - http://www.zikzakmedia.com "
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
"<jesteve@zikzakmedia.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-05-03 04:03+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:52+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:50+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:49+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+1 -1
View File
@@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 03:51+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"X-Poedit-Country: IRAN, ISLAMIC REPUBLIC OF\n"
"X-Poedit-Language: Persian\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: 2010-04-17 03:50+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-26 03:40+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+40 -40
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
"PO-Revision-Date: 2009-11-27 17:04+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-06-21 04:04+0000\n"
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
"Language-Team: Galician <gl@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-04-17 03:50+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -69,32 +69,32 @@ msgstr ""
#. module: base
#: selection:module.lang.install,init,lang:0
msgid "Hungarian / Magyar"
msgstr ""
msgstr "Húngaro / Magyar"
#. module: base
#: field:ir.actions.server,wkf_model_id:0
msgid "Workflow On"
msgstr ""
msgstr "Fluxo de traballo en"
#. module: base
#: view:ir.module.module:0
msgid "Created Views"
msgstr ""
msgstr "Vistas creadas"
#. module: base
#: view:workflow.activity:0
msgid "Outgoing transitions"
msgstr ""
msgstr "Transicións saintes"
#. module: base
#: selection:ir.report.custom,frequency:0
msgid "Yearly"
msgstr ""
msgstr "Anual"
#. module: base
#: field:ir.actions.act_window,target:0
msgid "Target Window"
msgstr ""
msgstr "Ventana destino"
#. module: base
#: model:ir.actions.todo,note:base.config_wizard_simple_view
@@ -116,14 +116,14 @@ msgstr ""
#. module: base
#: model:res.country,name:base.kr
msgid "South Korea"
msgstr ""
msgstr "Corea do Sur"
#. module: base
#: model:ir.actions.act_window,name:base.action_workflow_transition_form
#: model:ir.ui.menu,name:base.menu_workflow_transition
#: view:workflow.activity:0
msgid "Transitions"
msgstr ""
msgstr "Transicións"
#. module: base
#: model:ir.model,name:base.model_ir_ui_view_custom
@@ -133,7 +133,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.sz
msgid "Swaziland"
msgstr ""
msgstr "Suacilandia"
#. module: base
#: model:ir.model,name:base.model_ir_actions_report_custom
@@ -144,12 +144,12 @@ msgstr ""
#. module: base
#: selection:ir.ui.menu,icon:0
msgid "STOCK_CANCEL"
msgstr ""
msgstr "STOCK_CANCEL"
#. module: base
#: field:ir.report.custom,sortby:0
msgid "Sorted By"
msgstr ""
msgstr "Ordeado por"
#. module: base
#: field:ir.sequence,number_increment:0
@@ -176,33 +176,33 @@ msgstr ""
#: code:addons/base/module/wizard/wizard_export_lang.py:0
#, python-format
msgid "new"
msgstr ""
msgstr "novo"
#. module: base
#: selection:ir.ui.menu,icon:0
msgid "STOCK_GOTO_TOP"
msgstr ""
msgstr "STOCK_GOTO_TOP"
#. module: base
#: field:ir.actions.report.custom,multi:0
#: field:ir.actions.report.xml,multi:0
msgid "On multiple doc."
msgstr ""
msgstr "En múltiples doc."
#. module: base
#: field:ir.module.category,module_nr:0
msgid "Number of Modules"
msgstr ""
msgstr "Número de módulos"
#. module: base
#: field:res.partner.bank.type.field,size:0
msgid "Max. Size"
msgstr ""
msgstr "Tamaño máx."
#. module: base
#: field:res.partner.address,name:0
msgid "Contact Name"
msgstr ""
msgstr "Nome de contacto"
#. module: base
#: code:addons/base/module/wizard/wizard_export_lang.py:0
@@ -215,7 +215,7 @@ msgstr ""
#. module: base
#: selection:ir.ui.menu,icon:0
msgid "STOCK_DELETE"
msgstr ""
msgstr "STOCK_DELETE"
#. module: base
#: code:addons/base/ir/ir_model.py:0
@@ -232,12 +232,12 @@ msgstr ""
#. module: base
#: selection:res.request,state:0
msgid "active"
msgstr ""
msgstr "activo"
#. module: base
#: field:ir.actions.wizard,wiz_name:0
msgid "Wizard Name"
msgstr ""
msgstr "Nome do asistente"
#. module: base
#: view:res.lang:0
@@ -247,7 +247,7 @@ msgstr ""
#. module: base
#: selection:ir.ui.menu,icon:0
msgid "STOCK_GOTO_FIRST"
msgstr ""
msgstr "STOCK_GOTO_FIRST"
#. module: base
#: help:ir.rule.group,rules:0
@@ -290,14 +290,14 @@ msgstr ""
#: field:ir.model.access,group_id:0
#: field:ir.rule,rule_group:0
msgid "Group"
msgstr ""
msgstr "Grupo"
#. module: base
#: field:ir.exports.line,name:0
#: field:ir.translation,name:0
#: field:res.partner.bank.type.field,name:0
msgid "Field Name"
msgstr ""
msgstr "Nome do campo"
#. module: base
#: model:ir.actions.act_window,name:base.open_module_tree_uninstall
@@ -308,7 +308,7 @@ msgstr ""
#. module: base
#: selection:ir.actions.report.xml,report_type:0
msgid "txt"
msgstr ""
msgstr "txt"
#. module: base
#: wizard_view:server.action.create,init:0
@@ -319,12 +319,12 @@ msgstr ""
#. module: base
#: selection:ir.actions.todo,type:0
msgid "Configure"
msgstr ""
msgstr "Configurar"
#. module: base
#: model:res.country,name:base.tv
msgid "Tuvalu"
msgstr ""
msgstr "Tuvalu"
#. module: base
#: selection:ir.model,state:0
@@ -335,18 +335,18 @@ msgstr ""
#. module: base
#: field:res.lang,date_format:0
msgid "Date Format"
msgstr ""
msgstr "Formato de data"
#. module: base
#: field:res.bank,email:0
#: field:res.partner.address,email:0
msgid "E-Mail"
msgstr ""
msgstr "Correo electrónico"
#. module: base
#: model:res.country,name:base.an
msgid "Netherlands Antilles"
msgstr ""
msgstr "Antillas Holandesas"
#. module: base
#: code:addons/base/res/res_user.py:0
@@ -359,7 +359,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.gf
msgid "French Guyana"
msgstr ""
msgstr "Guayana francesa"
#. module: base
#: field:ir.ui.view.custom,ref_id:0
@@ -369,7 +369,7 @@ msgstr ""
#. module: base
#: selection:module.lang.install,init,lang:0
msgid "Bosnian / bosanski jezik"
msgstr ""
msgstr "Bosnia / Bosanski jezik"
#. module: base
#: help:ir.actions.report.xml,attachment_use:0
@@ -386,12 +386,12 @@ msgstr ""
#. module: base
#: selection:ir.ui.menu,icon:0
msgid "STOCK_MEDIA_REWIND"
msgstr ""
msgstr "STOCK_MEDIA_REWIND"
#. module: base
#: field:ir.actions.todo,note:0
msgid "Text"
msgstr ""
msgstr "Texto"
#. module: base
#: field:res.country,name:0
@@ -424,7 +424,7 @@ msgstr ""
#: selection:workflow.activity,join_mode:0
#: selection:workflow.activity,split_mode:0
msgid "Xor"
msgstr ""
msgstr "Xor"
#. module: base
#: view:res.partner:0
@@ -435,19 +435,19 @@ msgstr ""
#: view:ir.actions.wizard:0
#: field:wizard.ir.model.menu.create.line,wizard_id:0
msgid "Wizard"
msgstr ""
msgstr "Asistente"
#. module: base
#: selection:ir.ui.menu,icon:0
msgid "STOCK_CUT"
msgstr ""
msgstr "STOCK_CUT"
#. module: base
#: model:ir.actions.act_window,name:base.ir_action_wizard
#: view:ir.actions.wizard:0
#: model:ir.ui.menu,name:base.menu_ir_action_wizard
msgid "Wizards"
msgstr ""
msgstr "Asistentes"
#. module: base
#: selection:res.config.view,view:0
+4 -4
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
"PO-Revision-Date: 2010-04-05 04:29+0000\n"
"Last-Translator: Ddorda <d.dorda@gmail.com>\n"
"PO-Revision-Date: 2010-07-04 04:21+0000\n"
"Last-Translator: Ilan <ilan@fonz.net>\n"
"Language-Team: Hebrew <he@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-04-17 03:50+0000\n"
"X-Launchpad-Export-Date: 2010-07-05 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -315,7 +315,7 @@ msgstr "מודולים לא מותקנים"
#. module: base
#: selection:ir.actions.report.xml,report_type:0
msgid "txt"
msgstr ""
msgstr "txt"
#. module: base
#: wizard_view:server.action.create,init:0
+5 -5
View File
@@ -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-05-13 04:54+0000\n"
"Last-Translator: goranc <goranc@gmail.com>\n"
"PO-Revision-Date: 2010-07-06 04:13+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-05-14 04:54+0000\n"
"X-Launchpad-Export-Date: 2010-07-07 03:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"Language: hr\n"
@@ -1381,7 +1381,7 @@ msgstr "Gruzija"
#. module: base
#: model:res.country,name:base.pl
msgid "Poland"
msgstr ""
msgstr "Poljska"
#. module: base
#: selection:ir.module.module,state:0
@@ -2703,7 +2703,7 @@ msgstr ""
#: help:ir.values,key2:0
msgid ""
"The kind of action or button in the client side that will trigger the action."
msgstr ""
msgstr "Vrsta akcije ili gumba na klijentskoj strani koja će okinuti akciju."
#. module: base
#: selection:ir.ui.menu,icon:0
+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: 2010-04-17 03:50+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:51+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:50+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+7 -7
View File
@@ -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-05-13 09:24+0000\n"
"Last-Translator: Carlo - didotech.com <Unknown>\n"
"PO-Revision-Date: 2010-05-17 05:31+0000\n"
"Last-Translator: eLBati - albatos.com <lorenzo.battistini@albatos.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-05-14 04:54+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -901,7 +901,7 @@ msgstr "Relazione"
#. module: base
#: field:ir.model.access,perm_read:0
msgid "Read Access"
msgstr "Accesso di Lettura"
msgstr "Accesso in lettura"
#. module: base
#: model:ir.model,name:base.model_ir_exports
@@ -3875,7 +3875,7 @@ msgstr "Esegui Conteggio"
#. module: base
#: field:ir.model.access,perm_create:0
msgid "Create Access"
msgstr "Crea Accesso"
msgstr "Accesso in creazione"
#. module: base
#: field:res.partner.address,state_id:0
@@ -5506,7 +5506,7 @@ msgstr "Sig.rina"
#. module: base
#: field:ir.model.access,perm_write:0
msgid "Write Access"
msgstr "Accesso Scrittura"
msgstr "Accesso in scrittura"
#. module: base
#: field:res.bank,city:0
@@ -7411,7 +7411,7 @@ msgstr ">"
#. module: base
#: field:ir.model.access,perm_unlink:0
msgid "Delete Permission"
msgstr "Cancella Autorizzazione"
msgstr "Permesso di cancellazione"
#. module: base
#: model:ir.model,name:base.model_multi_company_default
+2 -2
View File
@@ -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-05-13 04:56+0000\n"
"PO-Revision-Date: 2010-07-06 04:09+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-05-14 04:54+0000\n"
"X-Launchpad-Export-Date: 2010-07-07 03:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:51+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:51+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+28 -28
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
"PO-Revision-Date: 2010-01-04 06:03+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-05-19 12:29+0000\n"
"Last-Translator: Olivier Dony (OpenERP) <Unknown>\n"
"Language-Team: Latvian <lv@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-04-17 03:51+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -176,7 +176,7 @@ msgstr "ir.report.custom.fields"
#. module: base
#: view:res.partner:0
msgid "Search Partner"
msgstr ""
msgstr "Meklēt Partneri"
#. module: base
#: code:addons/base/module/wizard/wizard_export_lang.py:0
@@ -419,7 +419,7 @@ msgstr "Kolumbija"
#. module: base
#: view:ir.module.module:0
msgid "Schedule Upgrade"
msgstr ""
msgstr "Ieplānot Jauninājumus"
#. module: base
#: field:ir.actions.report.custom,report_id:0
@@ -593,7 +593,7 @@ msgstr ","
#. module: base
#: view:res.partner:0
msgid "My Partners"
msgstr ""
msgstr "Mani Partneri"
#. module: base
#: model:res.country,name:base.es
@@ -745,7 +745,7 @@ msgstr "Irāna"
#: model:ir.actions.act_window,name:base.res_request-act
#: model:ir.ui.menu,name:base.menu_res_request_act
msgid "My Requests"
msgstr ""
msgstr "Mani Pieprasījumi"
#. module: base
#: field:ir.sequence,name:0
@@ -1009,7 +1009,7 @@ msgstr "STOCK_COPY"
#: code:addons/base/ir/ir_model.py:0
#, python-format
msgid "Model %s Does not Exist !"
msgstr ""
msgstr "Modelis %s neeksistē !"
#. module: base
#: code:addons/base/module/module.py:0
@@ -1137,7 +1137,7 @@ msgstr "Lietotāja Atskaite"
#: code:addons/base/res/res_user.py:0
#, python-format
msgid " (copy)"
msgstr ""
msgstr " (kopija)"
#. module: base
#: view:ir.sequence:0
@@ -1303,7 +1303,7 @@ msgstr "Copy text \t STOCK_PROPERTIES"
#. module: base
#: view:res.partner.address:0
msgid "Search Contact"
msgstr ""
msgstr "Meklēt Kontaktu"
#. module: base
#: view:ir.module.module:0
@@ -1484,7 +1484,7 @@ msgstr "Esošā Likme"
#. module: base
#: selection:module.lang.install,init,lang:0
msgid "Greek / Ελληνικά"
msgstr ""
msgstr "Grieķu / Ελληνικά"
#. module: base
#: view:ir.values:0
@@ -1565,7 +1565,7 @@ msgstr "Epasta Adrese"
#. module: base
#: selection:module.lang.install,init,lang:0
msgid "French (BE) / Français (BE)"
msgstr ""
msgstr "Franču (BE) / Français (BE)"
#. module: base
#: code:addons/base/ir/ir_model.py:0
@@ -1603,7 +1603,7 @@ msgstr "Lauka Sasaistes"
#: model:ir.actions.act_window,name:base.res_request-closed
#: model:ir.ui.menu,name:base.next_id_12_close
msgid "My Closed Requests"
msgstr ""
msgstr "Mani Slēgie Pieprasījumi"
#. module: base
#: model:ir.ui.menu,name:base.menu_custom
@@ -1861,7 +1861,7 @@ msgstr "Pieejas Kontrole"
#: view:ir.module.module:0
#: field:ir.module.module,dependencies_id:0
msgid "Dependencies"
msgstr "Atkarīgie objekti"
msgstr "Atkarīgs no"
#. module: base
#: field:ir.report.custom.fields,bgcolor:0
@@ -1988,7 +1988,7 @@ msgstr "Modulis"
#: model:ir.actions.act_window,name:base.action_res_bank_form
#: model:ir.ui.menu,name:base.menu_action_res_bank_form
msgid "Bank List"
msgstr ""
msgstr "Banku Saraksts"
#. module: base
#: field:ir.attachment,description:0
@@ -2401,7 +2401,7 @@ msgstr ""
#: model:ir.actions.act_window,name:base.action_partner_customer_form
#: view:res.partner:0
msgid "Customers"
msgstr ""
msgstr "Klienti"
#. module: base
#: model:res.country,name:base.au
@@ -2603,7 +2603,7 @@ msgstr "STOCK_SAVE_AS"
#. module: base
#: selection:ir.translation,type:0
msgid "SQL Constraint"
msgstr ""
msgstr "SQL Ierobežojums"
#. module: base
#: field:ir.actions.server,srcmodel_id:0
@@ -2669,7 +2669,7 @@ msgstr "%c - Atbilstošais datuma un laika attēlojums."
#. module: base
#: selection:module.lang.install,init,lang:0
msgid "Finland / Suomi"
msgstr ""
msgstr "Somu / Suomi"
#. module: base
#: model:res.country,name:base.bo
@@ -2931,7 +2931,7 @@ msgstr "Likmes"
#. module: base
#: selection:module.lang.install,init,lang:0
msgid "Albanian / Shqipëri"
msgstr ""
msgstr "Albāņu / Shqipëri"
#. module: base
#: model:res.country,name:base.sy
@@ -3192,7 +3192,7 @@ msgstr "Demo dati"
#. module: base
#: selection:module.lang.install,init,lang:0
msgid "English (UK)"
msgstr ""
msgstr "Angļu (UK)"
#. module: base
#: model:res.country,name:base.aq
@@ -3217,7 +3217,7 @@ msgstr "Tīmeklis"
#. module: base
#: selection:module.lang.install,init,lang:0
msgid "English (CA)"
msgstr ""
msgstr "Angļu (CA)"
#. module: base
#: field:res.partner.event,planned_revenue:0
@@ -3460,7 +3460,7 @@ msgstr "Partnera Adreses"
#. module: base
#: selection:module.lang.install,init,lang:0
msgid "Indonesian / Bahasa Indonesia"
msgstr ""
msgstr "Indonēziešu / Bahasa Indonesia"
#. module: base
#: model:res.country,name:base.cv
@@ -3625,7 +3625,7 @@ msgstr "Izveidot darbību"
#. module: base
#: selection:ir.actions.report.xml,report_type:0
msgid "HTML from HTML"
msgstr ""
msgstr "HTML no HTML"
#. module: base
#: selection:ir.actions.report.xml,report_type:0
@@ -4086,7 +4086,7 @@ msgstr "Faila Formāts"
#. module: base
#: field:res.lang,iso_code:0
msgid "ISO code"
msgstr ""
msgstr "ISO kods"
#. module: base
#: model:ir.model,name:base.model_res_config_view
@@ -4222,7 +4222,7 @@ msgstr "Izmainīt manus Uzstādījumus"
#. module: base
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Procesa definīcijā nepareizs modeļa nosaukums."
#. module: base
#: wizard_field:res.partner.sms_send,init,text:0
@@ -4344,7 +4344,7 @@ msgstr "Objekta Lauks"
#. module: base
#: selection:module.lang.install,init,lang:0
msgid "French (CH) / Français (CH)"
msgstr ""
msgstr "Franču (CH) / Français (CH)"
#. module: base
#: selection:ir.ui.menu,icon:0
@@ -4418,7 +4418,7 @@ msgstr "Atcelt atinstalāciju"
#: view:res.partner:0
#: view:res.partner.address:0
msgid "Communication"
msgstr ""
msgstr "Saziņa"
#. module: base
#: model:ir.model,name:base.model_ir_server_object_lines
@@ -6981,7 +6981,7 @@ msgstr "(year)="
#. module: base
#: rml:ir.module.reference:0
msgid "Dependencies :"
msgstr "Atkarīgie objekti:"
msgstr "Atkarīgs no:"
#. module: base
#: selection:ir.ui.menu,icon:0
+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: 2010-04-17 03:51+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:51+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:49+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+3 -3
View File
@@ -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-04-13 04:19+0000\n"
"PO-Revision-Date: 2010-06-01 04:46+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\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-04-17 03:52+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -873,7 +873,7 @@ msgstr "Aby eksportować nowy język, nie wybieraj języka."
#. module: base
#: model:res.country,name:base.md
msgid "Moldavia"
msgstr ""
msgstr "Mołdawia"
#. module: base
#: view:ir.module.module:0
+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: 2010-04-17 03:52+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+8 -8
View File
@@ -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-03-17 05:16+0000\n"
"Last-Translator: Valentin Caragea <carageav@gmail.com>\n"
"PO-Revision-Date: 2010-06-07 04:16+0000\n"
"Last-Translator: filsys <office@filsystem.ro>\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-04-17 03:52+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -774,12 +774,12 @@ msgstr "Uganda"
#. module: base
#: model:res.country,name:base.ne
msgid "Niger"
msgstr ""
msgstr "Niger"
#. module: base
#: model:res.country,name:base.ba
msgid "Bosnia-Herzegovina"
msgstr ""
msgstr "Bosnia-Herțegovina"
#. module: base
#: field:ir.report.custom.fields,alignment:0
@@ -789,7 +789,7 @@ msgstr "Aliniere"
#. module: base
#: selection:ir.rule,operator:0
msgid ">="
msgstr ""
msgstr ">="
#. module: base
#: view:res.lang:0
@@ -813,12 +813,12 @@ msgstr ""
#: field:ir.module.module,website:0
#: field:res.partner,website:0
msgid "Website"
msgstr ""
msgstr "Website"
#. module: base
#: field:ir.rule.group,rules:0
msgid "Tests"
msgstr ""
msgstr "Teste"
#. module: base
#: view:ir.module.repository:0
+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: 2010-04-17 03:52+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:52+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:52+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:49+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:52+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+2 -2
View File
@@ -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-05-13 04:57+0000\n"
"PO-Revision-Date: 2010-07-06 04:14+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-05-14 04:54+0000\n"
"X-Launchpad-Export-Date: 2010-07-07 03:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+2 -2
View File
@@ -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-05-13 04:57+0000\n"
"PO-Revision-Date: 2010-07-06 04:08+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-05-14 04:54+0000\n"
"X-Launchpad-Export-Date: 2010-07-07 03:39+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+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: 2010-04-17 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+5 -5
View File
@@ -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-05-13 04:57+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"PO-Revision-Date: 2010-07-06 04:12+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-05-14 04:55+0000\n"
"X-Launchpad-Export-Date: 2010-07-07 03:39+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -3156,7 +3156,7 @@ msgstr "网页"
#. module: base
#: selection:module.lang.install,init,lang:0
msgid "English (CA)"
msgstr "英语(加拿大)"
msgstr "英语(加拿大)"
#. module: base
#: field:res.partner.event,planned_revenue:0
@@ -6656,7 +6656,7 @@ msgstr "职能名称"
#. module: base
#: view:maintenance.contract.wizard:0
msgid "_Cancel"
msgstr "取消(_C)"
msgstr "取消(_C)"
#. module: base
#: model:res.country,name:base.cy
+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: 2010-04-17 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+98 -43
View File
@@ -18,9 +18,6 @@
<field name="model" select="1" required="1"/>
<field name="res_id"/>
<field name="key2" select="2" required="1"/>
<separator string="Values for Event Type" colspan="2"/>
<label string="client_action_multi, client_action_relate" colspan="2"/>
<label string="tree_but_action, client_print_multi" colspan="2"/>
</group>
<group col="2" colspan="2">
<separator string="Action To Launch" colspan="2"/>
@@ -230,7 +227,7 @@
</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"/>
<!-- Filters form view-->
<record id="ir_filters_view_form" model="ir.ui.view">
@@ -248,9 +245,9 @@
</form>
</field>
</record>
<!-- Filters tree view-->
<record id="ir_filters_view_tree" model="ir.ui.view">
<field name="name">ir.filters.tree</field>
<field name="model">ir.filters</field>
@@ -265,7 +262,7 @@
</tree>
</field>
</record>
<!-- Filters action-->
<record id="actions_ir_filters_view" model="ir.actions.act_window">
@@ -275,7 +272,7 @@
<field name="view_type">form</field>
<field name="view_id" ref="ir_filters_view_tree"/>
</record>
<!-- Filters view menu-->
<menuitem parent="base.next_id_6" name="Filters"
@@ -609,13 +606,21 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Views">
<field name="name" select="1"/>
<field name="type" select="1"/>
<field name="model" select="1"/>
<field name="field_parent"/>
<field name="priority"/>
<field name="inherit_id" select="1"/>
<field colspan="4" name="arch"/>
<group colspan="2" col="2">
<separator string="General" colspan="2"/>
<field name="name" select="1"/>
<field name="type" select="1"/>
<field name="model" select="1"/>
<field name="priority"/>
</group>
<group colspan="2" col="2">
<separator string="Advanced" colspan="2"/>
<field name="field_parent"/>
<field name="inherit_id" select="1"/>
<field name="xml_id" select="1"/>
</group>
<separator string="View architecture" colspan="4"/>
<field colspan="4" nolabel="1" name="arch"/>
</form>
</field>
</record>
@@ -628,9 +633,10 @@
<field name="name"/>
<field name="type"/>
<field name="model"/>
<field name="xml_id"/>
<field name="inherit_id"/>
<field name="priority"/>
<field name="field_parent"/>
<field name="priority"/>
</tree>
</field>
</record>
@@ -649,35 +655,37 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Attachments">
<group colspan="4" col="6">
<group colspan="4" col="2">
<field name="name" select="1" />
<field name="create_uid" select="2"/>
<field name="create_date" select="2"/>
</group>
<notebook colspan="4">
<page string="Attachment">
<group col="2" colspan="2">
<separator string="Data" colspan="2"/>
<group col="4" colspan="4">
<separator string="Data" colspan="2"/>
<field name="type"/>
<newline />
<group col="2" colspan="4" attrs="{'invisible':[('type','=','url')]}">
<field name="datas" filename="datas_fname"/>
<field name="datas_fname" select="1"/>
</group>
<group col="2" colspan="4" attrs="{'invisible':[('type','=','binary')]}">
<field name="url" widget="url"/>
</group>
</group>
<group col="2" colspan="2">
<separator string="Attached To" colspan="2"/>
<field name="res_model" select="2"/>
<field name="res_id"/>
<field name="res_name"/>
</group>
<separator string="Preview" colspan="4"/>
<field
name="preview"
widget="picture"
readonly="1"
nolabel="1"
colspan="4"
img_height="400"
img_width="800"/>
<group col="2" groups="base.group_extended">
<separator string="Created" colspan="2"/>
<field name="create_uid" select="2"/>
<field name="create_date" select="2"/>
</group>
</page>
<page string="Notes">
<field colspan="4" name="description" nolabel="1"/>
<field name="description" nolabel="1" colspan="4"/>
</page>
</notebook>
</form>
@@ -816,6 +824,7 @@
<page string="Object">
<field name="name" select="1"/>
<field name="model" select="1"/>
<field name="osv_memory" select="1"/>
<separator colspan="4" string="Fields"/>
<field colspan="4" context="{'manual':True}" name="field_id" nolabel="1">
<tree string="Fields Description">
@@ -951,6 +960,39 @@
</field>
</record>
<record model="ir.ui.view" id="view_model_data_form">
<field name="name">ir.model.data.form</field>
<field name="model">ir.model.data</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Module data">
<field name="module" select="1" />
<field name="name" select="1" />
<field name="model" select="1" />
<field name="res_id" select="1" />
<field name="noupdate" select="2" />
<field name="date_update" />
<field name="date_init" />
</form>
</field>
</record>
<record id="view_model_data_list" model="ir.ui.view">
<field name="name">ir.model.data.list</field>
<field name="model">ir.model.data</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Module Data">
<field name="module"/>
<field name="name"/>
<field name="model" select="1" />
<field name="res_id"/>
<field name="noupdate"/>
</tree>
</field>
</record>
<record id="action_model_model" model="ir.actions.act_window">
<field name="name">Objects</field>
<field name="res_model">ir.model</field>
@@ -958,7 +1000,7 @@
<field name="context">{'manual':True}</field>
<field name="view_id" ref="view_model_tree"/>
</record>
<menuitem id="next_id_9" name="Database Structure" parent="base.menu_custom"/>
<menuitem id="next_id_9" name="Database Structure" parent="base.menu_custom" groups="base.group_extended"/>
<menuitem action="action_model_model" id="ir_model_model_menu" parent="next_id_9"/>
<record id="action_model_fields" model="ir.actions.act_window">
@@ -970,6 +1012,15 @@
</record>
<menuitem action="action_model_fields" id="ir_model_model_fields" parent="base.next_id_9"/>
<record id="action_model_data" model="ir.actions.act_window">
<field name="name">Module data</field>
<field name="res_model">ir.model.data</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_model_data_list"/>
</record>
<menuitem action="action_model_data" id="ir_model_data_menu" parent="base.next_id_9"
groups="base.group_extended"/>
<!-- Translations -->
<record id="view_translation_search" model="ir.ui.view">
@@ -1204,11 +1255,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"/>
@@ -1229,7 +1275,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>
@@ -1302,14 +1357,14 @@
<field name="subject" colspan="4" attrs="{'required':[('state','=','email')]}"/>
<field name="message" select="2" colspan="4" attrs="{'required':[('state','=','email')]}"/>
<newline/>
<label colspan="4" string="Access all the fields related to the current object using expression in double brackets, i.e.[[ object.partner_id.name ]]" align="0.0"/>
<label colspan="4" string="Access all the fields related to the current object using expressions, i.e. object.partner_id.name " align="0.0"/>
</page>
<page string="SMS Configuration" attrs="{'invisible':[('state','!=','sms')]}">
<separator colspan="4" string="SMS Configuration"/>
<field name="mobile" domain="[('model_id','=',model_id)]" attrs="{'required':[('state','=','sms')]}"/>
<field name="sms" colspan="4" attrs="{'required':[('state','=','sms')]}"/>
<newline/>
<label colspan="4" string="Access all the fields related to the current object using expression in double brackets, i.e. [[ object.partner_id.name ]]" align="0.0"/>
<label colspan="4" string="Access all the fields related to the current object using expressions, i.e. object.partner_id.name " align="0.0"/>
</page>
<page string="Create / Write / Copy" attrs="{'invisible':[('state','!=','object_create'), ('state','!=','object_write'), ('state','!=','object_copy')]}">
<separator colspan="4" string="Fields Mapping"/>
@@ -1426,15 +1481,15 @@
</field>
</record>
<record id="act_ir_actions_todo_form" model="ir.actions.act_window">
<field name="name">List of Configuration Wizards</field>
<field name="name">Configuration Wizards</field>
<field name="res_model">ir.actions.todo</field>
<field name="view_id" ref="ir_actions_todo_tree"/>
<field name="view_type">form</field>
</record>
<menuitem id="next_id_11" name="Configuration Wizards" parent="base.menu_config" sequence="1"/>
<menuitem action="act_ir_actions_todo_form" id="menu_ir_actions_todo_form" parent="next_id_11"
groups="base.group_extended"/>
<menuitem action="act_ir_actions_todo_form" id="menu_ir_actions_todo_form"
parent="next_id_11" groups="base.group_extended" sequence="20"/>
<record id="action_start_configurator" model="ir.actions.server">
<field name="name">Launch Configuration Wizards</field>
+40 -25
View File
@@ -20,6 +20,7 @@
##############################################################################
from osv import fields,osv
from tools.safe_eval import safe_eval as eval
import tools
import time
from tools.config import config
@@ -225,13 +226,19 @@ class act_window(osv.osv):
'name': fields.char('Action Name', size=64, translate=True),
'type': fields.char('Action Type', size=32, required=True),
'view_id': fields.many2one('ir.ui.view', 'View Ref.', ondelete='cascade'),
'domain': fields.char('Domain Value', size=250),
'context': fields.char('Context Value', size=250),
'res_model': fields.char('Object', size=64),
'src_model': fields.char('Source Object', size=64),
'domain': fields.char('Domain Value', size=250,
help="Optional domain filtering of the destination data, as a Python expression"),
'context': fields.char('Context Value', size=250, required=True,
help="Context dictionary as Python expression, empty by default (Default: {})"),
'res_model': fields.char('Object', size=64, required=True,
help="Model name of the object to open in the view window"),
'src_model': fields.char('Source Object', size=64,
help="Optional model name of the objects on which this action should be visible"),
'target': fields.selection([('current','Current Window'),('new','New Window')], 'Target Window'),
'view_type': fields.selection((('tree','Tree'),('form','Form')),string='View Type'),
'view_mode': fields.char('View Mode', size=250),
'view_type': fields.selection((('tree','Tree'),('form','Form')), string='View Type', required=True,
help="View type: set to 'tree' for a hierarchical tree view, or 'form' for other views"),
'view_mode': fields.char('View Mode', size=250, required=True,
help="Comma-separated list of allowed view modes, such as 'form', 'tree', 'calendar', etc. (Default: tree,form)"),
'usage': fields.char('Action Usage', size=32),
'view_ids': fields.one2many('ir.actions.act_window.view', 'act_window_id', 'Views'),
'views': fields.function(_views_get_fnc, method=True, type='binary', string='Views'),
@@ -245,7 +252,9 @@ class act_window(osv.osv):
'auto_search':fields.boolean('Auto Search'),
'default_user_ids': fields.many2many('res.users', 'ir_act_window_user_rel', 'act_id', 'uid', 'Users'),
'search_view' : fields.function(_search_view, type='text', method=True, string='Search View'),
'menus': fields.char('Menus', size=4096)
'menus': fields.char('Menus', size=4096),
'help': fields.text('Action description',
help='Optional help text for the users with a description of the target view, such as its usage and purpose.')
}
_defaults = {
'type': lambda *a: 'ir.actions.act_window',
@@ -369,7 +378,7 @@ class actions_server(osv.osv):
def _select_signals(self, cr, uid, context={}):
cr.execute("SELECT distinct w.osv, t.signal FROM wkf w, wkf_activity a, wkf_transition t \
WHERE w.id = a.wkf_id AND t.act_from = a.id OR t.act_to = a.id AND t.signal!='' \
AND t.signal not in (null, NULL)")
AND t.signal NOT IN (null, NULL)")
result = cr.fetchall() or []
res = []
for rs in result:
@@ -445,7 +454,7 @@ class actions_server(osv.osv):
'type': lambda *a: 'ir.actions.server',
'sequence': lambda *a: 5,
'code': lambda *a: """# You can use the following variables
# - object
# - object or obj
# - time
# - cr
# - uid
@@ -522,7 +531,6 @@ class actions_server(osv.osv):
def run(self, cr, uid, ids, context={}):
logger = netsvc.Logger()
for action in self.browse(cr, uid, ids, context):
obj_pool = self.pool.get(action.model_id.model)
obj = obj_pool.browse(cr, uid, context['active_id'], context=context)
@@ -544,19 +552,27 @@ class actions_server(osv.osv):
return self.pool.get(action.action_id.type)\
.read(cr, uid, action.action_id.id, context=context)
if action.state == 'code':
localdict = {
'self': self.pool.get(action.model_id.model),
'context': context,
'time': time,
'ids': ids,
'cr': cr,
'uid': uid,
'object':obj
}
exec action.code in localdict
if 'action' in localdict:
return localdict['action']
if action.state=='code':
if config['server_actions_allow_code']:
localdict = {
'self': self.pool.get(action.model_id.model),
'context': context,
'time': time,
'ids': ids,
'cr': cr,
'uid': uid,
'object':obj,
'obj': obj,
}
eval(action.code, localdict, mode="exec")
if 'action' in localdict:
return localdict['action']
else:
netsvc.Logger().notifyChannel(
self._name, netsvc.LOG_ERROR,
"%s is a `code` server action, but "
"it isn't allowed in this configuration.\n\n"
"See server options to enable it"%action)
if action.state == 'email':
user = config['email_from']
@@ -570,7 +586,7 @@ class actions_server(osv.osv):
logger.notifyChannel('email', netsvc.LOG_INFO, 'Partner Email address not Specified!')
continue
if not user:
raise osv.except_osv(_('Error'), _("Please specify server option --smtp-from !"))
raise osv.except_osv(_('Error'), _("Please specify server option --email-from !"))
subject = self.merge_message(cr, uid, action.subject, action, context)
body = self.merge_message(cr, uid, action.message, action, context)
@@ -673,7 +689,6 @@ class actions_server(osv.osv):
res_id = False
obj_pool = self.pool.get(action.srcmodel_id.model)
res_id = obj_pool.create(cr, uid, res)
cr.commit()
if action.record_id:
self.pool.get(action.model_id.model).write(cr, uid, [context.get('active_id')], {action.record_id.name:res_id})
+43 -27
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,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/>.
#
##############################################################################
@@ -25,20 +25,20 @@ import tools
class ir_attachment(osv.osv):
def check(self, cr, uid, ids, mode, context=None):
if not ids:
if not ids:
return
ima = self.pool.get('ir.model.access')
if isinstance(ids, (int, long)):
ids = [ids]
cr.execute('select distinct res_model from ir_attachment where id = ANY (%s)', (ids,))
cr.execute('select distinct res_model from ir_attachment where id IN %s', (tuple(ids),))
for obj in cr.fetchall():
if obj[0]:
ima.check(cr, uid, obj[0], mode, context=context)
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
ids = super(ir_attachment, self).search(cr, uid, args, offset=offset,
limit=limit, order=order,
ids = super(ir_attachment, self).search(cr, uid, args, offset=offset,
limit=limit, order=order,
context=context, count=False)
if not ids:
if count:
@@ -66,7 +66,7 @@ class ir_attachment(osv.osv):
def write(self, cr, uid, ids, vals, context=None):
self.check(cr, uid, ids, 'write', context=context)
return super(ir_attachment, self).write(cr, uid, ids, vals, context)
def copy(self, cr, uid, id, default=None, context=None):
self.check(cr, uid, [id], 'write', context=context)
return super(ir_attachment, self).copy(cr, uid, id, default, context)
@@ -86,35 +86,51 @@ class ir_attachment(osv.osv):
res_id = dataobj.browse(cr, uid, data_id, context).res_id
return self.pool.get('ir.actions.act_window').read(cr, uid, res_id, [], context)
def _get_preview(self, cr, uid, ids, name, arg, context=None):
result = {}
if context is None:
context = {}
ctx = context.copy()
ctx['bin_size'] = False
for i in self.browse(cr, uid, ids, context=ctx):
result[i.id] = False
for format in ('png','jpg','jpeg','gif','bmp'):
if (i.datas_fname and i.datas_fname.lower() or '').endswith(format):
result[i.id]= i.datas
break
return result
def _name_get_resname(self, cr, uid, ids, object,method, context):
data = {}
for attachment in self.browse(cr, uid, ids, context=context):
model_object = attachment.res_model
res_id = attachment.res_id
if model_object and res_id:
model_pool = self.pool.get(model_object)
res = model_pool.name_get(cr,uid,[res_id],context)
data[attachment.id] = (res and res[0][1]) or False
else:
data[attachment.id] = False
return data
_name = 'ir.attachment'
_columns = {
'name': fields.char('Attachment Name',size=64, required=True),
'name': fields.char('Attachment Name',size=256, required=True),
'datas': fields.binary('Data'),
'preview': fields.function(_get_preview, type='binary', string='Image Preview', method=True),
'datas_fname': fields.char('Filename',size=64),
'datas_fname': fields.char('Filename',size=256),
'description': fields.text('Description'),
# Not required due to the document module !
'res_model': fields.char('Resource Object',size=64, readonly=True),
'res_id': fields.integer('Resource ID', readonly=True),
'link': fields.char('Link', size=256),
'res_name': fields.function(_name_get_resname, type='char',
string='Resource Name', method=True),
'res_model': fields.char('Resource Object',size=64, readonly=True,
help="The database object this attachment will be attached to"),
'res_id': fields.integer('Resource ID', readonly=True,
help="The record id this is attached to"),
'url': fields.char('Url', size=512, oldname="link"),
'type': fields.selection(
[ ('url','URL'), ('binary','Binary'), ],
'Type', help="Binary File or external URL", required=True),
'create_date': fields.datetime('Date Created', readonly=True),
'create_uid': fields.many2one('res.users', 'Creator', readonly=True),
}
_defaults = {
'type': 'binary',
}
def _auto_init(self, cr, context=None):
super(ir_attachment, self)._auto_init(cr, context)
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = %s', ('ir_attachment_res_idx',))
if not cr.fetchone():
cr.execute('CREATE INDEX ir_attachment_res_idx ON ir_attachment (res_model, res_id)')
cr.commit()
ir_attachment()
+4
View File
@@ -25,6 +25,7 @@ from datetime import datetime
from dateutil.relativedelta import relativedelta
import netsvc
import tools
from tools.safe_eval import safe_eval as eval
import pooler
from osv import fields, osv
@@ -146,16 +147,19 @@ class ir_cron(osv.osv, netsvc.Agent):
def create(self, cr, uid, vals, context=None):
res = super(ir_cron, self).create(cr, uid, vals, context=context)
cr.commit()
self.cancel(cr.dbname)
self._poolJobs(cr.dbname)
return res
def write(self, cr, user, ids, vals, context=None):
res = super(ir_cron, self).write(cr, user, ids, vals, context=context)
cr.commit()
self.cancel(cr.dbname)
self._poolJobs(cr.dbname)
return res
def unlink(self, cr, uid, ids, context=None):
res = super(ir_cron, self).unlink(cr, uid, ids, context=context)
cr.commit()
self.cancel(cr.dbname)
self._poolJobs(cr.dbname)
return res
ir_cron()
+11 -6
View File
@@ -27,17 +27,22 @@ class ir_filters(osv.osv):
'''
_name = 'ir.filters'
_description = 'Filters'
def _list_all_models(self, cr, uid, context=None):
cr.execute("SELECT model, name from ir_model")
return cr.fetchall()
def get_filters(self, cr, uid, model):
act_ids = self.search(cr,uid,[('model_id','=',model),('user_id','=',uid)])
my_acts = self.read(cr, uid, act_ids, ['name', 'domain','context'])
return my_acts
_columns = {
'name': fields.char('Action Name', size=64, translate=True, required=True),
'user_id':fields.many2one('res.users', 'User', help='False means for every user'),
'domain': fields.char('Domain Value', size=250, required=True),
'context': fields.char('Context Value', size=250, required=True),
'model_id': fields.selection(_list_all_models, 'Model', required=True),
'name': fields.char('Action Name', size=64, translate=True, required=True),
'user_id':fields.many2one('res.users', 'User', help='False means for every user'),
'domain': fields.char('Domain Value', size=250, required=True),
'context': fields.char('Context Value', size=250, required=True),
'model_id': fields.selection(_list_all_models, 'Model', required=True),
}
def get_filters(self, cr, uid, model):
+52 -15
View File
@@ -44,6 +44,25 @@ class ir_model(osv.osv):
_name = 'ir.model'
_description = "Objects"
_rec_name = 'name'
def _is_osv_memory(self, cr, uid, ids, field_name, arg, context=None):
models = self.browse(cr, uid, ids, context=context)
res = dict.fromkeys(ids)
for model in models:
res[model.id] = isinstance(self.pool.get(model.model), osv.osv_memory)
return res
def _search_osv_memory(self, cr, uid, model, name, domain, context=None):
if not domain:
return []
field, operator, value = domain[0]
if operator not in ['=', '!=']:
raise osv.except_osv('Invalid search criterions','The osv_memory field can only be compared with = and != operator.')
value = bool(value) if operator == '=' else not bool(value)
all_model_ids = self.search(cr, uid, [], context=context)
is_osv_mem = self._is_osv_memory(cr, uid, all_model_ids, 'osv_memory', arg=None, context=context)
return [('id', 'in', [id for id in is_osv_mem if bool(is_osv_mem[id]) == value])]
_columns = {
'name': fields.char('Object Name', size=64, translate=True, required=True),
'model': fields.char('Object', size=64, required=True, select=1),
@@ -51,6 +70,9 @@ class ir_model(osv.osv):
'field_id': fields.one2many('ir.model.fields', 'model_id', 'Fields', required=True),
'state': fields.selection([('manual','Custom Object'),('base','Base Object')],'Manually Created',readonly=True),
'access_ids': fields.one2many('ir.model.access', 'model_id', 'Access'),
'osv_memory': fields.function(_is_osv_memory, method=True, string='In-memory model', type='boolean',
fnct_search=_search_osv_memory,
help="Indicates whether this object model lives in memory only, i.e. is not persisted (osv.osv_memory)")
}
_defaults = {
'model': lambda *a: 'x_',
@@ -68,9 +90,20 @@ class ir_model(osv.osv):
_constraints = [
(_check_model_name, 'The Object name must start with x_ and not contain any special character !', ['model']),
]
# overridden to allow searching both on model name (model field)
# and model description (name field)
def name_search(self, cr, uid, name='', args=None, operator='ilike', context=None, limit=None):
if args is None:
args = []
domain = args + ['|', ('model', operator, name), ('name', operator, name)]
return super(ir_model, self).name_search(cr, uid, None, domain,
operator=operator, limit=limit, context=context)
def unlink(self, cr, user, ids, context=None):
for model in self.browse(cr, user, ids, context):
if model.state <> 'manual':
if model.state != 'manual':
raise except_orm(_('Error'), _("You can not remove the model '%s' !") %(model.name,))
res = super(ir_model, self).unlink(cr, user, ids, context)
pooler.restart_pool(cr.dbname)
@@ -82,6 +115,8 @@ class ir_model(osv.osv):
return super(ir_model,self).write(cr, user, ids, vals, context)
def create(self, cr, user, vals, context=None):
if context is None:
context = {}
if context and context.get('manual',False):
vals['state']='manual'
res = super(ir_model,self).create(cr, user, vals, context)
@@ -209,7 +244,7 @@ class ir_model_fields(osv.osv):
_description = "Fields"
_columns = {
'name': fields.char('Name', required=True, size=64, select=1),
'model': fields.char('Object Name', size=64, required=True),
'model': fields.char('Object Name', size=64, required=True, select=1),
'relation': fields.char('Object Relation', size=64),
'relation_field': fields.char('Relation Field', size=64),
'model_id': fields.many2one('ir.model', 'Object ID', required=True, select=True, ondelete='cascade'),
@@ -221,7 +256,7 @@ class ir_model_fields(osv.osv):
'select_level': fields.selection([('0','Not Searchable'),('1','Always Searchable'),('2','Advanced Search')],'Searchable', required=True),
'translate': fields.boolean('Translate'),
'size': fields.integer('Size'),
'state': fields.selection([('manual','Custom Field'),('base','Base Field')],'Manually Created', required=True, readonly=True),
'state': fields.selection([('manual','Custom Field'),('base','Base Field')],'Manually Created', required=True, readonly=True, select=1),
'on_delete': fields.selection([('cascade','Cascade'),('set null','Set NULL')], 'On delete', help='On delete property for many2one fields'),
'domain': fields.char('Domain', size=256),
'groups': fields.many2many('res.groups', 'ir_model_fields_group_rel', 'field_id', 'group_id', 'Groups'),
@@ -260,6 +295,8 @@ class ir_model_fields(osv.osv):
if 'model_id' in vals:
model_data = self.pool.get('ir.model').browse(cr, user, vals['model_id'])
vals['model'] = model_data.model
if context is None:
context = {}
if context and context.get('manual',False):
vals['state'] = 'manual'
res = super(ir_model_fields,self).create(cr, user, vals, context)
@@ -267,7 +304,7 @@ class ir_model_fields(osv.osv):
if not vals['name'].startswith('x_'):
raise except_orm(_('Error'), _("Custom fields must have a name that starts with 'x_' !"))
if 'relation' in vals and not self.pool.get('ir.model').search(cr, user, [('model','=',vals['relation'])]):
if vals.get('relation',False) and not self.pool.get('ir.model').search(cr, user, [('model','=',vals['relation'])]):
raise except_orm(_('Error'), _("Model %s Does not Exist !" % vals['relation']))
if self.pool.get(vals['model']):
@@ -284,9 +321,9 @@ ir_model_fields()
class ir_model_access(osv.osv):
_name = 'ir.model.access'
_columns = {
'name': fields.char('Name', size=64, required=True),
'model_id': fields.many2one('ir.model', 'Object', required=True),
'group_id': fields.many2one('res.groups', 'Group'),
'name': fields.char('Name', size=64, required=True, select=True),
'model_id': fields.many2one('ir.model', 'Object', required=True, domain=[('osv_memory','=', False)], select=True),
'group_id': fields.many2one('res.groups', 'Group', ondelete='cascade', select=True),
'perm_read': fields.boolean('Read Access'),
'perm_write': fields.boolean('Write Access'),
'perm_create': fields.boolean('Create Access'),
@@ -299,7 +336,7 @@ class ir_model_access(osv.osv):
if not grouparr:
return False
cr.execute("select 1 from res_groups_users_rel where uid=%s and gid in(select res_id from ir_model_data where module=%s and name=%s)", (uid, grouparr[0], grouparr[1],))
cr.execute("select 1 from res_groups_users_rel where uid=%s and gid IN (select res_id from ir_model_data where module=%s and name=%s)", (uid, grouparr[0], grouparr[1],))
return bool(cr.fetchone())
def check_group(self, cr, uid, model, mode, group_ids):
@@ -425,10 +462,10 @@ class ir_model_data(osv.osv):
_name = 'ir.model.data'
__logger = logging.getLogger('addons.base.'+_name)
_columns = {
'name': fields.char('XML Identifier', required=True, size=128),
'model': fields.char('Object', required=True, size=64),
'module': fields.char('Module', required=True, size=64),
'res_id': fields.integer('Resource ID'),
'name': fields.char('XML Identifier', required=True, size=128, select=1),
'model': fields.char('Object', required=True, size=64, select=1),
'module': fields.char('Module', required=True, size=64, select=1),
'res_id': fields.integer('Resource ID', select=1),
'noupdate': fields.boolean('Non Updatable'),
'date_update': fields.datetime('Update Date'),
'date_init': fields.datetime('Init Date')
@@ -453,7 +490,7 @@ class ir_model_data(osv.osv):
def _get_id(self, cr, uid, module, xml_id):
ids = self.search(cr, uid, [('module','=',module),('name','=', xml_id)])
if not ids:
raise Exception('No references to %s.%s' % (module, xml_id))
raise ValueError('No references to %s.%s' % (module, xml_id))
# the sql constraints ensure us we have only one result
return ids[0]
@@ -590,13 +627,13 @@ class ir_model_data(osv.osv):
return True
modules = list(modules)
module_in = ",".join(["%s"] * len(modules))
cr.execute('select id,name,model,res_id,module from ir_model_data where module in (' + module_in + ') and noupdate=%s', modules + [False])
cr.execute('select id,name,model,res_id,module from ir_model_data where module IN (' + module_in + ') and noupdate=%s', modules + [False])
wkf_todo = []
for (id, name, model, res_id,module) in cr.fetchall():
if (module,name) not in self.loads:
self.unlink_mark[(model,res_id)] = id
if model=='workflow.activity':
cr.execute('select res_type,res_id from wkf_instance where id in (select inst_id from wkf_workitem where act_id=%s)', (res_id,))
cr.execute('select res_type,res_id from wkf_instance where id IN (select inst_id from wkf_workitem where act_id=%s)', (res_id,))
wkf_todo.extend(cr.fetchall())
cr.execute("update wkf_transition set condition='True', role_id=NULL, signal=NULL,act_to=act_from,act_from=%s where act_to=%s", (res_id,res_id))
cr.execute("delete from wkf_transition where act_to=%s", (res_id,))
+1
View File
@@ -24,6 +24,7 @@ from osv.orm import browse_null
import ir
import report.custom
from tools.translate import _
from tools.safe_eval import safe_eval as eval
import netsvc
class report_custom(osv.osv):
+25 -7
View File
@@ -21,10 +21,14 @@
from osv import fields,osv
import time
from operator import itemgetter
from functools import partial
import tools
from tools.safe_eval import safe_eval as eval
class ir_rule(osv.osv):
_name = 'ir.rule'
_MODES = ['read', 'write', 'create', 'unlink']
def _domain_force_get(self, cr, uid, ids, field_name, arg, context={}):
res = {}
@@ -44,13 +48,7 @@ class ir_rule(osv.osv):
return res
def _check_model_obj(self, cr, uid, ids, context={}):
model_obj = self.pool.get('ir.model')
for rule in self.browse(cr, uid, ids, context):
model = model_obj.browse(cr, uid, rule.model_id.id, context).model
obj = self.pool.get(model)
if isinstance(obj, osv.osv_memory):
return False
return True
return not any(isinstance(self.pool.get(rule.model_id.model), osv.osv_memory) for rule in self.browse(cr, uid, ids, context))
_columns = {
'name': fields.char('Name', size=128, select=1),
@@ -89,6 +87,8 @@ class ir_rule(osv.osv):
@tools.cache()
def _compute_domain(self, cr, uid, model_name, mode="read"):
if mode not in self._MODES:
raise ValueError('Invalid mode: %r' % (mode,))
group_rule = {}
global_rules = []
@@ -114,6 +114,24 @@ class ir_rule(osv.osv):
dom += self.domain_create(cr, uid, value)
return dom
def clear_cache(self, cr, uid):
cr.execute("""SELECT DISTINCT m.model
FROM ir_rule r
JOIN ir_model m
ON r.model_id = m.id
WHERE r.global
OR EXISTS (SELECT 1
FROM rule_group_rel g_rel
JOIN res_groups_users_rel u_rel
ON g_rel.group_id = u_rel.gid
WHERE g_rel.rule_group_id = r.id
AND u_rel.uid = %s)
""", (uid,))
models = map(itemgetter(0), cr.fetchall())
clear = partial(self._compute_domain.clear_cache, cr.dbname, uid)
[clear(model, mode) for model in models for mode in self._MODES]
def domain_get(self, cr, uid, model_name, mode='read', context={}):
dom = self._compute_domain(cr, uid, model_name, mode=mode)
if dom:
+13 -14
View File
@@ -88,8 +88,8 @@ class ir_translation(osv.osv):
'where lang=%s ' \
'and type=%s ' \
'and name=%s ' \
'and res_id in ('+','.join(map(str, ids))+')',
(lang,tt,name))
'and res_id IN %s',
(lang,tt,name,tuple(ids)))
for res_id, value in cr.fetchall():
translations[res_id] = value
return translations
@@ -107,9 +107,8 @@ class ir_translation(osv.osv):
'where lang=%s ' \
'and type=%s ' \
'and name=%s ' \
'and res_id in ('+','.join(map(str, ids))+')',
(lang,tt,name))
cr.commit()
'and res_id IN %s',
(lang,tt,name,tuple(ids),))
for id in ids:
self.create(cr, uid, {
'lang':lang,
@@ -150,26 +149,26 @@ class ir_translation(osv.osv):
if not context:
context = {}
ids = super(ir_translation, self).create(cursor, user, vals, context=context)
for trans_obj in self.read(cursor, user, [ids], ['name','type','res_id'], context=context):
self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], lang=context.get('lang','en_US'))
self._get_ids.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], context.get('lang','en_US'), [trans_obj['res_id']])
for trans_obj in self.read(cursor, user, [ids], ['name','type','res_id','src','lang'], context=context):
self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], source=trans_obj['src'])
self._get_ids.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], [trans_obj['res_id']])
return ids
def write(self, cursor, user, ids, vals, context=None):
if not context:
context = {}
result = super(ir_translation, self).write(cursor, user, ids, vals, context=context)
for trans_obj in self.read(cursor, user, ids, ['name','type','res_id'], context=context):
self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], lang=context.get('lang','en_US'))
self._get_ids.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], context.get('lang','en_US'), [trans_obj['res_id']])
for trans_obj in self.read(cursor, user, ids, ['name','type','res_id','src','lang'], context=context):
self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], source=trans_obj['src'])
self._get_ids.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], [trans_obj['res_id']])
return result
def unlink(self, cursor, user, ids, context=None):
if not context:
context = {}
for trans_obj in self.read(cursor, user, ids, ['name','type','res_id'], context=context):
self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], lang=context.get('lang','en_US'))
self._get_ids.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], context.get('lang','en_US'), [trans_obj['res_id']])
for trans_obj in self.read(cursor, user, ids, ['name','type','res_id','src','lang'], context=context):
self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], source=trans_obj['src'])
self._get_ids.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], [trans_obj['res_id']])
result = super(ir_translation, self).unlink(cursor, user, ids, context=context)
return result
+21 -14
View File
@@ -31,6 +31,10 @@ def one_in(setA, setB):
return True
return False
def cond(C, X, Y):
if C: return X
return Y
class many2many_unique(fields.many2many):
def set(self, cr, obj, id, name, values, user=None, context=None):
if not values:
@@ -62,7 +66,7 @@ class ir_ui_menu(osv.osv):
def clear_cache(self):
# radical but this doesn't frequently happen
self._cache = {}
def create_shortcut(self, cr, uid, values, context={}):
dataobj = self.pool.get('ir.model.data')
menu_id = dataobj._get_id(cr, uid, 'base', 'menu_administration_shortcut', context)
@@ -76,24 +80,22 @@ class ir_ui_menu(osv.osv):
menu_id = self.pool.get('ir.ui.menu').create(cr, uid, menu_data)
sc_data= {'name':values['name'], 'sequence': 1,'res_id': menu_id }
sc_menu_id = self.pool.get('ir.ui.view_sc').create(cr, uid, sc_data, context)
user_groups = set(self.pool.get('res.users').read(cr, 1, uid, ['groups_id'])['groups_id'])
key = (cr.dbname, shortcut_menu_id, tuple(user_groups))
self._cache[key] = True
return True
def search(self, cr, uid, args, offset=0, limit=2000, order=None,
context=None, count=False):
if context is None:
context = {}
ids = osv.orm.orm.search(self, cr, uid, args, offset, limit, order, context=context, count=(count and uid==1))
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
ids = super(ir_ui_menu, self).search(cr, uid, args, offset=0,
limit=None, order=order, context=context, count=False)
if not ids:
if count:
return 0
return []
if count and ids:
return ids
modelaccess = self.pool.get('ir.model.access')
user_groups = set(self.pool.get('res.users').read(cr, 1, uid, ['groups_id'])['groups_id'])
@@ -113,9 +115,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
@@ -141,6 +143,11 @@ class ir_ui_menu(osv.osv):
result.append(menu.id)
self._cache[key] = True
if offset:
result = result[long(offset):]
if limit:
result = result[:long(limit)]
if count:
return len(result)
return result
+9 -2
View File
@@ -22,6 +22,7 @@
from osv import fields,osv
from lxml import etree
from tools import graph
from tools.safe_eval import safe_eval as eval
import tools
import netsvc
import os
@@ -66,10 +67,12 @@ class view(osv.osv):
'arch': fields.text('View Architecture', required=True),
'inherit_id': fields.many2one('ir.ui.view', 'Inherited View', ondelete='cascade'),
'field_parent': fields.char('Child Field',size=64),
'xml_id': fields.function(osv.osv.get_xml_id, type='char', size=128, string="XML ID",
method=True),
}
_defaults = {
'arch': lambda *a: '<?xml version="1.0"?>\n<tree string="Unknwown">\n\t<field name="name"/>\n</tree>',
'priority': lambda *a: 16
'arch': '<?xml version="1.0"?>\n<tree string="My view">\n\t<field name="name"/>\n</tree>',
'priority': 16
}
_order = "priority"
_constraints = [
@@ -200,6 +203,10 @@ class view_sc(osv.osv):
'resource': lambda *a: 'ir.ui.menu',
'user_id': lambda obj, cr, uid, context: uid,
}
_sql_constraints = [
('shortcut_unique', 'unique(res_id, user_id)', 'Shortcut for this menu already exists!'),
]
view_sc()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+30 -58
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,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/>.
#
##############################################################################
@@ -75,8 +75,7 @@ class ir_values(osv.osv):
method=True, type='text', string='Value'),
'object': fields.boolean('Is Object'),
'key': fields.selection([('action','Action'),('default','Default')], 'Type', size=128),
'key2': fields.char('Event Type', size=256,
help="The kind of action or button in the client side that will trigger the action."),
'key2' : fields.char('Event Type',help="The kind of action or button in the client side that will trigger the action.", size=128),
'meta': fields.text('Meta Datas'),
'meta_unpickle': fields.function(_value_unpickle, fnct_inv=_value_pickle,
method=True, type='text', string='Metadata'),
@@ -95,7 +94,6 @@ class ir_values(osv.osv):
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'ir_values_key_model_key2_index\'')
if not cr.fetchone():
cr.execute('CREATE INDEX ir_values_key_model_key2_index ON ir_values (key, model, key2)')
cr.commit()
def set(self, cr, uid, key, key2, name, models, value, replace=True, isobject=False, meta=False, preserve_user=False, company=False):
if type(value)==type(u''):
@@ -156,54 +154,33 @@ class ir_values(osv.osv):
else:
res_id=False
where1 = ['key=%s','model=%s']
where2 = [key,str(m)]
where_opt = []
where = ['key=%s','model=%s']
params = [key, str(m)]
if key2:
where1.append('key2=%s')
where2.append(key2[:200])
where.append('key2=%s')
params.append(key2[:200])
else:
dest = where1
if not key2_req or meta:
dest=where_opt
dest.append('key2 is null')
if key2_req and not meta:
where.append('key2 is null')
if res_id_req and (models[-1][0]==m):
if res_id:
where1.append('res_id=%d' % (res_id,))
where.append('res_id=%s')
params.append(res_id)
else:
where1.append('(res_id is NULL)')
where.append('(res_id is NULL)')
elif res_id:
if (models[-1][0]==m):
where1.append('(res_id=%d or (res_id is null))' % (res_id,))
where_opt.append('res_id=%d' % (res_id,))
where.append('(res_id=%s or (res_id is null))')
params.append(res_id)
else:
where1.append('res_id=%d' % (res_id,))
# if not without_user:
where_opt.append('user_id=%d' % (uid,))
result = []
ok = True
result_ids = {}
while ok:
if not where_opt:
cr.execute('select id,name,value,object,meta, key from ir_values where ' +\
' and '.join(where1)+' and user_id is null', where2)
else:
cr.execute('select id,name,value,object,meta, key from ir_values where ' +\
' and '.join(where1+where_opt), where2)
for rec in cr.fetchall():
if rec[0] in result_ids:
continue
if rec[2]:
result.append(rec)
result_ids[rec[0]] = True
if len(where_opt):
where_opt.pop()
else:
ok = False
where.append('res_id=%s')
params.append(res_id)
where.append('(user_id=%s or (user_id IS NULL))')
params.append(uid)
clause = ' and '.join(where)
cr.execute('select id,name,value,object,meta, key from ir_values where ' + clause, params)
result = cr.fetchall()
if result:
break
@@ -228,7 +205,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:
@@ -245,19 +222,14 @@ class ir_values(osv.osv):
res2 = res[:]
for r in res:
if type(r[2])==type({}) and 'type' in r[2]:
if r[2]['type'] in ('ir.actions.report.xml','ir.actions.act_window','ir.actions.wizard'):
if r[2].has_key('groups_id'):
groups = r[2]['groups_id']
if len(groups) > 0:
cr.execute("SELECT count(*) FROM res_groups_users_rel WHERE gid = ANY(%s) AND uid=%s",(groups, uid))
gr_ids = cr.fetchall()
if not gr_ids[0][0] > 0:
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)
groups = r[2].get('groups_id')
if groups:
cr.execute('SELECT COUNT(1) FROM res_groups_users_rel WHERE gid IN %s AND uid=%s',(tuple(groups), uid))
cnt = cr.fetchone()[0]
if cnt:
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 !!!')
return res2
ir_values()
+25 -22
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,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/>.
#
##############################################################################
@@ -23,11 +23,11 @@ import time, os
import netsvc
import report,pooler,tools
from operator import itemgetter
def graph_get(cr, graph, wkf_id, nested=False, workitem={}):
def graph_get(cr, graph, wkf_ids, nested=False, workitem={}):
import pydot
cr.execute('select * from wkf_activity where wkf_id=%s', (wkf_id,))
cr.execute('select * from wkf_activity where wkf_id in ('+','.join(['%s']*len(wkf_ids))+')', wkf_ids)
nodes = cr.dictfetchall()
activities = {}
actfrom = {}
@@ -56,9 +56,12 @@ def graph_get(cr, graph, wkf_id, nested=False, workitem={}):
graph.add_node(pydot.Node(n['id'], **args))
actfrom[n['id']] = (n['id'],{})
actto[n['id']] = (n['id'],{})
cr.execute('select * from wkf_transition where act_from in ('+','.join(map(lambda x: str(x['id']),nodes))+')')
node_ids = tuple(map(itemgetter('id'), nodes))
cr.execute('select * from wkf_transition where act_from IN %s', (node_ids,))
transitions = cr.dictfetchall()
for t in transitions:
if not t['act_to'] in activities:
continue
args = {}
args['label'] = str(t['condition']).replace(' or ', '\\nor ').replace(' and ', '\\nand ')
if t['signal']:
@@ -77,9 +80,9 @@ def graph_get(cr, graph, wkf_id, nested=False, workitem={}):
activity_to = actto[t['act_to']][1].get(t['signal'], actto[t['act_to']][0])
graph.add_edge(pydot.Edge( str(activity_from) ,str(activity_to), fontsize='10', **args))
nodes = cr.dictfetchall()
cr.execute('select id from wkf_activity where flow_start=True and wkf_id=%s limit 1', (wkf_id,))
cr.execute('select * from wkf_activity where flow_start=True and wkf_id in ('+','.join(['%s']*len(wkf_ids))+')', wkf_ids)
start = cr.fetchone()[0]
cr.execute("select 'subflow.'||name,id from wkf_activity where flow_stop=True and wkf_id=%s", (wkf_id,))
cr.execute("select 'subflow.'||name,id from wkf_activity where flow_stop=True and wkf_id in ("+','.join(['%s']*len(wkf_ids))+')', wkf_ids)
stop = cr.fetchall()
if (stop):
stop = (stop[0][1], dict(stop))
@@ -90,8 +93,8 @@ def graph_get(cr, graph, wkf_id, nested=False, workitem={}):
def graph_instance_get(cr, graph, inst_id, nested=False):
workitems = {}
cr.execute('select * from wkf_instance where id=%s', (inst_id,))
inst = cr.dictfetchone()
cr.execute('select wkf_id from wkf_instance where id=%s', (inst_id,))
inst = cr.fetchall()
def workitem_get(instance):
cr.execute('select act_id,count(*) from wkf_workitem where inst_id=%s group by act_id', (instance,))
@@ -101,7 +104,7 @@ def graph_instance_get(cr, graph, inst_id, nested=False):
for (subflow_id,) in cr.fetchall():
workitems.update(workitem_get(subflow_id))
return workitems
graph_get(cr, graph, inst['wkf_id'], nested, workitem_get(inst_id))
graph_get(cr, graph, [x[0] for x in inst], nested, workitem_get(inst_id))
#
# TODO: pas clean: concurrent !!!
@@ -131,12 +134,9 @@ class report_graph_instance(object):
(No workflow defined) show
showpage'''
else:
cr.execute('SELECT id FROM wkf_instance \
WHERE res_id=%s AND wkf_id=%s \
ORDER BY state LIMIT 1',
(data['id'], wkfinfo['id']))
inst_id = cr.fetchone()
if not inst_id:
cr.execute('select i.id from wkf_instance i left join wkf w on (i.wkf_id=w.id) where res_id=%s and osv=%s',(data['id'],data['model']))
inst_ids = cr.fetchall()
if not inst_ids:
ps_string = '''%PS-Adobe-3.0
/inch {72 mul} def
/Times-Roman findfont 50 scalefont setfont
@@ -144,11 +144,14 @@ showpage'''
(No workflow instance defined) show
showpage'''
else:
inst_id = inst_id[0]
graph = pydot.Dot(fontsize='16', label="""\\\n\\nWorkflow: %s\\n OSV: %s""" % (wkfinfo['name'],wkfinfo['osv']),
size='7.3, 10.1', center='1', ratio='auto', rotate='0', rankdir='TB',
)
graph_instance_get(cr, graph, inst_id, data.get('nested', False))
graph = pydot.Dot(
fontsize='16',
label="""\\\n\\nWorkflow: %s\\n OSV: %s""" % (wkfinfo['name'],wkfinfo['osv']),
size='7.3, 10.1', center='1', ratio='auto', rotate='0', rankdir='TB',
)
for inst_id in inst_ids:
inst_id = inst_id[0]
graph_instance_get(cr, graph, inst_id, data.get('nested', False))
ps_string = graph.create(prog='dot', format='ps')
except Exception, e:
import traceback, sys
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem id="menu_workflow_root" name="Workflow Definitions" parent="menu_custom"/>
<menuitem id="menu_workflow_root" name="Workflow Definitions" parent="base.menu_custom" groups="base.group_extended"/>
<!--
================================
@@ -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>
@@ -49,7 +49,7 @@
<menuitem
name="Maintenance"
id="maintenance"
parent="base.menu_administration"/>
parent="base.menu_administration" groups="base.group_extended"/>
<menuitem
action="action_maintenance_contract_form"
+82 -60
View File
@@ -3,6 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -23,6 +24,8 @@ import tarfile
import re
import urllib
import os
import imp
import logging
import tools
from osv import fields, osv, orm
import zipfile
@@ -42,7 +45,14 @@ class module_category(osv.osv):
_description = "Module Category"
def _module_nbr(self,cr,uid, ids, prop, unknow_none,context):
cr.execute('select category_id,count(*) from ir_module_module where category_id in ('+','.join(map(str, ids))+') or category_id in (select id from ir_module_category where parent_id in ('+','.join(map(str, ids))+')) group by category_id')
cr.execute('SELECT category_id, COUNT(*) \
FROM ir_module_module \
WHERE category_id IN %(ids)s \
OR category_id IN (SELECT id \
FROM ir_module_category \
WHERE parent_id IN %(ids)s) \
GROUP BY category_id', {'ids': tuple(ids)}
)
result = dict(cr.fetchall())
for id in ids:
cr.execute('select id from ir_module_category where parent_id=%s', (id,))
@@ -101,9 +111,12 @@ class module(osv.osv):
try:
key = data_id['model']
if key=='ir.ui.view':
v = view_obj.browse(cr,uid,data_id.res_id)
aa = v.inherit_id and '* INHERIT ' or ''
res[mnames[data_id.module]]['views_by_module'] += aa + v.name + ' ('+v.type+')\n'
try:
v = view_obj.browse(cr,uid,data_id.res_id)
aa = v.inherit_id and '* INHERIT ' or ''
res[mnames[data_id.module]]['views_by_module'] += aa + v.name + ' ('+v.type+')\n'
except:
pass
elif key=='ir.actions.report.xml':
res[mnames[data_id.module]]['reports_by_module'] += report_obj.browse(cr,uid,data_id.res_id).name + '\n'
elif key=='ir.ui.menu':
@@ -122,6 +135,8 @@ class module(osv.osv):
'shortdesc': fields.char('Short Description', size=256, readonly=True, translate=True),
'description': fields.text("Description", readonly=True, translate=True),
'author': fields.char("Author", size=128, readonly=True),
'maintainer': fields.char('Maintainer', size=128, readonly=True),
'contributors': fields.text('Contributors', readonly=True),
'website': fields.char("Website", size=256, readonly=True),
# attention: Incorrect field names !!
@@ -146,11 +161,13 @@ class module(osv.osv):
], string='State', readonly=True),
'demo': fields.boolean('Demo data'),
'license': fields.selection([
('GPL-2', 'GPL-2'),
('GPL-2', 'GPL Version 2'),
('GPL-2 or any later version', 'GPL-2 or later version'),
('GPL-3', 'GPL-3'),
('GPL-3', 'GPL Version 3'),
('GPL-3 or any later version', 'GPL-3 or later version'),
('Other proprietary', 'Other proprietary')
('AGPL-3', 'Affero GPL-3'),
('Other OSI approved licence', 'Other OSI Approved Licence'),
('Other proprietary', 'Other Proprietary')
], string='License', readonly=True),
'menus_by_module': fields.function(_get_views, method=True, string='Menus', type='text', multi="meta", store=True),
'reports_by_module': fields.function(_get_views, method=True, string='Reports', type='text', multi="meta", store=True),
@@ -161,7 +178,7 @@ class module(osv.osv):
_defaults = {
'state': lambda *a: 'uninstalled',
'demo': lambda *a: False,
'license': lambda *a: 'GPL-2',
'license': lambda *a: 'AGPL-3',
}
_order = 'name'
@@ -189,6 +206,27 @@ class module(osv.osv):
return super(module, self).unlink(cr, uid, ids, context=context)
@staticmethod
def _check_external_dependencies(terp):
depends = terp.get('external_dependencies')
if not depends:
return
for pydep in depends.get('python', []):
parts = pydep.split('.')
parts.reverse()
path = None
while parts:
part = parts.pop()
try:
f, path, descr = imp.find_module(part, path and [path] or None)
except ImportError:
raise ImportError('No module named %s' % (pydep,))
for binary in depends.get('bin', []):
if tools.find_in_path(binary) is None:
raise Exception('Unable to find %r in path' % (binary,))
def state_update(self, cr, uid, ids, newstate, states_to_update, context={}, level=100):
if level<1:
raise orm.except_orm(_('Error'), _('Recursion error in modules dependencies !'))
@@ -204,6 +242,11 @@ class module(osv.osv):
else:
od = self.browse(cr, uid, ids2)[0]
mdemo = od.demo or mdemo
terp = self.get_module_info(module.name)
try:
self._check_external_dependencies(terp)
except Exception, e:
raise orm.except_orm(_('Error'), _('Unable %s the module "%s" because an external dependencie is not met: %s' % (newstate, module.name, e.args[0])))
if not module.dependencies_id:
mdemo = module.demo
if module.state in states_to_update:
@@ -277,6 +320,19 @@ class module(osv.osv):
self.update_translations(cr, uid, ids)
return True
@staticmethod
def get_values_from_terp(terp):
return {
'description': terp.get('description', ''),
'shortdesc': terp.get('name', ''),
'author': terp.get('author', 'Unknown'),
'maintainer': terp.get('maintainer', False),
'contributors': ', '.join(terp.get('contributors', [])) or False,
'website': terp.get('website', ''),
'license': terp.get('license', 'GPL-2'),
'certificate': terp.get('certificate') or None,
}
# update the list of available packages
def update_list(self, cr, uid, context={}):
res = [0, 0] # [update, add]
@@ -284,46 +340,31 @@ class module(osv.osv):
# iterate through installed modules and mark them as being so
for mod_name in addons.get_modules():
ids = self.search(cr, uid, [('name','=',mod_name)])
terp = self.get_module_info(mod_name)
values = self.get_values_from_terp(terp)
if ids:
id = ids[0]
mod = self.browse(cr, uid, id)
terp = self.get_module_info(mod_name)
if terp.get('installable', True) and mod.state == 'uninstallable':
self.write(cr, uid, id, {'state': 'uninstalled'})
if parse_version(terp.get('version', '')) > parse_version(mod.latest_version or ''):
self.write(cr, uid, id, { 'url': ''})
self.write(cr, uid, id, {'url': ''})
res[0] += 1
self.write(cr, uid, id, {
'description': terp.get('description', ''),
'shortdesc': terp.get('name', ''),
'author': terp.get('author', 'Unknown'),
'website': terp.get('website', ''),
'license': terp.get('license', 'GPL-2'),
'certificate': terp.get('certificate') or None,
})
self.write(cr, uid, id, values)
cr.execute('DELETE FROM ir_module_module_dependency WHERE module_id = %s', (id,))
self._update_dependencies(cr, uid, ids[0], terp.get('depends', []))
self._update_category(cr, uid, ids[0], terp.get('category', 'Uncategorized'))
continue
mod_path = addons.get_module_path(mod_name)
if mod_path:
terp = self.get_module_info(mod_name)
else:
mod_path = addons.get_module_path(mod_name)
if not mod_path:
continue
if not terp or not terp.get('installable', True):
continue
id = self.create(cr, uid, {
'name': mod_name,
'state': 'uninstalled',
'description': terp.get('description', ''),
'shortdesc': terp.get('name', ''),
'author': terp.get('author', 'Unknown'),
'website': terp.get('website', ''),
'license': terp.get('license', 'GPL-2'),
'certificate': terp.get('certificate') or None,
})
ids = self.search(cr, uid, [('name','=',mod_name)])
id = self.create(cr, uid, dict(name=mod_name, state='uninstalled', **values))
res[1] += 1
self._update_dependencies(cr, uid, id, terp.get('depends', []))
self._update_category(cr, uid, id, terp.get('category', 'Uncategorized'))
self._update_dependencies(cr, uid, id, terp.get('depends', []))
self._update_category(cr, uid, id, terp.get('category', 'Uncategorized'))
return res
@@ -350,14 +391,7 @@ class module(osv.osv):
except Exception, e:
raise orm.except_orm(_('Error'), _('Can not create the module file:\n %s') % (fname,))
terp = self.get_module_info(mod.name)
self.write(cr, uid, mod.id, {
'description': terp.get('description', ''),
'shortdesc': terp.get('name', ''),
'author': terp.get('author', 'Unknown'),
'website': terp.get('website', ''),
'license': terp.get('license', 'GPL-2'),
'certificate': terp.get('certificate') or None,
})
self.write(cr, uid, mod.id, self.get_values_from_terp(terp))
cr.execute('DELETE FROM ir_module_module_dependency ' \
'WHERE module_id = %s', (mod.id,))
self._update_dependencies(cr, uid, mod.id, terp.get('depends',
@@ -422,31 +456,19 @@ class module(osv.osv):
tools.trans_load(cr.dbname, f, lang, verbose=False)
def check(self, cr, uid, ids, context=None):
logger = netsvc.Logger()
logger = logging.getLogger('init')
for mod in self.browse(cr, uid, ids, context=context):
if not mod.description:
logger.notifyChannel("init", netsvc.LOG_WARNING, 'module %s: description is empty !' % (mod.name,))
logger.warn('module %s: description is empty !', mod.name)
if not mod.certificate or not mod.certificate.isdigit():
logger.notifyChannel('init', netsvc.LOG_WARNING, 'module %s: no quality certificate' % (mod.name,))
logger.info('module %s: no quality certificate', mod.name)
else:
val = long(mod.certificate[2:]) % 97 == 29
if not val:
logger.notifyChannel('init', netsvc.LOG_CRITICAL, 'module %s: invalid quality certificate: %s' % (mod.name, mod.certificate))
logger.critical('module %s: invalid quality certificate: %s', mod.name, mod.certificate)
raise osv.except_osv(_('Error'), _('Module %s: Invalid Quality Certificate') % (mod.name,))
def create(self, cr, uid, data, context={}):
id = super(module, self).create(cr, uid, data, context)
if data.get('name'):
self.pool.get('ir.model.data').create(cr, uid, {
'name': 'module_meta_information',
'model': 'ir.module.module',
'res_id': id,
'module': data['name'],
'noupdate': True,
})
return id
module()
class module_dependency(osv.osv):
+6 -6
View File
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="ir_ui_view_sc_modules0" model="ir.ui.view_sc">
<field name="name">Modules</field>
<field name="resource">ir.ui.menu</field>
<field name="user_id" ref="base.user_root"/>
<field name="res_id" ref="base.menu_module_tree"/>
</record>
<!-- <record id="ir_ui_view_sc_modules0" model="ir.ui.view_sc">-->
<!-- <field name="name">Modules</field>-->
<!-- <field name="resource">ir.ui.menu</field>-->
<!-- <field name="user_id" ref="base.user_root"/>-->
<!-- <field name="res_id" ref="base.menu_module_tree"/>-->
<!-- </record>-->
</data>
</openerp>
+29 -23
View File
@@ -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 -->
@@ -46,17 +39,23 @@
<field name="arch" type="xml">
<search string="Search modules">
<group col='10' colspan='4'>
<filter icon="terp-sale" string="Installed" domain="[('state', 'in', ['installed', 'to upgrade', 'to remove'])]"/>
<filter icon="terp-sale" string="Uninstalled" domain="[('state', 'in', ['uninstalled', 'uninstallable'])]"/>
<filter icon="terp-sale" string="To be upgraded" domain="[('state','in', ['to upgrade', 'to remove', 'to install'])]"/>
<filter icon="terp-check" string="Installed" domain="[('state', 'in', ['installed', 'to upgrade', 'to remove'])]"/>
<filter icon="terp-dialog-close" string="Uninstalled" domain="[('state', 'in', ['uninstalled', 'uninstallable'])]"/>
<filter icon="terp-gtk-jump-to-ltr" string="To be upgraded" domain="[('state','in', ['to upgrade', 'to remove', 'to install'])]"/>
<separator orientation="vertical"/>
<filter icon="terp-sale" string="Certified" domain="[('certificate','&lt;&gt;', False)]"/>
<filter icon="terp-camera_test" string="Certified" domain="[('certificate','&lt;&gt;', 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>
<newline/>
<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>
@@ -97,19 +96,21 @@
<field name="latest_version"/>
<field name="author" select="2"/>
<field name="website" select="2" widget="url"/>
<field name="maintainer" attrs="{'invisible': [('maintainer', '=', False)]}"/>
<field name="url" widget="url"/>
<field name="contributors" widget="char" attrs="{'invisible': [('contributors', '=', False)]}"/>
<field name="published_version"/>
<field name="license"/>
<field name="demo" readonly="1"/>
<newline/>
<field name="state" readonly="1" select="1"/>
<group col="6" colspan="2">
<button name="button_install" states="uninstalled" string="Schedule for Installation" type="object"/>
<button name="button_install_cancel" states="to install" string="Cancel Install" type="object"/>
<button name="button_uninstall" states="installed" string="Uninstall (beta)" type="object"/>
<button name="button_uninstall_cancel" states="to remove" string="Cancel Uninstall" type="object"/>
<button name="button_upgrade" states="installed" string="Schedule Upgrade" type="object"/>
<button name="button_upgrade_cancel" states="to upgrade" string="Cancel Upgrade" type="object"/>
<button name="button_install" states="uninstalled" string="Schedule for Installation" icon="terp-gtk-jump-to-ltr" type="object"/>
<button name="button_install_cancel" states="to install" string="Cancel Install" icon="gtk-cancel" type="object"/>
<button name="button_uninstall" states="installed" string="Uninstall (beta)" icon="terp-dialog-close" type="object"/>
<button name="button_uninstall_cancel" states="to remove" string="Cancel Uninstall" icon="gtk-cancel" type="object"/>
<button name="button_upgrade" states="installed" string="Schedule Upgrade" icon="terp-gtk-go-back-rtl" type="object"/>
<button name="button_upgrade_cancel" states="to upgrade" string="Cancel Upgrade" icon="gtk-cancel" type="object"/>
</group>
</page>
<page string="Dependencies">
@@ -143,8 +144,13 @@
<field name="author"/>
<field name="installed_version"/>
<field name="latest_version"/>
<field name="published_version"/>
<field name="state"/>
<button name="button_install" states="uninstalled" string="Schedule for Installation" icon="terp-gtk-jump-to-ltr" type="object" help="Schedule for Installation"/>
<button name="button_install_cancel" states="to install" string="Cancel Install" icon="gtk-cancel" type="object"/>
<button name="button_upgrade" states="installed" string="Schedule Upgrade" icon="terp-gtk-go-back-rtl" type="object" help="Schedule Upgrade"/>
<button name="button_uninstall" states="installed" string="Uninstall (beta)" icon="terp-dialog-close" type="object"/>
<button name="button_uninstall_cancel" states="to remove" string="Cancel Uninstall" icon="gtk-cancel" type="object"/>
<button name="button_upgrade_cancel" states="to upgrade" string="Cancel Upgrade" icon="gtk-cancel" type="object"/>
</tree>
</field>
</record>
@@ -156,7 +162,7 @@
<field name="domain"/>
<field name="search_view_id" ref="view_module_filter"/>
</record>
<menuitem action="open_module_tree" id="menu_module_tree" parent="base.menu_management"/>
<menuitem action="open_module_tree" id="menu_module_tree" parent="base.menu_management"/>
</data>
</openerp>
+4 -7
View File
@@ -3,6 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -56,7 +57,7 @@ class wizard_install_module(wizard.interface):
terp = mod_obj.get_module_info(module)
if not terp.get('installable', True):
continue
# XXX check if this code is correct...
fm = imp.find_module(module)
try:
@@ -65,12 +66,8 @@ class wizard_install_module(wizard.interface):
if fm[0]:
fm[0].close()
mod_id = mod_obj.create(cr, uid, {
'name': module,
'state': 'uninstalled',
'description': terp.get('description', ''),
'shortdesc': terp.get('name', ''),
'author': terp.get('author', 'Unknown')})
values = mod_obj.get_values_from_terp(terp)
mod_id = mod_obj.create(cr, uid, dict(name=module, state='uninstalled', **values))
dependencies = terp.get('depends', [])
for d in dependencies:
cr.execute('insert into ir_module_module_dependency (module_id,name) values (%s, %s)', (mod_id, d))
@@ -25,31 +25,25 @@ import os
import tools
view_form_end = """<?xml version="1.0"?>
<form string="System upgrade done">
<separator string="System upgrade done"/>
<label align="0.0" string="The modules have been upgraded / installed !" colspan="4"/>
<label align="0.0" string="You may have to reinstall some language pack." colspan="4"/>
<label align="0.0" string="We suggest you to reload the menu tab (Ctrl+t Ctrl+r)." colspan="4"/>
<form string="System update done">
<separator string="System update completed"/>
<label align="0.0" string="The selected modules have been updated / installed !" colspan="4"/>
<label align="0.0" string="We suggest to reload the menu tab to see the new menus (Ctrl+T then Ctrl+R)." colspan="4"/>
</form>"""
view_form = """<?xml version="1.0"?>
<form string="System Upgrade">
<form string="System Update">
<image name="gtk-dialog-info" colspan="2"/>
<group colspan="2" col="4">
<label align="0.0" string="Your system will be upgraded." colspan="4"/>
<label align="0.0" string="Note that this operation my take a few minutes." colspan="4"/>
<label align="0.0" string="Your system will be updated." colspan="4"/>
<label align="0.0" string="Note that this operation might take a few minutes." colspan="4"/>
<separator string="Modules to update"/>
<field name="module_info" nolabel="1" colspan="4"/>
<separator string="Modules to download"/>
<field name="module_download" nolabel="1" colspan="4"/>
</group>
</form>"""
view_field = {
"module_info": {'type': 'text', 'string': 'Modules to update',
'readonly': True},
"module_download": {'type': 'text', 'string': 'Modules to download',
'readonly': True},
"module_info": {'type': 'text', 'string': 'Modules to update', 'readonly': True},
}
class wizard_info_get(wizard.interface):
@@ -59,9 +53,7 @@ class wizard_info_get(wizard.interface):
ids = mod_obj.search(cr, uid, [
('state', 'in', ['to upgrade', 'to remove', 'to install'])])
res = mod_obj.read(cr, uid, ids, ['name','state'], context)
url = mod_obj.download(cr, uid, ids, download=False, context=context)
return {'module_info': '\n'.join(map(lambda x: x['name']+' : '+x['state'], res)),
'module_download': '\n'.join(url)}
return {'module_info': '\n'.join(map(lambda x: x['name']+' : '+x['state'], res))}
def _check_upgrade_module(self,cr,uid,data,context):
pool = pooler.get_pool(cr.dbname)
@@ -105,7 +97,7 @@ class wizard_info_get(wizard.interface):
'result': {'type':'form', 'arch':view_form, 'fields': view_field,
'state':[
('end', 'Cancel', 'gtk-cancel'),
('start', 'Start Upgrade', 'gtk-ok', True)
('start', 'Start update', 'gtk-ok', True)
]
}
},
@@ -145,9 +137,7 @@ class wizard_info_get_simple(wizard.interface):
ids = mod_obj.search(cr, uid, [
('state', 'in', ['to upgrade', 'to remove', 'to install'])])
res = mod_obj.read(cr, uid, ids, ['name','state'], context)
url = mod_obj.download(cr, uid, ids, download=False, context=context)
return {'module_info': '\n'.join(map(lambda x: x['name']+' : '+x['state'], res)),
'module_download': '\n'.join(url)}
return {'module_info': '\n'.join(map(lambda x: x['name']+' : '+x['state'], res)),}
def _check_upgrade_module(self,cr,uid,data,context):
pool = pooler.get_pool(cr.dbname)
@@ -171,7 +161,7 @@ class wizard_info_get_simple(wizard.interface):
if dep_mod.state in ('unknown','uninstalled'):
unmet_packages.append(dep_mod.name)
if len(unmet_packages):
raise wizard.except_wizard('Unmet dependency !', 'Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages))
raise wizard.except_wizard('Unmet dependencies!', 'The following modules are not installed or unavailable. \n\n'+'\n'.join(unmet_packages))
mod_obj.download(cr, uid, ids, context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
@@ -191,7 +181,7 @@ class wizard_info_get_simple(wizard.interface):
'result': {'type':'form', 'arch':view_form, 'fields': view_field,
'state':[
('end', 'Cancel', 'gtk-cancel'),
('start', 'Start Upgrade', 'gtk-ok', True)
('start', 'Start update', 'gtk-ok', True)
]
}
},
@@ -50,7 +50,8 @@ class wizard_update_module(wizard.interface):
return {'update': update, 'add': add}
def _action_module_open(self, cr, uid, data, context):
return {
res = {
'domain': str([]),
'name': 'Module List',
'view_type': 'form',
@@ -59,8 +60,11 @@ class wizard_update_module(wizard.interface):
'view_id': False,
'type': 'ir.actions.act_window'
}
search_view_id = pooler.get_pool(cr.dbname).get('ir.ui.view').search(cr, uid, [('name','=','ir.module.module.list.select')], context=context)
if search_view_id:
res.update({'search_view_id' : search_view_id[0]})
return res
states = {
'init': {
+1 -3
View File
@@ -31,8 +31,6 @@ import res_company
import res_user
import res_request
import res_lang
import res_log
import ir_property
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+18 -16
View File
@@ -12,23 +12,25 @@
<field name="active" select="2"/>
<field name="bic" select="1"/>
<newline/>
<group string="Address" colspan="2" col="4">
<field name="street" select="2"/>
<field name="street2" select="2"/>
<field name="zip"/>
<field name="city"/>
<field name="country" select="2"/>
<field name="state" select="2"/>
<separator string="Address" colspan="2" col="4"/>
<separator string="Communication" colspan="2" col="4"/>
<group colspan="2" col="4">
<field name="street" select="2"/>
<field name="street2" select="2"/>
<field name="zip"/>
<field name="city"/>
<field name="country" select="2"/>
<field name="state" select="2"/>
</group>
<group string="Communication" colspan="2" col="4">
<field name="phone"/>
<field name="fax"/>
<field name="email"/>
<group colspan="2" col="4">
<field name="phone"/>
<field name="fax"/>
<field name="email"/>
</group>
</form>
</field>
</record>
<record id="view_res_bank_tree" model="ir.ui.view">
<field name="name">res.bank.tree</field>
<field name="model">res.bank</field>
@@ -41,15 +43,15 @@
</tree>
</field>
</record>
<record id="action_res_bank_form" model="ir.actions.act_window">
<field name="name">Bank List</field>
<field name="res_model">res.bank</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_res_bank_form" groups="group_extended" id="menu_action_res_bank_form" parent="menu_base_config" sequence="40"/>
<menuitem action="action_res_bank_form" groups="group_extended" id="menu_action_res_bank_form"
parent="base.menu_config_address_book" sequence="3"/>
</data>
</openerp>
+4 -3
View File
@@ -37,8 +37,9 @@
<field name="view_type">form</field>
</record>
<menuitem id="menu_localisation" name="Localisation" parent="menu_base_config" sequence="30"/>
<menuitem action="action_country" id="menu_country_partner" parent="menu_localisation"/>
<menuitem id="menu_localisation" name="Localisation" parent="menu_config_address_book" sequence="5"/>
<menuitem action="action_country" id="menu_country_partner" parent="menu_localisation" sequence="0"/>
<!--
State
@@ -78,7 +79,7 @@
<field name="view_id" ref="view_country_state_tree"/>
</record>
<menuitem action="action_country_state" id="menu_country_state_partner" parent="menu_localisation"/>
<menuitem action="action_country_state" id="menu_country_state_partner" parent="menu_localisation" sequence="1"/>
</data>
</openerp>
+33 -10
View File
@@ -40,8 +40,7 @@ class ir_property(osv.osv):
return res
def _models_get(self, cr, uid, context=None):
return self._models_field_get(cr, uid, 'model_id.model', 'model_id.name',
context)
return self._models_field_get(cr, uid, 'model', 'name', context)
def _models_get2(self, cr, uid, context=None):
return self._models_field_get(cr, uid, 'relation', 'relation', context)
@@ -64,6 +63,7 @@ class ir_property(osv.osv):
'type' : fields.selection([('char', 'Char'),
('float', 'Float'),
('boolean', 'Boolean'),
('integer', 'Integer'),
('integer_big', 'Integer Big'),
('text', 'Text'),
@@ -85,10 +85,20 @@ class ir_property(osv.osv):
value = values.pop('value', None)
if not value:
return values
type_ = values.get('type', 'many2one')
prop = None
type_ = values.get('type')
if not type_:
if ids:
prop = self.browse(cr, uid, ids[0])
type_ = prop.type
else:
type_ = self._defaults['type']
type2field = {
'char': 'value_text',
'float': 'value_float',
'boolean' : 'value_integer',
'integer': 'value_integer',
'integer_big': 'value_integer',
'text': 'value_text',
@@ -107,9 +117,9 @@ class ir_property(osv.osv):
elif isinstance(value, (int, long)):
field_id = values.get('fields_id')
if not field_id:
if not ids:
if not prop:
raise ValueError()
field_id = self.browse(cr, uid, ids[0]).fields_id
field_id = prop.fields_id
else:
field_id = self.pool.get('ir.model.fields').browse(cr, uid, field_id)
@@ -138,6 +148,8 @@ class ir_property(osv.osv):
return record.value_text
elif record.type == 'float':
return record.value_float
elif record.type == 'boolean':
return bool(record.value_integer)
elif record.type in ('integer', 'integer_big'):
return record.value_integer
elif record.type == 'binary':
@@ -147,11 +159,13 @@ class ir_property(osv.osv):
elif record.type == 'datetime':
return record.value_datetime
elif record.type == 'date':
if not record.value_datetime:
return False
return time.strftime('%Y-%m-%d', time.strptime(record.value_datetime, '%Y-%m-%d %H:%M:%S'))
return False
def get(self, cr, uid, name, model, res_id=False, context=None):
def get(self, cr, uid, name, model, res_id=False, context={}):
domain = self._get_domain(cr, uid, name, model, context=context)
if domain is not None:
domain = [('res_id', '=', res_id)] + domain
@@ -159,18 +173,27 @@ class ir_property(osv.osv):
return self.get_by_id(cr, uid, nid, context=context)
return False
def _get_domain_default(self, cr, uid, prop_name, model, context=None):
domain = self._get_domain(cr, uid, prop_name, model, context=context)
if domain is None:
return None
return ['&', ('res_id', '=', False)] + domain
def _get_domain(self, cr, uid, prop_name, model, context=None):
context = context or {}
cr.execute('select id from ir_model_fields where name=%s and model=%s', (prop_name, model))
res = cr.fetchone()
if not res:
return None
company = self.pool.get('res.company')
cid = company._company_default_get(cr, uid, model, res[0],
context=context)
if 'force_company' in context and context['force_company']:
cid = context['force_company']
else:
company = self.pool.get('res.company')
cid = company._company_default_get(cr, uid, model, res[0], context=context)
domain = ['&', ('fields_id', '=', res[0]),
'|', ('company_id', '=', cid), ('company_id', '=', False)]
'|', ('company_id', '=', cid), ('company_id', '=', False)]
return domain
ir_property()
+1 -1
View File
@@ -30,7 +30,7 @@
<field name="company_id" select="1" groups="base.group_multi_company"/>
<field colspan="4" name="fields_id" select="1"/>
<field colspan="4" name="type"/>
<group colspan="4" attrs="{'invisible' : [('type', 'not in', ('integer', 'integer_big'))]}">
<group colspan="4" attrs="{'invisible' : [('type', 'not in', ('integer', 'integer_big', 'boolean'))]}">
<field colspan="4" name="value_integer" widget="integer"/>
</group>
<group colspan="4" attrs="{'invisible' : [('type', '!=', 'float')]}">
+2 -28
View File
@@ -59,43 +59,17 @@ class res_partner_event(osv.osv):
_name = "res.partner.event"
_columns = {
'name': fields.char('Events',size=64, required=True),
'som': fields.many2one('res.partner.som', 'State of Mind'),
'description': fields.text('Description'),
'planned_cost': fields.float('Planned Cost'),
'planned_revenue': fields.float('Planned Revenue'),
'probability': fields.float('Probability (0.50)'),
'document': fields.reference('Document', selection=_links_get, size=128),
'partner_id': fields.many2one('res.partner', 'Partner', select=True),
'date': fields.datetime('Date', size=16),
'user_id': fields.many2one('res.users', 'User'),
'canal_id': fields.many2one('res.partner.canal', 'Channel'),
'partner_type': fields.selection([('customer','Customer'),('retailer','Retailer'),('prospect','Commercial Prospect')], 'Partner Relation'),
'type': fields.selection([('sale','Sale Opportunity'),('purchase','Purchase Offer'),('prospect','Prospect Contact')], 'Type of Event'),
'event_ical_id': fields.char('iCal id', size=64),
}
_order = 'date desc'
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'user_id': lambda self, cr, uid, context: uid,
}
res_partner_event()
class res_partner_event_type(osv.osv):
_name = "res.partner.event.type"
_description = "Partner Events"
_columns = {
'name': fields.char('Event Type',size=64, required=True),
'key': fields.char('Key', size=64, required=True),
'active': fields.boolean('Active'),
}
_defaults = {
'active': lambda *a: 1
}
def check(self, cr, uid, key, context={}):
return self.search(cr, uid, [('key','=',key)])
res_partner_event_type()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+9 -54
View File
@@ -30,42 +30,8 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="next_id_14" name="Partner Events" parent="base.menu_base_config_partner"/>
<menuitem action="res_partner_canal-act" id="menu_res_partner_canal-act" parent="next_id_14"/>
<record id="res_partner_event_type-view" model="ir.ui.view">
<field name="name">res.partner.event.type.form</field>
<field name="model">res.partner.event.type</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Event Type">
<field name="name" select="1"/>
<field name="active" select="1"/>
<field name="key" select="1"/>
</form>
</field>
</record>
<record id="res_partner_event_type_view_tree" model="ir.ui.view">
<field name="name">res.partner.event.type.tree</field>
<field name="model">res.partner.event.type</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Event Type">
<field name="name"/>
<field name="active"/>
</tree>
</field>
</record>
<record id="res_partner_event_type-act" model="ir.actions.act_window">
<field name="name">Active Partner Events</field>
<field name="res_model">res.partner.event.type</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'active_test': False}</field>
</record>
<menuitem action="res_partner_event_type-act" id="menu_res_partner_event_type-act" parent="base.next_id_14"/>
<menuitem id="menu_partner_events" name="Events" parent="menu_config_address_book" sequence="6"/>
<menuitem action="res_partner_canal-act" id="menu_res_partner_canal-act" parent="menu_partner_events"/>
<record id="res_partner_som_tree-view" model="ir.ui.view">
<field name="name">res.partner.som.tree</field>
@@ -96,29 +62,20 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="res_partner_som-act" id="menu_res_partner_som-act" parent="base.next_id_14"/>
<menuitem action="res_partner_som-act" id="menu_res_partner_som-act" parent="menu_partner_events"/>
<record id="res_partner_event-wopartner-view_form" model="ir.ui.view">
<field name="name">res.partner.event.form</field>
<field name="model">res.partner.event</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Partner Events">
<form string="Event Logs">
<separator colspan="4" string="General Description"/>
<field name="name" select="1"/>
<field name="partner_type" select="1"/>
<field name="som" select="1"/>
<field name="name" select="1" string="Name"/>
<field name="date" select="1"/>
<field name="canal_id" select="1"/>
<field name="type" select="1"/>
<field name="user_id" select="1"/>
<field name="probability"/>
<field name="planned_revenue"/>
<field name="planned_cost"/>
<separator colspan="4" string="Description"/>
<field colspan="4" name="description"/>
<separator colspan="4" string="Document Link"/>
<field colspan="4" name="document"/>
<field colspan="4" name="description" nolabel="1"/>
</form>
</field>
</record>
@@ -128,14 +85,12 @@
<field name="model">res.partner.event</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Partner Events">
<tree string="Event Logs">
<field name="date"/>
<field name="name"/>
<field name="som"/>
<field name="partner_type"/>
<field name="name" string="Event"/>
<field name="user_id"/>
</tree>
</field>
</record>
</data>
</openerp>
</openerp>
+12 -18
View File
@@ -55,7 +55,7 @@ class res_partner_category(osv.osv):
def _check_recursion(self, cr, uid, ids):
level = 100
while len(ids):
cr.execute('select distinct parent_id from res_partner_category where id in ('+','.join(map(str, ids))+')')
cr.execute('select distinct parent_id from res_partner_category where id IN %s',(tuple(ids),))
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
if not level:
return False
@@ -90,18 +90,6 @@ class res_partner_title(osv.osv):
_order = 'name'
res_partner_title()
def _contact_title_get(self, cr, uid, context={}):
obj = self.pool.get('res.partner.title')
ids = obj.search(cr, uid, [('domain', '=', 'contact')])
res = obj.read(cr, uid, ids, ['shortcut','name'], context)
return [(r['shortcut'], r['name']) for r in res] + [('','')]
def _partner_title_get(self, cr, uid, context={}):
obj = self.pool.get('res.partner.title')
ids = obj.search(cr, uid, [('domain', '=', 'partner')])
res = obj.read(cr, uid, ids, ['shortcut','name'], context)
return [(r['shortcut'], r['name']) for r in res] + [('','')]
def _lang_get(self, cr, uid, context={}):
obj = self.pool.get('res.lang')
ids = obj.search(cr, uid, [], context=context)
@@ -116,7 +104,7 @@ class res_partner(osv.osv):
_columns = {
'name': fields.char('Name', size=128, required=True, select=True),
'date': fields.date('Date', select=1),
'title': fields.selection(_partner_title_get, 'Title', size=32),
'title': fields.many2one('res.partner.title','Title'),
'parent_id': fields.many2one('res.partner','Parent Partner', select=2),
'child_ids': fields.one2many('res.partner', 'parent_id', 'Partner Ref.'),
'ref': fields.char('Reference', size=64),
@@ -124,7 +112,7 @@ class res_partner(osv.osv):
'user_id': fields.many2one('res.users', 'Salesman', help='The internal user that is in charge of communicating with this partner if any.'),
'vat': fields.char('VAT',size=32 ,help="Value Added Tax number. Check the box if the partner is subjected to the VAT. Used by the VAT legal statement."),
'bank_ids': fields.one2many('res.partner.bank', 'partner_id', 'Banks'),
'website': fields.char('Website',size=64),
'website': fields.char('Website',size=64, help="Website of Partner"),
'comment': fields.text('Notes'),
'address': fields.one2many('res.partner.address', 'partner_id', 'Contacts'),
'category_id': fields.many2many('res.partner.category', 'res_partner_category_rel', 'partner_id', 'category_id', 'Categories'),
@@ -136,6 +124,7 @@ class res_partner(osv.osv):
'supplier': fields.boolean('Supplier', help="Check this box if the partner is a supplier. If it's not checked, purchase people will not see it when encoding a purchase order."),
'city': fields.related('address', 'city', type='char', string='City'),
'phone': fields.related('address', 'phone', type='char', string='Phone'),
'mobile': fields.related('address', 'mobile', type='char', string='Mobile'),
'country': fields.related('address', 'country_id', type='many2one', relation='res.country', string='Country'),
'employee': fields.boolean('Employee', help="Check this box if the partner is an Employee."),
'email': fields.related('address', 'email', type='char', size=240, string='E-mail'),
@@ -158,6 +147,9 @@ class res_partner(osv.osv):
default.update({'name': name+ _(' (copy)'), 'events':[]})
return super(res_partner, self).copy(cr, uid, id, default, context)
def do_share(self, cr, uid, ids, *args):
return True
def _check_ean_key(self, cr, uid, ids):
for partner_o in pooler.get_pool(cr.dbname).get('res.partner').read(cr, uid, ids, ['ean13',]):
thisean=partner_o['ean13']
@@ -222,7 +214,7 @@ class res_partner(osv.osv):
return True
def address_get(self, cr, uid, ids, adr_pref=['default']):
cr.execute('select type,id from res_partner_address where partner_id in ('+','.join(map(str,map(int, ids)))+')')
cr.execute('select type,id from res_partner_address where partner_id IN %s',(tuple(ids),))
res = cr.fetchall()
adr = dict(res)
# get the id of the (first) default address if there is one,
@@ -274,10 +266,10 @@ class res_partner_address(osv.osv):
_description ='Partner Addresses'
_name = 'res.partner.address'
_columns = {
'partner_id': fields.many2one('res.partner', 'Partner', ondelete='set null', select=True, help="Keep empty for a private address, not related to partner."),
'partner_id': fields.many2one('res.partner', 'Partner Name', ondelete='set null', select=True, help="Keep empty for a private address, not related to partner."),
'type': fields.selection( [ ('default','Default'),('invoice','Invoice'), ('delivery','Delivery'), ('contact','Contact'), ('other','Other') ],'Address Type', help="Used to select automatically the right address according to the context in sales and purchases documents."),
'function': fields.char('Function', size=64),
'title': fields.selection(_contact_title_get, 'Title', size=32),
'title': fields.many2one('res.partner.title','Title'),
'name': fields.char('Contact Name', size=64, select=1),
'street': fields.char('Street', size=128),
'street2': fields.char('Street2', size=128),
@@ -290,6 +282,8 @@ class res_partner_address(osv.osv):
'fax': fields.char('Fax', size=64),
'mobile': fields.char('Mobile', size=64),
'birthdate': fields.char('Birthdate', size=64),
'is_customer_add': fields.related('partner_id', 'customer', type='boolean', string='Customer'),
'is_supplier_add': fields.related('partner_id', 'supplier', type='boolean', string='Supplier'),
'active': fields.boolean('Active', help="Uncheck the active field to hide the contact."),
# 'company_id': fields.related('partner_id','company_id',type='many2one',relation='res.company',string='Company', store=True),
'company_id': fields.many2one('res.company', 'Company',select=1),
+18 -9
View File
@@ -229,7 +229,6 @@
<field name="city">Taiwan</field>
<field name="name">Tang</field>
<field name="zip">23410</field>
<field name="title">M.</field>
<field model="res.country" name="country_id" search="[('name','=','Taiwan')]"/>
<field name="street">31 Hong Kong street</field>
<field name="type">default</field>
@@ -239,7 +238,6 @@
<field name="city">Hong Kong</field>
<field name="name">Wong</field>
<field name="zip">23540</field>
<field name="title">M.</field>
<field model="res.country" name="country_id" search="[('name','=','China')]"/>
<field name="street">56 Beijing street</field>
<field name="type">default</field>
@@ -249,7 +247,6 @@
<field name="city">Bruxelles</field>
<field name="name">Etienne Lacarte</field>
<field name="zip">2365</field>
<field name="title">M.</field>
<field model="res.country" name="country_id" search="[('name','=','Belgium')]"/>
<field name="street">23 rue du Vieux Bruges</field>
<field name="type">default</field>
@@ -259,7 +256,6 @@
<field name="city">Namur</field>
<field name="name">Jean Guy Lavente</field>
<field name="zip">2541</field>
<field name="title">M.</field>
<field model="res.country" name="country_id" search="[('name','=','Belgium')]"/>
<field name="street">42 rue de la Lesse</field>
<field name="type">default</field>
@@ -269,17 +265,33 @@
<field name="city">Wavre</field>
<field name="name">Sylvie Lelitre</field>
<field name="zip">5478</field>
<field name="title">Ms.</field>
<field model="res.country" name="country_id" search="[('name','=','Belgium')]"/>
<field name="street">69 rue de Chimay</field>
<field name="type">default</field>
<field name="partner_id" ref="res_partner_agrolait"/>
</record>
<record id="res_partner_address_8delivery" model="res.partner.address">
<field name="city">Wavre</field>
<field name="name">Paul Lelitre</field>
<field name="zip">5478</field>
<field model="res.country" name="country_id" search="[('name','=','Belgium')]"/>
<field name="street">71 rue de Chimay</field>
<field name="type">delivery</field>
<field name="partner_id" ref="res_partner_agrolait"/>
</record>
<record id="res_partner_address_8invoice" model="res.partner.address">
<field name="city">Wavre</field>
<field name="name">Serge Lelitre</field>
<field name="zip">5478</field>
<field model="res.country" name="country_id" search="[('name','=','Belgium')]"/>
<field name="street">69 rue de Chimay</field>
<field name="type">invoice</field>
<field name="partner_id" ref="res_partner_agrolait"/>
</record>
<record id="res_partner_address_9" model="res.partner.address">
<field name="city">Paris</field>
<field name="name">Arthur Grosbonnet</field>
<field name="zip">75016</field>
<field name="title">M.</field>
<field model="res.country" name="country_id" search="[('name','=','France')]"/>
<field name="street">1 rue Rockfeller</field>
<field name="type">default</field>
@@ -289,7 +301,6 @@
<field name="city">Alencon</field>
<field name="name">Sebastien LANGE</field>
<field name="zip">61000</field>
<field name="title">M.</field>
<field name="email">contact@syleam.fr</field>
<field name="street">1 place de l'Église</field>
<field name="phone">+33 (0) 2 33 31 22 10</field>
@@ -301,7 +312,6 @@
<field name="city">Liege</field>
<field name="name">Karine Lesbrouffe</field>
<field name="zip">6985</field>
<field name="title">Mss</field>
<field model="res.country" name="country_id" search="[('name','=','Belgium')]"/>
<field name="street">2 Impasse de la Soif</field>
<field name="type">default</field>
@@ -311,7 +321,6 @@
<field name="city">Shanghai</field>
<field name="name">Zen</field>
<field name="zip">4785552</field>
<field name="title">M.</field>
<field model="res.country" name="country_id" search="[('name','=','China')]"/>
<field name="street">52 Chop Suey street</field>
<field name="type">default</field>
+56 -74
View File
@@ -2,12 +2,17 @@
<openerp>
<data>
<menuitem icon="terp-partner" id="menu_base_partner" name="Sales" sequence="0"/>
<menuitem id="menu_address_book" name="Address Book" parent="menu_base_partner" sequence="2"/>
<menuitem id="menu_base_config" name="Configuration" parent="menu_base_partner" sequence="9"
<menuitem id="menu_base_config" name="Configuration" parent="menu_base_partner" sequence="30"
groups="group_system"/>
<menuitem id="menu_base_config_partner" name="Partners" parent="menu_base_config" sequence="10" groups="base.group_extended"/>
<menuitem id="menu_base_config_contact" name="Contacts" parent="menu_base_config" sequence="20" />
<menuitem id="menu_config_address_book" name="Address Book" parent="menu_base_config" sequence="3"
groups="group_system"/>
<menuitem id="menu_config_crm_address_contact" name="Contacts" parent="menu_config_address_book" sequence="4"
groups="group_system"/>
<!--
=====================
@@ -21,10 +26,21 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Contact">
<field name="name" select='1'/>
<field name="partner_id" select='1'/>
<field name="country_id" select='1'/>
</search>
<group>
<filter string="Customer" name="customer" icon="terp-personal" domain="[('is_customer_add','=','1')]" />
<filter string="Supplier" name="supplier" icon="terp-personal" domain="[('is_supplier_add','=','1')]" />
<separator orientation="vertical"/>
<field name="partner_id" />
<field name="name" />
<field name="country_id" />
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by' : 'partner_id'}" />
<filter string="Country" icon="terp-go-home" domain="[]" context="{'group_by' : 'country_id'}" />
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}" />
</group>
</search>
</field>
</record>
@@ -64,7 +80,7 @@
<field name="company_id" groups="base.group_multi_company" widget="selection" colspan="2"/>
<newline/>
<field name="name"/>
<field domain="[('domain', '=', 'contact')]" name="title"/>
<field domain="[('domain', '=', 'contact')]" name="title" widget="selection"/>
<field name="function"/>
</group>
<group colspan="2" col="2">
@@ -92,6 +108,7 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner.address</field>
<field name="view_type">form</field>
<field name="context">{"search_default_customer":1}</field>
<field name="search_view_id" ref="view_res_partner_address_filter"/>
</record>
<record id="action_partner_address_form_view1" model="ir.actions.act_window.view">
@@ -122,7 +139,7 @@
<field name="arch" type="xml">
<form string="Contacts">
<field name="name" select="1"/>
<field domain="[('domain', '=', 'contact')]" name="title"/>
<field domain="[('domain', '=', 'contact')]" name="title" widget="selection"/>
<field name="street"/>
<field name="street2"/>
<field name="type"/>
@@ -190,7 +207,8 @@
<field name="view_type">form</field>
<field name="domain">[('domain','=','partner')]</field>
</record>
<menuitem action="action_partner_title_partner" id="menu_partner_title_partner" parent="menu_base_config_partner" sequence="10"/>
<menuitem action="action_partner_title_partner" id="menu_partner_title_partner" name="Company Title" parent="menu_config_address_book" sequence="0"/>
<record id="action_partner_title_contact" model="ir.actions.act_window">
<field name="name">Contact Titles</field>
@@ -199,8 +217,8 @@
<field name="view_type">form</field>
<field name="domain">[('domain','=','contact')]</field>
</record>
<menuitem action="action_partner_title_contact" id="menu_partner_title_contact" parent="menu_base_config_contact" sequence="10"/>
<menuitem action="action_partner_title_contact" id="menu_partner_title_contact" name="Titles" parent="menu_config_crm_address_contact" sequence="3"/>
<!--
=======================
Partner
@@ -235,13 +253,13 @@
<group colspan="5" col="6">
<field name="name" select="1"/>
<field name="ref"/>
<field domain="[('domain', '=', 'partner')]" name="title" groups="base.group_extended"/>
<field domain="[('domain', '=', 'partner')]" name="title" size="0" groups="base.group_extended" widget="selection"/>
<field name="lang"/>
</group>
<group colspan="1" col="2">
<field name="customer" select="1"/>
<field name="supplier"/>
<field name="employee"/>
<!-- <field name="employee"/>-->
</group>
</group>
<notebook colspan="4">
@@ -250,7 +268,7 @@
<form string="Partner Contacts">
<group colspan="4" col="6">
<field name="name"/>
<field domain="[('domain', '=', 'contact')]" name="title" size="0"/>
<field domain="[('domain', '=', 'contact')]" name="title" size="0" widget="selection"/>
<field name="function"/>
</group>
<newline/>
@@ -281,8 +299,10 @@
<field name="email"/>
</tree>
</field>
<separator colspan="4" string="Categories"/>
<field colspan="4" name="category_id" nolabel="1" height="90" groups="base.group_extended"/>
<group groups="base.group_extended">
<separator colspan="4" string="Categories"/>
<field colspan="4" name="category_id" nolabel="1"/>
</group>
</page>
<page string="Sales &amp; Purchases">
<separator string="General Information" colspan="4"/>
@@ -294,8 +314,7 @@
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<newline/>
</page>
<page string="History">
<field colspan="4" name="events" nolabel="1" widget="one2many_list"/>
<page string="History" groups="base.group_extended">
</page>
<page string="Notes">
<field colspan="4" name="comment" nolabel="1"/>
@@ -312,28 +331,31 @@
<field name="arch" type="xml">
<search string="Search Partner">
<group col='10' colspan='4'>
<filter string="My Partners" icon="terp-partner" domain="[('user_id','=',uid)]"/>
<separator orientation="vertical"/>
<filter string="Customers" icon="terp-partner" domain="[('customer','=',1)]" help="Customer Partners"/>
<filter string="Suppliers" icon="terp-partner" domain="[('supplier','=',1)]" help="Supplier Partners"/>
<filter string="Employees" icon="terp-partner" domain="[('employee','=',1)]" help="Employee Partners"/>
<filter string="Customers" name="customer" icon="terp-personal" domain="[('customer','=',1)]" help="Customer Partners"/>
<filter string="Suppliers" name="supplier" icon="terp-personal" domain="[('supplier','=',1)]" help="Supplier Partners"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="address" select="1"/>
<field name="country" select="1"/>
<field name="category_id" select="1"/>
<field name="user_id" select="1"/>
<field name="user_id" select="1">
<filter string="My Partners" icon="terp-personal+" domain="[('user_id','=',uid)]"/>
</field>
</group>
<newline />
<group expand="0" string="Group By...">
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by' : 'user_id'}" />
</group>
</search>
</field>
</record>
<record id="action_partner_form" model="ir.actions.act_window">
<field name="name">Partners</field>
<field name="name">Customers</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="context">{"search_default_supplier":supplier}</field>
<field name="context">{"search_default_customer":1}</field>
<field name="search_view_id" ref="view_res_partner_filter"/>
</record>
<record id="action_partner_form_view1" model="ir.actions.act_window.view">
@@ -360,7 +382,7 @@
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="domain">[('customer','=',1)]</field>
<field name="context">{'default_customer':1}</field>
<field name="context">{'default_customer':1, 'search_default_customer':1}</field>
<field name="filter" eval="True"/>
</record>
@@ -369,8 +391,8 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="domain">[('supplier','=',1)]</field>
<field name="context">{'default_customer':0, 'default_supplier':1}</field>
<field name="domain">[]</field>
<field name="context">{'default_customer':0, 'search_default_supplier': 1, 'default_supplier':1}</field>
<field name="filter" eval="True"/>
</record>
@@ -393,15 +415,6 @@
<field name="filter" eval="True"/>
</record>
<record id="action_partner_customer_form_new" model="ir.actions.act_window">
<field name="name">New Partner</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="view_partner_form"/>
</record>
<record id="view_payterm_form" model="ir.ui.view">
<field name="name">res.payterm</field>
<field name="model">res.payterm</field>
@@ -484,40 +497,6 @@
</field>
</record>
<!--
======================
Company Architecture
======================
-->
<record id="view_partner_tree2" model="ir.ui.view">
<field name="name">res.partner.tree</field>
<field name="model">res.partner</field>
<field name="type">tree</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree string="Partners">
<field name="name"/>
<field name="lang"/>
<field name="ref"/>
</tree>
</field>
</record>
<record id="action2" model="ir.actions.act_window">
<field name="name">Company Architecture</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="domain">[('id','in',active_ids)]</field>
<field name="view_type">tree</field>
<field name="view_id" ref="view_partner_tree2"/>
</record>
<record id="ir_partner_structure" model="ir.values">
<field eval="'client_action_multi'" name="key2"/>
<field eval="'res.partner'" name="model"/>
<field name="name">Company Architecture</field>
<field eval="'ir.actions.act_window,'+str(action2)" name="value"/>
<field eval="True" name="object"/>
</record>
<!--
======================
Categories
@@ -559,6 +538,7 @@
</tree>
</field>
</record>
<!--
<record id="action_partner_category" model="ir.actions.act_window">
<field name="name">Partners by Categories</field>
<field name="type">ir.actions.act_window</field>
@@ -569,6 +549,7 @@
</record>
<menuitem action="action_partner_category" id="menu_partner_category_main" parent="base.menu_address_book" sequence="1"
groups="base.group_extended"/>
-->
<record id="action_partner_by_category" model="ir.actions.act_window">
<field name="name">Partner Categories</field>
@@ -594,7 +575,8 @@
<field name="res_model">res.partner.category</field>
<field name="view_type">form</field>
</record>
<menuitem action="action_partner_category_form" id="menu_partner_category_form" parent="base.menu_base_config_partner"/>
<menuitem action="action_partner_category_form" id="menu_partner_category_form" name="Categories" sequence="2" parent="menu_config_address_book"/>
<act_window domain="[('partner_id', '=', active_id)]"
id="act_res_partner_event" name="Events"
@@ -604,7 +586,7 @@
/>
<record id="ir_ui_view_sc_partner0" model="ir.ui.view_sc">
<field name="name">Partner</field>
<field name="name">Address Book</field>
<field name="resource">ir.ui.menu</field>
<field name="user_id" ref="base.user_root"/>
<field name="res_id" ref="menu_partner_form"/>
@@ -1,11 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<wizard id="res_partner_send_sms_wizard" model="res.partner" name="res.partner.sms_send" string="Send SMS"/>
<data>
<wizard id="res_partner_mass_mailing_wizard" model="res.partner" name="res.partner.spam_send" string="Mass Mailing"/>
<!--
<wizard string="Check EAN13" model="res.partner" name="res.partner.ean13"/>
<wizard string="Clear IDs" model="res.partner" name="res.partner.clear_ids"/>
-->
</data>
</openerp>
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
@@ -15,14 +15,14 @@
# 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/>.
#
##############################################################################
import wizard_sms
import wizard_spam
import wizard_clear_ids
import wizard_ean_check
import partner_sms_send
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,84 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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/>.
#
##############################################################################
import wizard
import netsvc
import tools
from osv import fields, osv
class partner_sms_send(osv.osv_memory):
""" Create Menu """
_name = "partner.sms.send"
_description = "Send SMS"
_columns = {
'mobile_to': fields.char('To', size=256, required=True),
'app_id': fields.char('API ID', size=256,required=True),
'user': fields.char('Login', size=256,required=True),
'password': fields.char('Password', size=256,required=True),
'text': fields.text('SMS Message',required=True),
}
def default_get(self, cr, uid, fields, context=None):
"""
This function gets default values
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param fields: List of fields for default value
@param context: A standard dictionary for contextual values
@return : default values of fields.
"""
partner_pool = self.pool.get('res.partner')
active_ids = context and context.get('active_ids', [])
res = {}
for partner in partner_pool.browse(cr, uid, active_ids, context=context):
if 'mobile_to' in fields:
res.update({'mobile_to': partner.mobile})
return res
def sms_send(self, cr, uid, ids, context):
"""
to send sms
@param cr: the current row, from the database cursor.
@param uid: the current user’s ID for security checks.
@param ids: the ID or list of IDs
@param context: A standard dictionary
@return: number indicating the acknowledgement
"""
nbr = 0
for data in self.browse(cr, uid, ids, context) :
tools.sms_send(
data.user,
data.password,
data.app_id,
tools.ustr(data.text),
data.mobile_to)
nbr += 1
return {}
partner_sms_send()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Create Menu From view -->
<record id="view_partner_sms_send" model="ir.ui.view">
<field name="name">Send SMS</field>
<field name="model">partner.sms.send</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="SMS - Gateway: clickatell">
<separator string="Bulk SMS send" colspan="4"/>
<field name="mobile_to"/>
<field name="app_id"/>
<field name="user"/>
<field name="password"/>
<separator string="Message" colspan="4" />
<field name="text" colspan="4" nolabel="1"/>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="sms_send" string="Send SMS" type="object" icon="gtk-go-back"/>
</group>
</form>
</field>
</record>
<act_window name="SMS Send"
res_model="partner.sms.send"
src_model="res.partner"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_partner_sms_send"
groups="base.group_extended"/>
</data>
</openerp>
@@ -1,74 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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/>.
#
##############################################################################
import wizard
import netsvc
import tools
sms_send_form = '''<?xml version="1.0"?>
<form string="%s">
<separator string="%s" colspan="4"/>
<field name="app_id"/>
<newline/>
<field name="user"/>
<field name="password"/>
<newline/>
<field name="text" colspan="4"/>
</form>''' % ('SMS - Gateway: clickatell','Bulk SMS send')
sms_send_fields = {
'app_id': {'string':'API ID', 'type':'char', 'required':True},
'user': {'string':'Login', 'type':'char', 'required':True},
'password': {'string':'Password', 'type':'char', 'required':True},
'text': {'string':'SMS Message', 'type':'text', 'required':True}
}
def _sms_send(self, cr, uid, data, context):
service = netsvc.LocalService("object_proxy")
res_ids = service.execute(cr.dbname, uid, 'res.partner.address', 'search', [('partner_id','in',data['ids']),('type','=','default')])
res = service.execute(cr.dbname, uid, 'res.partner.address', 'read', res_ids, ['mobile'])
nbr = 0
for r in res:
to = r['mobile']
if to:
tools.sms_send(data['form']['user'], data['form']['password'], data['form']['app_id'], unicode(data['form']['text'], 'utf-8').encode('latin1'), to)
nbr += 1
return {'sms_sent': nbr}
class part_sms(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':sms_send_form, 'fields': sms_send_fields, 'state':[('end','Cancel'), ('send','Send SMS')]}
},
'send': {
'actions': [_sms_send],
'result': {'type': 'state', 'state':'end'}
}
}
part_sms('res.partner.sms_send')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+16 -9
View File
@@ -24,7 +24,7 @@ from osv import fields
import os
import tools
from tools.translate import _
import base64
from tools.safe_eval import safe_eval as eval
class multi_company_default(osv.osv):
"""
@@ -92,11 +92,18 @@ class res_company(osv.osv):
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
user_preference = context and context.get('user_preference', False) or False
if context is None:
context = {}
user_preference = context.get('user_preference', False)
if user_preference:
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
cmp_ids = list(set([user.company_id.id] + [cmp.id for cmp in user.company_ids]))
# TODO: improve this as soon as the client sends the proper
# combination of active_id and active_model we'll be able to
# use active_id here to restrict to the user being modified instead
# of current user.
user_id = context.get('user_id', uid)
user = self.pool.get('res.users').browse(cr, uid, user_id, context=context)
cmp_ids = list(set([user.company_id.id] + [cmp.id for cmp in user.company_ids]))
return cmp_ids
return super(res_company, self).search(cr, uid, args, offset=offset, limit=limit, order=order,
context=context, count=count)
@@ -126,12 +133,12 @@ class res_company(osv.osv):
ids = self._get_company_children(cr, uid, company)
return ids
@tools.cache()
def _get_company_children(self, cr, uid=None, company=None):
if not company:
return []
ids = self.search(cr, uid, [('parent_id','child_of',[company])])
return ids
_get_company_children = tools.cache()(_get_company_children)
def _get_partner_hierarchy(self, cr, uid, company_id, context={}):
if company_id:
@@ -161,7 +168,6 @@ class res_company(osv.osv):
def write(self, cr, *args, **argv):
self.cache_restart(cr)
# Restart the cache on the company_get method
return super(res_company, self).write(cr, *args, **argv)
def _get_euro(self, cr, uid, context={}):
@@ -173,7 +179,7 @@ class res_company(osv.osv):
def _check_recursion(self, cr, uid, ids):
level = 100
while len(ids):
cr.execute('select distinct parent_id from res_company where id in ('+','.join(map(str, ids))+')')
cr.execute('select distinct parent_id from res_company where id IN %s',(tuple(ids),))
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
if not level:
return False
@@ -181,8 +187,9 @@ class res_company(osv.osv):
return True
def _get_logo(self, cr, uid, ids):
file_data = open('../pixmaps/openerp-header.png','rb').read()
return base64.encodestring(file_data)
return open(os.path.join(
tools.config['root_path'], '..', 'pixmaps', 'openerp-header.png'),
'rb') .read().encode('base64')
def _get_header2(self,cr,uid,ids):
+1 -1
View File
@@ -66,7 +66,7 @@
</record>
<menuitem id="menu_custom_multicompany"
name="Multi company"
name="Multi-Companies"
parent="base.menu_custom"
sequence="50"/>
+5 -4
View File
@@ -77,7 +77,7 @@ class res_config_configurable(osv.osv_memory):
todo_obj = todos.browse(cr, uid, active_todos[0], context=None)
todo_groups = map(lambda x:x.id, todo_obj.groups_id)
if todo_groups:
cr.execute("select 1 from res_groups_users_rel where uid=%s and gid=ANY(%s)",(uid, todo_groups,))
cr.execute("select 1 from res_groups_users_rel where uid=%s and gid IN %s",(uid, tuple(todo_groups),))
dont_skip_todo = bool(cr.fetchone())
if dont_skip_todo:
return todos.browse(cr, uid, active_todos[0], context=None)
@@ -121,7 +121,7 @@ class res_config_configurable(osv.osv_memory):
'res_model': action.res_model,
'type': action.type,
'target': action.target,
}
}
self.logger.notifyChannel(
'actions', netsvc.LOG_INFO,
'all configuration actions have been executed')
@@ -133,6 +133,7 @@ class res_config_configurable(osv.osv_memory):
.read(cr, uid, current_user_menu.id)
def start(self, cr, uid, ids, context=None):
print 'Start'
ids2 = self.pool.get('ir.actions.todo').search(cr, uid, [], context=context)
for todo in self.pool.get('ir.actions.todo').browse(cr, uid, ids2, context=context):
if (todo.restart=='always') or (todo.restart=='onskip' and (todo.state in ('skip','cancel'))):
@@ -390,6 +391,8 @@ class res_config_installer(osv.osv_memory):
cr, uid, fields, context, read_access)
for module in self._already_installed(cr, uid, context=context):
if module.name not in fields:
continue
fields[module.name].update(
readonly=True,
help=fields[module.name].get('help', '') +
@@ -408,8 +411,6 @@ class res_config_installer(osv.osv_memory):
cr, uid,
modules.search(cr, uid, [('name','in',to_install)]),
'to install', ['uninstalled'], context=context)
cr.commit()
pooler.restart_pool(cr.dbname, update_module=True)
res_config_installer()
+3 -3
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,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/>.
#
##############################################################################
import time
@@ -35,7 +35,7 @@ class res_currency(osv.osv):
date=time.strftime('%Y-%m-%d')
date= date or time.strftime('%Y-%m-%d')
for id in ids:
cr.execute("SELECT currency_id, rate FROM res_currency_rate WHERE currency_id = %s AND name <= '%s' ORDER BY name desc LIMIT 1" % (id, date))
cr.execute("SELECT currency_id, rate FROM res_currency_rate WHERE currency_id = %s AND name <= %s ORDER BY name desc LIMIT 1" ,(id, date))
if cr.rowcount:
id, rate=cr.fetchall()[0]
res[id]=rate
+4 -4
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_currency_tree" model="ir.ui.view">
<field name="name">res.currency.tree</field>
<field name="model">res.currency</field>
@@ -53,8 +53,8 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_currency_form" id="menu_action_currency_form" parent="menu_localisation" sequence="11"/>
<menuitem action="action_currency_form" id="menu_action_currency_form" parent="menu_localisation" sequence="3"/>
</data>
</openerp>
+5 -3
View File
@@ -22,6 +22,7 @@
from osv import fields, osv
from locale import localeconv
import tools
from tools.safe_eval import safe_eval as eval
class lang(osv.osv):
_name = "res.lang"
@@ -60,11 +61,11 @@ class lang(osv.osv):
('name_uniq', 'unique (name)', 'The name of the language must be unique !'),
('code_uniq', 'unique (code)', 'The code of the language must be unique !'),
]
@tools.cache(skiparg=3)
def _lang_data_get(self, cr, uid, lang_id, monetary=False):
conv = localeconv()
lang_obj=self.browse(cr,uid,lang_id)
lang_obj = self.browse(cr, uid, lang_id)
thousands_sep = lang_obj.thousands_sep or conv[monetary and 'mon_thousands_sep' or 'thousands_sep']
decimal_point = lang_obj.decimal_point
grouping = lang_obj.grouping
@@ -80,6 +81,7 @@ class lang(osv.osv):
if not grouping:
return (s, 0)
result = ""
seps = 0
spaces = ""
@@ -129,7 +131,7 @@ class lang(osv.osv):
parts = formatted.split('.')
if grouping:
parts[0], seps = self._group(cr,uid,ids,parts[0], monetary=monetary, grouping=lang_grouping, thousands_sep=thousands_sep)
parts[0], seps = self._group(cr,uid,ids,parts[0], monetary=monetary, grouping=lang_grouping, thousands_sep=thousands_sep)
formatted = decimal_point.join(parts)
while seps:
+44
View File
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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/>.
#
##############################################################################
from osv import fields, osv
class res_log(osv.osv_memory):
_name = 'res.log'
_columns = {
'name': fields.char('Message', size=128, help='The logging message.', required=True),
'user_id': fields.many2one('res.users','User', required=True),
'res_model': fields.char('Object', size=128),
'res_id': fields.integer('Object ID'),
'secondary': fields.boolean('Secondary Log', help='Do not display this log if it belongs to the same object the user is working on')
}
_defaults = {
'user_id': lambda self,cr,uid,ctx: uid
}
_order='id desc'
# TODO: do not return secondary log if same object than in the model (but unlink it)
def get(self, cr, uid, context={}):
ids = self.search(cr, uid, [('user_id','=',uid)], context=context)
result = self.read(cr, uid, ids, ['name','res_model','res_id'], context=context)
self.unlink(cr, uid, ids, context=context)
return result
res_log()
+56
View File
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="res_log_search" model="ir.ui.view">
<field name="name">res.log.search</field>
<field name="model">res.log</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Logs">
<filter icon="terp-stock_align_left_24" string="My Logs" domain="[('user_id','=',uid)]" name="my"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="user_id"/>
<field name="res_model"/>
</search>
</field>
</record>
<record id="res_log_tree" model="ir.ui.view">
<field name="name">res.log.tree</field>
<field name="model">res.log</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Logs">
<field name="name"/>
<field name="user_id"/>
</tree>
</field>
</record>
<record id="res_log_form" model="ir.ui.view">
<field name="name">res.log.form</field>
<field name="model">res.log</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Logs">
<group colspan="4" col="6">
<field name="name" colspan="4"/>
<field name="user_id" />
<field name="res_model"/>
<field name="res_id"/>
</group>
</form>
</field>
</record>
<record id="res_log_act_window" model="ir.actions.act_window">
<field name="name">Logs</field>
<field name="res_model">res.log</field>
<field name="view_type">form</field>
<field name="context">{'search_default_my': 1}</field>
</record>
<menuitem
action="res_log_act_window"
id="menu_res_log_act_window"
parent="base.next_id_4"/>
</data>
</openerp>

Some files were not shown because too many files have changed in this diff Show More