Commit Graph
134153 Commits
Author SHA1 Message Date
Nicolas Martinelli 609e948739 [FIX] payment: False in reference
- Activate a payment provider (e.g. Stripe)
- As an unconnected user, visit
  website_payment/pay?reference=MY_REF&amount=1337&acquirer_id=ACQUIRER
- Pay

After payment, the user is redirected to the `website_payment/confirm`
page. However, the generated reference contains `False`, which is
confusing.

This happens because the route is generated with the `False` string,
which is used later on in the computation reference.

We fix the URL generation by not adding the partner if it is not set.

opw-2201289

closes odoo/odoo#46277

X-original-commit: 7c5f5958a4ef20ac67ad6c87c3ea0c94b858a74b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-25 16:16:10 +00:00
Siddarth Gajjar 8b88f743b7 [ADD] doc: gantt view cell_create attribute.
closes odoo/odoo#46205

Related: odoo/enterprise#6327
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-02-25 12:22:20 +00:00
Rémy Baranx (bar) 51b70b6fc4 [FIX] sale_timesheet_purchase: move_id.type has been renamed as move_id.move_type
The 'type' field in the 'account.move' model has been recently renamed to 'move_type'.

This bug fix consists in using the new field name in the search call.

closes odoo/odoo#45935

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-21 10:40:34 +00:00
Mathieu Duckerts-Antoine 743d551331 [FIX] web: Regroup and order date groupby options
A previous commit makes the graph view render only the finer interval
option for each date/datetime field.
The fact is that in the control panel, different options can be selected
in any order along with other groupbys. This can lead to situations like

'Foo > Date: Day > Bar > Date: Month'

and becomes unreadable.
For that reason we choose to regroup and order options. For the previous
situation, this leads to the following global groupby

'Foo > Date: Month > Date: Day > Bar'.

Our choice also make more sense in a list view for instance.

Task ID: 2198846

closes odoo/odoo#46269

X-original-commit: 59afc869233165e21ef94f485b91d33ac4543b24
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-25 15:30:06 +00:00
Mathieu Duckerts-Antoine c7851add36 [FIX] web: graph renders only finer date groupby option
Rendering a graph view with several options selected for a given
date groupby can take too much time and block the page.
Since grouping on the same date/datetime field several times
barely makes sense in a graph view, we choose to use only the finer
option, e.g. 'week' is prefered to 'quarter'.

Task ID: 2198846

X-original-commit: 7e36bee14e18ca17e15de1bacb7ff26010d0b372
2020-02-25 15:30:04 +00:00
aab-odoo a39cc6bc00 [FIX] web: grouped list with pager: reset offset on search
Have a grouped list view with enough groups to have several pages.
Go to the second page, and toggle a filter s.t. it only remains a
single page of groups.

Before this commit, no group is displayed (like if there was no
record matching the domain), whereas it should display groups of
page 1. The issue occurs because we didn't reset the group offset
to 0, like we do for the regular offset.

Bug reported in the v13 migration pad.

closes odoo/odoo#46257

X-original-commit: c6a4123b25e884495c5c44287d4d9fed061eeaa4
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-25 14:15:32 +00:00
Nicolas Lempereur 36d4ff5c4c [FIX] website_form: binary work with website_crm_phone_validation
With this change, a binary field in a website form works when
website_crm_phone_validation (website_crm in 13.0) is installed.

The module website_crm_phone_validation would call `extract_data` method
to do some things, but when extract_data was called a second time to
really save data, the FileStorage werkzeug object would already consumed
and files would erroneously appear as empty.

opw-2191873

closes odoo/odoo#46241

X-original-commit: a168fe23cc6d9b817b44c189822952a1ee98d81d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-02-25 13:19:39 +00:00
Alexandre Kühn 5da3454499 [FIX] im_livechat: pin "chat" channels on message post
Revision on https://github.com/odoo/odoo/commit/abeb75ae6006b50dace9397db35c08c90f6cc568

