Commit Graph
126133 Commits
Author SHA1 Message Date
Nans Lefebvre 295690ce70 [IMP] mrp: start work orders in the right state
To be able to override the initialisation of the work orders states,
we put that in a function.

opw 1943674

closes odoo/odoo#31774

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-03 08:11:30 +00:00
Yenthe666 556d6d6059 [ADD] mail: add activities menu and views under Settings/Technical
closes odoo/odoo#32287

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-04-01 08:47:36 +00:00
Felix H. Hoßfeld 3a92c2644d [CLA] Thought Gang GmbH Contributor License Aggrement
closes odoo/odoo#32152

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-08 12:18:03 +00:00
Priyanka Kakadiya b82f6fee71 [IMP] hr: display warning when user is not linked to employee
On user form view, when no employee is linked to the user, we want
to display a message to the HR Officer (only) with the possibility
to create the employee profile with prefilled information.

Task-1916925

closes odoo/odoo#29659

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-04-08 07:58:01 +00:00
jem-odoo 3be372cfc4 [FIX] hr: restrict sudoing fields_view_get of res.users
Since d77ce4c2a9, the feature of editing own employee profile was
added. It was complicated with the access rights point of view because the
hr.employee fields are protected (groups="hr.group_hr_user"). To allow editing
its own hr.employee, it was required to `sudo` the field_view_get of res.users
(as the profile form view is a res.users form view, with related field from the
employee).

- Bug
The problem is that calling `fields_view_get` as `sudo` each time breaks the `groups`
mecanism on res.users views (not only form view). For instance, adding a field
on the form view with a group will always make it visible as the `groups`check
is done in sudo mode.

