Commit Graph
3175 Commits
Author SHA1 Message Date
Odoo Translation Bot 0a94a766e6 [I18N] Update translation terms from Transifex 2018-09-30 00:29:10 +02:00
Rémi Rahir b6a981405e [IMP] snailmail: adding special map for the country names 2018-09-29 11:12:38 +02:00
Christophe Monniez 8c682544ea [FIX] config: add a config dest to test-enable option
Commit 76c5389 removed the option dest for test-enable leading to a
traceback when trying to save the configuration.
This was due to the fact that the options dict was sorted while
containing a None key because of the missing dest.
2018-09-28 16:11:22 +02:00
Nicolas LempereurandWolfgang Taferner 46f2e1918f [FIX] base: access_token error handling correctly
When an attachment is requested with an access_token, a server error
would occur in some situation.

With this changeset when an access token is specified:

- returns a 404 error if the attachment does not exist
- returns a 403 error if the attachment has no access_token

Without this change, the added test would fail with:

```
 status = test_access(access_token='Secret')
 self.assertEqual(status, 403,
     "no access if access token for attachment without access token")
 | if not consteq(obj.access_token, access_token):
 | TypeError: unsupported operand types(s) or combination of types: 'bool' and 'str'

 status = test_access(access_token='Secret')
 self.assertEqual(status, 404,
     "no access with access token for deleted attachment")
 | if not consteq(obj.access_token, access_token):
 | odoo.exceptions.MissingError: ('Record does not exist or has been deleted.', None)
```

close #26647
opw-1884419
closes #27275

Co-authored-by: Wolfgang Taferner <wtaferner@users.noreply.github.com>
2018-09-28 10:42:51 +00:00
Stefan Rijnhart 926a5006a3 [FIX] base: Set enterprise modules to uninstallable
Two were left uninstalled instead of uninstallable

Closes #27288
2018-09-28 09:56:55 +02:00
Raphael Collet 574f4c3deb [FIX] base: update XML ids of automatic fields
Upon module upgrade, automatic fields are removed from `ir.model.fields`.  This
is because those fields do not belong to the module of their model.  Fix the
condition to update their XML id when the module of their model is upgraded.
2018-09-27 15:29:53 +02:00
qsm-odoo 509a7f73b0 [FIX] website, *: restore color edition in theme dialog
* base, web_editor

Commit https://github.com/odoo/odoo/commit/44d659d0df6b50ae230af39a0d41a46b9549e2ae
made the system work with multi-website but fetching the assets content
was unfortunately not working in multi-website...

Also restore correct search operators.
2018-09-27 13:56:09 +02:00
XavierDo 76c5389cd9 [IMP] core: enable tests when test-tags are set
The goal here is to keep the default behaviour of test-enable and test-tags
except that test-tags will set test-enable to true if set.
- +standart must stay the default test-tags if none are set
	(only usefull if test-enable is set)
- should work no matter the order of "test-tags" and "test-enable"
	options  in args
- knowing the fact that for strange reason, _parse_config is called twice

PR: #27255
2018-09-27 13:01:22 +02:00
ThanhDodeurOdoo ed2a8c4f3b [FIX] documents, base: pdf split
Reason: Following feedback from FP and AVW.

- Fixed the "split PDF" feature, it is now possible to leave an
empty page input, check the "split all" box and get a result.

Task: 1888982
2018-09-27 12:12:33 +02:00
Adrian Torres 3f4f77fd9d [REF] *: adapt code to new related default behaviour
This commit adapts the business code to changes introduced by
the parent commit in order to keep the same behaviour as before.

All readonly=False fields will have to be checked afterwards to confirm
that the business case requires write access to the source field.
2018-09-27 12:10:23 +02:00
Adrian Torres 52a8ed3c0c [IMP] fields: make related fields readonly by default
With this commit, any *explicitly* related fields will be `readonly=True`
by default.

*Implicitly* related fields (i.e. _inherits fields) however will keep the
source field's `readonly` attribute.

The rationales behind this patch are:
    * Enforce good practices, as the most common use-case for
      related fields is the same as for compute fields: to read data.
    * Avoid errors where some user saves a form view which contains
      a related field that the user doesn't have write access to.
2018-09-27 12:10:23 +02:00
Raphael Collet 3a30391e9d [FIX] base: superuser cannot become active 2018-09-27 09:54:28 +02:00
Raphael Collet 186b1c09cc [FIX] base: avoid prefetching all the fields when getting context
When getting the context of res_users, all the fields are read but if
the schema is being modified and the modifications are not yet commited
in the database, this leads to a bad query.