Commit above fixed an issue where livechat channels were not pinned
on the UI after page refresh. To do so, it marked channels of type
"chat" and "livechat" as chat channels.

However, this failed marking channels of type "chat" as chat
channels, because it mistakenly unset these channels while
processing livechat channels. As a result, chat channels were not
marked as pinned, resulting in this channel not being visible in
the interface.

Steps to reproduce:

1. Connect as Admin.
2. Have unpinned conversation with Demo.
3. Receive a new private message from Demo.
4. Refresh page
=> the conversation is not visible in Discuss app or in systray
   messaging menu.

This commit fixes the issue by not overriding channels that have not
been marked as `is_chat`. This way, channels of type "chat" and
"livechat" are correctly considered as chat channels.

closes odoo/odoo#46266

X-original-commit: 72a9498ac93d15767f221e3db9b94f38f1c2e8b5
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-02-25 14:50:22 +00:00
Alexandre Kühn 86fd7ab4f0 [FIX] mail: improve discuss new channel handling in mobile
Revision on https://github.com/odoo/odoo/commit/8e5b6ab02aa95c204ea7bd241e6b8944d5972d43

Intent of commit above was to remove server-side synchronization of
chat windows in mobile. To do so, it prevented sending RPCs for chat
window state in mobile, in addition to not automatically adapt state
of chat windows in mobile from longpolling notification.

This implementation, while functionally working as intended, had
disturbing intermediate logic that could potentially lead to bugs
in the future. Specifically, on mobile, new channel did not directly
trigger a re-render of discuss widgets. However, and thankfully, the
related new message was triggering the rendering, so that UI
correctly has channel and its notification.

This commit simply improves code so that new channel always triggers
a rendering, even in mobile, like before the commit above. Of course,
to preserve the intent of not synchronizing chat windows in mobile,
new detached channels must still not auto-open a chat window, and
this commit clarifies this intended behaviour in the code.

X-original-commit: 1046d063ca46aacb1e186599b5d4a02ef9c8e18d
2020-02-25 14:50:21 +00:00
Yoshi Tashiro 06d842d31f [IMP] base: use unnaccent Japanese prefectures
Very few people in Japan know how to type accented characters, which
brings a usability issue when the Japanese prefectures are defined
with accented characters.

closes odoo/odoo#46258

X-original-commit: db4ea065fee3e0344a65d2386799ffa6e7e47abc
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-25 14:16:20 +00:00
lejeune quentin a85032bcc8 [IMP] point_of_sale: New version for IoTBox 20.02
We release a new version of IoT Box 20.02
With new version of Raspbian

closes odoo/odoo#46256

X-original-commit: d58151c37c6e464c42a73171a0b5b3834f9b4d10
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-02-25 14:12:05 +00:00
lejeune quentin 17c181ac74 [FIX] hw_drievrs: Replace SSID on the first boot
We replace the SSID of the IoTBox with a unique SSID

closes odoo/odoo#46255

X-original-commit: c847c1cb149e386331ff2e5b19a58862e1b66714
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-02-25 14:08:49 +00:00
Thibault Delavallée 965eef99d8 [FIX] mail: make followers computation compatible with postgresql < 10
Follow up of be06eb47bdf8b5f2cc281e3986818faf59e3a616 . Even if postgresql < 10.0 is not officially
supported this fix allows to keep compatibility with older postgresql.

closes odoo/odoo#46243

X-original-commit: 7e218be37cf0bc2c2c4fd4284b93ba99de679692
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-25 13:24:23 +00:00
Toufik Ben Jaa f9f5531f3f [FIX] sale: speed-up invoice creation
- At invoice creation, the stored fields that depends on `invoice_lines`
    are computed to be stored.
    This can slow down the invoice creation for a database with a lot of
    records on `account_move`.

    This commit speed-up the invoice creation by using SQL Joins to
    speed-up the searches.
    We cannot use `auto_join` on the `invoice_lines` field since it is
    not supported on many2many, thus we do it in SQL.

