[MERGE] merged trunk.

bzr revid: vmt@openerp.com-20121022101716-491hv1k50abqd8k9
This commit is contained in:
Vo Minh Thu 2012-10-22 12:17:16 +02:00
commit 218d25b130
149 changed files with 7016 additions and 3658 deletions

View File

@ -1,14 +1,19 @@
.*
*.egg-info
*.orig
*.vim
.*.swp
.bzrignore
.idea
.project
.pydevproject
.ropeproject
.settings
.DS_Store
openerp/addons/*
openerp/filestore*
.Python
*.pyc
*.pyo
bin/*
build/
RE:^bin/
RE:^dist/
RE:^include/
RE:^share/
RE:^man/
RE:^lib/
RE:^doc/_build/
include/
lib/
share/
doc/_build/*

View File

@ -3,9 +3,24 @@ User avatar
.. versionadded:: 7.0
This revision adds an avatar for users. This replaces the use of gravatar to emulate avatars, used in views like the tasks kanban view. Two fields have been added to the res.users model:
- avatar_big, a binary field holding the image. It is base-64 encoded, and PIL-supported. Images stored are resized to 540x450 px, to limitate the binary field size.
- avatar, a function binary field holding an automatically resized version of the avatar_big field. It is also base-64 encoded, and PIL-supported. Dimensions of the resized avatar are 180x150. This field is used as an inteface to get and set the user avatar.
When changing the avatar through the avatar function field, the new image is automatically resized to 540x450, and stored in the avatar_big field. This triggers the function field, that will compute a 180x150 resized version of the image.
This revision adds an avatar for users. This replaces the use of
gravatar to emulate avatars, used in views like the tasks kanban
view. Two fields have been added to the res.users model:
An avatar field has been added to the users form view, as well as in Preferences. When creating a new user, a default avatar is chosen among 6 possible default images.
* ``avatar_big``, a binary field holding the image. It is base-64
encoded, and PIL-supported. Images stored are resized to 540x450 px,
to limitate the binary field size.
* ``avatar``, a function binary field holding an automatically resized
version of the avatar_big field. It is also base-64 encoded, and
PIL-supported. Dimensions of the resized avatar are 180x150. This
field is used as an inteface to get and set the user avatar.
When changing the avatar through the avatar function field, the new
image is automatically resized to 540x450, and stored in the
avatar_big field. This triggers the function field, that will compute
a 180x150 resized version of the image.
An avatar field has been added to the users form view, as well as in
Preferences. When creating a new user, a default avatar is chosen
among 6 possible default images.

View File

@ -16,9 +16,10 @@ import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
sys.path.append(os.path.abspath('_themes'))
sys.path.insert(0, os.path.abspath('../addons'))
sys.path.insert(0, os.path.abspath('..'))
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../openerp'))
# -- General configuration -----------------------------------------------------
@ -42,7 +43,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'OpenERP Web Developers Documentation'
project = u'OpenERP Server Developers Documentation'
copyright = u'2012, OpenERP s.a.'
# The version info for the project you're documenting, acts as replacement for
@ -50,9 +51,9 @@ copyright = u'2012, OpenERP s.a.'
# built documents.
#
# The short X.Y version.
version = '6.1'
version = '7.0'
# The full version, including alpha/beta/rc tags.
release = '6.1'
release = '7.0b'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -170,7 +171,7 @@ html_sidebars = {
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'openerp-web-doc'
htmlhelp_basename = 'openerp-server-doc'
# -- Options for LaTeX output --------------------------------------------------
@ -189,7 +190,7 @@ latex_elements = {
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'openerp-web-doc.tex', u'OpenERP Web Developers Documentation',
('index', 'openerp-server-doc.tex', u'OpenERP Server Developers Documentation',
u'OpenERP s.a.', 'manual'),
]
@ -219,7 +220,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'openerp-web-doc', u'OpenERP Web Developers Documentation',
('index', 'openerp-server-doc', u'OpenERP Server Developers Documentation',
[u'OpenERP s.a.'], 1)
]
@ -233,8 +234,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'OpenERPWebDocumentation', u'OpenERP Web Developers Documentation',
u'OpenERP s.a.', 'OpenERPWebDocumentation', 'Developers documentation for the openerp-web project.',
('index', 'OpenERPServerDocumentation', u'OpenERP Server Developers Documentation',
u'OpenERP s.a.', 'OpenERPServerDocumentation', 'Developers documentation for the openobject-server project.',
'Miscellaneous'),
]
@ -247,11 +248,10 @@ texinfo_documents = [
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
todo_include_todos = True
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('http://docs.python.org/', None),
'openerpserver': ('http://doc.openerp.com/trunk/developers/server', None),
'openerpweb': ('http://doc.openerp.com/trunk/developers/web', None),
'openerpdev': ('http://doc.openerp.com/trunk/developers', None),
}

263
doc/import.rst Normal file
View File

@ -0,0 +1,263 @@
.. _bulk-import:
Bulk Import
===========
OpenERP has included a bulk import facility for CSV-ish files for a
long time. With 7.0, both the interface and internal implementation
have been redone, resulting in
:meth:`~openerp.osv.orm.BaseModel.load`.
.. note::
the previous bulk-loading method,
:meth:`~openerp.osv.orm.BaseModel.import_data`, remains for
backwards compatibility but was re-implemented on top of
:meth:`~openerp.osv.orm.BaseModel.load`, while its interface is
unchanged its precise behavior has likely been altered for some
cases (it shouldn't throw exceptions anymore in many cases where
it previously did)
This document attempts to explain the behavior and limitations of
:meth:`~openerp.osv.orm.BaseModel.load`.
Data
----
The input ``data`` is a regular row-major matrix of strings (in Python
datatype terms, a ``list`` of rows, each row being a ``list`` of
``str``, all rows must be of equal length). Each row must be the same
length as the ``fields`` list preceding it in the argslist.
Each field of ``fields`` maps to a (potentially relational and nested)
field of the model under import, and the corresponding column of the
``data`` matrix provides a value for the field for each record.
Generally speaking each row of the input yields a record of output,
and each cell of a row yields a value for the corresponding field of
the row's record. There is currently one exception for this rule:
One to Many fields
++++++++++++++++++
Because O2M fields contain multiple records "embedded" in the main
one, and these sub-records are fully dependent on the main record (are
no other references to the sub-records in the system), they have to be
spliced into the matrix somehow. This is done by adding lines composed
*only* of o2m record fields below the main record:
.. literalinclude:: o2m.txt
the sections in double-lines represent the span of two o2m
fields. During parsing, they are extracted into their own ``data``
matrix for the o2m field they correspond to.
Import process
--------------
Here are the phases of import. Note that the concept of "phases" is
fuzzy as it's currently more of a pipeline, each record moves through
the entire pipeline before the next one is processed.
Extraction
++++++++++
The first phase of the import is the extraction of the current row
(and potentially a section of rows following it if it has One to Many
fields) into a record dictionary. The keys are the ``fields``
originally passed to :meth:`~openerp.osv.orm.BaseModel.load`, and the
values are either the string value at the corresponding cell (for
non-relational fields) or a list of sub-records (for all relational
fields).
This phase also generates the ``rows`` indexes for any
:ref:`import-message` produced thereafter.
Conversion
++++++++++
This second phase takes the record dicts, extracts the :ref:`dbid` and
:ref:`xid` if present and attempts to convert each field to a type
matching what OpenERP expects to write.
* Empty fields (empty strings) are replaced with the ``False`` value
* Non-empty fields are converted through
:class:`~openerp.addons.base.ir.ir_fields.ir_fields_converter`
.. note:: if a field is specified in the import, its default will *never* be
used. If some records need to have a value and others need to use
the model's default, either specify that default explicitly or do
the import in two phases.
Char, text and binary fields
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Are returned as-is, without any alteration.
Boolean fields
~~~~~~~~~~~~~~
The string value is compared (in a case-insensitive manner) to ``0``,
``false`` and ``no`` as well of any translation thereof loaded in the
database. If the value matches one of these, the field is set to
``False``.
Otherwise the field is compared to ``1``, ``true`` and ``yes`` (and
any translation of these in the database). The field is always set to
``True``, but if the value does not match one of these a warning will
also be output.
Integers and float fields
~~~~~~~~~~~~~~~~~~~~~~~~~
The field is parsed with Python's built-in conversion routines
(``int`` and ``float`` respectively), if the conversion fails an error
is generated.
Selection fields
~~~~~~~~~~~~~~~~
The field is compared to 1. the values of the selection (first part of
each selection tuple) and 2. all translations of the selection label
found in the database.
If one of these is matched, the corresponding value is set on the
field.
Otherwise an error is generated.
The same process applies to both list-type and function-type selection
fields.
Many to One field
~~~~~~~~~~~~~~~~~
If the specified field is the relational field itself (``m2o``), the
value is used in a ``name_search``. The first record returned by
``name_search`` is used as the field's value.
If ``name_search`` finds no value, an error is generated. If
``name_search`` finds multiple value, a warning is generated to warn
the user of ``name_search`` collisions.
If the specified field is a :ref:`xid` (``m2o/id``), the
corresponding record it looked up in the database and used as the
field's value. If no record is found matching the provided external
ID, an error is generated.
If the specified field is a :ref:`dbid` (``m2o/.id``), the process is
the same as for external ids (on database identifiers instead of
external ones).
Many to Many field
~~~~~~~~~~~~~~~~~~
The field's value is interpreted as a comma-separated list of names,
external ids or database ids. For each one, the process previously
used for the many to one field is applied.
One to Many field
~~~~~~~~~~~~~~~~~
For each o2m record extracted, if the record has a ``name``,
:ref:`xid` or :ref:`dbid` the :ref:`dbid` is looked up and checked
through the same process as for m2o fields.
If a :ref:`dbid` was found, a LINK_TO command is emmitted, followed by
an UPDATE with the non-db values for the relational field.
Otherwise a CREATE command is emmitted.
Date fields
~~~~~~~~~~~
The value's format is checked against
:data:`~openerp.tools.misc.DEFAULT_SERVER_DATE_FORMAT`, an error is
generated if it does not match the specified format.
Datetime fields
~~~~~~~~~~~~~~~
The value's format is checked against
:data:`~openerp.tools.misc.DEFAULT_SERVER_DATETIME_FORMAT`, an error
is generated if it does not match.
The value is then interpreted as a datetime in the user's
timezone. The timezone is specified thus:
* If the import ``context`` contains a ``tz`` key with a valid
timezone name, this is the timezone of the datetime.
* Otherwise if the user performing the import has a ``tz`` attribute
set to a valid timezone name, this is the timezone of the datetime.
* Otherwise interpret the datetime as being in the ``UTC`` timezone.
Create/Write
++++++++++++
If the conversion was successful, the converted record is then saved
to the database via ``(ir.model.data)._update``.
Error handling
++++++++++++++
The import process will only catch 2 types of exceptions to convert
them to error messages: ``ValueError`` during the conversion process,
and sub-exceptions of ``psycopg2.Error`` during the create/write
process.
The import process uses savepoint to:
* protect the overall transaction from the failure of each ``_update``
call, if an ``_update`` call fails the savepoint is rolled back and
the import process keeps going in order to obtain as many error
messages as possible during each run.
* protect the import as a whole, a savepoint is created before
starting and if any error is generated that savepoint is rolled
back. The rest of the transaction (anything not within the import
process) will be left untouched.
.. _import-message:
.. _import-messages:
Messages
--------
A message is a dictionary with 5 mandatory keys and one optional key:
``type``
the type of message, either ``warning`` or ``error``. Any
``error`` message indicates the import failed and was rolled back.
``message``
the message's actual text, which should be translated and can be
shown to the user directly
``rows``
a dict with 2 keys ``from`` and ``to``, indicates the range of
rows in ``data`` which generated the message
``record``
a single integer, for warnings the index of the record which
generated the message (can be obtained from a non-false ``ids``
result)
``field``
the name of the (logical) OpenERP field for which the error or
warning was generated
``moreinfo`` (optional)
A string, a list or a dict, leading to more information about the
warning.
* If ``moreinfo`` is a string, it is a supplementary warnings
message which should be hidden by default
* If ``moreinfo`` is a list, it provides a number of possible or
alternative values for the string
* If ``moreinfo`` is a dict, it is an OpenERP action descriptor
which can be executed to get more information about the issues
with the field. If present, the ``help`` key serves as a label
for the action (e.g. the text of the link).

View File

@ -5,6 +5,8 @@ OpenERP Server
.. toctree::
:maxdepth: 1
import
module-versioning
test-framework
Changed in 7.0
@ -16,4 +18,4 @@ Changed in 7.0
api/user_img_specs
api/need_action_specs
api/font_style
api/field_level_acl
api/field_level_acl

69
doc/module-versioning.rst Normal file
View File

@ -0,0 +1,69 @@
.. _module_versioning:
Module versioning
=================
OpenERP has been developed with modularity in mind: OpenERP should be flexible
enough so it can be adopted by any enterprise, of any size and in any market.
By using modules one can adapt OpenERP in many different ways: from completely
different business to smaller, company-specific changes.
As modules (and the core framework itself) evolve, it is necessary to identify
modules by their version so a sensible set of modules can be chosen for a
particular deployment.
There are two trends re-inforcing each others. Firstly OpenERP s.a. will work
on a smaller number of official modules and let the community handles more and
more development. Secondly all those modules will receive greater exposure on
`OpenERP Apps`_ where each module will be owned by a single author.
The solution advocated by OpenERP is straightforward and aims to avoid the
`dependency hell`_. In particular we don't want to deal with versioned
dependencies (i.e. a module depends on a specific version of another module).
For each stable release (e.g. OpenERP 6.1, or OpenERP 7.0) or, said in other
words, for each major version, there is only one (major) version of each
module. The minor version is bumped for bug fixes but is otherwise not
important here.
Making variations on some business needs must be done by creating new modules,
possibly depending on previously written modules. If depending on a module
proves too difficult, you can write a new module (not a new _version_). But
generally Python is flexible enough that depending on the existing module
should work.
For the next major version, refactoring modules can be done and similar
functionalities can be brought together in a better module.
.. _`OpenERP Apps`: http://apps.openerp.com/
.. _`dependency hell`: http://en.wikipedia.org/wiki/Dependency_hell
Example
-------
Whenever a new module is developed or must evolve, the above versioning policy
should be respected.
A particular concern one can face when deploying OpenERP to multiple customers
is now detailed as an example to provide a few guidelines. The hypotethical
situation is as follow. A partner needs to create a new module, called ``M``, for a
customer. Shortly after (but still within a typical OpenERP release cycle, so
there is no chance to bump the version number except for bug fixes), ``M`` must be
adapted for another customer.
The correct way to handle it is to leave ``M`` as it is and create a new module,
say called ``X``, that depends on ``M`` for the second customer. Both modules have the
same version (i.e. 6.1 or 7.0, targeting the corresponding OpenERP version).
If leaving ``M`` as it is is not possible (which should be very rare as Python
is incredibly flexible), the ``X`` module for the new customer can depend on a
new module ``N``, derived from ``M``. At this point, ``N`` is a new,
differently named module. It is not a ``M`` module with a increased version
number. Your goal should be to make ``N`` as close as possible to ``M``, so
that at the next version of OpenERP, the first customer can switch to ``N``
instead of ``M`` (or include the changes in a new version of ``M``). At that
point you are in the ideal situation: you have a module ``N`` for one customer,
and a module ``X`` depending on N to account for the differences between those
two customers.

13
doc/o2m.txt Normal file
View File

@ -0,0 +1,13 @@
+-------+-------+===========+===========+-------+-------+
|value01|value02‖o2m/value01|o2m/value02‖value03|value04|
+-------+-------+-----------+-----------+-------+-------+
| | ‖o2m/value11|o2m/value12‖ | |
+-------+-------+-----------+-----------+-------+-------+
| | ‖o2m/value21|o2m/value22‖ | |
+-------+-------+===========+===========+-------+-------+
|value11|value12‖o2m/value01|o2m/value02‖value13|value14|
+-------+-------+-----------+-----------+-------+-------+
| | ‖o2m/value11|o2m/value12‖ | |
+-------+-------+===========+===========+-------+-------+
|value21|value22| | |value23|value24|
+-------+-------+-----------+-----------+-------+-------+

View File

@ -43,11 +43,22 @@ The kernel of OpenERP, needed for all installation.
'res/res_config.xml',
'data/res.country.state.csv',
'ir/wizard/wizard_menu_view.xml',
'ir/ir.xml',
'ir/ir_filters.xml',
'ir/ir_actions.xml',
'ir/ir_attachment_view.xml',
'ir/ir_config_parameter_view.xml',
'ir/workflow/workflow_view.xml',
'ir/ir_cron_view.xml',
'ir/ir_filters.xml',
'ir/ir_mail_server_view.xml',
'ir/ir_model_view.xml',
'ir/ir_rule_view.xml',
'ir/ir_sequence_view.xml',
'ir/ir_translation_view.xml',
'ir/ir_ui_menu_view.xml',
'ir/ir_ui_view_view.xml',
'ir/ir_values_view.xml',
'ir/osv_memory_autovacuum.xml',
'ir/report/ir_report.xml',
'ir/workflow/workflow_view.xml',
'module/module_view.xml',
'module/module_data.xml',
'module/module_report.xml',

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:35+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:57+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:35+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:57+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:35+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:57+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:35+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:36+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:36+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:36+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:36+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"X-Poedit-Language: Czech\n"
#. module: base
@ -25,7 +25,7 @@ msgstr "Svatá Helena"
#. module: base
#: view:ir.actions.report.xml:0
msgid "Other Configuration"
msgstr "Ostatní nastavení"
msgstr "Další nastavení"
#. module: base
#: selection:ir.property,type:0
@ -35,7 +35,7 @@ msgstr "Datum a čas"
#. module: base
#: model:ir.module.module,shortdesc:base.module_project_mailgate
msgid "Tasks-Mail Integration"
msgstr ""
msgstr "Integrace úkolů a e-mailů"
#. module: base
#: code:addons/fields.py:582
@ -126,7 +126,7 @@ msgstr ""
#. module: base
#: view:ir.module.module:0
msgid "Created Views"
msgstr "Vytvořit pohledy"
msgstr "Vytvořené náhledy"
#. module: base
#: code:addons/base/ir/ir_model.py:532

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:36+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

File diff suppressed because it is too large Load Diff

View File

@ -12,8 +12,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:37+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:00+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"X-Poedit-Country: GREECE\n"
"X-Poedit-Language: Greek\n"
"X-Poedit-SourceCharset: utf-8\n"

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:42+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:41+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:42+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh
@ -25,17 +25,17 @@ msgstr "Santa Helena"
#. module: base
#: view:ir.actions.report.xml:0
msgid "Other Configuration"
msgstr ""
msgstr "Otra configuración"
#. module: base
#: selection:ir.property,type:0
msgid "DateTime"
msgstr ""
msgstr "Fecha y hora"
#. module: base
#: model:ir.module.module,shortdesc:base.module_project_mailgate
msgid "Tasks-Mail Integration"
msgstr ""
msgstr "Integración Tareas-Email"
#. module: base
#: code:addons/fields.py:582
@ -44,6 +44,8 @@ msgid ""
"The second argument of the many2many field %s must be a SQL table !You used "
"%s, which is not a valid SQL table name."
msgstr ""
"¡El segundo argumento del campo many2many %s debe ser una tabla SQL! Has "
"utilizado %s, que no es un nombre de tabla SQL válido."
#. module: base
#: field:ir.ui.view,arch:0
@ -70,6 +72,21 @@ msgid ""
" * Graph of My Remaining Hours by Project\n"
" "
msgstr ""
"\n"
"El módulo de Gestión de Proyectos permite gestionar proyectos con varios "
"niveles, tareas, trabajo realizado en tareas, etc.\n"
"============================================================================="
"=========\n"
"\n"
"Es capaz de generar planificaciones, ordenar tareas, etc.\n"
"\n"
"El tablero de control para los miembros del proyecto incluye:\n"
"--------------------------------------------\n"
"* Lista de mis tareas abiertas\n"
"* Lista de mis tareas delegadas\n"
"* Gráfico de mis proyectos: Planificado vs Horas totales\n"
"* Gráfico de mis horas pendientes por proyecto\n"
" "
#. module: base
#: field:base.language.import,code:0
@ -89,7 +106,7 @@ msgstr "Workflow"
#. module: base
#: selection:ir.sequence,implementation:0
msgid "No gap"
msgstr ""
msgstr "Sin hueco"
#. module: base
#: selection:base.language.install,lang:0
@ -99,7 +116,7 @@ msgstr "Húngaro / Magyar"
#. module: base
#: selection:base.language.install,lang:0
msgid "Spanish (PY) / Español (PY)"
msgstr ""
msgstr "Español (UY) / Español (UY)"
#. module: base
#: model:ir.module.category,description:base.module_category_project_management
@ -107,22 +124,26 @@ msgid ""
"Helps you manage your projects and tasks by tracking them, generating "
"plannings, etc..."
msgstr ""
"Le ayuda a gestionar sus proyectos y tareas realizando un seguimiento de los "
"mismos, generando planificaciones, ..."
#. module: base
#: field:ir.actions.act_window,display_menu_tip:0
msgid "Display Menu Tips"
msgstr ""
msgstr "Mostrar consejos de menú"
#. module: base
#: help:ir.cron,model:0
msgid ""
"Model name on which the method to be called is located, e.g. 'res.partner'."
msgstr ""
"Nombre del módelo en el que se encuentra el método al que se llama, por "
"ejemplo 'res.partner'."
#. module: base
#: view:ir.module.module:0
msgid "Created Views"
msgstr ""
msgstr "Vistas creadas"
#. module: base
#: code:addons/base/ir/ir_model.py:532
@ -131,6 +152,8 @@ msgid ""
"You can not write in this document (%s) ! Be sure your user belongs to one "
"of these groups: %s."
msgstr ""
"¡No puede escribir en este documento (%s)! Asegúrese que su usuario "
"pertenezca a alguno de estos grupos: %s."
#. module: base
#: model:ir.module.module,description:base.module_event_project
@ -141,6 +164,11 @@ msgid ""
"\n"
"This module allows you to create retro planning for managing your events.\n"
msgstr ""
"\n"
"Organización y gestión de eventos.\n"
"======================================\n"
"\n"
"Este módulo permite crear retro planning para gestionar tus eventos.\n"
#. module: base
#: help:ir.model.fields,domain:0
@ -149,16 +177,19 @@ msgid ""
"specified as a Python expression defining a list of triplets. For example: "
"[('color','=','red')]"
msgstr ""
"El dominio opcional para restringir los posibles valores para los campos de "
"relación, se especifica como una expresión Python compuesta por una lista de "
"tripletas. Por ejemplo: [('color','=',' red')]"
#. module: base
#: field:res.partner,ref:0
msgid "Reference"
msgstr ""
msgstr "Referencia"
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_be_invoice_bba
msgid "Belgium - Structured Communication"
msgstr ""
msgstr "Bélgica - Comunicación Estructurada"
#. module: base
#: field:ir.actions.act_window,target:0
@ -168,12 +199,12 @@ msgstr "Ventana destino"
#. module: base
#: model:ir.module.module,shortdesc:base.module_sale_analytic_plans
msgid "Sales Analytic Distribution"
msgstr ""
msgstr "Distribución Analítica de Ventas"
#. module: base
#: model:ir.module.module,shortdesc:base.module_web_process
msgid "Process"
msgstr ""
msgstr "Procesar"
#. module: base
#: model:ir.module.module,shortdesc:base.module_analytic_journal_billing_rate

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:42+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:43+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"Language: \n"
#. module: base

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:43+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:43+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:37+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:36+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

File diff suppressed because it is too large Load Diff

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:43+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:37+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:37+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:37+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:00+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:38+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:00+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:38+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:00+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:40+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:03+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"Language: hr\n"
#. module: base

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:38+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:00+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh
@ -35,7 +35,7 @@ msgstr "Dátum/Idő"
#. module: base
#: model:ir.module.module,shortdesc:base.module_project_mailgate
msgid "Tasks-Mail Integration"
msgstr ""
msgstr "Feladat-levél beillesztés"
#. module: base
#: code:addons/fields.py:582
@ -109,6 +109,8 @@ msgid ""
"Helps you manage your projects and tasks by tracking them, generating "
"plannings, etc..."
msgstr ""
"Segít Önnek a projektjei és feladatai menedzselésében, azok "
"nyomonkövetésével, tervezések készítésével, stb..."
#. module: base
#: field:ir.actions.act_window,display_menu_tip:0
@ -145,6 +147,11 @@ msgid ""
"\n"
"This module allows you to create retro planning for managing your events.\n"
msgstr ""
"\n"
"Az események szervezése és menedzselése.\n"
"======================================\n"
"\n"
"Ezzel a modullal átütemezést készíthet az események menedzselésében.\n"
#. module: base
#: help:ir.model.fields,domain:0
@ -175,17 +182,17 @@ msgstr "Cél Ablak"
#. module: base
#: model:ir.module.module,shortdesc:base.module_sale_analytic_plans
msgid "Sales Analytic Distribution"
msgstr ""
msgstr "Eladás elemzés osztályozás"
#. module: base
#: model:ir.module.module,shortdesc:base.module_web_process
msgid "Process"
msgstr ""
msgstr "Folyamat"
#. module: base
#: model:ir.module.module,shortdesc:base.module_analytic_journal_billing_rate
msgid "Billing Rates on Contracts"
msgstr ""
msgstr "Árfolyamok a szerződéseken"
#. module: base
#: code:addons/base/res/res_users.py:558
@ -218,7 +225,7 @@ msgstr "ir.ui.view.custom"
#: code:addons/base/ir/ir_model.py:313
#, python-format
msgid "Renaming sparse field \"%s\" is not allowed"
msgstr ""
msgstr "Nem megengedett a \"%s\" ritka mező átnevezése"
#. module: base
#: model:res.country,name:base.sz
@ -234,12 +241,12 @@ msgstr "létrehozva."
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_tr
msgid "Turkey - Accounting"
msgstr ""
msgstr "Török - könyvelés"
#. module: base
#: model:ir.module.module,shortdesc:base.module_mrp_subproduct
msgid "MRP Subproducts"
msgstr ""
msgstr "MRP altermékek"
#. module: base
#: code:addons/base/module/module.py:390
@ -272,7 +279,7 @@ msgstr "Inuktitut / ᐃᓄᒃᑎᑐᑦ"
#: model:ir.module.category,name:base.module_category_sales_management
#: model:ir.module.module,shortdesc:base.module_sale
msgid "Sales Management"
msgstr ""
msgstr "Értékesítés menedzsment"
#. module: base
#: view:res.partner:0
@ -359,6 +366,11 @@ msgid ""
" complex data from other software\n"
" "
msgstr ""
"\n"
" Ez a modul gondoskodik egy csoport keretmunka_bevitelről ami "
"segítséget nyújt\n"
" más szoftver összetett adatainak betöltéséhez\n"
" "
#. module: base
#: field:ir.actions.wizard,wiz_name:0
@ -368,17 +380,17 @@ msgstr "Varázsló Neve"
#. module: base
#: model:res.groups,name:base.group_partner_manager
msgid "Partner Manager"
msgstr ""
msgstr "Partner kapcsolati felelős"
#. module: base
#: model:ir.module.category,name:base.module_category_customer_relationship_management
msgid "Customer Relationship Management"
msgstr ""
msgstr "Ügyfél kapcsolati irányítás"
#. module: base
#: view:ir.module.module:0
msgid "Extra"
msgstr ""
msgstr "Extra"
#. module: base
#: code:addons/orm.py:2526
@ -399,7 +411,7 @@ msgstr "Hitelkeret"
#. module: base
#: model:ir.module.module,description:base.module_web_graph
msgid "Openerp web graph view"
msgstr ""
msgstr "Openerp web grafikus nézet"
#. module: base
#: field:ir.model.data,date_update:0
@ -409,7 +421,7 @@ msgstr "Frissítés Dátuma"
#. module: base
#: model:ir.module.module,shortdesc:base.module_base_action_rule
msgid "Automated Action Rules"
msgstr ""
msgstr "Automata végrehalytási szabályok"
#. module: base
#: view:ir.attachment:0
@ -15451,6 +15463,8 @@ msgid ""
"This field is computed automatically based on bank accounts defined, having "
"the display on footer checkbox set."
msgstr ""
"Ez a mező automatikusan generált a megadott bank számlák alapján, a "
"lábjegyzetben lévő jelölőnégyzet kiválasztásával."
#. module: base
#: model:ir.module.module,description:base.module_mrp_subproduct

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:35+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:38+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:01+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:38+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:01+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:38+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:01+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-21 04:41+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:01+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:37+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:38+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:01+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:39+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:01+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:39+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:39+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:39+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:39+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:39+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:36+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh
@ -397,7 +397,7 @@ msgstr "Naam assistent"
#. module: base
#: model:res.groups,name:base.group_partner_manager
msgid "Partner Manager"
msgstr "Relatie manager"
msgstr "Relatiemanager"
#. module: base
#: model:ir.module.category,name:base.module_category_customer_relationship_management
@ -1403,7 +1403,7 @@ msgstr "Document Beheer Systeem"
#. module: base
#: model:ir.module.module,shortdesc:base.module_crm_claim
msgid "Claims Management"
msgstr "Claimsmanagement"
msgstr "Klachtenregistratie"
#. module: base
#: model:ir.ui.menu,name:base.menu_purchase_root
@ -1453,7 +1453,7 @@ msgid ""
" * Effective Date\n"
msgstr ""
"\n"
"deze module voegt extra informatie toe aan een verkooporder.\n"
"Deze module voegt extra informatie toe aan een verkooporder.\n"
"===================================================\n"
"\n"
"U kunt de navolgende extra data toevoegen aan een verkooporder:\n"
@ -2502,8 +2502,8 @@ msgstr ""
"Helpdesk management.\n"
"===================\n"
"\n"
"Net als administratie en verwerking van claims is de Helpdesk en "
"ondersteuning tool, een goed instrument\n"
"Net als de klachtenregistratie module is de Helpdesk en ondersteuning tool, "
"een goed instrument\n"
"om uw acties vast te leggen. Dit menu is meer aangepast aan de mondelinge "
"communicatie,\n"
"die niet noodzakelijkerwijs verband houden met een claim. Selecteer een "
@ -2614,7 +2614,7 @@ msgstr "Ideeën"
#. module: base
#: model:ir.module.module,shortdesc:base.module_sale_crm
msgid "Opportunity to Quotation"
msgstr "Verkoopkans naar offerte"
msgstr "Prospect naar offerte"
#. module: base
#: model:ir.module.module,description:base.module_sale_analytic_plans
@ -4255,6 +4255,15 @@ msgid ""
"automatically new claims based on incoming emails.\n"
" "
msgstr ""
"\n"
"Met deze module kunt u alle klachten van uw klanten en leveranciers "
"registreren.\n"
"==================================================================\n"
"\n"
"Deze module is volledig geïntegreerd met de e-mail gateway, zodat u "
"automatisch\n"
"nieuwe klachten kunt registreren op basis van inkomende e-mails.\n"
" "
#. module: base
#: selection:workflow.activity,join_mode:0
@ -7672,7 +7681,7 @@ msgstr "Canada"
#: code:addons/base/res/res_company.py:158
#, python-format
msgid "Reg: "
msgstr "Reg: "
msgstr "KVK: "
#. module: base
#: help:res.currency.rate,currency_rate_type_id:0
@ -14542,7 +14551,7 @@ msgstr ""
#. module: base
#: model:ir.module.module,shortdesc:base.module_fetchmail_crm_claim
msgid "eMail Gateway for CRM Claim"
msgstr "E-mail Gateway voor CRM Claims"
msgstr "E-mail Gateway voor klachtenregistratie"
#. module: base
#: help:res.partner,supplier:0
@ -15541,10 +15550,11 @@ msgid ""
"1,06,500;[1,2,-1] will represent it to be 106,50,0;[3] will represent it as "
"106,500. Provided ',' as the thousand separator in each case."
msgstr ""
"Het scheidingsformaat moet zoals [,n] zijn waarin 0 < n: -1 eindigt de "
"scheiding. Bijv. [3,2,-1] geeft op 106500 het volgende resultaat: 1,06,500. "
"[1,2,-1] geeft 106,50,0; [3] geeft 106,500. Er is in deze voorbeelden "
"uitgegaan van ',' als scheidingsteken."
"De instellingen voor het scheidingsteken heeft het formaat [,n] waarbij n > "
"0 gerekend vanaf het decimaalteken. -1 eindigt de scheiding. Bijv. [3,2,-1] "
"geeft op 106500 het volgende resultaat: 1,06,500. [1,2,-1] geeft 106,50,0; "
"[3] geeft 106,500. Er is in deze voorbeelden uitgegaan van ',' als "
"scheidingsteken."
#. module: base
#: field:ir.module.module,auto_install:0

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:42+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:39+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh
@ -29,7 +29,7 @@ msgstr "Inna konfiguracja"
#. module: base
#: selection:ir.property,type:0
msgid "DateTime"
msgstr ""
msgstr "Data i godzina"
#. module: base
#: model:ir.module.module,shortdesc:base.module_project_mailgate
@ -83,7 +83,7 @@ msgstr "Kod (np:en__US)"
#: field:workflow.transition,wkf_id:0
#: field:workflow.workitem,wkf_id:0
msgid "Workflow"
msgstr "Obieg"
msgstr "Przebieg procesu"
#. module: base
#: selection:ir.sequence,implementation:0

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:40+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:03+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:42+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh
@ -1944,6 +1944,47 @@ msgid ""
"\n"
" "
msgstr ""
"\n"
"Validação de IVA para os números Parceiros 'IVA\n"
"========================================\n"
"\n"
"Depois de instalar este módulo, os valores inseridos no domínio do IVA de "
"parceiros\n"
"ser validado para todos os países suportados. O país é inferida a partir da\n"
"2-letra código do país que prefixos o número de IVA, por exemplo, `` `` "
"BE0477472701\n"
"será validado usando as regras belgas.\n"
"\n"
"Existem dois níveis diferentes de validação Número de IVA:\n"
"\n"
"  * Por padrão, uma verificação off-line simples é realizado utilizando a "
"validação conhecido\n"
"    regras para o país, geralmente uma verificação simples dígito. Isto é "
"rápido e\n"
"    sempre disponível, mas permite que os números que não são "
"verdadeiramente talvez alocados,\n"
"    ou não mais válido.\n"
"  * Quando os \"VIES IVA Verifique\" está activada (na configuração do "
"usuário do\n"
"    Empresa), números de IVA será submetido ao invés linha UE VIES\n"
"    banco de dados, o que vai realmente verificar se o número é válido e, "
"atualmente,\n"
"    atribuídos a uma empresa da UE. Este é um pouco mais lento do que o "
"simples\n"
"    off-line, cheque, requer uma ligação à Internet, e pode não estar "
"disponível\n"
"    o tempo todo. Se o serviço não está disponível ou não suporta o\n"
"    país requerido (por exemplo, para países fora da UE), uma simples "
"verificação será realizada\n"
"    em vez disso.\n"
"\n"
"Países suportados atualmente são os países da UE, e alguns países não "
"comunitários\n"
"como Chile, Colômbia, México, Noruega ou a Rússia. Para os países não "
"suportados,\n"
"apenas o código do país serão validados.\n"
"\n"
" "
#. module: base
#: view:ir.sequence:0
@ -2467,6 +2508,22 @@ msgid ""
"re-invoice your customer's expenses if your work by project.\n"
" "
msgstr ""
"\n"
"Este módulo tem como objetivo gerenciar as despesas dos funcionários.\n"
"===============================================\n"
"\n"
"O fluxo de trabalho inteiro é implementado:\n"
"     * Projeto de despesa\n"
"     * Confirmação da folha pelo empregado\n"
"     * Validação por seu empresário\n"
"     * A validação pelo contador e criação de fatura\n"
"     * Pagamento da fatura para o empregado\n"
"\n"
"Este módulo também utiliza a contabilidade analítica e é compatível com a\n"
"a fatura no módulo de folha de ponto, de modo que você vai ser capaz de "
"automaticamente\n"
"cobrar seu cliente despesas se você trabalhar por projeto.\n"
" "
#. module: base
#: field:ir.values,action_id:0
@ -2948,6 +3005,31 @@ msgid ""
"performing those tasks.\n"
" "
msgstr ""
"\n"
"Este módulo implementa todos os conceitos definidos pela metodologia GTD - "
"Getting Things Done.\n"
"================================================== "
"=================================\n"
"\n"
"Este módulo implementa um simples lista Todo pessoal baseado em tarefas. Ele "
"acrescenta\n"
"a aplicação do projeto uma lista editável de tarefas simplificadas para o "
"mínimo\n"
"campos obrigatórios.\n"
"\n"
"A lista de afazeres é baseado na metodologia GTD. Esta metodologia "
"mundialmente utilizada\n"
"é utilizado para a melhoria pessoal de gerenciamento de tempo.\n"
"\n"
"Getting Things Done (comumente abreviado como GTD) é uma ação de gestão\n"
"método criado por David Allen, e descrito em um livro de mesmo nome.\n"
"\n"
"GTD se baseia no princípio de que uma pessoa precisa para mover as tarefas "
"fora da mente por\n"
"gravá-las externamente. Dessa forma, a mente se liberta do trabalho de\n"
"lembrando de tudo que precisa ser feito, e pode se concentrar em realmente\n"
"executar essas tarefas.\n"
" "
#. module: base
#: model:res.country,name:base.tt
@ -3084,7 +3166,7 @@ msgstr "Erro!"
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_fr_rib
msgid "French RIB Bank Details"
msgstr ""
msgstr "Detalhes do RIB do Banco Francês"
#. module: base
#: view:res.lang:0
@ -3200,12 +3282,12 @@ msgid ""
"The decimal precision is configured per company.\n"
msgstr ""
"\n"
"Você precisa configurar a precisão do preço para diferentes tipos de uso: "
"contabilidade, venda, compras, etc.\n"
"Configurar a precisão preço que você precisa para diferentes tipos de uso: "
"contabilidade, vendas, compras, etc\n"
"============================================================================="
"=========================\n"
"\n"
"A precisão decimal é configurada por empresa.\n"
"A precisão decimal é configurado por empresa.\n"
#. module: base
#: model:ir.module.module,description:base.module_l10n_pl
@ -3223,6 +3305,18 @@ msgid ""
"że wszystkie towary są w obrocie hurtowym.\n"
" "
msgstr ""
"\n"
"Este é o módulo para gerenciar o gráfico contabilidade e impostos para a "
"Polónia no OpenERP.\n"
"================================================== "
"================================\n"
"\n"
"To jest moduł do tworzenia wzorcowego planu kont i podstawowych ustawień do "
"podatków\n"
"VAT 0%, 7% i 22%. Moduł ustawia też konta do kupna i sprzedaży towarów "
"zakładając,\n"
"że wszystkie towary są w obrocie hurtowym.\n"
" "
#. module: base
#: field:ir.actions.client,params_store:0
@ -3258,6 +3352,21 @@ msgid ""
"since it's the same which has been renamed.\n"
" "
msgstr ""
"\n"
"Este módulo permite aos usuários executar a segmentação entre os parceiros.\n"
"================================================== ===============\n"
"\n"
"Ele utiliza os critérios de perfis a partir do módulo de segmentação mais "
"cedo e melhorá-lo. Graças ao novo conceito de questionário. Agora você pode "
"reagrupar as perguntas em um questionário e usá-lo diretamente em um "
"parceiro.\n"
"\n"
"Ele também foi fundida com a anterior ferramenta de CRM & SRM segmentação "
"porque foram sobrepostos.\n"
"\n"
"     * Nota: Este módulo não é compatível com o módulo de segmentação, já "
"que é o mesmo que foi renomeado.\n"
" "
#. module: base
#: code:addons/report_sxw.py:434
@ -3379,6 +3488,30 @@ msgid ""
"\n"
" "
msgstr ""
"\n"
" \n"
"Localização belga para as facturas em-e de saída (pré-requisito para "
"account_coda):\n"
"     Rótulos 'referência' Renomear campo para 'Comunicação' -\n"
"     - Adicionar suporte para comunicação estruturada belga\n"
"\n"
"Uma comunicação estruturada pode ser gerado automaticamente em faturas de "
"saída de acordo com os seguintes algoritmos:\n"
"     1) aleatória: + + + RRR / RRRR / RRRDD + + +\n"
"         R. R =. Dígitos aleatórios, Dígitos DD = Verificar\n"
"     2) Data: + + + DOY / ano / SSSDD + + +\n"
"         Doy = dia do ano, o SSS = número de seqüência, DD dígitos = "
"Verificar)\n"
"     3) Referência ao Cliente + + + RRR / RRRR / SSSDDD + + +\n"
"         R.. = R Referência do cliente sem caracteres não numéricos, SSS = "
"Número sequencial, DD dígitos = Verificar)\n"
"        \n"
"O tipo preferido de comunicação estruturada e algoritmo associado pode ser "
"especificado nos registros de parceiros.\n"
"Uma comunicação \"aleatória\" estruturado gerado se nenhum algoritmo é "
"especificado no registro de parceiros. \n"
"\n"
" "
#. module: base
#: model:ir.module.module,shortdesc:base.module_wiki_quality_manual
@ -3515,6 +3648,14 @@ msgid ""
"for Wiki FAQ.\n"
" "
msgstr ""
"\n"
"Este módulo oferece um Wiki Modelo FAQ.\n"
"=========================================\n"
"\n"
"Ele fornece dados de demonstração, criando um Grupo de wiki e uma página "
"Wiki\n"
"para Wiki FAQ.\n"
" "
#. module: base
#: view:ir.actions.server:0
@ -3789,6 +3930,13 @@ msgid ""
" * the Tax Code Chart for Luxembourg\n"
" * the main taxes used in Luxembourg"
msgstr ""
"\n"
"Este é o módulo de base para gerenciar o Plano Contábil de Luxemburgo.\n"
"================================================== ====================\n"
"\n"
"     * Quadro da KLUWER de Contas,\n"
"     * O Gráfico Código Tributário para o Luxemburgo\n"
"     * Os principais impostos usados no Luxemburgo"
#. module: base
#: field:ir.module.module,demo:0
@ -3813,6 +3961,21 @@ msgid ""
"module 'share'.\n"
" "
msgstr ""
"\n"
"Este módulo define \"portais\" para personalizar o acesso ao seu banco de "
"dados OpenERP\n"
"para usuários externos.\n"
"\n"
"Um portal define menu de usuário personalizada e direitos de acesso para um "
"grupo de usuários\n"
"(os associados a esse portal). Ela também se associa grupos de usuários para "
"o\n"
"usuários do portal (adicionando um grupo no portal adiciona automaticamente "
"para o portal\n"
"usuários, etc.) Essa característica é muito útil quando utilizada em "
"combinação com a\n"
"'share' módulo.\n"
" "
#. module: base
#: selection:res.request,priority:0
@ -3959,6 +4122,22 @@ msgid ""
"\n"
" "
msgstr ""
"\n"
"Este módulo oferece alguns recursos para melhorar o layout das faturas.\n"
"================================================== =======================\n"
"\n"
"Ele lhe dá a possibilidade de:\n"
"--------------------------------\n"
"     * Ordem todas as linhas de uma fatura\n"
"     * Adicionar títulos, linhas de comentário, sub total de linhas\n"
"     * Desenhar linhas horizontais e colocar quebras de página\n"
"\n"
"Além disso, há uma opção que permite a impressão de todas as faturas "
"selecionados com uma mensagem dada especial na parte inferior do mesmo. Este "
"recurso pode ser muito útil para imprimir as suas facturas com o fim-de-ano "
"desejos, condições especiais pontuais.\n"
"\n"
" "
#. module: base
#: constraint:res.partner:0
@ -4156,6 +4335,14 @@ msgid ""
"templates to target objects.\n"
" "
msgstr ""
"\n"
" * Apoio a Multi Idiomas de Plano de Contas, Impostos, códigos fiscais, "
"diários, Modelos de Contabilidade,\n"
"         Plano de Contas Analítico e Diários analíticos.\n"
"     * Assistente de Configuração mudanças\n"
"         - Copia traduções para COA, Imposto de Código Tributário, e Posição "
"Fiscal a partir de modelos para objetos de destino.\n"
" "
#. module: base
#: view:ir.actions.todo:0
@ -4547,6 +4734,15 @@ msgid ""
"automatically new claims based on incoming emails.\n"
" "
msgstr ""
"\n"
"Este módulo permite que você acompanhe as solicitações de seus clientes / "
"fornecedores.\n"
"================================================== "
"==============================\n"
"\n"
"É totalmente integrado com o gateway de e-mail para que você possa criar\n"
"automaticamente novos pedidos baseados em e-mails recebidos.\n"
" "
#. module: base
#: selection:workflow.activity,join_mode:0
@ -6667,6 +6863,26 @@ msgid ""
"an other object.\n"
" "
msgstr ""
"\n"
"Este módulo permite que você gerencie seus contatos\n"
"==============================================\n"
"\n"
"Ele permite que você definir:\n"
"     * Contatos não relacionados a um parceiro,\n"
"     * Contatos trabalhando em vários endereços (possivelmente para "
"parceiros diferentes),\n"
"     * Contatos com funções possivelmente diferentes para cada um dos "
"endereços do seu trabalho\n"
"\n"
"Ele também adiciona novos itens de menu localizado na\n"
"     Compras / Livro de Endereços / Contatos\n"
"     Vendas / Livro de Endereços / Contatos\n"
"\n"
"Preste atenção que este módulo converte os endereços existentes em "
"\"endereços + contatos\". Isso significa que alguns campos dos endereços vai "
"estar ausente (como o nome do contato), uma vez que estes devem ser "
"definidos em um outro objeto.\n"
" "
#. module: base
#: model:ir.actions.act_window,name:base.act_res_partner_event
@ -8017,6 +8233,14 @@ msgid ""
"that exceeds minimum amount set by configuration wizard.\n"
" "
msgstr ""
"\n"
"Dupla-validação para compras superiores a quantidade mínima.\n"
"================================================== =======\n"
"\n"
"Este módulo modifica o fluxo de trabalho de compra, a fim de validar "
"compras\n"
"que exceder o valor mínimo fixado pelo assistente de configuração.\n"
" "
#. module: base
#: field:res.currency,rounding:0
@ -14393,6 +14617,15 @@ msgid ""
"plans.\n"
" "
msgstr ""
"\n"
"O módulo base para gerenciar a distribuição analítica e ordens de compra.\n"
"================================================== ==================\n"
"\n"
"Permite que o usuário manter planos de análise diversas. Estes permitem-lhe "
"dividir\n"
"uma linha em um pedido de compra de fornecedores em várias contas e planos "
"analíticos.\n"
" "
#. module: base
#: field:res.company,vat:0

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:40+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:03+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-25 04:44+0000\n"
"X-Generator: Launchpad (build 16019)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:03+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:40+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:41+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:35+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:57+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:40+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:03+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:43+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:41+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:41+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:41+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:41+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:41+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:42+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:42+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:43+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:42+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-20 04:42+0000\n"
"X-Generator: Launchpad (build 15985)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -20,8 +20,6 @@
##############################################################################
import ir_model
import ir_model_constraint
import ir_model_relation
import ir_sequence
import ir_needaction
import ir_ui_menu
@ -40,6 +38,7 @@ import wizard
import ir_config_parameter
import osv_memory_autovacuum
import ir_mail_server
import ir_fields
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

File diff suppressed because it is too large Load Diff

View File

@ -19,14 +19,11 @@
#
##############################################################################
import ast
import copy
import logging
import os
import re
import time
import tools
from xml import dom
import netsvc
from osv import fields,osv
@ -47,6 +44,9 @@ class actions(osv.osv):
'name': fields.char('Name', size=64, required=True),
'type': fields.char('Action Type', required=True, size=32,readonly=True),
'usage': fields.char('Action Usage', size=32),
'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.',
translate=True),
}
_defaults = {
'usage': lambda *a: False,
@ -107,6 +107,7 @@ class report_xml(osv.osv):
r['report_xsl'] and opj('addons',r['report_xsl']))
_name = 'ir.actions.report.xml'
_inherit = 'ir.actions.actions'
_table = 'ir_act_report_xml'
_sequence = 'ir_actions_id_seq'
_order = 'name'
@ -155,6 +156,7 @@ report_xml()
class act_window(osv.osv):
_name = 'ir.actions.act_window'
_table = 'ir_act_window'
_inherit = 'ir.actions.actions'
_sequence = 'ir_actions_id_seq'
_order = 'name'
@ -245,9 +247,6 @@ class act_window(osv.osv):
'filter': fields.boolean('Filter'),
'auto_search':fields.boolean('Auto Search'),
'search_view' : fields.function(_search_view, type='text', string='Search View'),
'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.',
translate=True),
'multi': fields.boolean('Action on Multiple Doc.', help="If set to true, the action will not be displayed on the right toolbar of a form view"),
}
@ -329,8 +328,9 @@ class act_wizard(osv.osv):
act_wizard()
class act_url(osv.osv):
_name = 'ir.actions.url'
_name = 'ir.actions.act_url'
_table = 'ir_act_url'
_inherit = 'ir.actions.actions'
_sequence = 'ir_actions_id_seq'
_order = 'name'
_columns = {
@ -432,6 +432,7 @@ class actions_server(osv.osv):
_name = 'ir.actions.server'
_table = 'ir_act_server'
_inherit = 'ir.actions.actions'
_sequence = 'ir_actions_id_seq'
_order = 'sequence,name'
_columns = {

View File

@ -0,0 +1,507 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Actions -->
<record id="action_view" model="ir.ui.view">
<field name="name">ir.actions.actions</field>
<field name="model">ir.actions.actions</field>
<field name="arch" type="xml">
<form string="Action" version="7.0">
<group>
<field name="name"/>
<field name="type"/>
<field name="usage"/>
</group>
</form>
</field>
</record>
<record id="action_view_tree" model="ir.ui.view">
<field name="name">ir.actions.actions.tree</field>
<field name="model">ir.actions.actions</field>
<field name="arch" type="xml">
<tree string="Action">
<field name="name"/>
<field name="type"/>
</tree>
</field>
</record>
<record id="action_view_search" model="ir.ui.view">
<field name="name">ir.actions.actions.search</field>
<field name="model">ir.actions.actions</field>
<field name="arch" type="xml">
<search string="Action">
<field name="name" filter_domain="['|', ('name','ilike',self), ('type','ilike',self)]" string="Action"/>
</search>
</field>
</record>
<record id="ir_sequence_actions" model="ir.actions.act_window">
<field name="name">Actions</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.actions.actions</field>
<field name="view_type">form</field>
<field name="view_id" ref="action_view_tree"/>
<field name="search_view_id" ref="action_view_search"/>
</record>
<menuitem id="next_id_6" name="Actions" parent="base.menu_custom" sequence="2"/>
<menuitem action="ir_sequence_actions" id="menu_ir_sequence_actions" parent="next_id_6"/>
<record id="act_report_xml_view" model="ir.ui.view">
<field name="name">ir.actions.report.xml</field>
<field name="model">ir.actions.report.xml</field>
<field name="arch" type="xml">
<form string="Report" version="7.0">
<group>
<group>
<field name="name"/>
<field name="report_name"/>
<field name="model"/>
</group>
<group>
<field name="usage"/>
<field name="report_type"/>
<field name="report_file"/>
</group>
</group>
<notebook>
<page string="Other Configuration">
<group>
<group string="RML Report">
<field name="header"/>
</group>
<group string="XML Report">
<field name="report_xsl"/>
<field name="report_xml"/>
</group>
<group string="Attachments">
<field name="attachment"/>
<field name="attachment_use"/>
</group>
<group string="Miscellaneous">
<field name="multi"/>
<field name="auto"/>
</group>
</group>
</page>
<page string="Security">
<field name="groups_id"/>
</page>
</notebook>
</form>
</field>
</record>
<record id="act_report_xml_view_tree" model="ir.ui.view">
<field name="name">ir.actions.report.xml.tree</field>
<field name="model">ir.actions.report.xml</field>
<field name="arch" type="xml">
<tree string="Report xml">
<field name="name"/>
<field name="model"/>
<field name="type"/>
<field name="report_name"/>
<field name="report_type"/>
<field name="attachment"/>
</tree>
</field>
</record>
<record id="act_report_xml_search_view" model="ir.ui.view">
<field name="name">ir.actions.report.xml.search</field>
<field name="model">ir.actions.report.xml</field>
<field name="arch" type="xml">
<search string="Report Xml">
<field name="name"
filter_domain="['|', '|', '|', '|', ('name','ilike',self), ('model','ilike',self), ('type','ilike',self), ('report_name','ilike',self), ('report_type','ilike',self)]"
string="Report"/>
<group expand="0" string="Group By" colspan="4">
<filter string="Report Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'report_type'}"/>
</group>
</search>
</field>
</record>
<record id="ir_action_report_xml" model="ir.actions.act_window">
<field name="name">Reports</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.actions.report.xml</field>
<field name="view_type">form</field>
<field name="view_id" ref="act_report_xml_view_tree"/>
<field name="search_view_id" ref="act_report_xml_search_view"/>
</record>
<menuitem action="ir_action_report_xml" id="menu_ir_action_report_xml" parent="base.next_id_6"/>
<record id="view_window_action_tree" model="ir.ui.view">
<field name="name">ir.actions.windows.tree</field>
<field name="model">ir.actions.act_window</field>
<field name="arch" type="xml">
<tree string="Open Window">
<field name="name"/>
<field name="res_model"/>
<field name="view_type"/>
<field name="view_id"/>
<field name="domain"/>
</tree>
</field>
</record>
<record id="view_window_action_form" model="ir.ui.view">
<field name="name">ir.actions.windows.form</field>
<field name="model">ir.actions.act_window</field>
<field name="arch" type="xml">
<form string="Open a Window" version="7.0">
<group>
<group>
<field name="name"/>
<field name="res_model" string="Object"/>
<field name="src_model" string="Source Object"/>
</group>
<group>
<field name="usage"/>
<field name="type" readonly="1"/>
<field name="target"/>
</group>
</group>
<notebook>
<page string="General Settings">
<group>
<group string="Views">
<field name="view_type"/>
<field name="view_mode"/>
<field name="view_id"/>
<field name="search_view_id"/>
</group>
<group string="Filters">
<field name="domain"/>
<field name="context"/>
<field name="limit"/>
<field name="auto_refresh"/>
<field name="auto_search"/>
<field name="filter"/>
</group>
</group>
<group string="Help">
<field colspan="2" name="help" nolabel="1"/>
</group>
<group string="Views">
<field colspan="2" name="view_ids" nolabel="1">
<form string="Views" version="7.0">
<group>
<field colspan="4" name="sequence"/>
<field name="view_mode"/>
<field domain="[('type', '=', view_mode)]" name="view_id"/>
</group>
</form>
<tree string="Views">
<field name="sequence"/>
<field name="view_mode"/>
<field name="view_id"/>
</tree>
</field>
</group>
</page>
<page string="Security">
<field name="groups_id"/>
</page>
</notebook>
</form>
</field>
</record>
<record id="view_window_action_search" model="ir.ui.view">
<field name="name">ir.actions.windows.search</field>
<field name="model">ir.actions.act_window</field>
<field name="arch" type="xml">
<search string="Open a Window">
<field name="name" filter_domain="['|', ('name','ilike',self), ('res_model','ilike',self)]" string="Action"/>
<field name="view_type"/>
<group expand="0" string="Group By" colspan="4">
<filter string="View Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'view_type'}"/>
</group>
</search>
</field>
</record>
<record id="ir_action_window" model="ir.actions.act_window">
<field name="name">Window Actions</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="search_view_id" ref="view_window_action_search"/>
</record>
<record id="ir_action_window_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_window_action_tree"/>
<field name="act_window_id" ref="ir_action_window"/>
</record>
<record id="ir_action_window_view2" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_window_action_form"/>
<field name="act_window_id" ref="ir_action_window"/>
</record>
<menuitem action="ir_action_window" id="menu_ir_action_window" parent="base.next_id_6"/>
<record id="act_wizard_view_tree" model="ir.ui.view">
<field name="name">ir.actions.wizard.tree</field>
<field name="model">ir.actions.wizard</field>
<field name="arch" type="xml">
<tree string="Wizard">
<field name="name"/>
<field name="wiz_name"/>
<field name="multi"/>
</tree>
</field>
</record>
<record id="act_wizard_view" model="ir.ui.view">
<field name="name">ir.actions.wizard</field>
<field name="model">ir.actions.wizard</field>
<field name="arch" type="xml">
<form string="Wizards" version="7.0">
<group col="4">
<field name="name"/>
<field name="type"/>
<field name="wiz_name"/>
<field name="multi"/>
</group>
<label for="groups_id"/>
<field name="groups_id"/>
</form>
</field>
</record>
<record id="act_wizard_search_view" model="ir.ui.view">
<field name="name">ir.actions.wizard.search</field>
<field name="model">ir.actions.wizard</field>
<field name="arch" type="xml">
<search string="Wizards">
<field name="name"
filter_domain="['|', '|', ('name','ilike',self), ('type','ilike',self), ('wiz_name','ilike',self)]"
string="Wizard"/>
</search>
</field>
</record>
<record id="ir_action_wizard" model="ir.actions.act_window">
<field name="name">Wizards</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.actions.wizard</field>
<field name="view_type">form</field>
<field name="search_view_id" ref="act_wizard_search_view"/>
</record>
<menuitem action="ir_action_wizard" id="menu_ir_action_wizard" parent="base.next_id_6"/>
<record id="property_rule" model="ir.rule">
<field name="name">Property multi-company</field>
<field model="ir.model" name="model_id" ref="model_ir_property"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
</record>
<!--server action view-->
<record id="view_server_action_form" model="ir.ui.view">
<field name="name">Server Action</field>
<field name="model">ir.actions.server</field>
<field name="arch" type="xml">
<form string="Server Action" version="7.0">
<group>
<group>
<field name="name"/>
<field name="model_id"/>
<field name="state"/>
</group>
<group>
<field name="condition"/>
<field name="sequence"/>
</group>
</group>
<notebook colspan="4">
<page string="Python Code" attrs="{'invisible':[('state','!=','code')]}">
<field name="code"/>
</page>
<page string="Trigger" attrs="{'invisible':[('state','!=','trigger')]}">
<group string="Trigger Configuration" col="4">
<field name="wkf_model_id" attrs="{'required':[('state','=','trigger')]}"/>
<field name="trigger_obj_id" context="{'key':''}"
domain="[('model_id','=',model_id),('ttype','in',['many2one','int'])]"
attrs="{'required':[('state','=','trigger')]}"/>
<field name="trigger_name" attrs="{'required':[('state','=','trigger')]}"/>
</group>
</page>
<page string="Action to Launch" attrs="{'invisible':[('state','!=','client_action')]}">
<group>
<field name="action_id" attrs="{'required':[('state','=','client_action')]}"/>
</group>
</page>
<page string="Email Configuration" attrs="{'invisible':[('state','!=','email')]}">
<group>
<field name="email" domain="[('model_id','=',model_id)]" attrs="{'required':[('state','=','email')]}"/>
<field name="subject" attrs="{'required':[('state','=','email')]}"/>
<field name="message" attrs="{'required':[('state','=','email')]}"/>
<newline/>
<label colspan="2" string="Access all the fields related to the current object using expressions, i.e. object.partner_id.name " align="0.0"/>
</group>
</page>
<page string="SMS Configuration" attrs="{'invisible':[('state','!=','sms')]}">
<group>
<field name="mobile" domain="[('model_id','=',model_id)]" attrs="{'required':[('state','=','sms')]}"/>
<field name="sms" attrs="{'required':[('state','=','sms')]}"/>
</group>
<label 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')]}">
<group col="4" string="Fields Mapping">
<field name="srcmodel_id" attrs="{'required':[('state','!=','dummy'), ('state','!=','sms'), ('state','!=','code'), ('state','!=','loop'), ('state','!=','trigger'), ('state','!=','object_copy'), ('state','!=','client_action'), ('state','!=','email'), ('state','!=','sms'), ('state','!=','other')]}"/>
<field name="copy_object" on_change="change_object(copy_object, state)" attrs="{'required':[('state','!=','dummy'), ('state','!=','sms'), ('state','!=','code'), ('state','!=','loop'), ('state','!=','trigger'), ('state','!=','object_write'), ('state','!=','object_create'), ('state','!=','client_action'), ('state','!=','email'), ('state','!=','sms'), ('state','!=','other')]}"/>
<field name="fields_lines" nolabel="1" colspan="2">
<tree string="Field Mappings" editable="top">
<field name="col1" domain="[('model_id','=',parent.srcmodel_id or parent.model_id)]"/>
<field name="type"/>
<field name="value" colspan="4"/>
</tree>
<form string="Field Mapping" version="7.0">
<group col="4">
<field name="col1" domain="[('model_id','=',parent.srcmodel_id or parent.model_id)]"/>
<field name="type"/>
<field name="value" colspan="4"/>
</group>
</form>
</field>
<field name="record_id" attrs="{'readonly':[('state','!=','object_create')]}" domain="[('model_id','in',[model_id])]"/>
<field name="write_id" attrs="{'readonly':[('state','!=','object_write')]}"/>
</group>
<label string="If you use a formula type, use a python expression using the variable 'object'." align="0.0"/>
</page>
<page string="Iteration Actions" attrs="{'invisible':[('state','!=','loop')]}">
<group col="4">
<field name="expression" attrs="{'required':[('state','=','loop')]}"/>
<field name="loop_action" domain="[('state','!=','loop')]" attrs="{'required':[('state','=','loop')]}"/>
</group>
</page>
<page string="Multi Actions" attrs="{'invisible':[('state','!=','other')]}">
<field name="child_ids"/>
<label string="Only one client action will be executed, last client action will be considered in case of multiple client actions." align="0.0"/>
</page>
</notebook>
<field name="type" readonly="1"/>
</form>
</field>
</record>
<record id="view_server_action_tree" model="ir.ui.view">
<field name="name">Server Actions</field>
<field name="model">ir.actions.server</field>
<field name="arch" type="xml">
<tree string="Server Actions">
<field name="name"/>
<field name="state"/>
<field name="model_id"/>
<field name="sequence"/>
</tree>
</field>
</record>
<record id="view_server_action_search" model="ir.ui.view">
<field name="name">ir.actions.server.search</field>
<field name="model">ir.actions.server</field>
<field name="arch" type="xml">
<search string="Server Actions">
<field name="name" string="Server Action"/>
<field name="model_id"/>
<field name="state"/>
<group expand="0" string="Group By" colspan="4" col="4">
<filter string="Action Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
<record id="action_server_action" model="ir.actions.act_window">
<field name="name">Server Actions</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.actions.server</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_server_action_tree"/>
<field name="search_view_id" ref="view_server_action_search"/>
<field name="context">{'key':'server_action'}</field>
</record>
<menuitem action="action_server_action" id="menu_server_action" parent="base.next_id_6"/>
<!-- ir.actions.todo -->
<record id="ir_actions_todo_tree" model="ir.ui.view">
<field name="model">ir.actions.todo</field>
<field name="name">Config Wizard Steps</field>
<field name="arch" type="xml">
<tree string="Config Wizard Steps">
<field name="sequence"/>
<field name="action_id"/>
<field name="type"/>
<field name="state" readonly="1"/>
<button name="action_launch" states="open" string="Launch" type="object" icon="gtk-execute" help="Launch Configuration Wizard"/>
<button name="action_open" states="done"
string="Todo" type="object" help="Set as Todo"
icon="gtk-convert"/>
</tree>
</field>
</record>
<record id="config_wizard_step_view_form" model="ir.ui.view">
<field name="model">ir.actions.todo</field>
<field name="name">Config Wizard Steps</field>
<field name="arch" type="xml">
<form string="Config Wizard Steps" version="7.0">
<header>
<button name="action_launch"
states="open" string="Launch"
type="object" icon="gtk-execute" class="oe_highlight"
help="Launch Configuration Wizard"/>
<button name="action_open" states="done"
string="Set as Todo" type="object"
icon="gtk-convert" class="oe_highlight"/>
<field name="state" widget="statusbar" statusbar_visible="open,done" nolabel="1" readonly="1" statusbar_colors='{"open":"red","done":"blue"}'/>
</header>
<sheet>
<group col="4">
<field name="action_id"/>
<field name="type"/>
<field name="sequence"/>
</group>
<group string="Groups">
<field name="groups_id" nolabel="1" colspan="4"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="config_wizard_step_view_search" model="ir.ui.view">
<field name="model">ir.actions.todo</field>
<field name="name">ir.actions.todo.select</field>
<field name="arch" type="xml">
<search string="Search Actions">
<filter string="To Do" name="todo" icon="terp-camera_test" domain=" [('state','=','open')]" help="Wizards to be Launched"/>
<field name="action_id"/>
<field name="state"/>
</search>
</field>
</record>
<record id="act_ir_actions_todo_form" model="ir.actions.act_window">
<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>
<field name="help">The configuration wizards are used to help you configure a new instance of OpenERP. They are launched during the installation of new modules, but you can choose to restart some wizards manually from this menu.</field>
</record>
<menuitem id="menu_ir_actions_todo" name="Configuration Wizards" parent="menu_custom" sequence="20" groups="base.group_no_one"/>
<menuitem id="menu_ir_actions_todo_form" action="act_ir_actions_todo_form" parent="menu_ir_actions_todo"/>
</data>
</openerp>

View File

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Attachment -->
<record id="view_attachment_form" model="ir.ui.view">
<field name="model">ir.attachment</field>
<field name="arch" type="xml">
<form string="Attachments" version="7.0">
<sheet>
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name"/>
</h1>
<group>
<group string="Data">
<field name="type"/>
<field name="datas" filename="datas_fname" attrs="{'invisible':[('type','=','url')]}"/>
<field name="datas_fname" invisible="1" attrs="{'invisible':[('type','=','url')]}" class="oe_inline oe_right"/>
<field name="url" widget="url" attrs="{'invisible':[('type','=','binary')]}"/>
</group>
<group string="Attached To">
<field name="res_model"/>
<field name="res_id"/>
<field name="res_name"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group groups="base.group_no_one" string="History">
<label for="create_uid" string="Creation"/>
<div name="creation_div">
<field name="create_uid" readonly="1" class="oe_inline"/> on
<field name="create_date" readonly="1" class="oe_inline"/>
</div>
</group>
<group name="description_group" string="Description" colspan="4">
<field name="description" nolabel="1"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_attachment_tree" model="ir.ui.view">
<field name="model">ir.attachment</field>
<field name="arch" type="xml">
<tree string="Attachments">
<field name="name"/>
<field name="datas_fname"/>
<field name="type" invisible="1"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="create_uid"/>
<field name="create_date"/>
</tree>
</field>
</record>
<record id="view_attachment_search" model="ir.ui.view">
<field name="model">ir.attachment</field>
<field name="arch" type="xml">
<search string="Attachments">
<field name="name" filter_domain="['|', ('name','ilike',self), ('datas_fname','ilike',self)]" string="Attachment"/>
<field name="create_date"/>
<filter icon="terp-stage"
string="URL"
domain="[('type','=','url')]"/>
<filter icon="terp-stock_align_left_24"
string="Binary"
domain="[('type','=','binary')]"/>
<separator/>
<filter name="my_documents_filter"
string="My Document(s)"
icon="terp-personal"
domain="[('create_uid','=',uid)]"
help="Filter on my documents"/>
<field name="create_uid"/>
<field name="type"/>
<group expand="0" string="Group By...">
<filter string="Owner" icon="terp-personal" domain="[]" context="{'group_by':'create_uid'}"/>
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}" groups="base.group_no_one"/>
<filter string="Company" icon="terp-gtk-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Month" help="Creation Month" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}"/>
</group>
</search>
</field>
</record>
<record id="action_attachment" model="ir.actions.act_window">
<field name="name">Attachments</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.attachment</field>
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_attachment_search"/>
</record>
<menuitem action="action_attachment" id="menu_action_attachment" parent="base.next_id_4"/>
</data>
</openerp>

View File

@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_ir_config_search">
<field name="name">ir.config_parameter.search</field>
<field name="model">ir.config_parameter</field>
<field name="arch" type="xml">
<search string="System Properties">
@ -13,7 +11,6 @@
</field>
</record>
<record model="ir.ui.view" id="view_ir_config_list">
<field name="name">ir.config_parameter.list</field>
<field name="model">ir.config_parameter</field>
<field name="arch" type="xml">
<tree string="System Parameters">
@ -23,7 +20,6 @@
</field>
</record>
<record model="ir.ui.view" id="view_ir_config_form">
<field name="name">ir.config_parameter.form</field>
<field name="model">ir.config_parameter</field>
<field name="arch" type="xml">
<form string="System Parameters" version="7.0">
@ -36,7 +32,6 @@
</form>
</field>
</record>
<act_window name="System Parameters" res_model="ir.config_parameter" id="ir_config_list_action"/>
<menuitem id="ir_config_menu" name="System Parameters" parent="menu_ir_property" action="ir_config_list_action"/>
</data>

View File

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- ir.cron -->
<record id="ir_cron_view" model="ir.ui.view">
<field name="model">ir.cron</field>
<field name="arch" type="xml">
<form string="Scheduled Actions" version="7.0">
<sheet>
<group col="4">
<field name="name"/>
<field name="active"/>
<field name="user_id" />
<field name="priority" />
</group>
<notebook>
<page string="Information">
<group col="4">
<field name="interval_number"/>
<field name="interval_type"/>
<newline/>
<field name="nextcall"/>
<field name="numbercall"/>
<field name="doall"/>
</group>
</page>
<page string="Technical Data" groups="base.group_no_one">
<group string="Action to Trigger">
<field name="model"/>
<field name="function"/>
</group>
<label for="args"/>
<field name="args"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="ir_cron_view_tree" model="ir.ui.view">
<field name="model">ir.cron</field>
<field name="arch" type="xml">
<tree string="Scheduled Actions">
<field name="priority" string="Sequence"/>
<field name="name"/>
<field name="nextcall"/>
<field name="interval_number"/>
<field name="interval_type"/>
<field name="numbercall"/>
<field name="user_id" invisible="1"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="ir_cron_view_calendar">
<field name="model">ir.cron</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Scheduled Actions" date_start="nextcall" color="user_id">
<field name="name"/>
<field name="user_id"/>
</calendar>
</field>
</record>
<record id="ir_cron_view_search" model="ir.ui.view">
<field name="model">ir.cron</field>
<field name="arch" type="xml">
<search string="Scheduled Actions">
<field name="name" string="Scheduled Action"/>
<field name="user_id"/>
<field name="nextcall"/>
<field name="active"/>
<group expand="0" string="Group By...">
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Execution" icon="terp-go-month"
domain="[]" context="{'group_by':'nextcall'}" />
</group>
</search>
</field>
</record>
<record id="ir_cron_act" model="ir.actions.act_window">
<field name="name">Scheduled Actions</field>
<field name="res_model">ir.cron</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="context">{'active_test': False}</field>
<field name="view_id" ref="ir_cron_view_tree"/>
</record>
<menuitem id="menu_ir_cron" name="Scheduler" parent="menu_custom" groups="base.group_no_one" sequence="23"/>
<menuitem id="menu_ir_cron_act" action="ir_cron_act" parent="menu_ir_cron"/>
</data>
</openerp>

View File

@ -0,0 +1,365 @@
# -*- coding: utf-8 -*-
import datetime
import functools
import operator
import itertools
import time
import psycopg2
import pytz
from openerp.osv import orm
from openerp.tools.translate import _
from openerp.tools.misc import DEFAULT_SERVER_DATE_FORMAT,\
DEFAULT_SERVER_DATETIME_FORMAT
REFERENCING_FIELDS = set([None, 'id', '.id'])
def only_ref_fields(record):
return dict((k, v) for k, v in record.iteritems()
if k in REFERENCING_FIELDS)
def exclude_ref_fields(record):
return dict((k, v) for k, v in record.iteritems()
if k not in REFERENCING_FIELDS)
CREATE = lambda values: (0, False, values)
UPDATE = lambda id, values: (1, id, values)
DELETE = lambda id: (2, id, False)
FORGET = lambda id: (3, id, False)
LINK_TO = lambda id: (4, id, False)
DELETE_ALL = lambda: (5, False, False)
REPLACE_WITH = lambda ids: (6, False, ids)
class ConversionNotFound(ValueError): pass
class ir_fields_converter(orm.Model):
_name = 'ir.fields.converter'
def to_field(self, cr, uid, model, column, fromtype=str, context=None):
""" Fetches a converter for the provided column object, from the
specified type.
A converter is simply a callable taking a value of type ``fromtype``
(or a composite of ``fromtype``, e.g. list or dict) and returning a
value acceptable for a write() on the column ``column``.
By default, tries to get a method on itself with a name matching the
pattern ``_$fromtype_to_$column._type`` and returns it.
Converter callables can either return a value and a list of warnings
to their caller or raise ``ValueError``, which will be interpreted as a
validation & conversion failure.
ValueError can have either one or two parameters. The first parameter
is mandatory, **must** be a unicode string and will be used as the
user-visible message for the error (it should be translatable and
translated). It can contain a ``field`` named format placeholder so the
caller can inject the field's translated, user-facing name (@string).
The second parameter is optional and, if provided, must be a mapping.
This mapping will be merged into the error dictionary returned to the
client.
If a converter can perform its function but has to make assumptions
about the data, it can send a warning to the user through adding an
instance of :class:`~openerp.osv.orm.ImportWarning` to the second value
it returns. The handling of a warning at the upper levels is the same
as ``ValueError`` above.
:param column: column object to generate a value for
:type column: :class:`fields._column`
:param type fromtype: type to convert to something fitting for ``column``
:param context: openerp request context
:return: a function (fromtype -> column.write_type), if a converter is found
:rtype: Callable | None
"""
# FIXME: return None
converter = getattr(
self, '_%s_to_%s' % (fromtype.__name__, column._type), None)
if not converter: return None
return functools.partial(
converter, cr, uid, model, column, context=context)
def _str_to_boolean(self, cr, uid, model, column, value, context=None):
# all translatables used for booleans
true, yes, false, no = _(u"true"), _(u"yes"), _(u"false"), _(u"no")
# potentially broken casefolding? What about locales?
trues = set(word.lower() for word in itertools.chain(
[u'1', u"true", u"yes"], # don't use potentially translated values
self._get_translations(cr, uid, ['code'], u"true", context=context),
self._get_translations(cr, uid, ['code'], u"yes", context=context),
))
if value.lower() in trues: return True, []
# potentially broken casefolding? What about locales?
falses = set(word.lower() for word in itertools.chain(
[u'', u"0", u"false", u"no"],
self._get_translations(cr, uid, ['code'], u"false", context=context),
self._get_translations(cr, uid, ['code'], u"no", context=context),
))
if value.lower() in falses: return False, []
return True, [orm.ImportWarning(
_(u"Unknown value '%s' for boolean field '%%(field)s', assuming '%s'")
% (value, yes), {
'moreinfo': _(u"Use '1' for yes and '0' for no")
})]
def _str_to_integer(self, cr, uid, model, column, value, context=None):
try:
return int(value), []
except ValueError:
raise ValueError(
_(u"'%s' does not seem to be an integer for field '%%(field)s'")
% value)
def _str_to_float(self, cr, uid, model, column, value, context=None):
try:
return float(value), []
except ValueError:
raise ValueError(
_(u"'%s' does not seem to be a number for field '%%(field)s'")
% value)
def _str_id(self, cr, uid, model, column, value, context=None):
return value, []
_str_to_char = _str_to_text = _str_to_binary = _str_id
def _str_to_date(self, cr, uid, model, column, value, context=None):
try:
time.strptime(value, DEFAULT_SERVER_DATE_FORMAT)
return value, []
except ValueError:
raise ValueError(
_(u"'%s' does not seem to be a valid date for field '%%(field)s'") % value, {
'moreinfo': _(u"Use the format '%s'") % u"2012-12-31"
})
def _input_tz(self, cr, uid, context):
# if there's a tz in context, try to use that
if context.get('tz'):
try:
return pytz.timezone(context['tz'])
except pytz.UnknownTimeZoneError:
pass
# if the current user has a tz set, try to use that
user = self.pool['res.users'].read(
cr, uid, [uid], ['tz'], context=context)[0]
if user['tz']:
try:
return pytz.timezone(user['tz'])
except pytz.UnknownTimeZoneError:
pass
# fallback if no tz in context or on user: UTC
return pytz.UTC
def _str_to_datetime(self, cr, uid, model, column, value, context=None):
if context is None: context = {}
try:
parsed_value = datetime.datetime.strptime(
value, DEFAULT_SERVER_DATETIME_FORMAT)
except ValueError:
raise ValueError(
_(u"'%s' does not seem to be a valid datetime for field '%%(field)s'") % value, {
'moreinfo': _(u"Use the format '%s'") % u"2012-12-31 23:59:59"
})
input_tz = self._input_tz(cr, uid, context)# Apply input tz to the parsed naive datetime
dt = input_tz.localize(parsed_value, is_dst=False)
# And convert to UTC before reformatting for writing
return dt.astimezone(pytz.UTC).strftime(DEFAULT_SERVER_DATETIME_FORMAT), []
def _get_translations(self, cr, uid, types, src, context):
types = tuple(types)
# Cache translations so they don't have to be reloaded from scratch on
# every row of the file
tnx_cache = cr.cache.setdefault(self._name, {})
if tnx_cache.setdefault(types, {}) and src in tnx_cache[types]:
return tnx_cache[types][src]
Translations = self.pool['ir.translation']
tnx_ids = Translations.search(
cr, uid, [('type', 'in', types), ('src', '=', src)], context=context)
tnx = Translations.read(cr, uid, tnx_ids, ['value'], context=context)
result = tnx_cache[types][src] = map(operator.itemgetter('value'), tnx)
return result
def _str_to_selection(self, cr, uid, model, column, value, context=None):
selection = column.selection
if not isinstance(selection, (tuple, list)):
# FIXME: Don't pass context to avoid translations?
# Or just copy context & remove lang?
selection = selection(model, cr, uid)
for item, label in selection:
labels = self._get_translations(
cr, uid, ('selection', 'model', 'code'), label, context=context)
labels.append(label)
if value == unicode(item) or value in labels:
return item, []
raise ValueError(
_(u"Value '%s' not found in selection field '%%(field)s'") % (
value), {
'moreinfo': [label or unicode(item) for item, label in selection
if label or item]
})
def db_id_for(self, cr, uid, model, column, subfield, value, context=None):
""" Finds a database id for the reference ``value`` in the referencing
subfield ``subfield`` of the provided column of the provided model.
:param model: model to which the column belongs
:param column: relational column for which references are provided
:param subfield: a relational subfield allowing building of refs to
existing records: ``None`` for a name_get/name_search,
``id`` for an external id and ``.id`` for a database
id
:param value: value of the reference to match to an actual record
:param context: OpenERP request context
:return: a pair of the matched database identifier (if any), the
translated user-readable name for the field and the list of
warnings
:rtype: (ID|None, unicode, list)
"""
if context is None: context = {}
id = None
warnings = []
action = {'type': 'ir.actions.act_window', 'target': 'new',
'view_mode': 'tree,form', 'view_type': 'form',
'views': [(False, 'tree'), (False, 'form')],
'help': _(u"See all possible values")}
if subfield is None:
action['res_model'] = column._obj
elif subfield in ('id', '.id'):
action['res_model'] = 'ir.model.data'
action['domain'] = [('model', '=', column._obj)]
RelatedModel = self.pool[column._obj]
if subfield == '.id':
field_type = _(u"database id")
try: tentative_id = int(value)
except ValueError: tentative_id = value
try:
if RelatedModel.search(cr, uid, [('id', '=', tentative_id)],
context=context):
id = tentative_id
except psycopg2.DataError:
# type error
raise ValueError(
_(u"Invalid database id '%s' for the field '%%(field)s'") % value,
{'moreinfo': action})
elif subfield == 'id':
field_type = _(u"external id")
if '.' in value:
module, xid = value.split('.', 1)
else:
module, xid = context.get('_import_current_module', ''), value
ModelData = self.pool['ir.model.data']
try:
_model, id = ModelData.get_object_reference(
cr, uid, module, xid)
except ValueError: pass # leave id is None
elif subfield is None:
field_type = _(u"name")
ids = RelatedModel.name_search(
cr, uid, name=value, operator='=', context=context)
if ids:
if len(ids) > 1:
warnings.append(orm.ImportWarning(
_(u"Found multiple matches for field '%%(field)s' (%d matches)")
% (len(ids))))
id, _name = ids[0]
else:
raise Exception(_(u"Unknown sub-field '%s'") % subfield)
if id is None:
raise ValueError(
_(u"No matching record found for %(field_type)s '%(value)s' in field '%%(field)s'")
% {'field_type': field_type, 'value': value},
{'moreinfo': action})
return id, field_type, warnings
def _referencing_subfield(self, record):
""" Checks the record for the subfields allowing referencing (an
existing record in an other table), errors out if it finds potential
conflicts (multiple referencing subfields) or non-referencing subfields
returns the name of the correct subfield.
:param record:
:return: the record subfield to use for referencing and a list of warnings
:rtype: str, list
"""
# Can import by name_get, external id or database id
fieldset = set(record.iterkeys())
if fieldset - REFERENCING_FIELDS:
raise ValueError(
_(u"Can not create Many-To-One records indirectly, import the field separately"))
if len(fieldset) > 1:
raise ValueError(
_(u"Ambiguous specification for field '%(field)s', only provide one of name, external id or database id"))
# only one field left possible, unpack
[subfield] = fieldset
return subfield, []
def _str_to_many2one(self, cr, uid, model, column, values, context=None):
# Should only be one record, unpack
[record] = values
subfield, w1 = self._referencing_subfield(record)
reference = record[subfield]
id, subfield_type, w2 = self.db_id_for(
cr, uid, model, column, subfield, reference, context=context)
return id, w1 + w2
def _str_to_many2many(self, cr, uid, model, column, value, context=None):
[record] = value
subfield, warnings = self._referencing_subfield(record)
ids = []
for reference in record[subfield].split(','):
id, subfield_type, ws = self.db_id_for(
cr, uid, model, column, subfield, reference, context=context)
ids.append(id)
warnings.extend(ws)
return [REPLACE_WITH(ids)], warnings
def _str_to_one2many(self, cr, uid, model, column, records, context=None):
commands = []
warnings = []
if len(records) == 1 and exclude_ref_fields(records[0]) == {}:
# only one row with only ref field, field=ref1,ref2,ref3 as in
# m2o/m2m
record = records[0]
subfield, ws = self._referencing_subfield(record)
warnings.extend(ws)
# transform [{subfield:ref1,ref2,ref3}] into
# [{subfield:ref1},{subfield:ref2},{subfield:ref3}]
records = ({subfield:item} for item in record[subfield].split(','))
for record in records:
id = None
refs = only_ref_fields(record)
# there are ref fields in the record
if refs:
subfield, w1 = self._referencing_subfield(refs)
warnings.extend(w1)
reference = record[subfield]
id, subfield_type, w2 = self.db_id_for(
cr, uid, model, column, subfield, reference, context=context)
warnings.extend(w2)
writable = exclude_ref_fields(record)
if id:
commands.append(LINK_TO(id))
commands.append(UPDATE(id, writable))
else:
commands.append(CREATE(writable))
return commands, warnings

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- Restrict modifications on ir.filters to owner only -->
<record id="ir_filters_rule" model="ir.rule">
@ -12,7 +11,6 @@
<data>
<record id="ir_filters_view_form" model="ir.ui.view">
<field name="name">ir.filters.form</field>
<field name="model">ir.filters</field>
<field name="arch" type="xml">
<form string="Filters" version="7.0">
@ -30,9 +28,7 @@
</form>
</field>
</record>
<record id="ir_filters_view_tree" model="ir.ui.view">
<field name="name">ir.filters.tree</field>
<field name="model">ir.filters</field>
<field name="arch" type="xml">
<tree string="Filters">
@ -44,9 +40,7 @@
</tree>
</field>
</record>
<record id="ir_filters_view_search" model="ir.ui.view">
<field name="name">ir.filters.search</field>
<field name="model">ir.filters</field>
<field name="arch" type="xml">
<search string="Filters">
@ -62,13 +56,11 @@
</search>
</field>
</record>
<record id="actions_ir_filters_view" model="ir.actions.act_window">
<field name="name">Filters</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.filters</field>
</record>
<menuitem parent="base.next_id_2" name="User-defined Filters"
id="menu_ir_filters" action="actions_ir_filters_view" sequence="5"/>
</data>

View File

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- ir.mail.server -->
<record model="ir.ui.view" id="ir_mail_server_form">
<field name="model">ir.mail_server</field>
<field name="arch" type="xml">
<form string="Outgoing Mail Servers" version="7.0">
<sheet>
<group col="4">
<field name="name"/>
<field name="sequence"/>
</group>
<group col="4" string="Connection Information">
<field name="smtp_host"/>
<field name="smtp_port"/>
<field name="smtp_debug" groups="base.group_no_one"/>
</group>
<group string="Security and Authentication" colspan="4">
<field name="smtp_encryption" on_change="on_change_encryption(smtp_encryption)"/>
<field name="smtp_user"/>
<field name="smtp_pass" password="True"/>
<button name="test_smtp_connection" type="object" string="Test Connection" icon="gtk-network"/>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="ir_mail_server_list">
<field name="model">ir.mail_server</field>
<field name="arch" type="xml">
<tree string="Outgoing Mail Servers">
<field name="sequence"/>
<field name="name"/>
<field name="smtp_host"/>
<field name="smtp_user"/>
<field name="smtp_encryption"/>
</tree>
</field>
</record>
<record id="view_ir_mail_server_search" model="ir.ui.view">
<field name="model">ir.mail_server</field>
<field name="arch" type="xml">
<search string="Outgoing Mail Servers">
<field name="name"
filter_domain="['|', '|', ('name','ilike',self), ('smtp_host','ilike',self), ('smtp_user','ilike',self)]"
string="Outgoing Mail Server"/>
<field name="smtp_encryption"/>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_ir_mail_server_list">
<field name="name">Outgoing Mail Servers</field>
<field name="res_model">ir.mail_server</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="ir_mail_server_list" />
<field name="search_view_id" ref="view_ir_mail_server_search"/>
</record>
<menuitem id="menu_mail_servers" parent="menu_email" action="action_ir_mail_server_list" sequence="15" groups="base.group_no_one"/>
</data>
</openerp>

View File

@ -24,8 +24,11 @@ import re
import time
import types
from openerp.osv import fields,osv
import openerp
from openerp import SUPERUSER_ID
from openerp import netsvc, pooler, tools
from openerp.osv import fields,osv
from openerp.osv.orm import Model
from openerp.tools.safe_eval import safe_eval as eval
from openerp.tools import config
from openerp.tools.translate import _
@ -58,7 +61,6 @@ def _in_modules(self, cr, uid, ids, field_name, arg, context=None):
result[k] = ', '.join(sorted(installed_modules & set(xml_id.split('.')[0] for xml_id in v)))
return result
class ir_model(osv.osv):
_name = 'ir.model'
_description = "Models"
@ -204,7 +206,6 @@ class ir_model(osv.osv):
else:
x_name = a._columns.keys()[0]
x_custom_model._rec_name = x_name
ir_model()
class ir_model_fields(osv.osv):
_name = 'ir.model.fields'
@ -462,12 +463,134 @@ class ir_model_fields(osv.osv):
obj._auto_init(cr, ctx)
return res
ir_model_fields()
class ir_model_constraint(Model):
"""
This model tracks PostgreSQL foreign keys and constraints used by OpenERP
models.
"""
_name = 'ir.model.constraint'
_columns = {
'name': fields.char('Constraint', required=True, size=128, select=1,
help="PostgreSQL constraint or foreign key name."),
'model': fields.many2one('ir.model', string='Model',
required=True, select=1),
'module': fields.many2one('ir.module.module', string='Module',
required=True, select=1),
'type': fields.char('Constraint Type', required=True, size=1, select=1,
help="Type of the constraint: `f` for a foreign key, "
"`u` for other constraints."),
'date_update': fields.datetime('Update Date'),
'date_init': fields.datetime('Initialization Date')
}
_sql_constraints = [
('module_name_uniq', 'unique(name, module)',
'Constraints with the same name are unique per module.'),
]
def _module_data_uninstall(self, cr, uid, ids, context=None):
"""
Delete PostgreSQL foreign keys and constraints tracked by this model.
"""
if uid != SUPERUSER_ID and not self.pool.get('ir.model.access').check_groups(cr, uid, "base.group_system"):
raise except_orm(_('Permission Denied'), (_('Administrator access is required to uninstall a module')))
context = dict(context or {})
ids_set = set(ids)
ids.sort()
ids.reverse()
for data in self.browse(cr, uid, ids, context):
model = data.model.model
model_obj = self.pool.get(model)
name = openerp.tools.ustr(data.name)
typ = data.type
# double-check we are really going to delete all the owners of this schema element
cr.execute("""SELECT id from ir_model_constraint where name=%s""", (data.name,))
external_ids = [x[0] for x in cr.fetchall()]
if (set(external_ids)-ids_set):
# as installed modules have defined this element we must not delete it!
continue
if typ == 'f':
# test if FK exists on this table (it could be on a related m2m table, in which case we ignore it)
cr.execute("""SELECT 1 from pg_constraint cs JOIN pg_class cl ON (cs.conrelid = cl.oid)
WHERE cs.contype=%s and cs.conname=%s and cl.relname=%s""", ('f', name, model_obj._table))
if cr.fetchone():
cr.execute('ALTER TABLE "%s" DROP CONSTRAINT "%s"' % (model_obj._table, name),)
_logger.info('Dropped FK CONSTRAINT %s@%s', name, model)
if typ == 'u':
# test if constraint exists
cr.execute("""SELECT 1 from pg_constraint cs JOIN pg_class cl ON (cs.conrelid = cl.oid)
WHERE cs.contype=%s and cs.conname=%s and cl.relname=%s""", ('u', name, model_obj._table))
if cr.fetchone():
cr.execute('ALTER TABLE "%s" DROP CONSTRAINT "%s"' % (model_obj._table, name),)
_logger.info('Dropped CONSTRAINT %s@%s', name, model)
self.unlink(cr, uid, ids, context)
class ir_model_relation(Model):
"""
This model tracks PostgreSQL tables used to implement OpenERP many2many
relations.
"""
_name = 'ir.model.relation'
_columns = {
'name': fields.char('Relation Name', required=True, size=128, select=1,
help="PostgreSQL table name implementing a many2many relation."),
'model': fields.many2one('ir.model', string='Model',
required=True, select=1),
'module': fields.many2one('ir.module.module', string='Module',
required=True, select=1),
'date_update': fields.datetime('Update Date'),
'date_init': fields.datetime('Initialization Date')
}
def _module_data_uninstall(self, cr, uid, ids, context=None):
"""
Delete PostgreSQL many2many relations tracked by this model.
"""
if uid != SUPERUSER_ID and not self.pool.get('ir.model.access').check_groups(cr, uid, "base.group_system"):
raise except_orm(_('Permission Denied'), (_('Administrator access is required to uninstall a module')))
ids_set = set(ids)
to_drop_table = []
ids.sort()
ids.reverse()
for data in self.browse(cr, uid, ids, context):
model = data.model
model_obj = self.pool.get(model)
name = openerp.tools.ustr(data.name)
# double-check we are really going to delete all the owners of this schema element
cr.execute("""SELECT id from ir_model_relation where name = %s""", (data.name,))
external_ids = [x[0] for x in cr.fetchall()]
if (set(external_ids)-ids_set):
# as installed modules have defined this element we must not delete it!
continue
cr.execute("SELECT 1 FROM information_schema.tables WHERE table_name=%s", (name,))
if cr.fetchone() and not name in to_drop_table:
to_drop_table.append(name)
self.unlink(cr, uid, ids, context)
# drop m2m relation tables
for table in to_drop_table:
cr.execute('DROP TABLE %s CASCADE'% (table),)
_logger.info('Dropped table %s', table)
cr.commit()
class ir_model_access(osv.osv):
_name = 'ir.model.access'
_columns = {
'name': fields.char('Name', size=64, required=True, select=True),
'active': fields.boolean('Active', help='If you uncheck the active field, it will disable the ACL without deleting it (if you delete a native ACL, it will be re-created when you reload the module.'),
'model_id': fields.many2one('ir.model', 'Object', required=True, domain=[('osv_memory','=', False)], select=True, ondelete='cascade'),
'group_id': fields.many2one('res.groups', 'Group', ondelete='cascade', select=True),
'perm_read': fields.boolean('Read Access'),
@ -475,6 +598,9 @@ class ir_model_access(osv.osv):
'perm_create': fields.boolean('Create Access'),
'perm_unlink': fields.boolean('Delete Access'),
}
_defaults = {
'active': True,
}
def check_groups(self, cr, uid, group):
grouparr = group.split('.')
@ -499,14 +625,16 @@ class ir_model_access(osv.osv):
cr.execute("SELECT perm_" + mode + " "
" FROM ir_model_access a "
" JOIN ir_model m ON (m.id = a.model_id) "
" WHERE m.model = %s AND a.group_id = %s", (model_name, group_id)
" WHERE m.model = %s AND a.active IS True "
" AND a.group_id = %s", (model_name, group_id)
)
r = cr.fetchone()
if r is None:
cr.execute("SELECT perm_" + mode + " "
" FROM ir_model_access a "
" JOIN ir_model m ON (m.id = a.model_id) "
" WHERE m.model = %s AND a.group_id IS NULL", (model_name, )
" WHERE m.model = %s AND a.active IS True "
" AND a.group_id IS NULL", (model_name, )
)
r = cr.fetchone()
@ -531,6 +659,7 @@ class ir_model_access(osv.osv):
LEFT JOIN ir_module_category c ON (c.id=g.category_id)
WHERE
m.model=%s AND
a.active IS True AND
a.perm_''' + access_mode, (model_name,))
return [('%s/%s' % x) if x[0] else x[1] for x in cr.fetchall()]
@ -550,7 +679,9 @@ class ir_model_access(osv.osv):
model_name = model
# TransientModel records have no access rights, only an implicit access rule
if self.pool.get(model_name).is_transient():
if not self.pool.get(model_name):
_logger.error('Missing model %s' % (model_name, ))
elif self.pool.get(model_name).is_transient():
return True
# We check if a specific rule exists
@ -560,6 +691,7 @@ class ir_model_access(osv.osv):
' JOIN res_groups_users_rel gu ON (gu.gid = a.group_id) '
' WHERE m.model = %s '
' AND gu.uid = %s '
' AND a.active IS True '
, (model_name, uid,)
)
r = cr.fetchone()[0]
@ -571,6 +703,7 @@ class ir_model_access(osv.osv):
' JOIN ir_model m ON (m.id = a.model_id) '
' WHERE a.group_id IS NULL '
' AND m.model = %s '
' AND a.active IS True '
, (model_name,)
)
r = cr.fetchone()[0]
@ -632,8 +765,6 @@ class ir_model_access(osv.osv):
res = super(ir_model_access, self).unlink(cr, uid, *args, **argv)
return res
ir_model_access()
class ir_model_data(osv.osv):
"""Holds external identifier keys for records in the database.
This has two main uses:
@ -967,5 +1098,4 @@ class ir_model_data(osv.osv):
_logger.info('Deleting %s@%s', res_id, model)
self.pool.get(model).unlink(cr, uid, [res_id])
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,77 +0,0 @@
import logging
import openerp
from openerp import SUPERUSER_ID
from openerp.osv import fields
from openerp.osv.orm import Model
_logger = logging.getLogger(__name__)
class ir_model_constraint(Model):
"""
This model tracks PostgreSQL foreign keys and constraints used by OpenERP
models.
"""
_name = 'ir.model.constraint'
_columns = {
'name': fields.char('Constraint', required=True, size=128, select=1,
help="PostgreSQL constraint or foreign key name."),
'model': fields.many2one('ir.model', string='Model',
required=True, select=1),
'module': fields.many2one('ir.module.module', string='Module',
required=True, select=1),
'type': fields.char('Constraint Type', required=True, size=1, select=1,
help="Type of the constraint: `f` for a foreign key, "
"`u` for other constraints."),
'date_update': fields.datetime('Update Date'),
'date_init': fields.datetime('Initialization Date')
}
_sql_constraints = [
('module_name_uniq', 'unique(name, module)',
'Constraints with the same name are unique per module.'),
]
def _module_data_uninstall(self, cr, uid, ids, context=None):
"""
Delete PostgreSQL foreign keys and constraints tracked by this model.
"""
if uid != SUPERUSER_ID and not self.pool.get('ir.model.access').check_groups(cr, uid, "base.group_system"):
raise except_orm(_('Permission Denied'), (_('Administrator access is required to uninstall a module')))
context = dict(context or {})
ids_set = set(ids)
ids.sort()
ids.reverse()
for data in self.browse(cr, uid, ids, context):
model = data.model.model
model_obj = self.pool.get(model)
name = openerp.tools.ustr(data.name)
typ = data.type
# double-check we are really going to delete all the owners of this schema element
cr.execute("""SELECT id from ir_model_constraint where name=%s""", (data.name,))
external_ids = [x[0] for x in cr.fetchall()]
if (set(external_ids)-ids_set):
# as installed modules have defined this element we must not delete it!
continue
if typ == 'f':
# test if FK exists on this table (it could be on a related m2m table, in which case we ignore it)
cr.execute("""SELECT 1 from pg_constraint cs JOIN pg_class cl ON (cs.conrelid = cl.oid)
WHERE cs.contype=%s and cs.conname=%s and cl.relname=%s""", ('f', name, model_obj._table))
if cr.fetchone():
cr.execute('ALTER TABLE "%s" DROP CONSTRAINT "%s"' % (model_obj._table, name),)
_logger.info('Dropped FK CONSTRAINT %s@%s', name, model)
if typ == 'u':
# test if constraint exists
cr.execute("""SELECT 1 from pg_constraint cs JOIN pg_class cl ON (cs.conrelid = cl.oid)
WHERE cs.contype=%s and cs.conname=%s and cl.relname=%s""", ('u', name, model_obj._table))
if cr.fetchone():
cr.execute('ALTER TABLE "%s" DROP CONSTRAINT "%s"' % (model_obj._table, name),)
_logger.info('Dropped CONSTRAINT %s@%s', name, model)
self.unlink(cr, uid, ids, context)

View File

@ -1,62 +0,0 @@
import logging
import openerp
from openerp import SUPERUSER_ID
from openerp.osv import fields
from openerp.osv.orm import Model
_logger = logging.getLogger(__name__)
class ir_model_relation(Model):
"""
This model tracks PostgreSQL tables used to implement OpenERP many2many
relations.
"""
_name = 'ir.model.relation'
_columns = {
'name': fields.char('Relation Name', required=True, size=128, select=1,
help="PostgreSQL table name implementing a many2many relation."),
'model': fields.many2one('ir.model', string='Model',
required=True, select=1),
'module': fields.many2one('ir.module.module', string='Module',
required=True, select=1),
'date_update': fields.datetime('Update Date'),
'date_init': fields.datetime('Initialization Date')
}
def _module_data_uninstall(self, cr, uid, ids, context=None):
"""
Delete PostgreSQL many2many relations tracked by this model.
"""
if uid != SUPERUSER_ID and not self.pool.get('ir.model.access').check_groups(cr, uid, "base.group_system"):
raise except_orm(_('Permission Denied'), (_('Administrator access is required to uninstall a module')))
ids_set = set(ids)
to_drop_table = []
ids.sort()
ids.reverse()
for data in self.browse(cr, uid, ids, context):
model = data.model
model_obj = self.pool.get(model)
name = openerp.tools.ustr(data.name)
# double-check we are really going to delete all the owners of this schema element
cr.execute("""SELECT id from ir_model_relation where name = %s""", (data.name,))
external_ids = [x[0] for x in cr.fetchall()]
if (set(external_ids)-ids_set):
# as installed modules have defined this element we must not delete it!
continue
cr.execute("SELECT 1 FROM information_schema.tables WHERE table_name=%s", (name,))
if cr.fetchone() and not name in to_drop_table:
to_drop_table.append(name)
self.unlink(cr, uid, ids, context)
# drop m2m relation tables
for table in to_drop_table:
cr.execute('DROP TABLE %s CASCADE'% (table),)
_logger.info('Dropped table %s', table)
cr.commit()

View File

@ -0,0 +1,416 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- model -->
<record id="view_model_form" model="ir.ui.view">
<field name="model">ir.model</field>
<field name="arch" type="xml">
<form string="Model Description" version="7.0">
<sheet>
<group>
<group>
<field name="name"/>
<field name="model"/>
<field name="osv_memory"/>
</group>
<group>
<field name="state"/>
<field name="modules"/>
</group>
</group>
<notebook>
<page string="Fields">
<field context="{'manual':True}" name="field_id">
<tree string="Fields Description">
<field name="name"/>
<field name="field_description"/>
<field name="ttype"/>
<field name="required"/>
<field name="readonly"/>
<field name="select_level"/>
<field name="state"/>
</tree>
<form string="Fields Description" version="7.0">
<group col="4">
<field name="name"/>
<field name="state"/>
<field name="field_description"/>
</group>
<group string="Properties">
<group>
<field name="ttype"/>
<field name="relation" attrs="{'required': [('ttype','in',['many2one','one2many','many2many'])],'readonly': [('ttype','!=','one2many'), ('ttype','!=','many2one'), ('ttype','!=','many2many')]}"/>
<field name="relation_field" attrs="{'required': [('ttype','=','one2many')], 'readonly': [('ttype','!=','one2many')]}"/>
<field name="selection" attrs="{'required': [('ttype','in',['selection','reference'])], 'readonly': [('ttype','not in',['selection','reference'])]}"/>
<field name="size" attrs="{'required': [('ttype','in',['char','reference'])], 'readonly': [('ttype','not in',['char','reference'])]}"/>
<field name="domain" attrs="{'readonly': [('relation','=','')]}"/>
<field name="serialization_field_id" attrs="{'readonly': [('state','=','base')]}" domain="[('ttype','=','serialized'), ('model_id', '=', model_id)]"/>
</group>
<group>
<field name="required"/>
<field name="readonly"/>
<field name="select_level"/>
<field name="translate"/>
<field name="on_delete" attrs="{'readonly': [('ttype','!=','many2one')]}"/>
<field name="modules"/>
</group>
</group>
<separator string="Groups"/>
<field name="groups"/>
</form>
</field>
<button
icon="gtk-justify-fill"
name="%(act_menu_create)d"
string="Create a Menu" type="action"
target="new" />
</page>
<page string="Access Rights">
<field name="access_ids">
<tree string="Access Rules" editable="bottom">
<field name="group_id"/>
<field name="perm_read"/>
<field name="perm_write"/>
<field name="perm_create"/>
<field name="perm_unlink"/>
<field name="name"/>
</tree>
</field>
</page>
<page string="Notes">
<field name="info"/>
</page>
<page string="Views">
<field name="view_ids"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_model_tree" model="ir.ui.view">
<field name="model">ir.model</field>
<field name="arch" type="xml">
<tree string="Model Description">
<field name="model"/>
<field name="name"/>
<field name="state"/>
<field name="osv_memory"/>
</tree>
</field>
</record>
<record id="view_model_search" model="ir.ui.view">
<field name="model">ir.model</field>
<field name="arch" type="xml">
<search string="Model Description">
<field name="name" filter_domain="['|', ('name','ilike',self), ('model','ilike',self)]" string="Model"/>
<filter icon="terp-camera_test"
string="In Memory"
domain="[('osv_memory', '=', True)]"/>
<separator/>
<filter icon="terp-stock_align_left_24"
string="Custom"
domain="[('state', '=', 'manual')]"/>
<filter icon="terp-translate"
string="Base"
domain="[('state', '=', 'base')]"/>
</search>
</field>
</record>
<record id="action_model_model" model="ir.actions.act_window">
<field name="name">Models</field>
<field name="res_model">ir.model</field>
<field name="view_type">form</field>
<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" groups="base.group_no_one"/>
<menuitem action="action_model_model" id="ir_model_model_menu" parent="next_id_9"/>
<!-- ir model fields -->
<record id="view_model_fields_form" model="ir.ui.view">
<field name="model">ir.model.fields</field>
<field name="arch" type="xml">
<form string="Fields" version="7.0">
<sheet>
<group>
<group>
<field name="name" string="Field Name"/>
<field name="field_description"/>
</group>
<group>
<field name="state"/>
<field name="model_id" attrs="{'readonly': [('state','!=', 'manual')]}"/>
<field name="modules"/>
</group>
</group>
<group>
<group>
<field name="ttype"/>
<field name="relation" attrs="{'required': [('ttype','in', ['many2one','one2many','many2many'])],
'readonly': [('ttype','not in', ['many2one','one2many','many2many'])]}"/>
<field name="relation_field" attrs="{'required': [('ttype','=','one2many')], 'readonly': [('ttype','!=','one2many')]}"/>
<field name="selection" attrs="{'required': [('ttype','in',['selection','reference'])], 'readonly': [('ttype','not in',['selection','reference'])]}"/>
<field name="size" attrs="{'required': [('ttype','in',['char','reference'])], 'readonly': [('ttype','not in',['char','reference'])]}"/>
<field name="domain" attrs="{'readonly': [('relation','=','')]}"/>
<field name="serialization_field_id" attrs="{'readonly': [('state','=','base')]}" domain="[('ttype','=','serialized'), ('model_id', '=', model_id)]"/>
<field name="on_delete" attrs="{'readonly': [('ttype','!=','many2one')]}"/>
</group>
<group>
<field name="required"/>
<field name="readonly"/>
<field name="select_level"/>
<field name="translate"/>
</group>
</group>
<field name="groups" invisible="1"/>
</sheet>
</form>
</field>
</record>
<record id="view_model_fields_tree" model="ir.ui.view">
<field name="model">ir.model.fields</field>
<field name="arch" type="xml">
<tree string="Fields">
<field name="name"/>
<field name="field_description"/>
<field name="model_id"/>
<field name="ttype"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_model_fields_search" model="ir.ui.view">
<field name="model">ir.model.fields</field>
<field name="arch" type="xml">
<search string="Fields">
<field name="name" filter_domain="['|', ('name','ilike',self), ('field_description','ilike',self)]" string="Field"/>
<filter icon="terp-gnome-cpu-frequency-applet+"
string="Required"
domain="[('required', '=', True)]"/>
<separator/>
<filter icon="terp-dialog-close"
string="Readonly"
domain="[('readonly', '=', True)]"/>
<separator/>
<filter icon="terp-translate"
string="Translate"
domain="[('translate', '=', True)]"/>
<field name="model_id"/>
<field name="ttype"/>
<field name="required"/>
<field name="readonly"/>
<group expand="0" string="Group By...">
<filter string="Object" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'model_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_model_fields" model="ir.actions.act_window">
<field name="name">Fields</field>
<field name="res_model">ir.model.fields</field>
<field name="view_type">form</field>
<field name="context">{'manual':True}</field>
<field name="view_id" ref="view_model_fields_tree"/>
</record>
<menuitem action="action_model_fields" id="ir_model_model_fields" parent="base.next_id_9"/>
<!-- ir model data -->
<record model="ir.ui.view" id="view_model_data_form">
<field name="model">ir.model.data</field>
<field name="arch" type="xml">
<form string="External Identifiers" version="7.0">
<group>
<group>
<field name="complete_name"/>
<field name="module"/>
<field name="name"/>
</group>
<group>
<field name="display_name"/>
<field name="model"/>
<field name="res_id"/>
</group>
<group>
<field name="noupdate"/>
<field name="date_update" />
<field name="date_init" />
</group>
</group>
</form>
</field>
</record>
<record id="view_model_data_list" model="ir.ui.view">
<field name="model">ir.model.data</field>
<field name="arch" type="xml">
<tree string="External Identifiers">
<field name="complete_name"/>
<field name="display_name"/>
<field name="res_id"/>
<field name="model" groups="base.group_no_one"/>
</tree>
</field>
</record>
<record id="view_model_data_search" model="ir.ui.view">
<field name="model">ir.model.data</field>
<field name="arch" type="xml">
<search string="External Identifiers">
<field name="name"
filter_domain="['|', '|', ('name','ilike',self), ('model','ilike',self), ('module','ilike',self)]"
string="External Identifier"/>
<filter icon="terp-camera_test"
string="Updatable"
domain="[('noupdate', '=', False)]"/>
<field name="res_id"/>
<field name="noupdate"/>
<group expand="0" string="Group By...">
<filter string="Module" icon="terp-folder-blue" domain="[]" context="{'group_by':'module'}"/>
<filter string="Object" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'model'}"/>
</group>
</search>
</field>
</record>
<record id="action_model_data" model="ir.actions.act_window">
<field name="name">External Identifiers</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 id="next_id_5" name="Sequences &amp; Identifiers" parent="base.menu_custom" sequence="21" groups="base.group_no_one"/>
<menuitem action="action_model_data" id="ir_model_data_menu" parent="base.next_id_5"
groups="base.group_no_one"/>
<!-- ir model contraints -->
<record model="ir.ui.view" id="view_model_constraint_form">
<field name="model">ir.model.constraint</field>
<field name="arch" type="xml">
<form string="Model Constraints">
<field name="type"/>
<field name="name"/>
<field name="module"/>
<field name="model"/>
<newline/>
<field name="date_update" />
<field name="date_init" />
</form>
</field>
</record>
<record id="view_model_constraint_list" model="ir.ui.view">
<field name="model">ir.model.constraint</field>
<field name="arch" type="xml">
<tree string="Model Constraints">
<field name="type"/>
<field name="name"/>
<field name="module"/>
<field name="model"/>
</tree>
</field>
</record>
<record id="action_model_constraint" model="ir.actions.act_window">
<field name="name">Model Constraints</field>
<field name="res_model">ir.model.constraint</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_model_constraint_list"/>
</record>
<menuitem action="action_model_constraint" id="ir_model_constraint_menu" parent="base.next_id_9"
groups="base.group_no_one"/>
<!-- ir model relations -->
<record model="ir.ui.view" id="view_model_relation_form">
<field name="model">ir.model.relation</field>
<field name="arch" type="xml">
<form string="ManyToMany Relations">
<field name="name"/>
<field name="module"/>
<field name="model"/>
<newline/>
<field name="date_update" />
<field name="date_init" />
</form>
</field>
</record>
<record id="view_model_relation_list" model="ir.ui.view">
<field name="model">ir.model.relation</field>
<field name="arch" type="xml">
<tree string="ManyToMany Relations">
<field name="name"/>
<field name="module"/>
<field name="model"/>
</tree>
</field>
</record>
<record id="action_model_relation" model="ir.actions.act_window">
<field name="name">ManyToMany Relations</field>
<field name="res_model">ir.model.relation</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_model_relation_list"/>
</record>
<menuitem action="action_model_relation" id="ir_model_relation_menu" parent="base.next_id_9"
groups="base.group_no_one"/>
<!-- ir.model.access -->
<record id="ir_access_view_tree" model="ir.ui.view">
<field name="model">ir.model.access</field>
<field name="arch" type="xml">
<tree string="Access Controls" editable="bottom">
<field name="name"/>
<field name="model_id"/>
<field name="group_id"/>
<field name="perm_read"/>
<field name="perm_write"/>
<field name="perm_create"/>
<field name="perm_unlink"/>
</tree>
</field>
</record>
<record id="ir_access_view_form" model="ir.ui.view">
<field name="model">ir.model.access</field>
<field name="arch" type="xml">
<form string="Access Controls" version="7.0">
<sheet>
<group col="4">
<field name="name"/>
<field name="model_id"/>
<field name="group_id"/>
<field name="active"/>
</group>
<group string="Access" col="4">
<field name="perm_read"/>
<field name="perm_write"/>
<field name="perm_create"/>
<field name="perm_unlink"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="ir_access_view_search" model="ir.ui.view">
<field name="model">ir.model.access</field>
<field name="arch" type="xml">
<search string="Access Controls">
<field name="name" string="Access Control"/>
<filter string="Global" icon="terp-stage" domain="[('group_id','=',False)]"/>
<separator/>
<filter string="Full Access" icon="terp-gtk-select-all" domain="[('perm_read','=',True),('perm_write','=',True),('perm_create','=',True),('perm_unlink','=',True)]"/>
<filter string="Read Access" icon="terp-stock_align_left_24" domain="[('perm_read','=',True)]"/>
<filter string="Write Access" icon="terp-tools" domain="[('perm_write','=',True)]"/>
<field name="model_id"/>
<field name="group_id"/>
<group expand="0" string="Group By..." colspan="11" col="11" groups="base.group_no_one">
<filter string="Group" icon="terp-personal" domain="[]" context="{'group_by':'group_id'}"/>
<filter string="Object" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'model_id'}"/>
</group>
</search>
</field>
</record>
<record id="ir_access_act" model="ir.actions.act_window">
<field name="name">Access Controls List</field>
<field name="res_model">ir.model.access</field>
<field name="view_type">form</field>
<field name="view_id" ref="ir_access_view_tree"/>
<field name="search_view_id" ref="ir_access_view_search"/>
</record>
<menuitem action="ir_access_act" id="menu_ir_access_act" parent="base.menu_security"/>
</data>
</openerp>

View File

@ -75,6 +75,7 @@ class ir_rule(osv.osv):
_columns = {
'name': fields.char('Name', size=128, select=1),
'active': fields.boolean('Active', help="If you uncheck the active field, it will disable the record rule without deleting it (if you delete a native record rule, it may be re-created when you reload the module."),
'model_id': fields.many2one('ir.model', 'Object',select=1, required=True, ondelete="cascade"),
'global': fields.function(_get_value, string='Global', type='boolean', store=True, help="If no group is specified the rule is global and applied to everyone"),
'groups': fields.many2many('res.groups', 'rule_group_rel', 'rule_group_id', 'group_id', 'Groups'),
@ -89,6 +90,7 @@ class ir_rule(osv.osv):
_order = 'model_id DESC'
_defaults = {
'active': True,
'perm_read': True,
'perm_write': True,
'perm_create': True,
@ -114,6 +116,7 @@ class ir_rule(osv.osv):
FROM ir_rule r
JOIN ir_model m ON (r.model_id = m.id)
WHERE m.model = %s
AND r.active is True
AND r.perm_""" + mode + """
AND (r.id IN (SELECT rule_group_id FROM rule_group_rel g_rel
JOIN res_groups_users_rel u_rel ON (g_rel.group_id = u_rel.gid)

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Rules -->
<record id="view_rule_form" model="ir.ui.view">
<field name="model">ir.rule</field>
<field name="arch" type="xml">
<form string="Record rules" version="7.0">
<sheet>
<group>
<group string="General">
<field name="name"/>
<field name="model_id"/>
<field name="active"/>
</group>
<group col="4" string="Access Rights">
<field name="perm_read"/>
<field name="perm_write"/>
<field name="perm_create"/>
<field name="perm_unlink"/>
</group>
</group>
<separator string="Rule Definition (Domain Filter)"/>
<field name="domain_force" colspan="2" nolabel="1"/>
<group string="Groups (no group = global)">
<field name="global"/>
<field name="groups" nolabel="1" colspan="4"/>
</group>
<group string="Interaction between rules">
<label colspan="2"
string="Global rules (non group-specific) are restrictions, and cannot be bypassed. Group-local rules grant additional permissions, but are constrained within the bounds of global ones. The first group rules restrict further than global rules, but any additional group rule will add more permissions"/>
<label colspan="2"
string="Detailed algorithm:"/>
<label colspan="2"
string="1. Global rules are combined together with a logical AND operator, and with the result of the following steps"/>
<label colspan="2"
string="2. Group-specific rules are combined together with a logical OR operator"/>
<label colspan="2"
string="3. If user belongs to several groups, the results from step 2 are combined with logical OR operator"/>
<label colspan="2"
string="Example: GLOBAL_RULE_1 AND GLOBAL_RULE_2 AND ( (GROUP_A_RULE_1 OR GROUP_A_RULE_2) OR (GROUP_B_RULE_1 OR GROUP_B_RULE_2) )"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_rule_tree" model="ir.ui.view">
<field name="model">ir.rule</field>
<field name="arch" type="xml">
<tree string="Record rules">
<field name="model_id"/>
<field name="name"/>
<field name="global"/>
<field name="domain_force"/>
<field name="perm_read"/>
<field name="perm_write"/>
<field name="perm_create"/>
<field name="perm_unlink"/>
</tree>
</field>
</record>
<record id="view_rule_search" model="ir.ui.view">
<field name="model">ir.rule</field>
<field name="arch" type="xml">
<search string="Record Rules">
<field name="name" string="Record Rule"/>
<filter string="Global" icon="terp-stage" domain="[('global','=',True)]"/>
<separator/>
<filter string="Full Access" icon="terp-gtk-select-all" domain="[('perm_read','=',True),('perm_write','=',True),('perm_create','=',True),('perm_unlink','=',True)]"/>
<filter string="Read Access" icon="terp-stock_align_left_24" domain="[('perm_read','=',True)]"/>
<filter string="Write Access" icon="terp-tools" domain="[('perm_write','=',True)]"/>
<field name="model_id"/>
<field name="groups"/>
</search>
</field>
</record>
<record id="action_rule" model="ir.actions.act_window">
<field name="name">Record Rules</field>
<field name="res_model">ir.rule</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_rule_tree"/>
<field name="search_view_id" ref="view_rule_search"/>
</record>
<menuitem action="action_rule" id="menu_action_rule" parent="base.menu_security" sequence="3"/>
</data>
</openerp>

View File

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Sequences -->
<record id="sequence_view" model="ir.ui.view">
<field name="model">ir.sequence</field>
<field name="arch" type="xml">
<form string="Sequences" version="7.0">
<sheet>
<group col="4">
<field name="name"/>
<field name="code"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="active" groups="base.group_no_one"/>
</group>
<notebook>
<page string="Sequence">
<group col="4">
<field name="prefix"/>
<field name="suffix"/>
<field name="padding"/>
<field name="number_increment"/>
<field name="number_next"/>
<field name="implementation"/>
</group>
<group col="3" string="Legend (for prefix, suffix)">
<group>
<label colspan="2" string="Current Year with Century: %%(year)s"/>
<label colspan="2" string="Current Year without Century: %%(y)s"/>
<label colspan="2" string="Month: %%(month)s"/>
<label colspan="2" string="Day: %%(day)s"/>
</group>
<group>
<label colspan="2" string="Day of the Year: %%(doy)s"/>
<label colspan="2" string="Week of the Year: %%(woy)s"/>
<label colspan="2" string="Day of the Week (0:Monday): %%(weekday)s"/>
</group>
<group>
<label colspan="2" string="Hour 00->24: %%(h24)s"/>
<label colspan="2" string="Hour 00->12: %%(h12)s"/>
<label colspan="2" string="Minute: %%(min)s"/>
<label colspan="2" string="Second: %%(sec)s"/>
</group>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="sequence_view_tree" model="ir.ui.view">
<field name="model">ir.sequence</field>
<field name="arch" type="xml">
<tree string="Sequences">
<field name="code"/>
<field name="name"/>
<field name="prefix"/>
<field name="padding"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="number_next"/>
<field name="number_increment"/>
<field name="implementation"/>
</tree>
</field>
</record>
<record id="view_sequence_search" model="ir.ui.view">
<field name="model">ir.sequence</field>
<field name="arch" type="xml">
<search string="Sequences">
<field name="name" string="Sequence"/>
<field name="code"/>
<field name="company_id" groups="base.group_multi_company"/>
</search>
</field>
</record>
<record id="ir_sequence_form" model="ir.actions.act_window">
<field name="name">Sequences</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.sequence</field>
<field name="view_type">form</field>
<field name="view_id" ref="sequence_view_tree"/>
<field name="context">{'active_test': False}</field>
</record>
<menuitem action="ir_sequence_form" id="menu_ir_sequence_form" parent="next_id_5"/>
<!-- Sequences Types -->
<record id="sequence_type_form_view" model="ir.ui.view">
<field name="model">ir.sequence.type</field>
<field name="arch" type="xml">
<form string="Sequence Type" version="7.0">
<sheet>
<group col="4">
<field name="name"/>
<field name="code"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="sequence_type_tree_view" model="ir.ui.view">
<field name="model">ir.sequence.type</field>
<field name="arch" type="xml">
<tree string="Sequence Type">
<field name="name"/>
<field name="code"/>
</tree>
</field>
</record>
<record id="view_sequence_type_search" model="ir.ui.view">
<field name="model">ir.sequence.type</field>
<field name="arch" type="xml">
<search string="Sequences Type">
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Sequence Type"/>
</search>
</field>
</record>
<record id="ir_sequence_type" model="ir.actions.act_window">
<field name="name">Sequence Codes</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.sequence.type</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field eval="False" name="view_id"/>
</record>
<menuitem action="ir_sequence_type" id="menu_ir_sequence_type"
groups="base.group_no_one"
parent="base.next_id_5"/>
</data>
</openerp>

View File

@ -19,10 +19,12 @@
#
##############################################################################
from osv import fields, osv
import tools
import logging
import openerp.modules
from openerp.osv import fields, osv
_logger = logging.getLogger(__name__)
TRANSLATION_TYPE = [
@ -57,7 +59,6 @@ class ir_translation_import_cursor(object):
the data.
@param parent an instance of ir.translation ORM model
"""
self._cr = cr
self._uid = uid
self._context = context
@ -67,29 +68,23 @@ class ir_translation_import_cursor(object):
# Note that Postgres will NOT inherit the constraints or indexes
# of ir_translation, so this copy will be much faster.
cr.execute('''CREATE TEMP TABLE %s(
imd_model VARCHAR(64),
imd_module VARCHAR(64),
imd_name VARCHAR(128)
) INHERITS (%s) ''' % (self._table_name, self._parent_table))
def push(self, ddict):
def push(self, trans_dict):
"""Feed a translation, as a dictionary, into the cursor
"""
state = "translated" if (ddict['value'] and ddict['value'] != "") else "to_translate"
self._cr.execute("INSERT INTO " + self._table_name \
+ """(name, lang, res_id, src, type,
imd_model, imd_module, imd_name, value,state)
VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""",
(ddict['name'], ddict['lang'], ddict.get('res_id'), ddict['src'], ddict['type'],
ddict.get('imd_model'), ddict.get('imd_module'), ddict.get('imd_name'),
ddict['value'],state))
params = dict(trans_dict, state="translated" if trans_dict['value'] else "to_translate")
self._cr.execute("""INSERT INTO %s (name, lang, res_id, src, type, imd_model, module, imd_name, value, state, comments)
VALUES (%%(name)s, %%(lang)s, %%(res_id)s, %%(src)s, %%(type)s, %%(imd_model)s, %%(module)s,
%%(imd_name)s, %%(value)s, %%(state)s, %%(comments)s)""" % self._table_name,
params)
def finish(self):
""" Transfer the data from the temp table to ir.translation
"""
cr = self._cr
if self._debug:
cr.execute("SELECT count(*) FROM %s" % self._table_name)
@ -101,22 +96,21 @@ class ir_translation_import_cursor(object):
SET res_id = imd.res_id
FROM ir_model_data AS imd
WHERE ti.res_id IS NULL
AND ti.imd_module IS NOT NULL AND ti.imd_name IS NOT NULL
AND ti.module IS NOT NULL AND ti.imd_name IS NOT NULL
AND ti.imd_module = imd.module AND ti.imd_name = imd.name
AND ti.module = imd.module AND ti.imd_name = imd.name
AND ti.imd_model = imd.model; """ % self._table_name)
if self._debug:
cr.execute("SELECT imd_module, imd_model, imd_name FROM %s " \
"WHERE res_id IS NULL AND imd_module IS NOT NULL" % self._table_name)
cr.execute("SELECT module, imd_model, imd_name FROM %s " \
"WHERE res_id IS NULL AND module IS NOT NULL" % self._table_name)
for row in cr.fetchall():
_logger.debug("ir.translation.cursor: missing res_id for %s. %s/%s ", *row)
cr.execute("DELETE FROM %s WHERE res_id IS NULL AND imd_module IS NOT NULL" % \
self._table_name)
# Records w/o res_id must _not_ be inserted into our db, because they are
# referencing non-existent data.
cr.execute("DELETE FROM %s WHERE res_id IS NULL AND module IS NOT NULL" % \
self._table_name)
find_expr = "irt.lang = ti.lang AND irt.type = ti.type " \
" AND irt.name = ti.name AND irt.src = ti.src " \
@ -126,15 +120,14 @@ class ir_translation_import_cursor(object):
if self._overwrite:
cr.execute("""UPDATE ONLY %s AS irt
SET value = ti.value,
state = 'translated'
state = 'translated'
FROM %s AS ti
WHERE %s AND ti.value IS NOT NULL AND ti.value != ''
""" % (self._parent_table, self._table_name, find_expr))
# Step 3: insert new translations
cr.execute("""INSERT INTO %s(name, lang, res_id, src, type, value,state)
SELECT name, lang, res_id, src, type, value,state
cr.execute("""INSERT INTO %s(name, lang, res_id, src, type, value, module, state, comments)
SELECT name, lang, res_id, src, type, value, module, state, comments
FROM %s AS ti
WHERE NOT EXISTS(SELECT 1 FROM ONLY %s AS irt WHERE %s);
""" % (self._parent_table, self._table_name, self._parent_table, find_expr))
@ -162,26 +155,37 @@ class ir_translation(osv.osv):
return [(d['code'], d['name']) for d in lang_data]
_columns = {
'name': fields.char('Field Name', size=128, required=True),
'res_id': fields.integer('Resource ID', select=True),
'lang': fields.selection(_get_language, string='Language', size=16),
'type': fields.selection(TRANSLATION_TYPE, string='Type', size=16, select=True),
'name': fields.char('Translated field', required=True),
'res_id': fields.integer('Record ID', select=True),
'lang': fields.selection(_get_language, string='Language'),
'type': fields.selection(TRANSLATION_TYPE, string='Type', select=True),
'src': fields.text('Source'),
'value': fields.text('Translation Value'),
'state':fields.selection([('to_translate','To Translate'),('inprogress','Translation in Progress'),('translated','Translated')])
'module': fields.char('Module', help="Module this term belongs to", select=True),
'state': fields.selection(
[('to_translate','To Translate'),
('inprogress','Translation in Progress'),
('translated','Translated')],
string="State",
help="Automatically set to let administators find new terms that might need to be translated"),
# aka gettext extracted-comments - we use them to flag openerp-web translation
# cfr: http://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/PO-Files.html
'comments': fields.text('Translation comments', select=True),
}
_defaults = {
'state':'to_translate',
'state': 'to_translate',
}
_sql_constraints = [ ('lang_fkey_res_lang', 'FOREIGN KEY(lang) REFERENCES res_lang(code)',
_sql_constraints = [ ('lang_fkey_res_lang', 'FOREIGN KEY(lang) REFERENCES res_lang(code)',
'Language code of translation item must be among known languages' ), ]
def _auto_init(self, cr, context=None):
super(ir_translation, self)._auto_init(cr, context)
# FIXME: there is a size limit on btree indexed values so we can't index src column with normal btree.
# FIXME: there is a size limit on btree indexed values so we can't index src column with normal btree.
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = %s', ('ir_translation_ltns',))
if cr.fetchone():
#temporarily removed: cr.execute('CREATE INDEX ir_translation_ltns ON ir_translation (name, lang, type, src)')
@ -207,7 +211,7 @@ class ir_translation(osv.osv):
if field == 'lang':
return
return super(ir_translation, self)._check_selection_field_value(cr, uid, field, value, context=context)
@tools.ormcache_multi(skiparg=3, multi=6)
def _get_ids(self, cr, uid, name, tt, lang, ids):
translations = dict.fromkeys(ids, False)
@ -271,10 +275,10 @@ class ir_translation(osv.osv):
if isinstance(types, basestring):
types = (types,)
if source:
query = """SELECT value
FROM ir_translation
WHERE lang=%s
AND type in %s
query = """SELECT value
FROM ir_translation
WHERE lang=%s
AND type in %s
AND src=%s"""
params = (lang or '', types, tools.ustr(source))
if name:
@ -308,9 +312,9 @@ class ir_translation(osv.osv):
if isinstance(ids, (int, long)):
ids = [ids]
if vals.get('src') or ('value' in vals and not(vals.get('value'))):
result = vals.update({'state':'to_translate'})
vals.update({'state':'to_translate'})
if vals.get('value'):
result = vals.update({'state':'translated'})
vals.update({'state':'translated'})
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','src','lang'], context=context):
self._get_source.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], trans_obj['src'])
@ -379,7 +383,34 @@ class ir_translation(osv.osv):
"""
return ir_translation_import_cursor(cr, uid, self, context=context)
ir_translation()
def load(self, cr, modules, langs, context=None):
context = dict(context or {}) # local copy
for module_name in modules:
modpath = openerp.modules.get_module_path(module_name)
if not modpath:
continue
for lang in langs:
lang_code = tools.get_iso_codes(lang)
base_lang_code = None
if '_' in lang_code:
base_lang_code = lang_code.split('_')[0]
# Step 1: for sub-languages, load base language first (e.g. es_CL.po is loaded over es.po)
if base_lang_code:
base_trans_file = openerp.modules.get_module_resource(module_name, 'i18n', base_lang_code + '.po')
if base_trans_file:
_logger.info('module %s: loading base translation file %s for language %s', module_name, base_lang_code, lang)
tools.trans_load(cr, base_trans_file, lang, verbose=False, module_name=module_name, context=context)
context['overwrite'] = True # make sure the requested translation will override the base terms later
# Step 2: then load the main translation file, possibly overriding the terms coming from the base language
trans_file = openerp.modules.get_module_resource(module_name, 'i18n', lang_code + '.po')
if trans_file:
_logger.info('module %s: loading translation file (%s) for language %s', module_name, lang_code, lang)
tools.trans_load(cr, trans_file, lang, verbose=False, module_name=module_name, context=context)
elif lang_code != 'en':
_logger.warning('module %s: no translation for language %s', module_name, lang_code)
return True
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Translations -->
<record id="view_translation_search" model="ir.ui.view">
<field name="model">ir.translation</field>
<field name="arch" type="xml">
<search string="Translations">
<filter icon="terp-gdu-smart-failing"
string="Untranslated"
domain="['|',('value', '=', False),('value','=','')]"/>
<filter name="openerp-web"
string="Web-only translations"
domain="[('comments', 'like', 'openerp-web')]"/>
<field name="name" operator="="/>
<field name="lang"/>
<field name="src"/>
<field name="value"/>
</search>
</field>
</record>
<record id="view_translation_form" model="ir.ui.view">
<field name="model">ir.translation</field>
<field name="arch" type="xml">
<form string="Translations" version="7.0">
<header>
<field name="state" widget="statusbar" nolabel="1"/>
</header>
<sheet>
<group>
<group>
<field name="name"/>
<field name="lang"/>
</group>
<group>
<field name="type"/>
<field name="res_id"/>
</group>
<group string="Source Term">
<field name="src" nolabel="1" height="400"/>
</group>
<group string="Translation">
<field name="value" nolabel="1" height="400"/>
</group>
<group string="Comments">
<field name="comments" nolabel="1" height="100"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_translation_tree" model="ir.ui.view">
<field name="model">ir.translation</field>
<field name="arch" type="xml">
<tree string="Translations" editable="bottom">
<field name="src" readonly="True"/>
<field name="value"/>
<field name="name" readonly="True"/>
<field name="lang" readonly="True"/>
<field name="type" readonly="True"/>
</tree>
</field>
</record>
<record id="action_translation" model="ir.actions.act_window">
<field name="name">Translated Terms</field>
<field name="res_model">ir.translation</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_translation_tree"/>
</record>
<menuitem action="action_translation" id="menu_action_translation" parent="base.menu_translation_app" />
</data>
</openerp>

View File

@ -265,7 +265,7 @@ class ir_ui_menu(osv.osv):
}
if menu.action and menu.action.type in ('ir.actions.act_window','ir.actions.client') and menu.action.res_model:
obj = self.pool.get(menu.action.res_model)
if obj._needaction:
if obj and obj._needaction:
if menu.action.type=='ir.actions.act_window':
dom = menu.action.domain and eval(menu.action.domain, {'uid': uid}) or []
else:
@ -298,7 +298,7 @@ class ir_ui_menu(osv.osv):
('ir.actions.report.xml', 'ir.actions.report.xml'),
('ir.actions.act_window', 'ir.actions.act_window'),
('ir.actions.wizard', 'ir.actions.wizard'),
('ir.actions.url', 'ir.actions.url'),
('ir.actions.act_url', 'ir.actions.act_url'),
('ir.actions.server', 'ir.actions.server'),
('ir.actions.client', 'ir.actions.client'),
]),
@ -316,9 +316,5 @@ class ir_ui_menu(osv.osv):
'sequence' : 10,
}
_order = "sequence,id"
ir_ui_menu()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="edit_menu_access" model="ir.ui.view">
<field name="model">ir.ui.menu</field>
<field name="arch" type="xml">
<form string="Menu" version="7.0">
<sheet>
<group>
<group>
<field name="name"/>
<field name="parent_id"/>
<field name="sequence"/>
</group>
<group>
<field name="complete_name"/>
<field name="action"/>
<field name="icon"/>
</group>
</group>
<notebook>
<page string="Groups">
<field name="groups_id"/>
</page>
<page string="Submenus">
<!-- Note: make sure you have 'ir.ui.menu.full_list'
in the context to see all submenus! -->
<field name="child_id"
context="{'default_parent_id': active_id}">
<tree string="Menu">
<field name="sequence"/>
<field icon="icon" name="name" string="Menu"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="edit_menu" model="ir.ui.view">
<field name="model">ir.ui.menu</field>
<field eval="8" name="priority"/>
<field name="arch" type="xml">
<tree string="Menu">
<field name="sequence"/>
<field icon="icon" name="complete_name" string="Menu"/>
</tree>
</field>
</record>
<record id="edit_menu_access_search" model="ir.ui.view">
<field name="name">ir.ui.menu.search</field>
<field name="model">ir.ui.menu</field>
<field name="arch" type="xml">
<search string="Menu">
<field name="name" string="Menu"/>
<field name="parent_id"/>
</search>
</field>
</record>
<record id="grant_menu_access" model="ir.actions.act_window">
<field name="name">Menu Items</field>
<field name="res_model">ir.ui.menu</field>
<field name="view_type">form</field>
<field name="view_id" ref="edit_menu"/>
<field name="context">{'ir.ui.menu.full_list':True}</field>
<field name="search_view_id" ref="edit_menu_access_search"/>
<field name="help">Manage and customize the items available and displayed in your OpenERP system menu. You can delete an item by clicking on the box at the beginning of each line and then delete it through the button that appeared. Items can be assigned to specific groups in order to make them accessible to some users within the system.</field>
</record>
<menuitem action="grant_menu_access" id="menu_grant_menu_access" parent="base.next_id_2" sequence="1"/>
</data>
</openerp>

View File

@ -44,7 +44,6 @@ class view_custom(osv.osv):
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'ir_ui_view_custom_user_id_ref_id\'')
if not cr.fetchone():
cr.execute('CREATE INDEX ir_ui_view_custom_user_id_ref_id ON ir_ui_view_custom (user_id, ref_id)')
view_custom()
class view(osv.osv):
_name = 'ir.ui.view'
@ -60,7 +59,7 @@ class view(osv.osv):
return result
_columns = {
'name': fields.char('View Name',size=64, required=True),
'name': fields.char('View Name', required=True),
'model': fields.char('Object', size=64, required=True, select=True),
'priority': fields.integer('Sequence', required=True),
'type': fields.function(_type_field, type='selection', selection=[
@ -88,11 +87,17 @@ class view(osv.osv):
_order = "priority,name"
# Holds the RNG schema
_relaxng_validator = None
_relaxng_validator = None
def create(self, cr, uid, values, context=None):
if 'type' in values:
_logger.warning("Setting the `type` field is deprecated in the `ir.ui.view` model.")
if not values.get('name'):
if values.get('inherit_id'):
inferred_type = self.browse(cr, uid, values['inherit_id'], context).type
else:
inferred_type = etree.fromstring(values['arch'].encode('utf8')).tag
values['name'] = "%s %s" % (values['model'], inferred_type)
return super(osv.osv, self).create(cr, uid, values, context)
def _relaxng(self):
@ -106,8 +111,7 @@ class view(osv.osv):
finally:
frng.close()
return self._relaxng_validator
def _check_render_view(self, cr, uid, view, context=None):
"""Verify that the given view's hierarchy is valid for rendering, along with all the changes applied by
its inherited views, by rendering it using ``fields_view_get()``.
@ -267,7 +271,6 @@ class view(osv.osv):
'label' : labels,
'blank_nodes': blank_nodes,
'node_parent_field': _Model_Field,}
view()
class view_sc(osv.osv):
_name = 'ir.ui.view_sc'
@ -304,7 +307,5 @@ class view_sc(osv.osv):
('shortcut_unique', 'unique(res_id, resource, user_id)', 'Shortcut for this menu already exists!'),
]
view_sc()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- View -->
<record id="view_view_form" model="ir.ui.view">
<field name="model">ir.ui.view</field>
<field name="arch" type="xml">
<form string="Views" version="7.0">
<sheet>
<group>
<group>
<field name="name"/>
<field name="type"/>
<field name="model"/>
<field name="priority"/>
</group>
<group>
<field name="field_parent"/>
<field name="inherit_id"/>
<field name="xml_id"/>
</group>
</group>
<notebook>
<page string="Architecture">
<field name="arch"/>
</page>
<page string="Groups">
<field name="groups_id"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_view_tree" model="ir.ui.view">
<field name="model">ir.ui.view</field>
<field name="arch" type="xml">
<tree string="Views">
<field name="priority" string="Sequence"/>
<field name="name"/>
<field name="type"/>
<field name="model"/>
<field name="xml_id"/>
<field name="inherit_id"/>
</tree>
</field>
</record>
<record id="view_view_search" model="ir.ui.view">
<field name="model">ir.ui.view</field>
<field name="arch" type="xml">
<search string="Views">
<field name="name" filter_domain="['|', ('name','ilike',self), ('model','ilike',self)]" string="View"/>
<filter icon="terp-stock_zoom"
string="Search"
domain="[('type', '=', 'search')]"/>
<filter icon="gtk-indent"
string="Tree"
domain="[('type', '=', 'tree')]"/>
<filter icon="gtk-new"
string="Form"
domain="[('type', '=','form')]"/>
<field name="inherit_id"/>
<field name="type"/>
<group expand="0" string="Group By...">
<filter string="Object" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'model'}"/>
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
</group>
</search>
</field>
</record>
<record id="action_ui_view" model="ir.actions.act_window">
<field name="name">Views</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.ui.view</field>
<field name="view_id" ref="view_view_tree"/>
<field name="help">Views allows you to personalize each view of OpenERP. You can add new fields, move fields, rename them or delete the ones that you do not need.</field>
</record>
<menuitem action="action_ui_view" id="menu_action_ui_view" parent="base.next_id_2" sequence="2"/>
<!-- View customizations -->
<record id="view_view_custom_form" model="ir.ui.view">
<field name="model">ir.ui.view.custom</field>
<field name="arch" type="xml">
<form string="Customized Views" version="7.0">
<sheet>
<group col="4">
<field name="user_id"/>
<field name="ref_id"/>
<field name="arch" colspan="4" nolabel="1"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_view_custom_tree" model="ir.ui.view">
<field name="model">ir.ui.view.custom</field>
<field name="arch" type="xml">
<tree string="Customized Views">
<field name="user_id"/>
<field name="ref_id"/>
</tree>
</field>
</record>
<record id="view_view_custom_search" model="ir.ui.view">
<field name="model">ir.ui.view.custom</field>
<field name="arch" type="xml">
<search string="Customized Views">
<field name="user_id"/>
<field name="ref_id"/>
</search>
</field>
</record>
<record id="action_ui_view_custom" model="ir.actions.act_window">
<field name="name">Customized Views</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.ui.view.custom</field>
<field name="help">Customized views are used when users reorganize the content of their dashboard views (via web client)</field>
</record>
<menuitem id="menu_action_ui_view_custom" action="action_ui_view_custom" parent="base.next_id_2" sequence="3"/>
<!-- Shortcuts -->
<record id="shortcut_form" model="ir.ui.view">
<field name="model">ir.ui.view_sc</field>
<field name="arch" type="xml">
<form string="Shortcut" version="7.0">
<group col="4">
<field name="name"/>
<field name="sequence"/>
</group>
</form>
</field>
</record>
<record id="shortcut_tree" model="ir.ui.view">
<field name="model">ir.ui.view_sc</field>
<field name="arch" type="xml">
<tree string="Shortcut">
<field name="name"/>
<field name="sequence"/>
</tree>
</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Values -->
<record id="values_view_form_action" model="ir.ui.view">
<field name="name">ir.values.form.action</field>
<field name="model">ir.values</field>
<field name="arch" type="xml">
<form string="Action Bindings" version="7.0">
<group>
<group>
<field name="name"/>
<field name="model_id" on_change="onchange_object_id(model_id)"/>
<field name="model"/>
<field name="res_id"/>
<field name="key2"/>
</group>
<group>
<field name="action_id" on_change="onchange_action_id(action_id)"/>
<field name="value_unpickle" colspan="4" string="Action Reference"/>
</group>
</group>
</form>
</field>
</record>
<record id="values_view_form_defaults" model="ir.ui.view">
<field name="name">ir.values.form.defaults</field>
<field name="model">ir.values</field>
<field name="arch" type="xml">
<form string="User-defined Defaults" version="7.0">
<group>
<group>
<field name="name"/>
<field name="model"/>
<field name="model_id" on_change="onchange_object_id(model_id)"/>
<field name="value_unpickle" nolabel="1"/>
</group>
<group>
<field name="key2" string="Condition"/>
<field name="user_id"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</group>
</form>
</field>
</record>
<record id="values_view_tree_action" model="ir.ui.view">
<field name="name">ir.values.tree.action</field>
<field name="model">ir.values</field>
<field name="arch" type="xml">
<tree string="Action Bindings/Defaults">
<field name="name"/>
<field name="model"/>
<field name="key2"/>
</tree>
</field>
</record>
<record id="values_view_search_action" model="ir.ui.view">
<field name="name">ir.values.search.action</field>
<field name="model">ir.values</field>
<field name="arch" type="xml">
<search string="Client Actions">
<field name="name"
filter_domain="['|', '|', ('name','ilike',self), ('model','ilike',self), ('key2','ilike',self)]"
string="Client Action"/>
<group expand="0" string="Group By...">
<filter string="Model" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'model'}"/>
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'key2'}"/>
</group>
</search>
</field>
</record>
<record id="act_values_form_action" model="ir.actions.act_window">
<field name="name">Action Bindings</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.values</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="values_view_search_action"/>
<field name="domain">[('key','=','action')]</field>
<field name="context">{'default_key':'action'}</field>
</record>
<record model="ir.actions.act_window.view" id="action_values_tree_view">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="values_view_tree_action"/>
<field name="act_window_id" ref="act_values_form_action"/>
</record>
<record model="ir.actions.act_window.view" id="action_values_form_view">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="values_view_form_action"/>
<field name="act_window_id" ref="act_values_form_action"/>
</record>
<menuitem action="act_values_form_action" id="menu_values_form_action" parent="next_id_6"/>
<record id="act_values_form_defaults" model="ir.actions.act_window">
<field name="name">User-defined Defaults</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.values</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="values_view_search_action"/>
<field name="domain">[('key','=','default')]</field>
<field name="context">{'default_key':'default','default_key2':''}</field>
</record>
<record model="ir.actions.act_window.view" id="action_values_defaults_tree_view">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="values_view_tree_action"/>
<field name="act_window_id" ref="act_values_form_defaults"/>
</record>
<record model="ir.actions.act_window.view" id="action_values_defaults_form_view">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="values_view_form_defaults"/>
<field name="act_window_id" ref="act_values_form_defaults"/>
</record>
<menuitem action="act_values_form_defaults" id="menu_values_form_defaults" parent="next_id_6"/>
</data>
</openerp>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.cron" id="cronjob_osv_memory_autovacuum">
<field name='name'>AutoVacuum osv_memory objects</field>
<field name='interval_number'>30</field>
<field name='interval_type'>minutes</field>
<field name="numbercall">-1</field>
<field name="active">True</field>
<field name="doall" eval="False" />
<field name="model">osv_memory.autovacuum</field>
<field name="function">power_on</field>
<field name="args">()</field>
</record>
</data>
</openerp>

View File

@ -19,6 +19,5 @@
#
##############################################################################
import wizard_menu
import wizard_screen
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -47,25 +47,6 @@ class wizard_model_menu(osv.osv_memory):
'icon': 'STOCK_INDENT'
}, context)
return {'type':'ir.actions.act_window_close'}
wizard_model_menu()
class wizard_model_menu_line(osv.osv_memory):
_name = 'wizard.ir.model.menu.create.line'
_columns = {
'wizard_id': fields.many2one('wizard.ir.model.menu.create','Wizard'),
'sequence': fields.integer('Sequence'),
'view_type': fields.selection([
('tree','Tree'),
('form','Form'),
('graph','Graph'),
('calendar','Calendar'),
('gantt','Gantt')],'View Type',required=True),
'view_id': fields.many2one('ir.ui.view', 'View'),
}
_defaults = {
'view_type': lambda self,cr,uid,ctx: 'tree'
}
wizard_model_menu_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,54 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2010 OpenERP s.a. (<http://www.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
# 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 base64
import os
import random
import tools
from osv import fields,osv
# Simple base class for wizards that wish to use random images on the left
# side of the form.
class wizard_screen(osv.osv_memory):
_name = 'ir.wizard.screen'
def _get_image(self, cr, uid, context=None):
path = os.path.join('base','res','config_pixmaps','%d.png'%random.randrange(1,4))
image_file = file_data = tools.file_open(path,'rb')
try:
file_data = image_file.read()
return base64.encodestring(file_data)
finally:
image_file.close()
def _get_image_fn(self, cr, uid, ids, name, args, context=None):
image = self._get_image(cr, uid, context)
return dict.fromkeys(ids, image) # ok to use .fromkeys() as the image is same for all
_columns = {
'config_logo': fields.function(_get_image_fn, string='Image', type='binary'),
}
_defaults = {
'config_logo': _get_image
}
wizard_screen()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

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