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
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
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.
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.
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.
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.
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.
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.
* 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
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.
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`.
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
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.
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
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.
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.
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.
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 !
[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.
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.