closes odoo/odoo#46233

X-original-commit: b39e17c464775564faa7d0f10e675d47fa026234
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-02-25 13:09:25 +00:00
Sébastien Theys 6bb0963b6a [IMP] core: optimize read() by avoiding useless query
When the `select` returns nothing more than ids that are already known, there is
no need to make it at all.

This removes one query from `_read` every time it has to fetch only fields that
are stored in a different table (o2m, ...), which happens all the time when
reading a stored field first (triggering prefetch) and then reading a o2m.

The query that is now removed was used to check access rules, but the trick is
to use `check_access_rule` to verify the rules in python instead.

Part of task-2061122

closes odoo/odoo#36263

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-02-25 13:46:10 +00:00
Sébastien Theys 93f10cb629 [IMP] test_mail, test_mass_mailing: adapt query count
To see impact of following commit.
2020-02-25 13:02:46 +00:00
Denis Ledoux c5b9bccf6b [FIX] doc: api.model no longer accept traditional style call
Since we dropped the old-api style compatibility layer,
some years ago.

This docstring was added to the 13.0 documentation
thanks to odoo/odoo#44838
So it's best not to mention this old-api style
in our latest documentation

closes odoo/odoo#46223

X-original-commit: 63691c78006fbf7077eb13f3045be21a18bbe753
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-02-25 12:06:06 +00:00
lejeune quentin 1dfda363a9 [FIX] doc: For IoT add reference for longpolling
Add details in IoT for the release of a event with the longpolling

closes odoo/odoo#46215

X-original-commit: 0ce8ab484d03ea2fdb318a7427fc20c0028bb964
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-02-25 11:26:07 +00:00
Rémy Voet (ryv)andVictor Feyens 182604178c [REM] stock: remove unused action
- Since 096f8c56b7 , action with
id='act_product_stock_move_open' is unused.
- Since f23cc14d13 , action with
id='action_receipt_picking_move' is unused.
- Since 88b000859f , action with
id='product_template_open_quants' is unused.
- Since v10, the action with
id='stock_picking_to_batch_action' is unused.

closes odoo/odoo#45270

Related: odoo/upgrade#840
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Co-authored-by: Victor Feyens <vfe@odoo.com>
2020-02-25 07:48:16 +00:00
Rémy Voet (ryv)andVictor Feyens 2d623375d6 [REM] purchase(_stock): remove unused action
- Since 2c5022b4f3 , the action with
id:'purchase_order_action_generic' was unused.
- Since 7743af00bf , the action with
id='purchase_open_picking' was unused.

Co-authored-by: Victor Feyens <vfe@odoo.com>
2020-02-25 07:48:16 +00:00
Rémy Voet (ryv)andVictor Feyens 7edf495235 [REM] mrp: remove unused actions
- Since 5118d248cc , the action with
id='act_product_mrp_production' was unused.
- Since 85a3e1e385 , the action with
id='action_mrp_unbuild_move_line' was renamed due to duplicate ids
(with action_mrp_unbuild_moves), then remove it (unused) and move
the helper message to the original one.
- Since 81577bf24e , the action with
id='mrp_workcenter_productivity_loss_action' is unused because
the commit remove the menu item using this action
- Since it was integred, the action with
id='mrp_workorder_delta_report' was unused, then remove it.

Co-authored-by: Victor Feyens <vfe@odoo.com>
2020-02-25 07:48:16 +00:00
Rémy Voet (ryv)andVictor Feyens 5337455c46 [REM] repair: remove unused repair.cancel wizard
Since 653d63153e,
the repair.cancel (before mrp.repair.cancel) is unused and the
dedicated code of cancelling is in the repair.order model.