- Solution
This commit tries to fix this matter but reducing the `sudo` usage to
- only form view (we don't want this to applied to every res.users view type)
- only for internal user
- only in the flow of the "self editing profile", by checking the current action
- only for the current user (avoid to get the profile of other res.users by
using the same action)

- Side effect
The `groups` mecanism is still breaking on the "my profile" form view, as the
`sudo` is still applied in that case. We might tolerate this as the view should
only be accessible for the current user.

This is not perfect at all, but cleaning that properly might involve to redevelop
this sensitive feature.

Task-1916925
2019-04-08 07:58:01 +00:00
xtanuiha ea4a782f49 [ADD] base: add Archived filter for ir.rule
To easily find archived rules

closes odoo/odoo#32261

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-08 10:18:31 +00:00
xtanuiha 4c4f79dd73 [CLA] signature for xtanuiha 2019-04-08 10:18:12 +00:00
Aurélien Warnon 4b7fb75bc2 [IMP] survey: improve survey form usability
Task #1949652

Some fields were renamed/moved around to improve the survey.survey
form usability.

closes odoo/odoo#31775

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-08 07:09:01 +00:00
Odoo Translation Bot 2d30bd9698 [I18N] Update translation terms from Transifex 2019-04-01 02:44:26 +02:00
Odoo Translation Bot 18c735361a [I18N] Update translation terms from Transifex 2019-03-31 06:20:38 +02:00
Christophe Simonis 28cce6ce3a [MERGE] forward port branch saas-12.1 up to c0cf4049b2 2019-03-29 19:47:46 +01:00
Christophe Simonis c0cf4049b2 Revert "[FIX] delivery: picking weight not updated sometime"
This commit is not needed (and not wanted) in saas~12.1 due to
07bef887af that convert field
`move_ids_without_package` to a computed field with an invert method.

The invert method writes on `move_lines`, which will recompute the value
of `weight` field correctly.

This reverts commit b2b395467f.
2019-03-29 19:02:51 +01:00
Christophe Simonis 2a06f4dcf3 [MERGE] forward port branch 12.0 up to 09fb2469b4 2019-03-29 18:10:57 +01:00
Nicolas Martinelli f7301a8eef [FIX] website_quote: redirect quotes only
- Create 2 identical SO: one with a quotation template set, the other
  without
- Validate them
- Go to the portal at `/my/orders`, access both orders

The order without template redirects to `/my/orders/<ID>`, while the
order with template redirects to `/quote/<ID>`.

Once the SO is validated, there is no reason to show a different page.
The redirection should only apply to non-validated SO.

opw-1925131

closes odoo/odoo#32262

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-29 15:51:59 +00:00
Odoo Translation Bot 48d88b6e6d [I18N] Update translation terms from Transifex 2019-03-31 03:16:57 +02:00
Pierre Masereel 09fb2469b4 [FIX] payment_paypal: fix tests
Since changes made in this commit https://github.com/odoo/odoo/commit/fc1389f8d881adfb94ea1b784fb7104b9eee5d2d the value of field 'custom'
is now set and wasn't before.

closes odoo/odoo#32258

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-29 14:35:23 +00:00
Pierre Masereel 095a539f5c [FIX] payment_buckaroo: fix tests
Some values in the form have been changed in this commit:
https://github.com/odoo/odoo/commit/fc1389f8d881adfb94ea1b784fb7104b9eee5d2d
2019-03-29 14:14:07 +00:00
Nicolas LempereurandRomain Derie a4ce56fe56 [FIX] website_sale: pricelist ecommerce 1st install
Since 2d970942ba it is possible among other improvments to have a
pricelist on all website if it has a "code" or is "selectable" and has
no specified website.

Following this, the default "Public Pricelist" is not associated to a
website but since it is not selectable and has no code, we would get no
pricelist on the website on default installation without demo data.

With this changeset, the "Public Priclist" is set to selectable when
website_sale is installed.

opw-1961069
closes #32254

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>


Co-authored-by: Romain Derie <rdedoo@users.noreply.github.com>
2019-03-29 14:49:02 +00:00
Olivier Colson b344c3c601 [FIX] l10n_jp: fix tax accounts
Forward port of commit https://github.com/odoo/odoo/commit/084246a54ed68e2898e9c713345192b2a33ddd81 (10.0) into https://github.com/odoo/odoo/commit/5e9ebe86bae53f019981361bbcc2f03a5d49e0cb (11.0) had wrongly replaced account code A21809 by its old version, A21807, in tax templates. It made the module uninstallable, as A21807 does not exist anymore.

closes odoo/odoo#32252

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-29 14:01:19 +00:00
Vincent Schippefilt 7b884afbda [FIX] web: fix error handling of _applyChanges
After 5df4746c9a the error handling has
been changed inaccurately. This fix sets the error handling correctly.

closes odoo/odoo#32247

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-29 13:21:10 +00:00
Robot OdooAaron Bohy aab@odoo.comDavid Monjoie dmo@odoo.comMartin Geubelle mge@odoo.comRavi Gadhia rga@odoo.com
9aea7ae162 [MERGE] web,*: list view improvements
This branch brings several improvements related to the list view:

- grouped list views are now editable
- 'expand' attribute can be used to open by default the first level groups
- if there are a lot of groups, a pager is displayed (instead of having all
groups in the same page)
- when grouped on a many2one field, custom buttons (on the many2one
comodel) can be inserted in each group's header
- we can edit several records in a row in editable list views
- editable lists do not flicker anymore when switching a row to edit mode
- we can navigate through the cells in list views with the arrows (in
readonly)

Co-authored-by: Aaron Bohy aab@odoo.com
Co-authored-by: David Monjoie dmo@odoo.com
Co-authored-by: Martin Geubelle mge@odoo.com
Co-authored-by: Ravi Gadhia rga@odoo.com

Task 1915702

closes odoo/odoo#31756

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-04-02 15:46:39 +02:00
David Monjoie 8ea5a40417 [IMP] web: list: directional keys navigation in readonly
With this rev., it is now possible to navigate with arrows in list
views (except when editing, as in this case hitting the arrows moves
the cursor in the input/textarea), and to expand/collapse groups
with keyboard navigation.

Part of task 1915702
2019-04-02 11:57:00 +00:00
Aaron Bohy ca19b17fd3 [IMP] web: fetch records alongside read_group
This rev. adds params to the 'web_read_group' method, allowing to
search_read records inside each groups in a single RPC, instead of
doing a 'web_read_group' RPC followed by n 'search_read' RPCs,
where n is the number of opened groups.

Part of task 1915702
2019-04-02 11:57:00 +00:00
Aaron Bohy d0164d834b [IMP] web,account: editable list: no more position absolute
Before this rev., widgets were absolutely positioned in table
cells. This cause an undesired effect with text fields, as their
textarea overflowed and overlapped the next lines.

With this rev., wigdets are now statically positioned, and the cells
height and width don't change when switching a row to edit mode.

Part of task 1915702
2019-04-02 11:55:57 +00:00
Aaron BohyandMartin Geubelle 9fbb4fb44f [IMP] web: editable list: table-layout: fixed
This rev. changes the layout of *editable* list views to a fixed
layout. This means that we are now responsible of the width of
each column. To do that, we associate with each field type a
factor, and the higher the factor is, the larger the column will
be (w.r.t. the others). This default value can be overriden in the
arch.

The fixed layout allows to remove the absolute positionning of
widgets inside editable lists (done in the next commit).

Part of task 1915702

Co-authored-by: Martin Geubelle <mge@odoo.com>
2019-04-02 11:55:57 +00:00
Martin Geubelle a75fa7e377 [IMP] web: allow mass update in editable lists
From an editable list view, if you select several lines then change
a field, you are now asked if you want to apply the same change on
all selected lines. If you accept, a write is directly performed
(without applying onchange, as the records are reloaded and the view
re-rendered). If you decline, the classic behavior still occurs.

Part of task 1915702
2019-04-02 11:55:57 +00:00
Martin Geubelle 015958dc17 [IMP] web,base: put buttons in list group headers
It is now possible to put buttons in the list view group headers.
When the view is grouped by a many2one field, those buttons
appear next to the header title when the group is opened.

The buttons are specified in the views in a <groupby> tag in the
list arch, with the following structure:
    <groupby name="groupedField"> <!-- must be a many2one -->
        <button type="object" name="my_method" string="Button1"/>
    </groupby>

It is also possible to add `field`, inside the `groupby` which can
be used for modifiers. These fields thus belong on the many2one
comodel, like:
    <groupby name="partner_id">
        <field name="name"/> <!-- name of partner_id -->
        <button type="object" name="my_method" string="Button1"
		attrs="{'invisible': [('name', '=', 'Georges')]}"/>
    </groupby>

These extra fields are fetched in batch when grouping on the field.

Part of task 1915702
2019-04-02 11:55:57 +00:00
Aaron Bohy 2be28d4d03 [IMP] web,board: enable pagination in grouped lists
With this rev., when there are a lot of groups in a grouped list
view, groups are displayed under several pages, whereas they were
all displayed in the same page before.

This is especially interesting with the new 'expand' attribute, to
ensure that we don't read records for a large number of groups.

By default, the groups limit is set to 80 (like records), and to 10
is the 'expand' attribute is set to true. This limit can be
overriden with the 'groups_limit' attribute.

Part of task 1915702
2019-04-02 11:55:57 +00:00
Aaron Bohy 5895d23cbd [IMP] web: list: add expand attrs
When this attribute is set to true on the <tree> root node, in a
grouped list view, first level groups are automatically opened.

Part of task 1915702
2019-04-02 11:55:57 +00:00
234d92c4f0 [IMP] web: list: editable grouped list views
This rev. enables the editable feature in grouped list views.

Part of task 1915702

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
2019-04-02 11:55:57 +00:00
Aaron Bohy 55676110c8 [IMP] web: list: import attrs
The 'import' attrs is valid according to the rng definition of the
list view. It is used in a few views in Odoo. However, it didn't
actually work (in most cases, it worked by chance because it is
set to "0" in addition to create="0", and create="0" already
disables the import feature).

With this ref, the 'import' attrs is taken into account and we
can now disable the import feature even if the create one is
enabled. Moreover, it is now documented.
2019-04-02 11:55:57 +00:00
Aaron Bohy 7024f8d58b [REF] base,account: list: remove deprecated attrs
The 'toolbar' attribute is not referenced in the documentation, and
it has no effect since at least v10.

The 'on_write' attribute was referenced in the documentation, but
is no longer used in Odoo and has no effect since at least v11.

The 'colors' and 'fonts' attributes are deprecated since v9, and
have no effect since v10.

The 'string' attribute is deprecated since v8 and has no effect
since v9. However, it is widely used in Odoo, so we must remove
all occurrences before removing it from the rng.
2019-04-02 11:55:57 +00:00
Julien Castiaux aa18cac547 [FIX] website_blog: invalid bootstrap id
- Go to Website.
- Open a Blog
- Try to open the Archives Tree an the right site
  (set 'Cuszomize Settings / Archives')
- The tree doesn't open

In Bootstrap 4, and HTML id attribute must start with a letter.

opw-1959770

closes odoo/odoo#32244

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-29 13:13:50 +00:00
Martin Trigaux c9d01b136f [ADD] test_translation_import: add new test
This test also fails before the module extraction commit as the code
translations like the one for 'Ijkl' have no 'module' value during the reimport
and are ignored by the following search

closes odoo/odoo#32022

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-29 14:50:56 +00:00
Martin TrigauxandRaphael Collet 257ccdf83c [FIX] tools: extract module from po file
When a single po file is processed (i.e. direct po import, not read from a i18n
directory inside a module), there was no module information on code translations

The module information is important for web translations where the list of
modules is given in the call to the route '/website/translations' and
'/web/webclient/translations' and only the web translations of these specific
modules is retrieved and used.

To manually import the translations of a custom module (e.g. openerp_enterprise),
the base.language.import wizard is typically used and the give .po file is
directly imported.
For model and model_terms, the module information is easily deducted from the
the record external id (<module>.<reference>) but for code translation, we
relied on the global variable module_name.

The .po file do contain the module information but this information was ignored.
Real example:

  #. module: openerp_enterprise
  #. openerp-web
  #: code:addons/openerp_enterprise/static/src/js/odoo_enterprise_start_trial.js:249
  #, python-format
  msgid "Please choose your domain name"
  msgstr "Veuillez choisir votre nom de domaine"

Before this commit, the above translation was imported without the module and
was not retrieved in the '/website/translations' call on the /trial page

The global module_name is still used when set for backward compatibility.

Co-authored-by: Raphael Collet <rco@odoo.com>
2019-03-29 14:48:57 +00:00
Martin Trigaux 76264db40b [FIX] project: remove old hack
This code was to be removed in saas-7 (which went the way of the dodo)
project_time_mode_id is now only on hr_timesheet

This was creating an ir.model.data entry with res_id=0 (not record found).
A ir.model.data without id triggers a warning in the trans_generate method when
trying to export the translations of the module project (where the reference
fails to be resolved)
2019-03-29 14:48:57 +00:00
Christophe Simonis 82f8c37f69 [MERGE] forward port branch saas-11.3 up to ec29b4d364 2019-03-29 16:10:42 +01:00
Nicolas Lempereur f2c301557d [FIX] website: "Visits" no overlap "active users" in dashboard
The current style on "Active users: {number}" placed it 60 pixels over
were it should be, so this was:

- overlapping "Visits" title
- not sparing vertical size (since we use "position:relative")

opw-1961605
closes #32245

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-29 12:53:12 +00:00
Nans Lefebvre 6b9b9d8997 [FIX] base_geolocalize: raise a helpful error to configure the Google account
Google maps used to be free, but became a paid API.
Technically, the usage could be part of the free offer,
but to benefit from it the account needs to have billing enabled.
Since it's a paid feature security had to be ramped up,
so now APIs have to be explicitly enabled (here geolocating/geocoding).
All this makes it so that the Google account has to be properly configured
before the calls to the Maps API can work.
As a result we add an explicit UserError if the request fails,
to help the user configure the Google account
(before the error was entirely hidden as to give the user no chance at all).

Also exports transaltions, including for commit e6ca846c65
which raised a similar error message if no API key was found.

opw 1946485
opw 1947292
opw 1947337

closes odoo/odoo#32162

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-29 11:33:00 +00:00
Martin Trigaux 89347f451b [FIX] im_livechat: do not rename module description
mail.channel module in mail module has the description "Discussion Channel"
(with a capital C) and was overriden in im_livechat to "Discussion channel"
(with a lowercase c).
Installing a module was renaming a field (which is never a good idea, especially
for translated fields)

closes odoo/odoo#32238

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-29 10:39:27 +00:00
Martin Trigaux 0f6038e777 [I18N] *: export 12.0 source terms
Some changes were not reflected in 12.0.
Changes made in .pot in previous versions were not forward ported

Closes odoo/odoo#32238
2019-03-29 10:39:17 +00:00
Martin Trigaux 14f893752a [I18N] *: export 11.0 source terms
Some were missing or lost during forward port

Fixes odoo/odoo#32217

closes odoo/odoo#32232

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-29 09:13:25 +00:00
Christophe Simonis ec29b4d364 [MERGE] forward port branch 11.0 up to 4231103cc9 2019-03-28 18:17:20 +01:00
Christophe Simonis 4231103cc9 [MERGE] forward port branch saas-15 up to 23650d5217 2019-03-28 16:54:21 +01:00
Christophe Simonis 23650d5217 [MERGE] forward port branch saas-14 up to 7dd2a642ed 2019-03-28 16:53:18 +01:00
Christophe Simonis 7dd2a642ed [MERGE] forward port branch 10.0 up to 14a8148e8d 2019-03-28 16:52:53 +01:00
Christophe Simonis 14a8148e8d [FIX] hw_escpos: define used variable
Oversight of #32079
2019-03-28 16:50:16 +01:00
Christophe Simonis a039d657e4 [MERGE] forward port branch saas-15 up to 6b54bd88a9 2019-03-28 16:05:06 +01:00
Christophe Simonis 6b54bd88a9 [MERGE] forward port branch saas-14 up to 78f01e3609 2019-03-28 15:46:55 +01:00
Christophe Simonis 78f01e3609 [MERGE] forward port branch 10.0 up to 6814f27bbc 2019-03-28 15:46:04 +01:00