With this commit, a read is used to fetch only the needed fields.

Thanks to @RCO for finding this issue that only occurs in specific
planetary alignment.

closes odoo/odoo#27263
2018-09-26 17:49:30 +00:00
Odoo Translation Bot f7a976584b [I18N] Update translation terms from Transifex 2019-02-24 03:16:28 +01:00
Lucas Perais (lpe) 71a295a1d5 [FIX] base: qweb t-call propagates t-lang
Before this commit, the t-lang on a t-call was not
propagated into the context's of the callee template

It resulted into mismatch translation and formatting in the final
rendered template
i.e. having a t-esc with a qweb widget float would take the wrong float format

After this commit, the t-lang parameter alters the context of the template
and t-esc with widgets are translated

OPW 1939989

closes odoo/odoo#31291
2019-02-22 13:40:39 +00:00
Moens Alexandre 21e44d472d [DOC] base: more explicit documentation
compute_sudo has no effects on non stored computed fields.
It was technically already said in the previous lines (REcomputed) but
it was not particularly explicit

closes odoo/odoo#31320
2019-02-21 13:00:47 +00:00
Christophe Simonis 5f08d82bcd [MERGE] forward port branch 11.0 up to fd122aec52 2018-09-26 19:37:29 +02:00
ThanhDodeurOdoo 2d82692648 [REF] documents, base: binary_content
- Changed the binary_content method
to make it more generic and allow alternative ways of checking
the access rights by using a new method check_access_mode.

   Reason: Asked by ODO following documents' security review.

- if all pages are processed, splitting a pdf will
archive the original attachment.

   Reason: FP feedback.

Task: 1853490
2018-09-26 19:18:38 +02:00
Martin Geubelle 77f6384240 [FIX] base: description of contact widget options
There were spelling errors in the description of the `contact` qweb
widget options.
2018-09-26 13:48:48 +02:00
Raphael Collet d1d496c0b6 [FIX] models: avoid multiple identical warnings in onchange 2018-09-26 13:28:56 +02:00
Christophe Simonis a0d832efdc [MERGE] forward port branch saas-14 up to 218eec5482 2018-09-26 12:09:18 +02:00
Raphael Collet a99e04dfee [FIX] base: perform field reflection in batch
Speedup 4% of installation time.
2018-09-26 11:46:30 +02:00
Jeremy Kersten b732ab3dc9 [FIX] base: fix dev mode for get_view_arch_from_file and inherits
Before this commits, dev mode crash in some case (see below) when you declare
a website_page without field name='arch'.
After this commit, we follow the view_id (limit: only into the same file)

Contactus works luckily before this commit, because compute field xml_id on
View return the first ir_model_data (order by name asc by default).

website.contactus
    is BEFORE
website.contactus_page_ir_ui_view

 -- while --

website.bs_debug_page_view
    is AFTER
website.contactus_page_ir_ui_view

closes odoo/odoo#27234
2018-09-26 09:32:11 +00:00
Christophe Simonis 218eec5482 [MERGE] forward port branch 10.0 up to 854eb97b2e 2018-09-26 11:28:33 +02:00
Yannick Tivisse 57ffbe89ef [IMP] models.py: Concatenate warning messages if they are different
Purpose
=======

When several warnings are raised, in an onchange for example, the warning
messages and titles are concatenated on the dialog, even if they are
exactly the same.

Specification
=============

Don't concatenate warning messages if they are exactly the same.
2018-09-25 18:39:32 +02:00
Christophe Simonis 6ce408c824 [MERGE] forward port branch saas-15 up to a0d832efdc 2018-09-26 12:41:31 +02:00
Odoo Translation Bot 5a439a85ef [I18N] Update translation terms from Transifex 2018-09-25 15:32:59 +02:00
Martin Trigaux b2d2be0a4a [I18N] base,mrp: export source terms 2018-09-25 15:30:45 +02:00
Thibault Delavallée 82f361a318 [FIX] models: add filter method on access rules
Currently check_access_rule method checks for record rules and raises an error
if there are either missing ids (deleted records) or forbidden ids (records
hidden due to a record rule).

Purpose of this commit is to have a method allowing to filter a given recordset
and receive only valid records. Its implementation is basically a refactoring
of check_access_rule.

This commit is linked to task ID 1856417 and PR #26565.
2018-09-25 10:51:34 +02:00
Raphael Collet 13fc1380ba [FIX] ir_ui_view: do not check arch twice upon install/upgrade
After a module upgrade, validate the architecture of the module's views that
are impacted by updates, but have not been checked yet.  Before this patch,
views were checked twice on average.