Co-authored-by: Victor Feyens <vfe@odoo.com>
2020-02-25 07:48:16 +00:00
Atchuthan Ubendran 40c2a124a1 [FIX] payment_authorize: change order of keys
- Select 'capture manually' in Authorize.net Payment acquirer
- Do an online transaction
- Click on the Capture button at Payment transaction windows.

An error message is returned:

The element 'transactionRequest' in namespace
'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element
'amount' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List
of possible elements expected: 'splitTenderId, order, lineItems...'.

This because the keys `amount` and `refTransId` are inverted in
`createTransactionRequest`:

https://developer.authorize.net/api/reference/index.html#payment-transactions-capture-a-previously-authorized-amount

A simple fix is to swtich them. Indeed, the Odoo 13.0 requirements is
Python 3.6+, in which the keys order at iteration is the insertion
order. Although this was officially part of the specification in 3.7,
the change is already available in 3.6.

Closes #45891
opw-2201667

closes odoo/odoo#46206

X-original-commit: ae3885295795f8c150bd40af266004016fd300c5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-25 10:34:36 +00:00
Nicolas Lempereur 1bcab2f42e [FIX] website_form: binary field do not need _filename
When a binary field is added to studio, the system will try to write the
name to {binary_field_name}_filename: this works if the field was
created with studio but could not work eg. if just a binary field is
created manually.

opw-2191873
closes #45994

closes odoo/odoo#46164

X-original-commit: 13b65d878d5240f07b279045e30d53915d176a61
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-02-24 19:40:58 +00:00
Thibault Francois c78bfb1da9 [FIX] account_payment: send amount in right currency
While sending payment request to acquirer
the amount used was the amout_residual_signed

This amound is in the currency of the company
and may be negative.

The currency send to the acquirer is the
currency on the invoice so you expect the
amount to be in the same currency and
being positive

amount_residual is exactly that amount

Solution: user amount_residual
          instead of amount_residual_signed

closes odoo/odoo#46082

X-original-commit: 1d1d5e27b4ad9f5ecbca60d8dacd4620d25dda99
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-24 11:50:06 +00:00
Guewen Baconnier 70b207fe32 [FIX] stock: sync only 'active' to sublocations on (un)archive
When a write on the active field is done, we only want to synchronize
this value to the locations downward.

Steps to reproduce the issue:

Import this file to update Stock Locations on a fresh runbot instance:

  id,name,location_id,usage,active,comment
  stock.stock_location_stock,STOCK,WH,internal,1,comment STOCK

Expected:

* The location "Stock" is renamed to STOCK with a comment: "comment
  STOCK".

Before the correction:

* The location "Stock" is renamed to STOCK with a comment: "comment
  STOCK".
* All the children locations of "Stock" are renamed to STOCK with the
  same comment

closes odoo/odoo#46188

Opw: 2188690
X-original-commit: 02e7558b221461545ad881319433607b2ac4334c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-25 08:59:34 +00:00
Nicolas Martinelli fdf95cf0d2 [FIX] stock: do not include service in picking
- Create a kit which contains a stockable product and a service
- Create a SO with the kit, validate

The service is included in the picking, while it shouldn't be.

The procurements only make sense for for consumable and stockable
products. Therefore, we do not run procurements for services.

opw-2201923

closes odoo/odoo#46175

X-original-commit: 30387a1a6e90adf760146591809ad141ff645187
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-25 08:19:31 +00:00
jerome hanke (jhk) 089447517c [FIX] web_tour: rtl tooltips are aligned properly
Steps to reproduce:
- install sales
- install any rtl language and set your user language to it
- go to sales

this.info.position can have any of the 4 values 'bottom', 'top',
'right' and 'left'. It only needs to be reverted in rtl if it's left
or right.

Previous behavior:
tooltip is not positionned properly and covers the create button

Current behavior:
toolips align the way they are supposed to

opw-2193479

closes odoo/odoo#46156

