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>
Before this commit, when the view switcher contained too many elements
(e.g.: CRM), in desktop mode but with a relatively small screen size
(i.e.: width ~< 1300px), the buttons of the view switcher went outside of the screen.
After this commit, the whole view switcher block is rejected on a new line.
closesodoo/odoo#78135
X-original-commit: dabc7b903340922557645c69df5858ca3360cc59
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit replaces the <button> elements used in the custom button of
the donation snippet by <span> elements because putting inputs inside
buttons is not valid HTML.
task-2637492
closesodoo/odoo#78089
X-original-commit: 38447f80f462ebf9d0877b5e170bb5dc1bf13725
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the minimum value of the custom button was not
updated when removing descriptions.
task-2637492
X-original-commit: 60266bf72abeac5689c8ae1cbc8d61d57a966fb0
Part-of: odoo/odoo#78089
In the donation snippet, do not allow user to select the option
"slider" if "display options" is disable because the slider is not
used on the pay/donation page.
task-2637492
X-original-commit: e5bc1dcd2dfdecc20d9e13f109ca206343b43069
Part-of: odoo/odoo#78089
In some cases we migh want to change to a value that isn't the default
one when uninstalling.
For instance: when we uninstall the module `event_sale`, a product has
the field `detailed_type` set to `event`, which is a subtype of `service`.
So we want to update the value to `service` when uninstalling instead of
the default value, which would be `consu` and wouldn't make any sense.
Part-of: odoo/odoo#77876
Create a payment without a partner for a receipt
Go to the form view
Click on the stats button.
=> Error, 'partner_id' is required
In some cases, having the partner not required on the view is needed.
closesodoo/odoo#78124
Task: 2610780
Forward-port-of: https://github.com/odoo/odoo/pull/77727
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Without this commit, if you had:
- 3 Qty for product P in WH1
- 10 Qty for product P in WH2
- no warehouse set on website
- set show stock and prevent sales if not enough stock enabled
And then:
- Add 3 P in your cart
- In cart, add more P, it would let you do it, while it shouldn't
You would then be stuck on payment step as it would tell you only 3 are
available.
This commit improves 6b05fb2b21a3 by ensuring the warehouse_id used is the
correct one (the one that will be used on the SO (required field)).
That commit was fixing a case that was not supposed to happen[1], it is that
case that should have been fixed (which is fixed by previous commit of this PR)
[1]: it would fix the 'issue' when you add a product which has no stock
available for the warehouse that will be used when creating the SO, by
letting you through the warning, but you would then be stuck on the
payment step as the qty check would be correctly done.
The fix should have been to display the correct qty and prevent the add to
cart in that case.
closesodoo/odoo#78045
X-original-commit: 5f74b84f67222147b2eb7caadb2d831a059aae4e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Adrien Widart <awt@odoo.com>
In multi-warehouses, the available quantities shown on product page is not the
same one used to compute the max quantity that can be bought in the checkout.
Indeed, a sale order has a required `warehouse_id` field, and the quantity that
can be bought is computed based on that warehouse.
But if the website has no warehouse set to it (in settings), the shown quantity
on product page will be computed based on all available warehouses.
It will then show an error on payment step, if the user has selected more
quantities than there is available on the warehouse used for his order.
Considering the structure of `sale.order`, displaying the quantities in
several warehouses does not make sense.
To reproduce the issue:
1. In Settings:
- Enable 'Multi-Warehouses'
- Make sure the option Website > Inventory > Warehouse in undefined
2. Create a second warehouse WH02
3. Update the quantity of "Storage Box":
- 18 in first WH (should already be present)
- 12 in WH02
4. Edit "Storage Box":
- eCommerce > Availability: "Show inventory on website and prevent
sales if not enough stock"
5. On the eShop, go on "Storage Box"
- Note that there are 30 units available
6. Add 22 "Storage Box" to the cart
7. Process checkout
Error: When trying to pay, a Server Error is raised: "We are not able to
redirect you to the payment form. You ask for 22.0 products but only
18.0 is available." This is confusing since the available quantity on
the product page is 30
opw-2630804
X-original-commit: ee2d1c31bb0f6ee7c52b84b6c9ee5ca2d8e70e03
Part-of: odoo/odoo#78045
Co-authored-by: Adrien Widart <awt@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Adding Chart of accounts, taxes and some translation for Saudi arabia accounting
closesodoo/odoo#77960
X-original-commit: db667f486083ae7a934fd18f9023cdc2bbfb0de0
Signed-off-by: Josse Colpaert <jco@openerp.com>