Prior to this commit, date tracking values in Chatter were always
formatted using the LL/dd/yyyy format.
After this commit, date tracking values will be formatted according to
the user's locale, so as not to cause discrepancies with other dates.
closesodoo/odoo#127834
X-original-commit: 865522e0925fbeae14f5f83d3a2d69a54b546b04
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when posting a message with 3 attachments
`A B C`, the message displayed attachments in order `C B A`.
This happens because message format list attachments in order
of `message.attachment_ids`, which has no specific order.
This commit fixes the issue by ordering attachments in
`message_format` from the oldest to most recent, so that displayed
order in message matches the one from composer, which itself
matches the order of creation of attachments.
closesodoo/odoo#127830
X-original-commit: 53508effa66bca79aa872412333ca8578ca9b813
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when scrolling down on a long chatter,
there was a specific scroll position that indefinitely
shows & hides "Jump to present" with an infinite flicker.
This happens because visibility of "Jump to present" affects
`scrollHeight`, and the threshold to show/hide this bar was
exactly the same, at 2500px. So when at exactly 2500px,
the bar is shown, but then the distance to present becomes
less than 2500px (because the bar is sticky and pushes the
present down), therefore it must be hidden. But hiding it,
the present moves up, so distance is 2500px again, etc.
This commit fixes the issue by having a 200px tolerance:
- more than 2500px: show "jump to present"
- less than 2300px: do not show "jump to present"
As the "Jump to present" bar is less than 200px height,
there's no risk to indefinitely change its visibility.
closesodoo/odoo#127829
X-original-commit: b1205a90dccc44e6cc7d5fd869cab34a63a4db2c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Commit #2:
Splite the method `_compute_from_product_id_company_id` so each stored field has its own compute method to avoid invalidation issues.
opw-3336796
closesodoo/odoo#126529closesodoo/odoo#127794
X-original-commit: b64a378aab79ae4b6682ad66902c43a98a6f776d
Signed-off-by: William André (wan) <wan@odoo.com>
Steps to reproduce:
- install Expense and Accounting
- create 3 separate Expense categories ( this will create a related product of 'service' type) with a different Expense account and Vendor tax on it.
- Configuring different Taxes are important to replicate the issue
- Create a 'test' user who has no access to apps
- login a 'test' user and create an expense for one of the categories and save it.
- Update the expense to a different category and click 'submit to Manager'
Issue:
The account_id of the expense is not updated
Reason:
Multiple fields are computed using the same method `_compute_from_product_id_company_id`. The field being read-only=False
https://github.com/odoo/odoo/blob/c38cf4c2038d15890d5d50ec05fd5cb4f9f379b1/addons/hr_expense/views/hr_expense_views.xml#L199
It is protected during the write; that is, considered as user input
Solution:
Duplicate the field is it will not be read-only and put it as invisible
Split the compute method
opw-3336796
X-original-commit: 6664ccba5230d7890964cfe372ca863314f2fad4
Part-of: odoo/odoo#127794
When investigating an issue on a customer database, the diff view modal
can be pretty useful. However it is not very good looking and therefore
poorly readable.
This PR improves the CSS styling of that modal so that it resemble more
the diff view of GitHub. This is done by:
- Increasing the width of the modal
- Aligning the text to the top of the table cell, that way there is no
text floating in the middle of two lines
- Lightly coloring the whole line when there is a change on it while the
actual change is on a darker background
- Putting in red all types of change on the left and in green on the
right (instead of mixing green, red and orange together)
This commit is improving the tool that was made at [`96d3fa4`](https://github.com/odoo/odoo/commit/96d3fa4e01bf8afc35dbf0b7301ce75c6bf3a5c7)
closesodoo/odoo#127765
X-original-commit: bf412f6920b10376a979c9f95c4508dedfec5d5f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit forces the video element to take all the space available.
Steps to reproduce:
* Open the barcode APP (on iOS device)
* Click on "Tap to scan"
* On iOS the video element doesn't take all space => BUG
closesodoo/odoo#127763
X-original-commit: 29e677ed84c0b7324488cfebf2d44b9247716c54
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
The `/mail/message/post` route wrongly prevent serialization
errors by suppressing any `OperationalError` when writing
on a canned response. This is wrong since the `write` method
does not issue any SQL.
In order to properly prevent serialization errors, the request
is now done with the `SKIP LOCKED` clause.
This is better since the error does not occur, hence:
- No rollback needed
- No need to mute the sql logger
- No need to suppress any exception
closesodoo/odoo#127761
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Commit [1] addressed the following situation: when we have a parallax on
an element, it adds the background on a `<span>` child of said element
instead of applying it directly on the element. Retargeting the `<span>`
is needed to display all the options linked to the background image.
Following [1], building blocks whose children are allowed to have a
background image are also applied their 1st child's background when one
of their children's background is modified. This happens because, when
changing the background of a child item, `BackgroundOptimize` is called
both on the child and on the main snippet due to
`_onBackgroundChanged()` bubbling up and `_loadImageInfo()` targetting
any child in the tree with the class `.oe_img_bg`.
This commit prevents `_onBackgroundChanged()` from bubbling up and
modifies the behavior from [1] by making sure the element identified as
the target within `_loadImageInfo()` can only be either the original
target or the parallax element.
Steps to reproduce:
- Drop a carousel building block
- Change its style to bordered
- Change the background image of the 2nd slide
=> the background of the entire snippet is also changed. It is then
impossible to remove the image on the snippet.
[1]: https://github.com/odoo/odoo/commit/31ba906
task-3349669
closesodoo/odoo#127756
X-original-commit: ab0ae8dadf55baa258d733835acc3a12771932be
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
Before this fix, a condition like "Foo is not set" created via the domain
selector would be badly described in the facet as "Foo is set".
We fix that problem and add a test that covers that situation and similar
ones.
closesodoo/odoo#127447
X-original-commit: a6b7de5d62906e5508585e0b994bf95544d10476
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Steps to reproduce:
- Drop a block, hide it on desktop and save
- Add a second language and click on translate
=> This raises an error.
The bug happened after the forward-port of [1] to 16.3, because
`_updateInvisibleDOM` was called prior to `_loadSnippetsTemplates`: it
then tried to `_createSnippetEditor`, requiring `templateOptions` while
they were still undefined.
opw-3383659
[1]: https://github.com/odoo/odoo/commit/959ea3d361fclosesodoo/odoo#127139
X-original-commit: c92ea9f10cdd38b275157e1ba7e79b84e3e45cbb
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Install POS, go in the settings, add a new cash routing method.
Traceback, the field as no comodel.
The ir.property `search_multi` method wasn't compatible with the
'any'/'not any' operator.
opw-3375624
closesodoo/odoo#127750
X-original-commit: 7dd14eb0b0edb57150288361e72e407e05e67a73
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Co-authored-by: Julien00859 <juc@odoo.com>
`filtered_domain` didn't throw an exception when it is called with a
domain containing the new 'any' and 'not any' operators. Fix it.
X-original-commit: 05713a270bfad406daa9dbf739b80cf8c4d065c0
Part-of: odoo/odoo#127750
Since 5a998694a6,
`[('<many2one>', 'not any', [<domain>])]` matches rows where the
<many2one> is set and the corresponding many2one row matches the
<domain>. This is incorrect. 'not any' should be the inverse of
the 'any' operator and domains such as
`['!', ('partner_id.name', '=', 'System')]` are incorrectly converted
to "Return every record with a partner name != 'System'"
when it should be "Return every record with a partner name != 'System'
OR without partner at all".
Fix semantic and add tests to avoid any future regressions.
X-original-commit: c8c1ef45f24482e380529daf2de55b9091338a83
Part-of: odoo/odoo#127750
Configure Document Layout for Paper Format European A4 for DIN 5008 Type A
Set layout to DIN 5008
Create an invoice
Open preview (portal)
Issues:
- portal preview contains a lot of white space on the right hand side
- Invoice terms and payment reference are not correctly aligned
https://wiki.documentfoundation.org/Videos/Business_letter_according_to_DIN_5008#Margins
opw-3279157
closesodoo/odoo#127743
X-original-commit: 1ed905666a6fa191c48dec576236942cc2cfb006
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
This commit fixes the filtering of choices when the choices or the groups
props values are updated. Before this commit, the filter was only triggered
when the length of choices or groups differ.
Instead, it is prefered to apply the filter of choices whenever those props
are updated (in a dedicated useEffect).
A test has been added, updating the choices props, while having an object with
the same number of choices, while having different values. Before this fix, the
filtering wouldn't be applied correctly, since the filter wouldn't be triggered
because the object has the same number of values in it.
closesodoo/odoo#127733
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
Since [1] the page manager tour test fails from time to time because it
manages to click on the Delete Page popup's OK button before it is
enabled.
This commit makes sure it only clicks on the button once it is enabled.
This commit also includes the master version cleanup of [1].
[1]: https://github.com/odoo/odoo/commit/a65d8811119f4d1a044be3e140fd0c27ad1cf823
runbot-20823
runbot-23032
closesodoo/odoo#127614
X-original-commit: 668fc8fa6f56b8eda9c81300a818da2559c0d0dd
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
The language and pricelist fields were not changing correctly in the
contact editor in the PoS. This is now fixed.
closesodoo/odoo#127581
Related: odoo/enterprise#43745
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Steps to reproduce the bug:
- Drag and drop a Carousel snippet onto the homepage.
- Add an image inside a Carousel slide.
- Set the "Content width" option of the slide to "Full".
- Set the "Layout" option of the slide to "Grid".
- Make sure the image touches the edge of the page.
- Bug: The arrows are below the image and are no longer accessible.
To fix this bug, we add 'isolation: isolate;' on the Carousel content to
create a new stacking context. This ensures that elements like
indicators and arrows will always appear on top of the carousel content.
task-3383061
closesodoo/odoo#127491
X-original-commit: 99133cafbb0cb0aa9563475eb364dfffc412d2fe
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
We added a new method to identify if the current pos.order.line can be discounted
in a global discount, fromt he pos_discount, module.
This in order to be inherited from third ones.
closesodoo/odoo#127232
X-original-commit: 0c441737308bf7f47193c64d3e29c895154c3df8
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Steps to reproduce:
1- install l10n_au_reports
2- switch to the Australian company
3- create a vendor bill
4- add a line with the tax Purch (10%) TPAR
5- confirm the bill
6- go to Reporting > Taxable Payments Annual Reports (TPAR)
7- make sure the reporting date includes your bill
8- ABN is not displayed
Bug:
Currently, the ABN (Australian vat number) column is always empty in the TPAR report.
OPW-3327919
closesodoo/odoo#127188
X-original-commit: 8c4c3b5cfa992d4ea48198be6da3f769232ce91b
Related: odoo/enterprise#43572
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
This commit changes the behavior of the "Search More..." option in
Many2XAutocomplete and analytic distribution by making it available
as long as there's at least one record in the search results and by
renaming it to "View all".
task-3258625
closesodoo/odoo#126041
Related: odoo/enterprise#43660
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Issue:
------
When we want to add a newly-created user
who does not yet have "personal stages" to an fsm task,
it triggers a User Error.
Cause:
------
There's a mistake in the `project_id` field,
which is missing the 's'.
Therefore, when creating the personal stage,
the ORM does not find the value in the context
and inserts the command to set the default project.
As a result, when checking constraints,
we will trigger an error for the
`_check_personal_stage_not_linked_to_projects` method.
opw-3390169
closesodoo/odoo#127694
X-original-commit: 05722c9710f74a073833235de9bbe4743485174a
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
The `api.constrains` `_check_name` on `ir.model.fields`
ensures users do not create custom fields not starting with `x_`.
It offers a user-friendly message when users try to do that.
However, this `api.constrains` can be bypassed,
for instance when updating the field name through raw SQL.
This revision aims to no longer load custom fields
if they do not starts with `x_`.
In addition, it replaces the Python constraint
with an SQL constraint in order to have a stronger constraint.
Following bugs or unexpected flows, people
were able to add custom fields not starting with `x_`
with the `api.constrains` alone.
Adding the SQL constraint will tighten the constraint.
However, even without that SQL constraint,
for instance if users drop the SQL constraint manually,
custom field not starting by `x_` must not be loaded.
A user would be able to drop that constraint
through a SQL shell or a `cr.execute` in a server action.
This is to prevent users to override class attributes.
closesodoo/odoo#127702
Related: odoo/upgrade#4908
In this pr https://github.com/odoo/odoo/pull/121601, we did some modification on
the payment form but by doing that we change the label of the menu item.
So this PR will change the menu item back to what is used to be but keeping the
change on the action.
closesodoo/odoo#127626
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Before this commit, when clicking on avatar of author of an
authenticated visitor in a livechat, it was opening the chat with
this user.
The intended behaviour is to show the profile, as it's quite useful
for livechat. Opening a DM chat is useless, because the livechat
already represents a chat with the person
closesodoo/odoo#127615
X-original-commit: 4eedc234fe19ab681c6a35c2265e9763b2a80760
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before the task
when the default language for a website is not en_US, and users try to
edit_translations from the website, all terms are marked "translated"
because odoo adds
`data-oe-translation-state="to translate"` if the term is not extracted from
the en_US value and is the same as its en_US term
After this commit:
if the record's bounded website's default language is lang_base
odoo adds
`data-oe-translation-state="to translate"` if the term is not extracted from
the lang_base value and is the same as its lang_base term
closesodoo/odoo#127468
Task-id: 3344973
X-original-commit: 7c20510bda2f1312a9392df445ee38aea7b2267b
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Chong Wang (cwg) <cwg@odoo.com>
This commit changes the hex_color param which is not relevant
anymore since we are now using a color_index to make use of
a css class to take advantage of its responsiveness.
Task-3384796
closesodoo/odoo#127677
X-original-commit: a5687eac9115f1c8274f52e6662b23b8ad26f72f
Related: odoo/enterprise#43792
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, it was not possible to copy some text content in
chat window with CTRL-C from the home menu.
This happens because keydown events are intercepted by the (hidden)
search bar in the home menu. So when pressing CTRL, the focus is
lost in the chat window.
This commit fixes the issue by not bubbling events from chat window.
Exceptions are inside dropdown, as the keyboard navigation there
make use of the hotkey service that needs bubbling of keydown events.
closesodoo/odoo#127662
X-original-commit: 05d9d3ce1fed0c76d9c85a50e361035a7a81b46b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
`BroadcastChannel` is not supported in Safari < 15.4.
This commit prevents the crash by not using broadcast channel
if it doesn't work.
A minor inconvenience of not using `BroadcastChannel` API is that
activity data are not synced among tabs. But this is still better
than a crash.
closesodoo/odoo#127660
X-original-commit: f7f7e11ae30d2a5a659b09d913566b0cab95846a
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit fixes the position of the notification
manager which was wrongly placed in the dom and
caused the notifications to be behind dialog's backdrop.
closesodoo/odoo#127631
X-original-commit: 381d574974bcfe274291628889459148ad741812
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
The aim of this commit is to:
- ease the company configuration in DK
- make the feature work when the country_code prefix isn't present
Context:
The DK company registry is the CVR. The CVR is quite the same than the
VAT number.
Re-applied logic used in `l10n_be` to ease the configuration.
Before the commit:
The company registry has to be inputed.
After the commit:
The company registry don't need to inputed while a DK VAT is setup for a
DK company.
closesodoo/odoo#125058
Task-id: 3334595
Related: odoo/enterprise#42561
Signed-off-by: Josse Colpaert <jco@odoo.com>
Refactor CoA modules and maintain separate tax and fiscal position data
- Combine multiple CoA modules into a single module for each country,
as support for multiple CoA support has been improved
- Keep tax declarations and fiscal position templates in separate files
for better organization and maintainability
closesodoo/odoo#116274
Task-id: 3180738
Related: odoo/upgrade#4529
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Fixup of 5cb044dd8a2385c9a3c09520ed97eb4faa39216d
We should use float_compare when working with float amounts as the
standard == may give wrong results
opw-3389449
closesodoo/odoo#127684
X-original-commit: 91f970fdfd8136e303b7052d690d8997f0278f24
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Websocket instances use `selectors.DefaultSelector` in order to
wait for the socket to be ready for I/O. Gevent replaces the
default selector standard implementation by its own, using
`select.select` by default. The issue is that `select.select`
can only handle fd between 0 and 1023 which leads to select
out of range errors when this cap is reached.
In order to solve this issue, this commit enforces the use of
the `PollSelector` when running in evented mode and when it
is available: `select.poll` does not suffer from the same limit
as `select.select` does.
closesodoo/odoo#127692
X-original-commit: 7e8c0dbe118494c94745ba0fde6290db66d610e2
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Web lacked a default route for /robots.txt meaning that if you didn't
installed website (which comes with a full fledged robots.txt) you would
get a 404 page not found.
closesodoo/odoo#127402
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Add a test that checks that a chart_template reload
when data didn't changed won't delete or create any
records.
Test added retroactively for this fix: https://github.com/odoo/odoo/pull/126830closesodoo/odoo#127685
X-original-commit: 7d78bd2733e9b1aaada0551333bfdf8e7d470c8b
Signed-off-by: William André (wan) <wan@odoo.com>
Steps to reproduce:
- Install 'survey' module
- Create a survey with 2 questions
- Change the sequence of the questions
- Edit the second question (last in the sequence)
- Set it as conditional
- Select first question as trigger (with any answer)
- Duplicate the survey
Issue:
The triggering question is not set on the right question.
Cause:
When copying the survey, we map the old question to the new ones but
there are by default sorted by order of creation and not by sequence
and therefore the mapping is wrong.
Solution:
Order the questions and answers by sequence before mapping them.
opw-3330476
closesodoo/odoo#127681
X-original-commit: 70f7e13c38acd07ea04324bc78e379dac6051e41
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
Before this commit, fetching mention suggestions
(e.g. with `@mention` in discuss composer) was not
making a silent RPC. This is a minor RPC, so it should
not display a "loading" whenever suggestions are being
fetched.
closesodoo/odoo#127649
X-original-commit: a7ba5365614c3b599bc55e4cb3903a0e89429f7a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Steps to reproduce
==================
- Install purchase_stock
- Use a mobile viewport
- Go to Purchase
- Click on a record
- Try to set the "Deliver To" field
- Click on a record
-> An action is triggered and the record is not selected
Cause of the issue
==================
[commit] removed the only use of `forceGlobalClick`.
When it is set, KanbanRecord.selection_mode evaluates to true.
Solution
========
forceGlobalClick should be set when selecting a record from the
SelectCreateDialog.
[commit]: https://github.com/odoo/odoo/commit/6e18fb3c35281bdba26d9616150141298975bb40
opw-3337018
closesodoo/odoo#127632
X-original-commit: 7a1db9fade48d231a71084624fa0063989afd2b9
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
The buttons on the Mailing Lists page were under the content and felt
weirdly placed. These have been moved up on smaller devices to be next
to the Total Contacts column, making the visual result more balanced.
Note that these buttons are only visible on tablet and desktop, not
mobile.
The buttons' spacings have been fixed so as to not touch one another.
This commit also fixes the padding on either side of the ungrouped
Kanban card to be aligned with the control panel.
task-3378519
part of task-3326263
closesodoo/odoo#127613
X-original-commit: 8c4dbaa37cccda6a5af5e9c5be216e69ecd4227d
Related: odoo/enterprise#43762
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Some buttons were stuck together or some had too much of a gap between
them, this commit aims to harmonize the space between buttons.
task-3378519
part of task-3326263
X-original-commit: 68d16f5b2131f44b2dfc3a5d6756aea8987b3fd5
Part-of: odoo/odoo#127613