Reintroduce the SampleServer class with some modifications:
- it uses luxon instead of moment
- it uses the registry from core folder instead of a dedicated one
A util function is also provided to help the construction of a fake orm
using the sample server in order to get sample data.
Part-of: odoo/odoo#73311
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
This function must be used to parse boolean attributes from archs.
If returns false if the attribute is set to "False", "false", "0"
or "", true otherwise.
Part-of: odoo/odoo#73311
This hook automatically generates custom tooltips (instead of
native ones) for all elements with the "data-tooltip" attribute
set, inside the component using it. The optional attribute
"data-tooltip-position" can be used to enforce a specific tooltip
position.
This commit also makes the WebClient use this hook.
Part-of: odoo/odoo#73311
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
This is actually not what we want. It changes the behavior of
the favorite menu: when the user deletes an item, a confirm dialog
opens, but we want the dropdown to remain visible.
Part-of: odoo/odoo#73311
Before this commit, the new webclient 'Domain' module only supported
arrays for domains constructed with an 'in' operator.
Now, it also supports any primitive, that will then be wrapped in an
array.
Part-of: odoo/odoo#73311
Partially revert b0c325 removing rules defining '<a>' children as
exceptions. Indeed, to have a child wrapping the entry's content (either
<a> or <span>) is now considered the norm.
This commit will extend bootstrap 'dropdown-item' design to any
'o_dropdown_item' child rather than on 'o_dropdown_item' itself.
Part-of: odoo/odoo#73311
Reproduce :
- Create an invoice with a sepa QR-code.
Result :
When reading the QR-code, German banks assume the fisrt 3 characters are the currency name/code, so the first 3 digits of the amount are cut from this amount.
Solution :
The amount now starts with the currency name/code (3 letters), as prescribed by EPC norms.
opw-2591454
closesodoo/odoo#76051
X-original-commit: 4d5b4de95c474136ba69fbddeab5589204efdc4e
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Audric Onockx <auon-odoo@users.noreply.github.com>
Currently, during the slide tour, while adding 'Section' from the
website, the modal is opened, and the tour/bubble for this step is
added at the bottom of the input which introduces a vertical scrollbar
to this simple modal which looks ugly.
This commit removes this step (and thus bubble for input), and simply
provides a placeholder for this input.
And, for the section modal next step ('Save' button), we simply improve
the wordings of the message, which now asks the user to pick
a name for the section first.
The same issue also happens while uploading new 'Content' from the
website, and so to avoid scrollbar here, this commit also adds little
bottom margin for the anchor (so that there's enough space for tour
bubble).
Task-2616529
closesodoo/odoo#75976
X-original-commit: 7757c5bfd3c6ef760035bcae9cfda9c919fb773e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
With this commit we passes messageIsHtml as a prop while calling notification
service when links is available, so that if message has html content then it is
displayed well formatted.
For example: Inventory -> Operations -> Replenishment -> click 'Order Once' button
it will show notification but the link is displayed as string like <a href=.../>
if message has HTML then it should properly displayed.
task-2591451
closesodoo/odoo#74571
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
When a subtest fails, the failure message maybe a bit cryptic like
`Fail: Subtest (login=admin)`
With this commit, the parent test case and test method are displayed
too.
closesodoo/odoo#76046
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit allows to use the editor collaboratively for any html
field in peer to peer using webRTC.
task-2497931
closesodoo/odoo#75768
Signed-off-by: Antony Lesuisse (al) <al@openerp.com>
This commit prepares the ground for the collaborative feature.
Before this commit, it was impossible to have different channels for
each tabs. In collaboration, multiples tabs could listen to differents set
of channels.
Example:
One tab X could be subscribed to channel [a, b] and tab Y on channel
[a, b] and a tab Z on [a, c].
Before this commit, only the channels of the master tab were
listened. So in this case it was either [a, b] or [a, c] depending on
which tab is the master.
So either channel b or channel c were not listened depending on which tab
is the master.
Now, each time a tab listens or stops listens to a channel, the
master tab listen all channels for all tabs.
task-2497931
odoo pr: 75768
Part-of: odoo/odoo#75768
Assume that model A has a computed field G that depends on both fields
F1 and F2. Assume that model B inherits from A (_inherits). When G is
computed during an onchange, it must use the form values for all its
dependencies F1 and F2. Before this commit, only the field triggering
the onchange was assigned on the parent record (see (*) below.)
record parent
--- ------------+-------------+------------
initial state | F1=0, F2=0 | F1=0, F2=0
assign F1=1 | F1=1, F2=0 | F1=1, F2=0
assign F2=2 | F1=1, F2=1 | F1=0, F2=1 (*)
The commit also includes another patch: when assigning the parent
record, the ORM determines the dependent records (in this case, the main
record in the onchange). If the delegate field (many2one from B to A)
has an inverse one2many field, the ORM uses that field to determine
dependent records. However, in the case of a new record, that field is
not in cache, and its value is determined to be... empty! The patch
consists in "fixing" the value of that field when we determine the
parent record (when the delegate field is accessed.)
Part-of: odoo/odoo#76042
Co-authored-by: William André <wan@odoo.com>
Commit [1] introduced a "hack" to transform `'NULL'` values into `null`
values in some maps as normally-defined `null` values are automatically
removed (replaced by a fallback). This hack did not need to be general
and in web_editor but can rather be confined to website only for the
user palette maps (especially since the fix made by the parent of this
commit here).
[1]: https://github.com/odoo/odoo/commit/a48a30f954afcb6ff3a59c4f32b05fd0c2cfcd2bclosesodoo/odoo#76033
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When [1] was introduced, we prevented to define a 'null' value for a
parameter P in a palette and forced a fallback to a default value X
defined in a "base" palette (value X which could be null). That allowed
to ensure that all final palette values were consistent as always
fallbacking to a "safe" value. However, since then, we introduced [2]
which makes it so a parameter P in the "base" palette is defined to X
(not null) while null is a valid value for P. We could keep the old
system and define that paramater P to a 'null' value in the "base"
palette and add the default X value in all palettes explicitely... but
with this commit we are choosing to be less tolerant (but in fact more
tolerant to custo) and rely on the fact palettes are well defined with
valid values (e.g. not defining a value to null while only X or Y are
allowed for example). Indeed, an exception for the "null" value did not
make much sense: if only X or Y are allowed as value for a parameter P,
setting a random Z value was not prevented, only null was.
[1]: https://github.com/odoo/odoo/commit/05d17089c4a604cb49f1a263b68f39aeffecccda
[2]: https://github.com/odoo/odoo/commit/a48a30f954afcb6ff3a59c4f32b05fd0c2cfcd2b
Part-of: odoo/odoo#76033
Currently, when we try to shorten the links from content with help of
`_shorten_links_text` method, it throws traceback if the body(content)
we pass is `False`(might happen when we directly pass a model field of
textual type but the field doesn't have a value yet). It's because
the `re` expects the content to be string / bytestring.
This commit fixes the issue by adding a check in this method, which
will simply return `False` if there's no body.
Task-2628586
closesodoo/odoo#76041
X-original-commit: 3cc5217f1196108d5c7a52202054263a480963b2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose is to add some tests for newly added feature logging portal access
granting. Some code is also cleaned to avoid unnecessary computation when
groups are not modified on user model.
closesodoo/odoo#76040
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Bad debt accounts should be of expenses type like the ones in the l10n_de_skr03 addon
opw-2512526
closesodoo/odoo#76039
X-original-commit: 5780e50c0baf7c4b0c2799c38fd532a6772f6a1d
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Hubert Van De Walle <hubvd@users.noreply.github.com>
When using module `account_invoice_extract`, it would happen that a
bank account of another company was set on the `account.move`.
This happened when the extract update was done in background via the
cron.
A check on the company of the bank account fixes the issue.
opw-2631833
closesodoo/odoo#76024
X-original-commit: 12559929a551c7f837facb8242333e9b0285950b
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Louis Baudoux <lobaudoux@users.noreply.github.com>
Since 29db699e9b, auth_top depends of mail module, which lead to delay auth_totp
installation - not during DB creation anymore. As mail module is not installed
during DB creation, once an app that depends on mail is installed after DB
creation, auth_top module is finally installed and the session token now depends
auth_top module. As a result, the user is automatically logged out.
This commit moves the invite mail (and the dependance to 'mail' module) to a
new bridge module. Auth_totp module will now be reinstalled during DB creation
automatically.
Task-2638538
Parent Task-2487630
COM PR: odoo/odoo#76022
UPG PR: odoo/upgrade#2808
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, it was assumed that the call was still active when
the video permission was granted, this assumption was false and this
commit fixes this issue.
closesodoo/odoo#75999
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Here is the idea: when creating a view V that inherits another view, and
V only adds elements in the parent view, only the elements added by V
must be validated. The other elements are not modified, and thus do not
need to be validated again. However partial validation cannot be done
when modifying an existing view, or when the view replaces elements in
the parent view. In such cases, the method _check_xml() validates the
whole combined architecture.
The time spent in method _check_xml() to install a database from scratch
with module sale_management went from 2.730s to 2.243s (-18%), and the
number of queries made in the method went from 2283 to 1614 (-29%).
closesodoo/odoo#75796
Related: odoo/enterprise#20633
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Also speed up view validation by not calling fields_get when possible.
This avoids a call that is usually not necessary for validating a view.
Most of the time, fields can be found on the model itself. Only
overridden fields_get() with fake fields are actually useful, like the
one of model 'res.users'.
The time spent in method _check_xml() to install a database from scratch with
module sale_management went from 3.510s to 2.730s (-22%), and the number
of queries made in the method went from 2995 to 2283 (-24%).
Part-of: odoo/odoo#75796
Besides simple code improvements, remove node_info['attr_model'], and
check domain on specific elements. Also refactor _validate_attrs. The
changes have no impact on performance.
Part-of: odoo/odoo#75796
This makes it easier to optimize the algorithms for both cases:
postprocessing without validation, and validation without
postprocessing. Also factor out some common bits like the editability
of nodes.
The net result is a speedup in performance. The time spent in method
_check_xml() to install a database from scratch with module
sale_management went from 4.955s to 3.578s (-28%), and the number of
queries made in the method went from 3779 to 2995 (-21%).
Part-of: odoo/odoo#75796
This generalizes an existing optimization and saves a few time to
validate a view. The time spent in method _check_xml() to install a
database from scratch with module sale_management went from 5.145s to
5.044s (-2%).
Part-of: odoo/odoo#75796
Adjust the height of the HTML field for the email body
On the survey sharing email.
Regression introduced in 607c5ea4 (#75863)
task-2586137
closesodoo/odoo#76016
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
*: extensions of `adyen_platforms`, namely:
- pos_adyen: remove related code, records, views, ...
- payment_odoo: remove the module
- sale_payment_odoo: remove the module
Modules related to Odoo Payments are already all merged since 14.0 and
14.4 (depending on the module). As the plan is to merge the final
version of Odoo Payments in 15.0 soon after the release, we want to
avoid all the complications that inevitably come with huge diffs, model
changes, XMLID collisions, etc. when merging in a stable version. Even
though it is possible to install these modules since 14.0, no
information could be lost during the upgrade since the entry point of
the application has never been activated.
task-2637770
closesodoo/odoo#75852
Related: odoo/upgrade#2804
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv)
The project overview is a significant technical debt
as it is a custom qweb view. It is quite limited:
- It is not possible to group the data, to filter on dates,
SOs or Field Service projects.
- Improving this is very difficult and would require weeks
of development that are not worth it.
In any case, all the information provided by the project overview
can be found elsewhere. The stat buttons of the report are basically
duplicates of the ones from the project form view.
Therefore, we are removing this report and its twin,
the Project Costs and Revenues.
In addition, analytic items lack context for the user to understand
what generated a certain cost or revenue:
- there is no link to the source document;
- the entries are not categorized (e.g. it is not easy to understand
if a cost comes from a timesheet cost, a purchase order or an expense);
- the billable type group by works fine for timesheets but then all
the other entries are flagged as Undefined, which is not very helpful;
- there is no option to easily isolate costs from revenues.
task-2545084
See odoo/enterprise#19250
See odoo/upgrade#2706closesodoo/odoo#72736
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
+ Added the 'Trusted Devices' feature
+ Added 'Remember this Device' checkbox on /web/login/totp
+ Added trusted device's OS / browser on Profile > Account Security
Added '2FA Trusted Devices' feature to allow users to remember their
device to bypass the 2FA for the next connections. The trusted devices
are displayed in a 'Trusted Devices' One2Many under the 'Developer API
Keys'. It is possible to revoke all the trusted devices at once with a
special button. It is also possible to revoke one at a time on the
desired one.
Task-id 2523092
closesodoo/odoo#75535
Related: odoo/upgrade#2800
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Martin Trigaux <mat@odoo.com>
On payment creation, when changing twice the payment's journal, if the
first journal already has some lines and the second one doesn't have any
lines, the payment name will be incorrect.
To reproduce the error:
1. (If present, delete all payments)
2. Create and save a payment P01:
- Journal: Bank
3. Create a second payment P02 (do not save it):
- Journal: Bank
4. Change P02's payment: Cash
5. Change P02's payment: Bank
6. Save P02
Error: The name of P02 is "CSH1/2021/08/0001", which would be correct if
it was a Cash payment. This error has a consequence: suppose the user
creates a third payment (journal: Bank) and confirms it, its name will
be "CSH1/2021/08/0002" (again, name linked to the incorrect journal)
On step 4, when changing the journal to Cash, since the latter hasn't
any payment, the server returns a new name ("CSH1/2021/08/0001"). Then,
on step 5, when changing back the journal to "Bank", since the latter
already has a payment (P01) and since the current record already has a
name ("CSH1/2021/08/0001"), the server doesn't change it and the
`onchange` response doesn't contain anything. As a result, when saving
the payment from the client side, the wrong name is included in the data
("CSH1/2021/08/0001"). Regarding the consequence: later, when creating
and confirming a third payment, the server will take the name of the
previous one in the same journal and will increment it
("CSH1/2021/08/0002").
OPW-2601668
closesodoo/odoo#75986
X-original-commit: 2024ff2b344d841cf775dbb14da9cc9e1e4c05e9
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Steps to follow
- Install web_dashboard,website_sale
- Go to the eCommerce Dashboard
- Click on Favorites
- Click on Add to my dashboard
- Go to the Dashboard app
- Click on orders
-> A traceback occurs
Cause of the issue
`this.subscriptions.update` is undefined
opw-2630849
closesodoo/odoo#75984
X-original-commit: 8ab700fc8e51631663443b6c8e81db9669375d82
Signed-off-by: Hubert Van De Walle <hubvd@users.noreply.github.com>
Right after some module operation (install, uninstall), the framework
looks for some ir.actions.todo to execute. Currently those actions
cannot be found, because the cursor seems to see the database in the
state it was just before the operation. Simply add the commit() which
was removed by revision 1595c0ee27.
closesodoo/odoo#75980
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
The XML-RPC interface has a compatibility shim for binaries as
historically Odoo has returned "binary" data as base64 strings. To
avoid breakages during the Python 3 transition, the shim was
introduced to decode the output binary data (under the assumption that
it'd be ASCII-compatible).
In the case where the data is *not* ascii-compatible, however, it can
generate invalid XML documents: "C0" control codes (with the exception
of tab, LF, and CR) are not valid in XML 1.0 (which XML-RPC is an
application of), however they're perfectly valid string characters and
the standard library's marshaller does not check for them, embedding
them directly in the output document and breaking the client's
decoding.
Work around the issue by replacing such binary data with an empty
string.
While at it, move the bytes shim to the customized marshaller, this
way everything's at the same place and it's not necessary to waste
time trying to understand why the marshaller is just not calling what
it's supposed to call.
Fixes#61919closesodoo/odoo#75973
Forward-port-of: #75952
Forward-port-of: #74699
X-original-commit: 1a0b3f7
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When using profiling on a fresh test database, it can be tedious to
access settings to enable the feature. This commit adds a wizard to help
enabling profiling without accessing the settings when trying to
activate profiling on a administrator session.
closesodoo/odoo#75967
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Improve the wizard 'import your first bill': usability + look & feel
- Removed the PDF viewer interface which was ugly + useless in this context
- Display an HTML preview instead which is dynamic
- Current date
- Company address depending on the Company
- bill sequence depending on the date
In the modal of upload, detect if there is no hosting domain @false > then remove this third option
PR #75815
Task: 2581377
Related: odoo/upgrade#2806
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit enables tracking on vat, parent_id for the contact, because the
impact of changes of these fields are very important.
We also manually track portal status change. To avoid a costly computed
field, this is done through manually logging portal access change as a note
on the user partner's chatter.
VAT field naming is also updated to match view naming used in inherited
views.
TaskID-2586195
closesodoo/odoo#74692
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When generating some sale order/invoices pdf automatically (via cron for example), the format of the
invoice is not correct (missing style, background image, etc). The html used to generate these pdf's
misses the asset lines (link to css and js files).
The asset lines are not generated because the manifest cache (http.addons_manifest) is empty if we
render a pdf from a cron.
This commit will generate http.addons_manifest if it's not yet done before.
opw-2581621
opw-2597990
opw-2542242
closesodoo/odoo#75092
X-original-commit: 3ae4db7fc8dbc404984e34ac532426d6bf2c6a0f
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Signed-off-by: ThomasBeckers <ThomasBeckers@users.noreply.github.com>