X-original-commit: c75595bd8f2b44197a4a0751bd8622916ea5ef8c
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-02-24 17:34:06 +00:00
Jorge Pinna Puissant d4aa362512 [FIX] point_of_sale: long product name print receipt in safari
Fine-tunning of 263131f49828d2d8f2177bae15d0af84af341c37

Before this commit, when printing in safari a receipt that contains
products with long names, parts of the name were overlapped. This occurs
because, in safari, the library that transforms the html into text
mismanages the spaces.

Now, the name is printed correctly in safari, same behaviour than the
others browsers.

opw-2169656

closes odoo/odoo#45794

X-original-commit: 9e4ab0da0e84b2b792659477e3520f7847d51aac
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-02-25 08:16:01 +00:00
Lucas Perais (lpe) 9256492f10 [FIX] qweb2: ignore comments between branching directives
Have a template of that form:
```xml
<t t-if=""/>
<!-- Comment -->
<t t-elif=""/>
```

Before this commit, both python and JS crashed because any type of node
between branching directive was forbidden

After this commit, Comments are just ignored and removed, while actual
template nodes are still forbidden between branching directives
There is no crash anymore

closes odoo/odoo#45899

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-02-24 15:32:19 +00:00
William Henrotin 0e77b3d16a [IMP] stock: set index on stock_move_line.picking_id
This commit set an index on column `picking_id` of table
`stock_move_line`. Many sql requests on stock_move_line
have picking_id in their where-clause.

On a database filled with 1M pickings, reading a picking of 10
stock_move_lines is 60 times faster.

Closes https://github.com/odoo/odoo/issues/44623

closes odoo/odoo#46153

X-original-commit: a36a693733579e1e8bdaa3aa00fcc482c6299acf
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-02-24 16:55:02 +00:00
lejeune quentin fff277a4a7 [FIX] hw_drivers: Do not send request if the IoT is in access point
If IoT Box is in access point mode and a server is configured
the box try to reach the server.
But in access point mode all requests are redirected to the box

So now before return True in function 'get_odoo_server_url'
we verify if the service 'hostapd' is inactive

closes odoo/odoo#46141

X-original-commit: 365f0e384630bad16e0872d2307702fca5a4e295
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-02-24 16:03:12 +00:00
Toufik Ben Jaa 1744878573 [FIX] base: access rights issue on users form
- The form view on `res.users` displays information about
    how many record rules, ACL and groups are applied to the users.

    In some cases the current users may not have the required
    access rights to compute those values.
    To fix this issue, the computed fields are now computed
    in `compute_sudo` mode

closes odoo/odoo#46149

X-original-commit: 653f81f49ba4d92648eb04209cdbe73894dfac08
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-02-24 16:39:26 +00:00
Robin Heinz 19e7707f70 [FIX] iot: make PoS use an IoT Blackbox driver
Remove the community Blackbox Driver
Small changes to make it possible to use the Blackbox IoT driver with the PoS.

closes odoo/odoo#46135

X-original-commit: 8e48a0d5d4586729eb22ac8b6abc0fdc74771b78
Related: odoo/enterprise#8714
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-02-24 15:22:40 +00:00
Raphael Collet dfab454732 [IMP] fields: inherited field on new record are set on parent records
This makes the behavior of `onchange()` consistent in the case of
inherited models (with `_inherits`).

closes odoo/odoo#45910

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-24 15:52:32 +00:00
Romain Derie 4206c1f225 [FIX] website: don't load ir.ui.menu in frontend until needed
Before this commit:
When logged in and navigating on a frontend page, the accessible `ir.ui.menu`
would be loaded in qcontext.
Loading those menus performs alot of SQL request, up to ~2.000 requests on big
databases such as Odoo.com for an user with a lot of access rights.
This is not a problem on low traffic website as this is ORM cached, but when
there is a lot of traffic, the cache is clear very often, thus this code only
is adding a lot of requests for no reason most of the time as the user is just
navigating without any intention of opening the application menu.

