Prior to owl, dom changes is normally performed by removing an element in the
dom and replacing it with new one. This is not a problem for the tour service
even if the used mutation observer is only observing attributes and childList
changes.
However, using owl is now a different story because it can change even just a
text of a node when rendering. If after a step this is the only change that
happened in the dom and you are expecting in the next step that the text has
changed, then the tour fails in that next step, but you are given a screenshot
containing the value you are expecting in the failed step. This is a false
negative.
It means that observing only classList and attributes changes in the dom is
not enough, and it is now necessary to observe characterData changes in order
to avoid the false negatives in tour tests.
This change is expected to incur performance tradeoff so the delay in calling
the mutation callback is increased from 500 to 750ms.
closesodoo/odoo#53649
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Create a product P, valuation FIFO automated
- Receive some stock
- Create a SO with 1 unit, validate
- Validate the picking
- Create the invoice, validate
=> the Stock Interim Account (Delivered) entries from the invoice and
the stock move are reconciled
- Return the picking, choose to update the quantity on SO
- Validate
- From the SO, create the invoice (which is a credit note), validate
The Stock Interim Account (Delivered) entries from the credit note and
the returned stock move are not reconciled. Note that both entries are
properly reconciled if the refund is generated directly from the
original invoice.
When retrieving the stock moves linked to the invoice, we always go
through the `refund_invoice_id` field, which is not filled in this
specific case.
The solution is to search from moves directly from the credit note
itself.
opw-2274731
closesodoo/odoo#53610
X-original-commit: 6aa7e843f427df17bc0845c44ab2345cfa93fb77
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
With a user with timezone "Europe/Brussels", add a
slot on the gantt view where the preceding day is a working day.
The default starting time will be the previous day.
Reason: the default starting time is midnight, adjusted to
the closest attendance interval in the employee's calendar.
However, midnight in "Europe/Brussels" is actually 10pm UTC
the previous day.
The method adjusting the datetime to the closest attendance only
checks within the corresponding day.
Two ways to fix this:
1) the business code calling `_adjust_to_calendar` should
timezone the datetimes itself. To avoid similar bugs in the future,
the method should be modified to only accept timezoned datetimes.
2) Change `_adjust_to_calendar` to convert datetimes it was given
to the resource's timezone and consider the dates in those converted
datetimes.
Option 2 is chosen because it seems to take care of the problem at a lower
level which allows the business code to not think about those timezone details.
While this is technically an API change (in a stable release), the method was
introduced recently by b058ca1 as a fix for an already broken method.
closesodoo/odoo#53582
X-original-commit: c6cecac60360a1d8b0c62ee155a818a3a28505e1
Related: odoo/enterprise#11399
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Use case 1:
Arriving in a record
=> The form view is scrolled to the first chatter message
Use case 2:
switch record with the pager
=> The other record is also scrolled to the first message
After this commit, arriving on a record or switching record displays
the top of the form view
task-2238141
PR #53136closesodoo/odoo#53644
X-original-commit: 42605baa5b8ddb94318f5a9d91a489c200469377
Related: odoo/enterprise#11429
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the size of the form view was handled by a media query
It made testing impossible in certain case when the size determined the behavior
of the form view (the chatter)
After this commit, a class is put on the form view to better be able to test
task-2238141
PR #53136
X-original-commit: d42610297b46f4a1624df1907a9cce91de29fafa
Also moved isLog from composer component prop to composer model field.
task-2280159 & task-2250887
closesodoo/odoo#53645
X-original-commit: ba41b1de5edc2b3153a5b20a4f11778a3f724ade
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Performance fix: when parsing domains using special operators
(`child_of`, ...), or with dotted field on the left value
(`['partner_id.name', ...]`), the ORM starts by a first call on
`search()` and builds a new domain so the final query has "IN (<ids
found by sub-search>)".
The sub-search issued on the comodel uses the default "order by".
The order of the ids is irrelevant here, we only need to know the ids.
A good example is when the sub-search happens on `product.product`,
which is ordered by `default_code, name, id`. The field `name` is
inherited and translated, so the ordering requires a JOIN on
`product_template` and a LEFT JOIN on `ir_translation`. Ordering by `id`
avoids these 2 JOINs.
Some discussion took place about modifying `_generate_order_by()` to
remove the `ORDER BY` clause when the `order` argument is False or ''.
Apart the fact that it would be a breaking change, @odony has shown that
sorting by `id` is so cheap that removing the `ORDER BY` might not
bring significant performance boost [0].
[0] https://github.com/odoo/odoo/pull/52368#issuecomment-646643773
opw-2270690
closesodoo/odoo#53629
X-original-commit: fc91f7b4e8f9f8a95862df1ce95a9639cf7d1363
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Steps to reproduce the bug:
- Let's consider two companies C1 and C2
- C1 has the logo L1 and C2 has the logo L2
- Let's consider a user U with C1 and C2 in his allowed companies and C1 as default company
- Log U just in C2
- Go to the point of sale and process an order
Bug:
The logo of C1 was displayed.
opw:2279227
closesodoo/odoo#53625
X-original-commit: 4c95e97ed44c48c7221748987cb3969b2ce9ad13
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
When comparing time ranges in pivot, it makes more sense to display the
previous period before the one being compared. This commit allows that.
Task ID: 2269770
closesodoo/odoo#52746
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
Co-authored-by: Priyanka Kakadiya <pka@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Purpose
=======
Small improvements for the reporting in Project Overview and allow to group by date in Project Costs and Revenues
Specifications
==============
In Project Overview:
- unfold the details of SO by default
- do not display caret if it is not foldable
In Project Costs and Revenues, the date is retrieved for each account_analytic_line and therefore the values are not summed anymore in the SQL request.
Also fix the default filter "Costs and Revenues" that wasn't applied at the opening of the report.
closesodoo/odoo#48172
Related: odoo/enterprise#9415
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In Chrome 84, mixed content will be completely blocked for security
reasons ([see blog](https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html))
Other browsers will probably follow in the next months.
As IoT Boxes don't have a valid certificate before connecting to a DB,
we used mixed passive content to communicate with the boxes.
This won't be possible anymore, and we have no possible way to
communicate directly from the browser to the box.
- When an IoT Box boots without registered DB, a unique code will be
created with a validity of 5 minutes.
- This code will be shown on the customer display and printed on the
status ticket.
- The box will call a route on odoo.com and a record will be created
in odoo.com with the unique code.
- The user will have to enter the code manually in his DB to connect
to the IoT Box, the DB will then contact odoo.com to search for a
record containing the unique code. If it's found, the
`openerp.enterprise.database` will be added to the record.
- The box will then query odoo.com at regular intervals (10 seconds)
to check if a DB is linked to the code.
closesodoo/odoo#53623
Taskid: 2246535
X-original-commit: c55f12e32598a713105f3c049ac053e46ba15bb2
Related: odoo/enterprise#11421
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Add checkboxes to some of the Note module's demo datas
Instead of an old text-only list, take advantage that the notes
contains HTML.
closesodoo/odoo#49368
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
On a re-render, when:
- a field is not yet started (still in willStart because of RPC)
- then an action is executed
we can get a traceback because we try to save the field before it is
started and `this.el` is not set.
eg. in MRP on a work order:
- click on + to get new serial number
=> page is re-rendered with RPC call to update duration to
mrp.workcenter.productivity().search_read to update time
counter
- click on "Record production" before RPC is finished
=> traceback because we try to save `duration` that is not already
started (`this.$el.toggleClass` when `this.$el` is `undefined`)
Without change, added test fails with:
"Cannot read property 'toggleClass' of undefined"
in BasicRenderer.canBeSaved
"Expected 6 assertions, but 5 were run"
Before saas-11.3 5faec34a3c this.el was always set in `init` so this
issue did not happen.
opw-2272117
closes#53532closesodoo/odoo#53612
X-original-commit: befcad51fd236fdaf284f76cea5624d21c070b0e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
We should push the request object on the request stack only in the
__enter__ method, in order to be symmetrical with the __exit__ method.
closesodoo/odoo#53613
X-original-commit: 30e94d305f9cffa816ddc213e0b9329c0263c145
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
When several tips (coming from different tours) can be displayed on
the same screen, we only display one of them [1], the one from the
tour having the lowest priority [2]. For instance, with CRM and
Sales, there are two tours starting from the HomeMenu, but we only
display the tip on the CRM app.
Before this commit, if the user entered the Sales app, the first
step of sales tour wasn't consumed, so no tip were displayed inside
the Sales app, even though the user "discovered it by himself".
This commit ensures that tips that aren't displayed because there
is another one with a lower sequence still get consumed when the
user clicks on their anchor.
[1] f0a7d69dcf
[2] 61ed0409c3c419f9624874fb0743d707eee673b1
closesodoo/odoo#53606
X-original-commit: 3bf1d8418f41bcaa0ba4b153620def11aaea0a2b
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Issue
The misc feature remove_accents(input_str) return a
string 'False' if the param is a boolean.
Solution
Return input_str if equal '' or False.
opw-2278959
closesodoo/odoo#53572
X-original-commit: 3fc7ce3b5599355933734e5e3f59d14a7a9b199c
Related: odoo/enterprise#11391
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Revision 07631a5185
inverts the parent/children relationship of the module categories
`module_category_administration`
and
`module_category_administration_administration`,
by swaping the `parent_id`.
During an upgrade, e.g. from 12.0 to 13.0,
as the `parent_id` node has been removed from the category
`module_category_administration` in the data xml file,
the field `parent_id` of the category was left untouched,
therefore leaving the former parent,
creating a recursion between the two categories.
```sql
select id,name,parent_id from ir_module_category where name ilike 'administration';
id | name | parent_id
----+----------------+-----------
79 | Administration | 78
78 | Administration | 79
```
closesodoo/odoo#53568
X-original-commit: e4bc0a6c6b1181b7c723df415c75f6983ff91927
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Done the below several improvement on project:
- move the stage description and tooltips to the debug mode
- remove the 'need assistance' tag
- Change the app description in manifest file 'Organize and
plan your projects.'
- Change the burger menu sequence into: Edit/Delete/Share/Set Cover Image
- change the description of the pad feature into, 'edit tasks
description collaboratively in real time. see each author's
text in a distinct color.'
- add the following tooltip for the allow_billable field,
'invoice your time and material from tasks.'
- add an fa-stopwatch icon in front of the Start & the Stop buttons
in task's form view
- rename the 'validate time spent' modal into 'confirm time spent '
+ increase the size of the description field
+ this field should not be required
- project overview: rename 'Hours recorded' into' Recorded Hours'
- project form view: disable the creation for the portal users field
- Rename the 'ready for next stage' kanban state into 'Ready'
TaskID: 2232051
Related Enterprise PR: https://github.com/odoo/enterprise/pull/9961
closes odoo/odoo#49694
Closes: #49694
Related: odoo/enterprise#9961
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose of the commit is to add the name on condition so it will
be inherited easily from the fsm view and able to change the condition
easily by inehritance.
closesodoo/odoo#51979
Taskid: 2253536
Related: https://github.com/odoo/enterprise/pull/10796
Related: odoo/enterprise#10796
Closes: #51979
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
1) Before this commit, propagate date on 1st receipt move was always False
if PO was created manually.
After this commit, move will be assigned with propagte_date of buy
route of warehouse only if there is not move_dest_ids.
2) Default settings on routes as -
1) If receipts in 3 steps > the alert on the receipt
(+ propagate) and the propagate rescheduling on the followings
2) If receipt in 1 step > the alert on the buy rule
(no propagate rescheduling)
Task-2209541
closesodoo/odoo#51853
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
It's not super useful as we've re-enabled DeprecationWarnings though
logging, and it turns out to be a *very* expensive lint, as it more
than doubles the runtime of pylint locally:
Before:
odoo.addons.test_lint.tests.test_pylint ran 1 tests in 376.27s, 2 queries
after:
odoo.addons.test_lint.tests.test_pylint ran 1 tests in 114.05s, 2 queries
It also seems to significantly increase peak memory consumption (by
~60% though that's not a precise measurement), which can lead to
non-deterministic memory errors.
Also disable mixed-indentation since it doesn't do anything (mixed
indentation is illegal in Python 3).
closesodoo/odoo#53562
X-original-commit: 8062098d0586048a9e91543290c6ab1c8d8d7009
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Purpose of the task is the current name(_description) of model
fleet.vehicle.log.contract is too long and confusion.
So in this commmit, Rename model fleet.vehicle.log.contract
name(_description) to 'Vehicle Contract'.
closes odoo/odoo#52176
Taskid: 2267547
Closes: #52176
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The translator defined a `meta` attribute, however:
* it was static so couldn't be expanded using the `meta` directive,
move to instance attribute, and create an `add_meta` method which
adds some indentation (for a cleaner HTML output)
* the `meta` directive itself was not supported by the translator
* turns out HTMLWriter just removes the first to entries of `meta` as
"cleanup", which explains why we had to duplicate it in the template
- therefore pad the `meta` list and remove entries from template
- move front to linktags, that seems more relevant
closesodoo/odoo#49699
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
- Create 3 products A, B1, B2
- Create a BOM for A:
Manufacture, 1 unit of B1
- Create another BOM or A:
Kit, 1 unit of B2
- Create a MO for A
- Click on 'Produce'
B2 appears as a 'By-product'. Upon saving, an error occurs because of a
rounding set to zero.
The issues is coming from the generation of the `move_finished_ids`.
Since the product A has a BOM kit, the latter is exploded and added as
'By-product'.
We should not try to find phantom BOM for this specific use case. A
solution is to not explote the move produced.
opw-2251423
closesodoo/odoo#53526
X-original-commit: 226ccc2f64d00a19e0ae8851c45051106aa49adc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Given an scenario in which a field F of model M is defined in module X
as `required=True` and is extended by another module Y as
`required=False` in a database with data not satisfying the original
constraint:
During an upgrade of base the original constraint will be re-applied
on the data (and fail) even though it is no longer necessary because
module Y relaxes the NOT NULL constraint.
This failure in and of itself is non-blocking, the upgrade will go
through but an error and a warning are logged anyway which are not
problematic either except in the case of automated testing
infrastructure (such as runbot), because of this it would be best if
these errors would not be logged at all unless we're 100% sure that the
constraint that was applied is not relaxed downstream.
With this commit, the `finalize_constraints` method will verify that the
constraint is applicable (field is required) before re-applying the NOT
NULL constraint.
opw-2269220
closesodoo/odoo#53529
X-original-commit: f09f4826fbdd1a547503c51a3cfad71285312c49
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Followup on ca707502a6
During replacing `partner_id` field in `purchase_requisition` module, widget and context key `show_vat` was not preserved.
With this commit we add missing attributes of the field.
closesodoo/odoo#52383
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This ensures that flushing a one2many field automatically flushes its
inverse many2one/integer field. Without that, a search like:
model.search([('o2m_ids', 'in', ids)])
can return incorrect results.
closesodoo/odoo#53514
X-original-commit: b91b485a5d9a62acfe44b12c64a46dcca23981ce
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
1. Activate receipt in 2 steps
2. Make a PO of 10
3. Receive 8 (pick 1), backorder
4. Receive 2 (pick 2)
5. Unreserve the internal transfer (pick 3)
6. Go to pick 2, return 2 (pick 4)
=> product is sent back to the supplier
7. Go to pick 4, return 2 (pick 5)
=> product is received from the supplier
8. Go to pick 3, check availability
Only 8 units are reserved instead of 10.
It happens because pick 5 (return of the return) is not linked to the
pick 3 (internal transfer).
We use a similar approach for `move_dest_to_link` than the one used for
`move_orig_to_link`.
Closes#52459
opw-2271838
closesodoo/odoo#53506
X-original-commit: c96339dd94ffe1e9c5103814062455c79d93a273
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
resolves the following error:
E psycopg2.IntegrityError: null value in column "partner_id" violates not-null constraint
E DETAIL: Failing row contains (193, 010391391, null, null, null, null, 10, null, 1, 1, 2020-05-20 20:05:28.431208, 1, 2020-05-20 20:05:28.431208, null, null, null, null).
To generate an ISR payment slip you need:
* a type == out_invoice
* a partner bank account with a ISR issuer number (field l10n_ch_isr_subscription_[chf|eur])
* a currency either in EUR or CHF
Remarks:
* l10n_ch_postal is not necessary and must be used for Vendors only.
* human readable subscription number is xx-yyyyyy-c
validation of such format is done with the following PR: https://github.com/odoo/odoo/pull/51544/files
It does:
- Removes unexisting field from tests
- Adds required field on partner_id
- Fix test with an actual case that case generate ISR payment slips
closesodoo/odoo#53498
X-original-commit: 776fd59909d12c981585fac82cfa9f3603d96ccf
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
A recent commit [1] made the daterangepicker automatically close
itself on scroll events. However, in firefox, a scroll event is
triggered when the daterangepicker opens. This event is triggered
inside the picker itself. As a consequence, the picker is closed
directly. This commit solves the issue by only closing it on scroll
events occurring outside the picker.
[1] https://github.com/odoo/odoo/commit/e6730c6e928587cd7438340cc101c57fee34220bclosesodoo/odoo#53497
Task: 2282571
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Install US localization
- Change the paper format of the main company
- Upgrade `l10n_us`
The paper format is changed back to 'US Letter'.
Note that the current situation is not ideal since it forces the
paper format on the main company, whithout taking into account its actual
country.
opw-2272894
closesodoo/odoo#53494
X-original-commit: 618f0e7f8b411e1930c73f52462e674353c18be9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
purpose of this task to improve invoiceable lines decoration
in view_order_form
- decoration is removed from the order line tree view
- decoration applied to fields
- product_uom_qty
- qty_delivered
- qty_invoiced
closesodoo/odoo#53402
Taskid: 2282277
Closes: odoo#53402
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose of the task is to improve the employee image and phone
behaviour while changing the user.
So in this commit, IF there is no pitcure on employee then apply the
image of user while adding the user to employee from cretae, write
and onchage. do not change the employee image if employee image is
already set while creating employee or changing the user on employee.
Also improve the phone behaviour when changing the company,
- Never change the mobile_phone when switching the company
on employee
- Always change the work_phone when switching the company, except
if empty on res.company.
closes odoo/odoo#50115
Taskid: 2240167
Closes: #50115
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
When an applicant is created from the website
and the job_id has a first stage with a template to send
the mail is actually not sent.
This is happening because at the creation of
a mail.thread values from computed field don't
appear in the change to track.
so _message_track_post_template don't see the
change on stage_id and thus don't send the email
This is going to be fix on the master
in the meanwhile we can force the value of the stage_id
at the creation of the applicant from the website form
closesodoo/odoo#53462
X-original-commit: bbaf4913382809da0c4d644f914cb3e8191a5d1b
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Since commit 042b4060bd, attrs 'column_invisible' on button was
ignored. This commit makes this work alongside the adjacent button
grouping feature: if all adjacent buttons have their attrs
column_invisible evaluated to true, no column is rendered for this
group of adjacent buttons.
closesodoo/odoo#53489
X-original-commit: 3110e34ab8e5ec3bf7160655af21f72b4d2179db
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>