This patch speeds up the installation of modules by about 15% without demo
data.  With demo data, the speedup is around 10%.
2018-09-25 10:41:55 +02:00
Martin Geubelle 587b21fb46 [FIX] base: correctly keep report values
When rendering a report (`render_qweb_html` for example), one can pass `data`
(a dict of values, used for the template rendering).

This dict was overriden in `_get_rendering_context` if the method
`_get_report_values` on the report model was not correctly written.

This was causing an issue when rendering a report in Studio because the `studio`
key was overriden.

Now, the `data` dict is updated (instead of replaced) with the rendering context.
2018-09-25 09:53:48 +02:00
ThanhDodeurOdoo b428bf1023 [FIX] ir.attachment: thumbnails.
- attachments with res_field do not get thumbnails anymore.
2018-09-24 14:37:59 +02:00
Olivier Dony cb2862ad2a [IMP] core: require install mode for db bootstrap
The registry loading system should not alter databases unless it is
asked to do so, by a module installation or update instruction.
This property should hold true as well for database bootstrap, and this
is what this commit changes..

In order to avoid any behavior change for command-line users, an
implicit `-i base` is assumed when starting the server from the
command-line with `-d <db>`, causing the db boostrap to happen if the
database did not exist yet.
2018-09-24 12:30:49 +02:00
David Tran cf30f35f3e [FIX] base: address_format for Vietnam
Vietnam address should come with Province name, not `state_code`

Closes #27164
2018-09-24 10:21:04 +02:00
Martin Trigaux 19523ea21b [IMP] base: use a generic warning message
l10n_mx_edi is a specific enterprise module
amount_to_text may be used in different modules (e.g. account_check_printing)
2018-09-24 09:58:21 +02:00
Goffin Simon 1ec6c069aa [FIX] base: Traceback when uploading a file with no ASCII name
When trying to upload a file with no ASCII name, it raised a
traceback saying: "UnicodeEncodeError: 'ascii' codec can't encode character ..."

opw:1886602
2018-09-24 09:25:53 +02:00
Odoo Translation Bot 2521b9990e [I18N] Update translation terms from Transifex 2018-09-23 07:02:35 +02:00
Odoo Translation Bot 1d79bf0273 [I18N] Update translation terms from Transifex 2018-09-23 02:29:29 +02:00
Odoo Translation Bot facc3b9a63 [I18N] Update translation terms from Transifex 2018-09-23 00:28:15 +02:00
Akim Juillerat 9cc39b77fc [ADD] base: split pdf merge method
To be able to extend the way different PDFs are merged together

closes odoo/odoo#27161
2018-09-21 14:42:18 +00:00
Martin Trigaux ae1fed50d5 [I18N] export saas-11.5 source terms 2018-09-21 16:32:59 +02:00
Yannick Tivisse 9e3a2eff61 [IMP] models.py: Log a warning if no '_description' is set on model 2018-09-21 16:13:59 +02:00
Yannick Tivisse c67ac34ee4 [IMP] base: Add missing _description on models 2018-09-21 16:13:59 +02:00
Christophe Simonis d23601cc67 [MERGE] forward port branch saas-14 up to a119373b5b 2018-09-21 14:18:48 +02:00
Antony Lesuisse a6e1eb9f0a [ADD] partner_autocomplete: Added autocomplete on partners fields
For Name field or M2O, gives a list of companies
Data comes from Odoo IAP Service
2018-09-21 14:02:22 +02:00
Raphael Collet 0f04b64544 [FIX] base: put loaded XML ids in a set (no need for a dict)
This is simpler, cleaner, and has a smaller memory footprint.
2018-09-21 13:21:49 +02:00
Nimesh Jethva 427ba08e0d [IMP]various: Improvement in model description
Purpose of this commit is to give description more "business oriented"
because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers.

Related Task ID : 37311
2018-09-21 11:45:15 +02:00
Nimesh Jethva 7eea263f36 [IMP]base_*: Improvement in model description
Purpose of this commit is to give description more "business oriented"
because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers.

Related Task ID : 37311
2018-09-21 11:45:15 +02:00
Prakash Prajapati 4b5265b9b9 [IMP] contact, product, various: improve labels and tooltips of partner and product fields
Purpose: improve understanding of partner and product models as well as their
daily use. This is done by improving tooltips and labels of some fields
according to business logic.

This commit is related to task ID 1880696 and closes PR #27133 .

Thanks to @xmo-odoo for its in-depth review.
2018-09-21 10:57:58 +02:00
Christophe Simonis a119373b5b [MERGE] forward port branch 10.0 up to cda1bec3e0 2018-09-21 10:42:19 +02:00