Note that this qcontext computation in frontend was pointless in enterprise as
the applications menu in frontend redirect to the backend without using it.

This commit removes that computation from the qcontext. The menus will be
computed and loaded only when the user really needs it, when he is about to
open the application menu.

closes odoo/odoo#46127

X-original-commit: 471ddf85ce619961e46fb281bf721968ff298d3b
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-24 15:43:32 +00:00
Romain Derie 6898fec5a6 [FIX] website_forum: set website_id when created from frontend
Every records created from frontend should have the website_id set to the
current website.
Most was done with 066cfc9598, but forum was missing it.

Fixes #45749

closes odoo/odoo#46126

X-original-commit: 08540d7853d497e326182e822b359cd6fcb05d59
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-24 14:44:58 +00:00
qho 64460c38ac [FIX] hr: quick user creation and assign user to employee
When creating a new user on-the-fly on the employee detail page (HR Settings/Related User), if the employee is never linked with a user before, the new created user will not be linked with the employee automatically and we have to select the user again.

With this commit, the new created user will be linked with the employee automatically.

Fixes #44442

closes odoo/odoo#46125

X-original-commit: 136c0dbea0ab00ff27daac69c27dc0824a16ff70
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-24 14:44:37 +00:00
Barad Mahendra b13cee7989 [FIX] crm_iap_lead,project: Fix invalid client-side domain
Since the commit https://github.com/odoo/odoo/commit/e95ccf0908c263f6cf23c91c477a8e252e936ff1
invalid client-side domain will raise the error

so fix the incorrect domain in attrs.

Taskid:2196805

closes odoo/odoo#46116

Closes: #45680
X-original-commit: 4279a6bdd4041ff643c3ff5c55f55c93cf4f774f
Related: odoo/enterprise#8708
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-24 14:05:34 +00:00
lejeune quentin 7e806e47af [FIX] point_of_sale: Reboot IoT after upgrade
For a upgrade the IoT Box perform a "git reset hard"
And after we restart odoo.
But it is not enough and we need to reboot the IoT Box

closes odoo/odoo#46119

X-original-commit: c20a17bf33f13543a331d557d65c5e6f196d46e4
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-02-24 14:10:43 +00:00
Nicolas Martinelli e5b9f5e63e [FIX] mrp_subcontracting: multi-step receipt
- Activate the multi-step reception
- Create a Subcontracting BOM for product P and supplier S.
- Create a PO for S with P
- Validate the PO
- Validate the input transfer
- Validate the internal transfer

A error is raised because a mandatory field is not set.

The root cause comes from the INT move being flagged as a subcontract
move, while it shouldn't be. Indeed, only the input move should be
flagged as subcontract.

We force the `is_subcontract` value to `False` when a move is copied in
the context of a stock rule.

opw-2193009
opw-2202727

closes odoo/odoo#46115

X-original-commit: 8795e0f3d4301710a089d263395633759eae76b7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-24 13:59:23 +00:00
Simon Lejeune 9104424186 [FIX] stock: move line: create batch
related to 896e36edab

Fixes #41813

closes odoo/odoo#46114

X-original-commit: e75bc034f121fd3790ebe11bb1b579e000912d2a
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-24 13:58:10 +00:00
Nicolas Lempereur 78545ce0ed [FIX] web: digits option for aggregate is taken into account
If you have a currency with 3 decimals, when you show a list view
grouped, you might have result like:

[group partner 1 : amount : 4.4€]
-                  amount : 1.11€
-                  amount : 3.33€

which is a little odd, it is not that odd since the groupings are an
approximation (eg. you could have a line in EUR and a line in USD and
the grouping value would be the sum of both line).

But there is no way to specify another precision, and since this is a
grouping it could be of line of different currencies so we can't use the
lines currency to decide.

With this changeset, having for example:

