Commit Graph
3175 Commits
Author SHA1 Message Date
Martin Trigaux b7bad9dbc4 [I18N] followup of 5284c43be5
Previous commit was cleaning the orphan and fuzzy translations of all main translations.
This commit does the same for all regional languages (that are not on Transifex).
To keep these files small, keep only the translated strings.
Fixes #14937
2017-01-06 10:40:39 +01:00
Raphael Collet 25af735dd6 Fix inheritance of views with elements and text (#14944)
This avoids screwing up the text coming from the inherited views.
2017-01-05 17:26:46 +01:00
Martin Trigaux 5284c43be5 [I18N] generate and clean orphan translations
Some languages were published on Transifex in v9 but no longer in v10.
These languages were still using the outdated .po files
In some of these po, there were some fuzzy translations that were incorrect
(e.g. 'POS Order %s' - 'Kassa ostud', missing '%s')
These were not erased as still using the old translations.
Regenerate a correct .po file based on the new .pot and remove fuzzy
translations.

Fixes similar issue than raised at #14937
2017-01-05 12:01:27 +01:00
Christophe Simonis e062dc7c36 [REL] 10.saas~14 2017-01-04 19:47:23 +01:00
Christophe Simonis ca475e08eb [MERGE] forward port branch 10.0 up to 799e7f7740 2017-01-04 19:43:24 +01:00
Christophe Simonis 799e7f7740 [FIX] core: leftover openerp use from last forward-port 2017-01-04 19:24:16 +01:00
Christophe Simonis 2217b37130 [MERGE] forward port branch saas-11 up to 573293a06d 2017-01-04 19:15:31 +01:00
Fabien Pinckaers 3d04e44880 [ADD] report,base: custom report layouts
External layout for reports can be customized. 4 Layout are currently
proposed, selectable from General Settings.
An onboarding popup is shown to select the layout to used if none has
been shown nor a company logo chosen.

Joint works by Fabien Pinckaers, Antony Lesuisse and Christophe Simonis.
Design by Csaba Fazekas.
2017-01-04 18:51:17 +01:00
qdp-odoo 4a8b088773 [ADD] xml_utils: utilitary file for common xml operations 2017-01-04 16:30:50 +01:00
Martin Geubelle 742cadaea8 [IMP] *: clean technical views (usability)
This closes the task #30074.
2017-01-04 10:22:48 +01:00
Martin Geubelle 7c7e825591 [IMP] base: allow to set an icon on ir.ui.menu
Before this commit, the field `web_icon_data` was a computed field
that depended on `web_icon` (which either specify a path to an image
or an icon).

We can now directly set the image binary value on the field.

The previous behaviour in which the binary is computed based on the
path is kept at the menu creation/edition, but the field is not `compute`
anymore.
2017-01-04 10:22:39 +01:00
Thibault Delavallée 99959e0f07 [IMP] various: add module name in server action name
Purpose is to ease their ordering and understanding.
2017-01-03 19:11:08 +01:00
Yannick Tivisse 319a939339 [MOV] base_action_rule: rename and move base_action_rule to base_automation
First step towards cleaning and improving automated actions is to
correctly name things. base_action_rule module is therefore renamed
to base_automation. Model is also renamed to base.automation.
2017-01-03 19:11:07 +01:00
Thibault Delavallée 1c79c5ee30 [REF] ir_cron: make scheduled actions inherits from server actions
The purpose of this commit is to handle code execution only in server
action and delegate schedule management to ir_cron model.

ir.cron model now inherits from ir.actions.server. Fields model, function
and args are removed as well as the logic to handle them. There is no
more code manipulation and evaluation in ir_cron, only a call to the run
method of ir.actions.server.

Cron form view use server action form view as primary view. This way
automated actions use the same base form as server actions with
cron details added.

Thanks to @fpodoo for the original idea and preliminary work. Thanks to
@jpr-odoo for first developments. Thanks to @jem-odoo for reviewing.
2017-01-03 19:11:07 +01:00
Thibault Delavallée 870974effe [IMP] ir_actions, mail: add add_followers server action
Add a server action allowing to add followers, either partners or
channels, to documents.
2017-01-03 19:11:07 +01:00
Yannick Tivisse 8fa9f7d6d4 [REF] ir_actions: refactor and simplify ir.actions.server
Main idea of this commit is to simplify the various options of
ir.actions.server model. Purpose is to make it a simple tool to
execute some actions or python code. This has two main consequences

 * create and update server actions are simplified to update only the
   current record. Complex options can always be achieved by python code
   instead of error-prone option building mechanism;
 * condition of server actions is removed. If a condition is necessary it
   can either be included in a code server action, or integrated in an
   automated action;

This commit features :

 * remove 'client_action' server action type. Indeed this can be achieved
   with a code server action returning an action;
 * remove 'condition' on ir_actions_server model. From now on conditions
   and triggers are managed in server action code or using automated
   or scheduled action;
 * clean 'create and copy a record'. Create and link are the proposed
   options. Copy of the record or of a selected record is removed. Link
   is simplified by removing the parsed expression that allowed complex
   path update. It is simpler to write code than write python-like
   expression in char fields;
 * remove 'use_write' options. It now simply updates a record;
 * remove 'write_expression' as it is replaced by code actions;
 * remove 'ref_object' not used anymore with the removal of "choose
   a record";
 * remove helper to build an expression not used anymore with the removal
   of "write expression";
 * remove object ID finder;
 * removed template display when choosing an email template; just go
   on the template if you want more details;
 * refactor server action form view to reflect changes. It will be used
   in future commits as base view for automated and scheduled actions;
 * add 'sequence' in list view;
 * add new 'usage' selection field allowing to distinguish which model
   uses the server action. Indeed as server action will soon be used
   in scheduled or automated actions having a clue about the usage
   is always helpful;

Thanks to @fpodoo for the original idea and preliminary work. Thanks to
@jpr-odoo for first developments. Thanks to @jem-odoo and @rco-odoo
for reviewing.
2017-01-03 19:11:06 +01:00
Thibault Delavallée 452a97d9d4 [REF] ir_actions: remove usage field
This field is now informative only and not used through the codebase. As
an usage field could be defined on various inheriting ir.actions.*
models, let us remove it from the base model and give some freedom
to sub-models.
2017-01-03 19:10:28 +01:00
Thibault Delavallée bcc0212bfb [IMP] ir_actions: perform small code cleaning
* use selection and selection_add to replace old indirection for state
   field and ease code understanding
 * update various strings and helps
 * update Python code helper to match new API changes, notably model,
   record and records being recordsets
2017-01-03 19:10:28 +01:00
Raphael Collet 172a767e5f [IMP] base: tighten ir.rule access rights
The computed field `domain` was formerly read as the current user to evaluate
the rule's domain for the current user.  As we restrict the access of `ir.rule`
to advanced users only, the computed field has no purpose anymore.
2017-01-03 16:52:50 +01:00
Raphael Collet 6453e4eb23 [IMP] base: tighten ir.model.data access rights 2017-01-03 16:52:50 +01:00
Raphael Collet 34c661111b [IMP] base, *: tighten ir.model.access access rights
In `website_crm_partner_assign`, remove duplicate ACLs and reorganize files.
2017-01-03 16:52:50 +01:00
Raphael Collet 4f230b2180 [IMP] base: tighten ir.model.relation access rights 2017-01-03 16:52:50 +01:00
Raphael Collet 73de86c768 [IMP] base: tighten ir.model.fields access rights 2017-01-03 16:52:49 +01:00
Raphael Collet 18f4711dce [IMP] base: tighten ir.model.constraint access rights 2017-01-03 16:52:49 +01:00
Raphael Collet 5d746d0ac6 [IMP] base, *: tighten ir.model access rights
Remove unrestricted "read" access.  To make code internally using `ir.model`
work, add a private method `_get` on `ir.model` to retrieve the record
corresponding to a model name, without access rights issue.

Change signature of method `get_authorized_fields` to make it use a model name
instead of a model id.  This removes the necessity of a search on `ir.model`.
2017-01-03 16:52:49 +01:00
Raphael Collet 1abd543f14 [IMP] base: tighten ir.filters access rights
Remove "full access" for all users, and add it to specific groups.
2017-01-03 16:52:49 +01:00
Raphael Collet d0ca2d115e [REF] ir_config_parameter: remove group_ids and simplify
Add `sudo()` to call `get_param` where necessary, and make the web client use a
controller instead of directly accessing parameters.
2017-01-03 16:52:49 +01:00
Raphael Collet 7543afb070 [IMP] base, *: tighten ir.config_parameter access rights
Add `base.group_system` on existing parameters:
 - `auth_signup.allow_uninvited`,
 - `auth_signup.reset_password`,
 - `auth_signup.template_user_id`,
 - `google_redirect_uri`,
 - `mail.bounce.alias`,
 - `mail.catchall.alias`,
 - `mail.catchall.domain`.
2017-01-03 16:52:49 +01:00
Raphael Collet 1539887ce2 [IMP] base: tighten ir.actions.* access rights
All users have read access on `ir.actions.server`.  Add `group_system` on some
fields to make server actions a bit more discrete about what they do.
2017-01-03 16:52:49 +01:00
Martin Trigaux ec5d696cf7 [FIX] base: revert and improve 24aba601
It forced to select a coutnry before the state which is not very userfriendly.
Cf comments at #13657

Instead restrict only if the country if a country is selected.
Courtesy of Pedro M. Baeza, Tecnativa
For v10 this is a minimum change and a larger refactoring can be done in master.

This replaces and closes #14896
2017-01-03 15:27:39 +01:00
Odoo Translation Bot f911ec712e [I18N] Update translation terms from Transifex 2017-01-03 15:10:30 +01:00
balapal 5f68a17812 [FIX] base: change rounding of HUF currency
Set rounding to 1.00 as the smallest coin is 5Ft and the smaller unit is no longer in circulation.

Closes #14855
2017-01-03 14:40:06 +01:00
Pin Zhang 4c798a2690 [FIX] base: use defined variable
The directive is `mname` not `name`.

CLA signature for PinZhang
Closes #14895
2017-01-03 11:17:43 +01:00
Raphael Collet 46b51cb4b2 [FIX] expression: multi-level expressions with magic columns 2017-01-03 10:17:13 +01:00
Simon Lejeune 13af401bc2 [FIX] QWeb: xml namespaces and t-call
Before this commit, when a t-call attribute triggered the compilation of
a template, the compilation of this template was not aware of the nsmap
of the parent, resulting in redundant xml namespaces declaration.

With this commit, we pass the current nsmap through the `options` dict.
2017-01-02 16:12:22 +01:00
Simon Lejeune 0d3af7ce1c [FIX] ir.ui.view: locate_node of a ns prefixed element
According to [1], "If your XPath expression uses namespace prefixes, you
must define them in a prefix mapping.". It makes sense because an xpath
to a prefixed tag is not able to uniquely locate the tag in the parent
view (it is possible to redefine the ns definition of a prefix, so you
could have multiple elements matching).

We chose to define the nsmap to locate the element in the parent view by
using the lxml internal form to qualify a node ({ns def}tagname). This
form is not compatible with etree.xpath but is with etree.ETXPath.
Fortunately, etree.ETXPath is compatible with the classic xpath
expressions so we'll use this one by default in `locate_node`.

A test has been introduced to showcase the problem.

http://lxml.de/xpathxslt.html#namespaces-and-prefixes: Namespaces and prefixes
2017-01-02 16:07:06 +01:00
Simon Lejeune 2d3c928d47 [ADD] QWeb: xml namespaces support in dynamic template
This is very similar and almost copy pasted from the implementation in
static template, as the main method `compile_node` will either call
`_compile_static_node` (which we patched in the static implementation)
or `_compile_directives` which will call `_compile_tag` in the cases
where xmlns matter (at least that's my understanding for today). So we
patch `_compile_tag` the same way than `_compile_static_node`. It would
be nicer if the method wasn't completely different and in two parts, but
hey.

This method is not always called on leaves, so setting options['nsmap']
to a copy before processing the content of the node is necessary (a node
with a nsmap and a t-attf- having a child with an nsmap: the child has
to be aware of the nsmap of its parent).

Note that we set the xmlns attribtue before calling
`_compile_all_attribute`, which will probably break xmlns set by t-*
tag. However, we don't plan to support that the moment.
2017-01-02 16:05:58 +01:00
Simon Lejeune 45d26bc257 [ADD] QWeb: xml namespaces support in static template
With this patch, QWeb is able to support xml namespace declaration and
prefixes. As this patch only deals with static template, the only method
we have to patch is `_compile_static_node`. We make it able to serialize
etree node having an nsmap by formating them to restore the xml prefix
if present or to declare the xmlns attribute if needed. To know if the
namespace definition is needed, we compare the tuples of (xmlprefix,
xmldefinition) of the node and its parent. The namespace definition of
the parent is passed by a dict in the `options` key. We took care of
dealing with the mutable + recursion thing by working with copy of this
namespace definition dict.

Two tests have been introduced, basically what we pass to QWeb is what
it has to return.
2017-01-02 16:05:50 +01:00
Raphael Collet 45352512a8 [REF] translate: rewrite XML translator to handle namespaces gracefully (#14816)
The class `XMLTranslator` is replaced by a function `translate_xml_node` that
takes an XML node and returns the translated XML node. The translation process
is done by a recursive function on XML nodes that returns the untranslated node
if it can be translated inline, or the translated node otherwise.
2017-01-02 15:16:18 +01:00
Odoo Translation Bot e8b0c1db69 [I18N] Update translation terms from Transifex 2017-01-01 04:42:12 +01:00
qdp-odoo 4f29b77e3d [MERGE] foward port of 10.0 up to revision 84a650e33a 2016-12-30 17:21:25 +01:00
Jérome Maes 7534f627b3 [IMP] base,forum: improve user preference view
Karma is now displayed on preference view. Also,
add a empty group to allow other module to set their
preference parameters on this form view.

Little big details are important !
2016-12-30 17:02:25 +01:00
Thibault Delavallée b46e6f4bb6 [REV] Revert "[IMP] base: code aestetic, res_country & state"
This reverts commit b70fe586f2. This commit
breaks the master branch.
2016-12-30 11:13:37 +01:00
Fabien Pinckaers b70fe586f2 [IMP] base: code aestetic, res_country & state
[FIX] base: country & state, enforce the max number of records to the requested limit
2016-12-30 01:38:42 -08:00
Fabien Pinckaers 44685b595b [IMP] base: selection of state based on coutry, all states if no country
[IMP] base: if state code, set it as the first state in the list
2016-12-29 23:02:26 -08:00
Fabien Pinckaers b76028f3f2 Revert "[FIX] base: restrict state selection to the selected country"
[IMP] revert a serious usability issue: people creating an address can
not select a state: it's weird to have to set the country first.

This reverts commit 24aba6014c.
2016-12-29 22:24:37 -08:00
Yannick Tivisse 81352d47c5 [FIX] res_config: Manage m2o,m2m and o2m for default_ fields
Before this fix this was crashing for these kind of fields because we received a recordset instead of a id list.
2016-12-29 15:50:45 +01:00
Yannick Tivisse fa8560a414 [REM] base.sql: remove table wkf used for workflows 2016-12-28 15:09:33 +01:00
qdp-odoo 4dd27bba34 [REF] base: enhance inheritability
split fields_view_get() and used an abstact mixin class in place of of FormatAddress

[IMP] base: added a m2o field (ir.ui.view) on res.country to decide the layout of the form view to input addresses.
2016-12-28 11:20:47 +01:00
Nicolas Martinelli cd3988e689 [FIX] base: duplicate ir.model.constraint
There is a contraint on `ir.model.constraint` that contrains the name to
be unique per module.

opw-702516
2016-12-27 10:14:02 +01:00