While calling `pip install -r requirements.txt`, the PyChart tarball is
always downloaded even if `pip` has a download cache configured (which
it does by default in later versions).
This is because `pip` has no way of knowing which package the PyChart
tarball contains before downloading and running its `setup.py`.
By declaring the PyChart "egg" in `requirements.txt` the tarball is no
longer downloaded if it's already in the download cache.
The priority widget did not handle the readonly concept
It was therefore possible to set the priority of
an issue (for instance) even if the field was marked
as readonly.
opw-628960
Adaptation of afe4a97d03, but we properly unlink the timesheet lines themselves instead of going for the account.analytic.lines like the original commit proposition did. Actually, the unlink method of hr.analytic.timesheet already unlinks the corresponding acount.analytic.line, but those records were previously deleted via ondelete='cascade', which didn't trigger the unlink method at all, so the associated analytic lines were not deleted accordingly.
Fixes opw 628256.
The natural order was discarded when merging results with a set,
and this was actually un-necessary as the second search()
excludes the previously found `ids`.
In the rare places with a m2o field to product.template
(e.g BoMs), it is necessary to be able to search on product
codes, EAN, etc, the way it works on product.product.
This is done by delegating the name_search to product.product
and then returning the corresponding templates.
This has a small penalty of executing name_get() twice,
but is simpler and more robust for future changes.
An alternative would have been to extract the name_search()
method into a mixin and mix it on both product.product and
product.template. However this would be more brittle and
only work as long as the name_search implementation strictly
uses fields that are present in both tables.
OPW 626662
It looks like it was possible to pass vals['date']
in date format (!= datetime format) to _create_analytic_entries.
This rev. is a retrocompatible patch for 73f7a2ba35.
In addition, it solves the same issue than the rev.
73f7a2ba35, but in the case the project is
set on the task after the work hours are created.
See ab5ecef476
opw-628729
In ir_ui_view.py, in method render (line 132 atm),
the values passed to the rendering engine is a merge of the context
and the values.
Therefore, if at this place, the language is rightly set in the context,
the report lang will be as well in the values.
In abstract_report.py, the values passed to the render method is the
wrapped report localcontext in which are added some key/values
(docs, doc_ids, doc_model).
By default, the lang in the localcontext is False
See __init__ method of rml_parse class in report_sxw.py.
If setLang method is not called, the lang in the localcontext remains False.
In this rev., we avoid to overwrite the lang from the context by the lang
of the localcontext if this one is False, so the lang of the report is set
with the current context lang.
Forcing the lang of the report to False had as side-effect to prevent the
editing of report using the website editor(e.g. playslip_report)
opw-628720
- Translations lookup normally uses the namespace of the current
QWeb template, after merging all inherited views.
But when a QWeb template is "cloned" by a child view using
inheritance with `primary` mode, the translations are more
likely to exist for the original (parent) template, and would not
be found when using only the "child" namespace.
This patch adds support for looking up each translation
also in the parent namespace in this case, if none was found
for the child template in the first place.
- ir.translation's _get_source() now supports a list of res_id
to search for, in addition to a single res_id
- Also moved the logic of routes /website/customize_template_get
and /website/get_view_translations to the ir.ui.view model where
it belongs.
opw: 615241
Closes#5325
Custom fields can point to custom models that have not been initialized
yet (`_setup_base` not called). Ensure every models in the registry
have a `_fields` attribute.
Use a `frozendict` as a defensive check to ensure it wont be modified
before calling `_setup_base`.
The tasks list view "act_project_project_2_project_task_all"
always displays inactive tasks ("'active_test': False" in context).
Both the link in the kanban and the button in the form
leading to this list view should therefore counts both
inactive & active tasks.
opw-628672
The implementation was based on the ill-defined method `same_parameters()` that
compares arguments based on a heuristic. Instead, we now create a new column
and check whether it is equivalent to `self` by comparing the arguments
returned by `to_field_args()`. If that is the case, `self` is reused instead
of the new column.
The code refactoring also fixes the column reuse which was broken by the
introduction of the parameter `compute` in commit 9333c62. Indeed, with that
parameter, `same_parameters()` always returned False, since old-api columns do
not have that parameter by default. The parameter has been renamed to
`_computed_field`, and is no longer passed for creating columns.
When having account installed, but having as only
access right "Contacts creation", it wasn't possible to
display the partner form.
Setting the "groups" on the button itself has as effect
to hide the button, but not to prevent its value computation.
If you did not had the access rights required to compute the
buttons values, it leaded to security issues.
Put the "groups" on the view instead prevent the button to be loaded,
and its value to be computed. It therefore avoids both
a useless computation (computing the value of a hidden button
is not really useful), and prevent any access rights warnings.
Besides, 3 different groups were needed to display the
three buttons:
- account.group_account_invoice
- account.group_account_user
- analytic.group_analytic_accounting
Not having one of these tree groups could lead to security
warnings. We therefore split this view into three sub-views,
with each one a group set (and a button)
opw-628668
In calendar, using recurrent events leads to the use of
virtual ids, which are strings.
It wasn't possible to change the message subscriptions
for recurring events,
neither for the user himself, neither for the other followers
opw-627895
27a48f8026 introduced the use of self.dataset
It appears it is not always defined.
Few lines above, self.getParent().dataset is used,
and looks to be always defined.
We therefore now use this dataset in order to get the context,
to correctly pass the current session language.
Closes#5416
When a delivery order is confirmed, pass the user language to the
procurement creation so the messages in the chatter are now translated
in his language.
opw 627002
This was due to secondary fields loaded from database in 'onchange' mode. In
that mode, the secondary fields were marked 'dirty', and therefore returned by
the method `onchange`. The fix consists in loading those secondary fields in
cache before processing the onchanges.
This incidentally fixes a test on method `onchange`: in a one2many field, some
dirty fields were unexpectedly returned in the result. This was due to those
fields being loaded while processing onchanges.
Node content of inherited views using <attribute> tags are added
in the translation terms when syncing the terms.
The fact that the content should be translated or not depends
on the content, or to which attribute it refers.
For instance, string attributes should be translated, but
domains probably not.
But, even for domains, this is possible that it requires a translation
e.g. [('category_id.name', 'ilike', 'Customers')].
This domain is very unlikely to be integrated in the standard source code,
but this is possible to have such a domain in a view customization.
Therefore, we provide the possibility to disable the translation
case by case. Setting translation="off" in the attribute of the node
will prevent to add the node content in the translated terms.
opw-625762