<field name="amount" digits="[69,3]"/>

with `digits` attribute is taken into account for the aggregate value
and it would be displayed with 3 decimals.

Without the fix, the added test fails with:

    aggregates monetary use digits attribute if available
    Expected: "2000.000", Result: "2000.00"

opw-2195042
closes #45545

closes odoo/odoo#46094

X-original-commit: 4dd293c71851d0c6e9ffe09402cf54cfe889f402
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-02-24 12:46:46 +00:00
Goffin Simon fd0937bdc7 [FIX] mrp: Quantities of components on MO
Steps to reproduce the bug:

- Install Manufacturing
- Go to General Settings/Inventory and tick Units of Measure
- Create a product P (storable) with UOM kg
- Create a Bill of Material for this product: e.g. 1 kg
- Add a component C with UOM "kg", but in the BOM uses "g"
- Create a MO for P, Mark as todo, Produce
- Click on C to change the quantities (e.g. change the first line to 900 g)
- Add a second line with 0.1 kg (as the uom of C is in kg, you are forced to set in kg)

Bug:
The strict consumption check is raised. It happens because the
lines quantity done are not correctly converted in the same
UoM

opw:2181892

closes odoo/odoo#46103

X-original-commit: e385930f8687fc4051ddd375fe0551dba59a8750
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-02-24 13:18:26 +00:00
Krunal Trivedi eb1207a705 [IMP] project: Allow to use kanban example stages in particular project
Purpose of the task is allow to use a example stages in real project.

Added a button 'Use this for my project' in modal dialog of project
stages examples, by clicking the button, user can directly use stages
of an example in his project. if some stages already exists in project
then new stages will be added next to existing stages.

NB: The stage will be created in user's language. user have to manually add
transalation for en_US.

Taskid-2179536

closes odoo/odoo#44562

Closes: #44562
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-18 10:26:43 +00:00
Simon Lejeune e9d3047ba2 [FIX] stock: write on warehouse name
fixes #19696

closes odoo/odoo#46093

X-original-commit: d4d012f693d3c177c782623bb1b460fa1a81d6eb
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-24 12:36:31 +00:00
koz-odoo 9c4b75f8a0 [IMP] hr_holidays: Close the leave dialog on click of save
Currently when click on "NEW TIME OFF REQUESTS" from the dashboard,
popup with save and discard buttons visible,
after create/save new time off request, the dialog is not closed.
the dialog is still there with footer buttons "Edit" & "Create".

After this commit, The dialog will be cloased when user click on save button.
Creted new form view because previous form view is used at other
place so we can not add buttons directly on that view.

closes odoo/odoo#45137

Task-id: 2183096
Closes: #45137
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-20 05:35:14 +00:00
Prakash Prajapati da591f5c6c [IMP] hr: Default employee gender should be null rather than male
Purpose of the task is, when creating a new employee, the default
gender should be empty.

closes odoo/odoo#42843

Taskid: 2165484
Closes: #42843
Related: odoo/enterprise#7648
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-12 09:57:58 +00:00
Ankita Raval 6e8e468e61 [FIX] stock_sms : Modify SMS confirmation settings name
Before Commit:
-The SMS confirmation settings doesn't have the right name.

After Commit:
-We change the field string 'SMS Validation with stock move'
to 'SMS Validation'.

closes odoo/odoo#46085

Task-id: 2185325
X-original-commit: d5edd512c128844598af4acedda57d75bf4d33d7
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-24 11:53:11 +00:00
Swapnesh Shah 8f703cb050 [FIX] website_slides: reset public views when duplicating
Followup on 82ce815a8c . When content (`slide.slide`) is
duplicated, public_views should not be copied. Indeed it gives a new slide
and it makes no sense to keep the old slide statistics.

closes odoo/odoo#46084

X-original-commit: a2f5f8b552b48483ce5fdf0be04da7c27b326f2e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-24 11:52:00 +00:00