This commit adresses to two issues:
Since 0c83542a93dde8dcaead04fadb7db95cf627a8b4, the move line's `expiration_date`
set by the user is always overrided at the creation of the move which
means the user has to modify it after the move was created.
To fix that, the compute doesn't override the `expiration_date` if there
is already one set.
Therefore, the onchange on the product who was removed is re-added to
force to recompute the `expiration_date` if the move line's product is
changed and it has already an `expiration_date` set.
closesodoo/odoo#78189
X-original-commit: db2881c4b6dc02b68ad61c1be8464d874f9115db
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
How to reproduce:
- Create a product tracked by lot;
- Create two receipts for this product;
- Use the same lot name in the two receipts;
- Try to validate the two receipts in the same time
=> `ValidationError` will trigger in the `_check_unique_lot`
constrain of the production lot.
task-2646107
X-original-commit: cf018e9f215336ef19e0a517d4e116f0da26850e
Part-of: odoo/odoo#78189
On mobile, since the commit [1], the BlockUI is not aligned with the
viewport due to its absolute position.
This commit restores the previous value ("fixed").
Steps to reproduce:
* Open Odoo
* Go to Apps
* Scroll a bit the page
* Install one App => BUG
Ref:
[1] odoo/odoo@0573acae23closesodoo/odoo#78344
X-original-commit: 04db62a45f42aba72da7d36b94b3c5d03db37e20
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
scrap_qty field was missing the digits attribute, and therefore the user
could not create a scrap with a quantity with more than two decimal places.
With this commit, scrap_qty will follow the 'Product Unit of Measure'
precision setting, just like any other quantity fields.
closesodoo/odoo#78338
X-original-commit: d9ed98f56e00f38cb3fd87bc9b7cad981a1c4400
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Before this commit: when creating scheduled activity from activity cell
activity type was not passed in context due to which default activity type not
set, to produce: CRM -> Activity View -> Click on existing record of activity
view which will open popover -> click on Scehdule Activity button, this will
open scheduled activity form but it will not have default activity type.
After this commit: when clicking on Scehdule Activity button from activity
popover, default activity type will be passed in context.
task-2568793
closesodoo/odoo#78330
X-original-commit: 17cbafdd1ce4f5f095512677d5b3750e3a8dc889
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
The processing of the LINK command in a one2many should fail when the
line being linked does not exist. However, there is one case where it
should not fail: when that line existed and was linked before applying
the commands. That use-case may seem strange, but it actually exists:
deleting a line in a sales order automatically deletes the corresponding
reward lines.
closesodoo/odoo#78318
X-original-commit: 4bfe1b5cab10d3171d386d76799a7d7729f49154
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
The cart UX was improved with [1] at payment step by adding a block ui when the
user had clicked on "Pay now".
Indeed, that step could take some (long) time, and preventing the user to click
on anything would limit the possible issues: changing a delivery, a payment
provider or anything.
Also, it would be even clearer to the user that something is being processed,
even if the Pay now button was already spinning.
The payment refactoring [2] did not correctly adapt that behavior.
This commit restores it.
[1]: https://github.com/odoo/odoo/commit/eb3ed89f8440050fc32f9a7b29fb2b6ab8fd6b59
[2]: https://github.com/odoo/odoo/commit/573ed74c121c1572b3fab6f9553ed7f93f7b3f99
task-2659450
closesodoo/odoo#78307
X-original-commit: b2a66370a9b6f37ae7177d40b7d43b82fb83cc8b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
1) Have Accounting and POS.
2) Activate multi-currencies (EUR and USD available).
3) Main currency should be USD, set a rate to EUR (i.e. 0.5).
4) Activate automated inventory valuation [CATEG].
5) Create storable product [TEST]:
- Storable, Category [CATEG]
- with public price $10 and cost $1
- available in POS
- no taxes needed
6) Have a POS in EUR (Pricelists, Journal, Payment methods +
their journal in EUR).
7) Sell [TEST] (it costs ($10/2) = 5EUR)
8) Close the session and post entries.
Result: in the journal Items, some of the COGS entries (110300
Stock Interim (Delivered) and 600000 Expenses) are multiplied by
the ratio between $ and EUR. This occur because the system attempts to
convert an amount which has been created in company currency.
opw-2613739
closesodoo/odoo#78227
X-original-commit: 91d6a81fef551a03e6af94c356b7e943ef53c473
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
In a lot of test class, we use `setUp` instead of
`setUpClass`. `setUp` is execute for each test method and `setUpClass`
will be execute only once by Class (and use savepoint + rollback).
Then change setUp into setUpClass reduce the time to make all tests
and avoid to repeat this error for the future.
closesodoo/odoo#78082
Related: odoo/enterprise#21563
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Before this commit the only way to modify the domain is to completely override portal_my_invoices.
Since this function is so big this is not clean/easy to do.
By creating a separate function we can simply override it and we can reuse the function on two places.
closesodoo/odoo#77446
X-original-commit: b7effc442cd7ff47e00718adf5b1af43e9f326ee
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
With bank synchronization, having information about changes done by
the user on the bank statements can be useful when looking into issues.
We'll now log changes in the starting/ending balance as well as the
state of the statement to keep better track of what is happening on
the statements.
Task id #2647224closesodoo/odoo#78264
X-original-commit: 3f2379347dae2482669aded034f3a5249aececa5
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
It was not possible to rename an employee with an existing image
profile, as it was trying to assign the size of the avatar (coming from
the webclient) as the avatar itself.
closesodoo/odoo#78299
Taskid: 2660773
X-original-commit: 425ddb217664ba3fdae9e8c1527317fee0fe9368
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The commit a27bbda37f1ad4 did not add a unit test.
Here it is.
closesodoo/odoo#78297
X-original-commit: e3a32191b6b9411abaf4c15550e537c666d615bd
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When the attendance app is installed and the extra hours option is
enabled, it could happend that we have an allocation with negative
virtual_remaining_leaves, however it does not make sense to display it
to the user.
This commit filters out that possibility from showing on the dashboard.
This commit also fixes a display mismatch between extra hours and other
time off types.
TaskId-2655689
closesodoo/odoo#78295
X-original-commit: c943b55237447ad58a994602e58702c952ac019d
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: William Braeckman (wbr) <Williambraecky@users.noreply.github.com>
While we try to open an opportunity from front-end page it will throws a
traceback. In this commit we have fixed the traceback, the traceback occured
because while rendering the template `portal_my_opportunity` we were using
an invalid field `res_model_id` for searching the corresponding model activity
types, in this verssion we have `res_model` field instead of `res_model_id` thus
we have updated this field instead of using the invalid field which doesnt
exist.
TaskID-2443894
closesodoo/odoo#78288
X-original-commit: 25d5d7bbfbe4ce054ebd3494a04e028498dbd441
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Sometimes, when using the "standard affixed" header effect, when
scrolling to the top, the header was kept hidden and left a blank space.
This happened in fact systematically when scrolling to the top very
fast. Indeed, in that case, the code went through the header update
only once and was not able to go from state 3 (page scrolled header
visible) to state 1 (page not scrolled header visible) without going
through state 2 (page scrolled header invisible) and you thus ended
with a mix of state 1 and 2: page not scrolled and header invisible).
Closes https://github.com/odoo/odoo/issues/71449closesodoo/odoo#78268
X-original-commit: 20648ef2134672587c25fd3c7c79ed3825728b38
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When using the configurator the user can upload its logo to
generate a color palette. In this case we select the base-1
palette as default palette instead of the theme's default palette.
Doing so avoids the potential customizations the theme palette
may introduces.
task-2665885
closesodoo/odoo#78251
X-original-commit: 50019c8f68b89968615f87c365095c94caeef46c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Headers of columns and rows are not properly aligned on RTL direction.
After this commit, they will be.
closesodoo/odoo#78261
X-original-commit: 2fb992d3ced438fd012d7702bdfbe23cce6000a6
Related: odoo/enterprise#21645
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Previously, when quickly mounting then unmounting a dropdown, a
traceback was shown. This is because the usePosition hook registered
listeners that were throttled/debounced, which would be called after the
component was already unmounted, causing the crash.
This commit fixes that by making cancelable the debounce timing util
and by introducing a new cancelable timing util: throttleForAnimation.
`debounce` and `throttleForAnimation` could be canceled i.e. when
a component is unmounted.
`throttleForAnimation` is used to replace throttle to avoid the popper's
scroll position not staying perfectly in sync with the page but instead
being slightly jittery, it effectively throttles a given function to the
display's refresh rate.
Also, the `throttle` util is kept unmodified but marked as deprecated.
Its implementation does not properly match its name, and we chose
to leave it as is because some code might already use it.
X-original-commit: a27bbda37f1ad444023cb1aae56675ac6c263cb2
Part-of: odoo/odoo#78261
Co-authored-by: Sam Degueldre <sad@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Before this commit:
Dropdowns menus were overriding the positioning hook direction flip
order in order to always stay in the same axis.
But a dropdown menu has as its maximum height 70% of the viewport.
These two "rules" aren't enough to ensure the whole spectrum of
possibilities will always make the menus entirely visible on screen.
We could have chose a correctier formula (50vh - toggler height), but
this would have led to sadly short dropdown menus in many cases,
so we chose the following alternative...
After this commit:
Dropdown components are no longer overriding the positioning hook
direction flipping order option.
That way, the flipping axis is no longer enforced and therefore the
menus will have a greater spectrum of possibilities to reposition.
This has shown us that it fixes the visibility issue of the menus.
E.g. when the menu flips to a right-middle position it could take up to
100vh and still get displayed entirely.
The position hook directionFlipOrder option has also been made
unavailable as there is no use case anymore.
X-original-commit: b768d771018843d7bfa8aab2e1b2e624d088e3f6
Part-of: odoo/odoo#78261
Revert "[FIX] web: dropdown: avoid positioning in mobile"
This reverts commit 1271ef80fafa4438271af0919dcca229aa20bf81.
Revert Reason:
A better alternative fix to the original
issue has been found. See preceding commit.
X-original-commit: 384169fb1b5874fd670f07fb2a6b1aca449f56c9
Part-of: odoo/odoo#78261
To compute a positioning, the usePosition hook uses as the default container
the <html/> element... but in the positioning computations it is assumed
that the container is scrollable which is not the case for small screens
when web_enterprise module is installed, as its webclient_layout.scss
applies rules to make sure only the main content is scrollable.
When the <html/> element is not scrollable, it can be scrolled out of the
viewport, which is problematic as the positioning computations are based
on a fixed positionment strategy.
The way we chose to fix this is to account the scrollTop position of the
container only if the container is the <html/> node.
If so, further computations will now take into account the amount of
scrolling the <html/> node has, and thus will be correct.
See https://developer.mozilla.org/docs/Web/API/Element/scrollTop fur
further understanding.
X-original-commit: a050094cdaa5dd6b76c3f10fb49d3a9c0813425a
Part-of: odoo/odoo#78261
The row groupby menus are always aligned on the left, but when a
multiple levels of groupby has been selected, it feels weird and
counterintuitive to see them aligned on the left whereas the row
labels are right aligned.
This commit makes sure that the alignment is coherent between the menu
and the row labels.
X-original-commit: b11b760365c45409b8ea10dee2a58c2e677e9d61
Part-of: odoo/odoo#78261
The generate serial number button uses the stock.lot.serial sequence by default
(default value for name of stock.production.lot)
Serial Mass Produce (and other parts) allow to generate serial numbers
starting from a user supplied initial value.
This fix makes the button generate the next serial number
according to the last generated.
task 2647238
closesodoo/odoo#78258
X-original-commit: b80259dff3aaafb9d11af9d936f5106bdf5ed781
Related: odoo/enterprise#21641
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Jean-François Aubert <ajf-odoo@users.noreply.github.com>
Before this commit, it was impossible for a user to invite people to a channel
or a group DM.
This commit add the invite button on the chat windows header only on mobile.
Part of task-2634175
closesodoo/odoo#78267
X-original-commit: 56ab9ffea28dd5f22a74ba269cbd5552c42953e3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The only fields added in
`//page[@name='invoicing']//group[@name='accounting']`
are `unspsc_code_id`, `intrastat_id` and `email_template_id`, which
should all be available with only the rights for invoicing.
opw-2665030
closesodoo/odoo#78260
X-original-commit: 1f69445f0a7ed02030f3f16f126e34b0d507ed80
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
The new version of firmware-brcm80211 20190114-2+rpt3 are unstable
when we use it with the IoT.
So we need to keep the original version of the last official version
of raspberry-pi OS 20190114-1+rpt11
closesodoo/odoo#78194
X-original-commit: 1bfb97caade7a92ff6521358b6b2f5caa6918208
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
To avoid the use of certificates when using direct devices
POS was redirected in HTTP
With new Chrome or Edge security measures this is no longer possible.
We add here the possibility to choose to redirect
the POS in https by adding a specific key in the parameters
closesodoo/odoo#78247
X-original-commit: 9cecb3bdbf5679b6d1d18dc2a250c86118bca6ce
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
This commit fixes the survey navigation rendering by always returning valid
HTML even when no buttons are displayed.
Indeed, in some cases, such as on the "thank you" page, we don't display any
buttons, meaning that the returned template will be an empty string, which in
turn prevents the re-rendering of this part of the page in the JS part of the
survey form management.
To avoid this issue, we simply add an enclosing div tag into the template so
that the template always returns valid HTML no matter the use case.
Task-2642787
closesodoo/odoo#78250
X-original-commit: 5504f9a1c13cee053f3142ad8eeb98d75311ee78
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Before this commit, a user would be able to drop pretty much any
snippet inside the product_catalog (pricelist) snippet.
This was not ideal as the snippet wasn't designed to receive
any other snippets inside of it.
With this commit, the configuration of the snippet is closer
to snippets such as timeline, allowing lines to be moved around
without allowing snippets to be dropped inside it.
task-2655171
closesodoo/odoo#78185
X-original-commit: 086bef8ffaff29a12836a36baed6cfb0ffea7da0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The owl OnboardingBanner component should be full width.
closesodoo/odoo#78228
X-original-commit: 3a0552a3a4e42bed8580715f097fad15f3e1e59f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When calling `_get_signup_url_for_action` on more than one partner,
because the `url` input parameter was re-used for the actual signup
URL before assigning to the partners map (in
559bdc976e), from the second iteration
onwards the signup URL will almost certainly get misgenerated to
redirect to the previous signup URL (accumulating).
As `signup_url` is not normally accessed in bulk this should not
usually be an issue.
Reported by Andreas Brückl
closesodoo/odoo#78223
X-original-commit: 4d9b23f60087e0e8ffcb85498f39324854f50cb8
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
- allow editing the date of a carryover line manually
- don't display the tax report line the carryover line is linked to anymore, as the user goes through this line to open the carryover line anyway, and it shouldn't be editable.
- also remove a domain that made no sense on carryover lines: pointing to a related field depending on the field defining the domain
Manual forward-port of https://github.com/odoo/odoo/pull/77718closesodoo/odoo#78213
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Before, when someone with settings rights created a foreign VAT fiscal position for a country in which there was no tax template yet, a banner was displayed, telling that the right l10n module needed to be installed. However, there was no link to the list of modules, and the user had to go back to the app switcher, then to the Apps menu to install the module he needed. We now display a link to this page, only for the users with setting rights. Other users will still see the same thing as before.
Manual forward-port of https://github.com/odoo/odoo/pull/77687closesodoo/odoo#78209
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
In some case, we know that page will contains dynamic content and that cache
should be ignored.
E.g. as soon as a s_snippet_form will be present in page, we know that we need
the real csrf, and so we cannot use the cached response from another user.
Now, we disable the cache (cache_time=0)
closesodoo/odoo#77935
X-original-commit: 262499a91cc9f2365cf2ff131796d9b61b438f9b
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Purpose
=======
Clean up messages related to email verification.
Specification
=============
Rephrase messages, add confirmation of email sent and let user change
email.
Do not show "Validation Email sent" if the current user changed their
email address.
PR: https://github.com/odoo/odoo/pull/77617
Task-2647065
closesodoo/odoo#77617
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
before this commit: custom filter on selection field shows database value while
it should display user freidnly value.
after this commit: custom filter on selection field will display UI value of
selection attribute instead of database value.
task-2363112
closesodoo/odoo#78181
X-original-commit: 0f268ba36b302df9f247c746db64987a966c1dec
Signed-off-by: FrancoisGe <fge@odoo.com>
Before this commit: the "Asset changed" log message would display
an incorrect version and name. This commit fixes that.
closesodoo/odoo#78175
X-original-commit: d4350ddace643fefa5951655e53f701b13b45333
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
As per the logging documentation, it is fine to send arguments that are
not string. Logging takes care of stringifying and injecting the
arguments in the message template.
closesodoo/odoo#78172
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
This commit adds a command to activate the debug mode with assets from
another debug mode.
closesodoo/odoo#78159
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
base: The two elements were not distinguishable by an xpath.
partner_autocomplete: Use new ids in xpath
The class `o_text_overflow` set on the fields was also
preventing the dropdown menu from appearing. This class is
now moved to the `input` tag instead of the while `div`.
closesodoo/odoo#78141
Task: 2638570
X-original-commit: fd7bfbccd45f874d5a826e695858bc75c8467700
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
In commit b4b5e8da3ee361cbdac6d5ebad29e67e24da8e81, we forgot to add
the moved files to the manifest.
We fix that in this commit.
closesodoo/odoo#78066
X-original-commit: 91e0f4a109dfdf6554c1cd2bb5c9d40b3a7fcbbc
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
A cursor created by a Connection object is not expected to be used with
environments; use registry.cursor() instead.
closesodoo/odoo#78143
X-original-commit: 6aeb73f10953f3547b7cf830718c02a3933df9e0
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
The limited products loading and the loading in the background did not follow the rule's order because the right method was never called. Also, the SQL query has been corrected to properly follow the rule of the loading order.
closesodoo/odoo#78142
X-original-commit: 8989811e5d61dac56d8c2b5433afa513eac88fb2
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Purpose of the task is to:
1) Label becomes "Notes" rather than "Terms & Conditions".
2) Fields reorganization from left to right.
So in this commit, Updated Label "Terms & Conditions" to "Notes", Fields
reorganization from left to right in 'account.bank.statement' and
'accont.bank.statement.line' model and make group_by bank statement.
Links
Task - 2613132
closesodoo/odoo#77454
X-original-commit: ce4234c98a701c0071228827187471db167a3bdb
Related: odoo/enterprise#21287
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>