- 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
closesodoo/odoo#46277
X-original-commit: 7c5f5958a4ef20ac67ad6c87c3ea0c94b858a74b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
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.
closesodoo/odoo#45935
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
closesodoo/odoo#46269
X-original-commit: 59afc869233165e21ef94f485b91d33ac4543b24
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
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.
closesodoo/odoo#46257
X-original-commit: c6a4123b25e884495c5c44287d4d9fed061eeaa4
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
closesodoo/odoo#46241
X-original-commit: a168fe23cc6d9b817b44c189822952a1ee98d81d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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.
closesodoo/odoo#46266
X-original-commit: 72a9498ac93d15767f221e3db9b94f38f1c2e8b5
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
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.
closesodoo/odoo#46258
X-original-commit: db4ea065fee3e0344a65d2386799ffa6e7e47abc
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
We release a new version of IoT Box 20.02
With new version of Raspbian
closesodoo/odoo#46256
X-original-commit: d58151c37c6e464c42a73171a0b5b3834f9b4d10
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
We replace the SSID of the IoTBox with a unique SSID
closesodoo/odoo#46255
X-original-commit: c847c1cb149e386331ff2e5b19a58862e1b66714
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Follow up of be06eb47bdf8b5f2cc281e3986818faf59e3a616 . Even if postgresql < 10.0 is not officially
supported this fix allows to keep compatibility with older postgresql.
closesodoo/odoo#46243
X-original-commit: 7e218be37cf0bc2c2c4fd4284b93ba99de679692
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- 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.
closesodoo/odoo#46233
X-original-commit: b39e17c464775564faa7d0f10e675d47fa026234
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
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
closesodoo/odoo#36263
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#46223
X-original-commit: 63691c78006fbf7077eb13f3045be21a18bbe753
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Add details in IoT for the release of a event with the longpolling
closesodoo/odoo#46215
X-original-commit: 0ce8ab484d03ea2fdb318a7427fc20c0028bb964
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
- 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.
closesodoo/odoo#45270
Related: odoo/upgrade#840
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Co-authored-by: Victor Feyens <vfe@odoo.com>
- 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>
- 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>
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>
- 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
closesodoo/odoo#46206
X-original-commit: ae3885295795f8c150bd40af266004016fd300c5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
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#45994closesodoo/odoo#46164
X-original-commit: 13b65d878d5240f07b279045e30d53915d176a61
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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
closesodoo/odoo#46082
X-original-commit: 1d1d5e27b4ad9f5ecbca60d8dacd4620d25dda99
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
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
closesodoo/odoo#46188
Opw: 2188690
X-original-commit: 02e7558b221461545ad881319433607b2ac4334c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- 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
closesodoo/odoo#46175
X-original-commit: 30387a1a6e90adf760146591809ad141ff645187
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
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
closesodoo/odoo#46156
X-original-commit: c75595bd8f2b44197a4a0751bd8622916ea5ef8c
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
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
closesodoo/odoo#45794
X-original-commit: 9e4ab0da0e84b2b792659477e3520f7847d51aac
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
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
closesodoo/odoo#45899
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
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/44623closesodoo/odoo#46153
X-original-commit: a36a693733579e1e8bdaa3aa00fcc482c6299acf
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
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
closesodoo/odoo#46141
X-original-commit: 365f0e384630bad16e0872d2307702fca5a4e295
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
- 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
closesodoo/odoo#46149
X-original-commit: 653f81f49ba4d92648eb04209cdbe73894dfac08
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Remove the community Blackbox Driver
Small changes to make it possible to use the Blackbox IoT driver with the PoS.
closesodoo/odoo#46135
X-original-commit: 8e48a0d5d4586729eb22ac8b6abc0fdc74771b78
Related: odoo/enterprise#8714
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
This makes the behavior of `onchange()` consistent in the case of
inherited models (with `_inherits`).
closesodoo/odoo#45910
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
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.
closesodoo/odoo#46127
X-original-commit: 471ddf85ce619961e46fb281bf721968ff298d3b
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
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#45749closesodoo/odoo#46126
X-original-commit: 08540d7853d497e326182e822b359cd6fcb05d59
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
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#44442closesodoo/odoo#46125
X-original-commit: 136c0dbea0ab00ff27daac69c27dc0824a16ff70
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
closesodoo/odoo#46119
X-original-commit: c20a17bf33f13543a331d557d65c5e6f196d46e4
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
- 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
closesodoo/odoo#46115
X-original-commit: 8795e0f3d4301710a089d263395633759eae76b7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
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#45545closesodoo/odoo#46094
X-original-commit: 4dd293c71851d0c6e9ffe09402cf54cfe889f402
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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
closesodoo/odoo#46103
X-original-commit: e385930f8687fc4051ddd375fe0551dba59a8750
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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>
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>
Purpose of the task is, when creating a new employee, the default
gender should be empty.
closes odoo/odoo#42843
Taskid: 2165484Closes: #42843
Related: odoo/enterprise#7648
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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'.
closesodoo/odoo#46085
Task-id: 2185325
X-original-commit: d5edd512c128844598af4acedda57d75bf4d33d7
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
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.
closesodoo/odoo#46084
X-original-commit: a2f5f8b552b48483ce5fdf0be04da7c27b326f2e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>