Expected singleton res.currency() trace back
that occurs in account/account_move : _compute_tax_total
was caught by sentry.
Because currency is not available when we remove journal_id in account_move.
In res.company currency_id is a required field.
So we are accessing currency value from res.company.
Sentry-3946448424
closesodoo/odoo#113927
X-original-commit: 326ae981b767a9ae3cacd50099dcce354df591d8
Signed-off-by: William André (wan) <wan@odoo.com>
Steps to reproduce:
1. Settings > Accounting > Vendor Payments > Checks > Enabled with
Print Check (Top) - US
2. Accounting / Vendors / Payments
3. Create at least 2 vendor payments using "Checks" as the payment method
4. In the list view select both payments and click action/print checks
5. Error
Bug:
in `_render_qweb_pdf_prepare_streams`, in the case of multiple
documents on multiple pages, we can only split them if the pdf has an
outline, and it will have an outline only with templates that have a
header tag. For the ones that don't have them like
`l10n_us_check_printing.print_check_top`, it is not possible with the
current logic to unambiguously split them. (maybe we can add a
heuristic like if number of pages = number of documents we can assume
1 document/page)
thus the streams returned by `_render_qweb_pdf_prepare_streams` don't
contain the record ids and
`safe_eval(report_sudo.attachment, {'object': record, 'time': time})`
might fail based on the expression to evaluate.
Fix:
It doesn't make sense to save the attachment if we can't split the
attachments clearly anyway, so we can just continue and skip the saving
if record is null
OPW-3124089
closesodoo/odoo#113863
X-original-commit: 1fac708bd335dce27eeb77e0a11e12883a83dac6
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
To reproduce the issue:
- Website (edit mode) > Drop a snippet with icons (e.g. "Steps").
- Open mediaDialog to change an icon.
- Select the same one (or click immediately on "ADD") > This will set an
empty icon (without any "fa" specific class).
The code on `MediaDialog` > `save()` adds CSS classes from the original
icon to the new created one then removes the old 'fa' classes from it.
(see `initialIconClasses`), as a consequence, the class will be deleted
(not replaced) when the selected icon is the same as the old one.
The goal of this commit is to fix this behaviour by simply closing the
dialog if the selected icon remains the same as the old one.
task-3210472
closesodoo/odoo#114345
X-original-commit: 0515e987b985622bc7b913dbbb37c0d0cd69eb4b
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
An error is thrown when trying to edit the tax in a vendor bill
Steps to reproduce:
1. Install Accounting
2. Go to Accounting and create a new Vendor Bill
3. Add product 'Large Cabinet' to the bill
4. Click on the pencil icon next to the tax in the total amount
5. An error is thrown
Solution:
Partially revert the erroneous fix in TaxTotalsComponent by adding the
currency getter. If there is no currency, floatFormat will fallback on a
decimal precision of 2.
Problem:
https://github.com/odoo/odoo/pull/108412 removed `currency` from
TaxTotalsComponent. This value was passed in the props of
TaxGroupComponent so it was undefined.
opw-3212170
closesodoo/odoo#114362
X-original-commit: 59a1d1f825cfbc1f720cccb80de212f6ee6d5404
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Before this change, when the recipient_single_description field was empty (the field is then false), the field box was still displayed before the number. Since the field is not editable there is just a blank space.
This PR hides the field when it is empty to avoid having the empty space.
closesodoo/odoo#114354
X-original-commit: a7425a2d829a7bfe0e25619a3bd5c40d9e112bb0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
Now the promise waiting for all async no longer relies on a setInterval.
It was a hack that can be better solved by listening to the data sources
event.
closesodoo/odoo#114348
X-original-commit: de1f42f98410bc796dfdbfd237b1e20be4496166
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
1. Install [Manufacturing] on Apps
2. On [Settings]>[Manufacturing]
- toggle on [Work Orders], [Quality] & [Quality Worksheet]
3. Go to Manufacturing
- Work Centers (a.k.a WC) Overview should be visible
- if no W.C. by default, add from [Configuration]>[Work Centers]
- give tag to each W.C. (lengthy so as to test the overlap)
- click Manufacturing and [Group by] Tag (Custom)
affected branch: 16.0-master
opw-3177656
closesodoo/odoo#114303
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
Refactoring send&print wizard.
==============================
Main reason for this commit is that we want to let the user
decide when to generate the relevant documents / approvals
for its invoices. The natural choice is when the information
leaves Odoo. So now, each time the users decide to
download/send its invoices, he will be able to select the
relevant documents to be generated and the approvals to be
requested from the send&print wizard.
This used to happen automatically during the posting with lots
of undesirable behaviors (difficulty to update/revert, hard to
know exactly what will happen,...)
Main changes:
1/ Send&print wizard
- The model 'account.invoice.send' has been replaced by
'account.move.send' and became models.Model to handle
asynchrounous generation of documents (webservice,..) in
case of more than one invoice.
- The wizard is meant to be overriden in order to add
checkbox and document to be generated. A comprehensive exemple
can be found in account_edi_ubl_cii.
2/ Import invoice from attachments
- The decoding logic has moved from account_edi to account
on the attachemnts.
- The function _extend_with_attachments() serve as a common
entry point for import (from chatter, dashboard).
3/ Export invoice pdf / document
- All the specific actions to export attachments should be
implemented on the account.move and called from the wizard in
_generate_documents()
- The official pdf for the invoice is now only generated once
the user request it. In order to regenerate the pdf and
documents, it needs to be deleted.
task-id: 3117238
[enterprise](https://github.com/odoo/enterprise/pull/36757)
[community](https://github.com/odoo/odoo/pull/111857
)
[IMP] web: enable close on ir.actions.act_url in wizard
Before this commit, calling ir.actions.act_url on a modal
leaves the modal open. Which feels ackward in the send&print
wizard.
We now enable 'close' parameter on ir.actions.act_url. If set,
the wizard will close after act_url.
closesodoo/odoo#111857
Related: odoo/enterprise#36757
Related: odoo/upgrade#4387
Signed-off-by: Laurent Smet <las@odoo.com>
* Add refunds with liquido docs
* Add Is AFIP POS field (l10n_ar_is_pos)
* Adapt letter mapping
* Add unit test
closesodoo/odoo#111076
Related: odoo/enterprise#36322
Signed-off-by: Josse Colpaert <jco@odoo.com>
This commit fixes an issue with the width of items in the we-list not
being correct when they are being dragged using jQuery's sortable
feature.
Steps to reproduce the bug:
- Drop a "Form" snippet on a page.
- Add a "Multiple Checkboxes" field in the form.
- Move an option from the list using the move button.
- Bug: while dragging the item, the width of the items is too small.
When an element is dragged, it is given an absolute position which takes
it out of the normal flow of the document, causing the input element
within the list item to no longer be able to correctly occupy 100% of
the available width.
task-3138662
closesodoo/odoo#114343
X-original-commit: e0a4ed0b21a9f87678e13609ff597cf1b3ae4189
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
Currently, even if a `default_quantity` is given to the replenish
wizard, that quantity will be overwritten by the product's
`virtual_available`, which defeats the point of setting a
`default_quantity`.
This will allow to bypass that computation when a `default_quantity` is
given to the wizard.
Also makes it return a close action with some custom info when `Confirm`
is clicked, so it's possible to know which button was clicked to close
the wizard.
closesodoo/odoo#113394
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Add a way to disable the read() done in the forecast report. While those
are useful to send the right data to the client, they have no use and
even slow down the process when the forecast report lines are generated
for a python-side use.
Part of task-3059467
Part-of: odoo/odoo#113394
Adds in a new report that allows the user to monitor the entire
production of a product, including the resupply of the components (i.e.
subassemblies, purchases, ...) in a single view.
Task-3059467
Part-of: odoo/odoo#113394
Steps to reproduce:
- create two storable products (Great Product - Super Product) - automated avco
- create rfq with the two products - confirm -receive products
- create Bill - set qty of one Great Product to 0 -> save
- create bill for the Great Product - confirm
Issue:
User Error You can only reconcile posted entries
Cause:
`_get_all_related_aml()` fetches all aml related to the `stock_moves` with the product in the bill we want to post.
It retrieves the aml of the bill in which we have put the product quantity to 0 but that it is still in draft.
And we try to reconcile this draft move_line in
https://github.com/odoo/odoo/blob/d0fdc38385f5f259da259d21e9137494e6d7c17d/addons/account/models/account_move_line.py#L2308
Solution:
filter the `product_account_moves(_lines)` so we don't take into account moves that are still in draft
opw-3180209
closesodoo/odoo#114328
X-original-commit: b1a74a1841c05e4e37643e17f6b97dfff11555cd
Signed-off-by: Adrien Widart <awt@odoo.com>
For the moment, the price unit of the down payment line on the sale
order is not always correctly computed. If the price unit is updated on
the down payment invoice, it is not updated on the sale order; or if a
regular invoice is created, the price unit of the down payment is set to
zero on the sale order.
This commit corrects the behavior by using the unit price of the invoice
line.
opw-3140740
opw-3160406
opw-3160420
closesodoo/odoo#114304
X-original-commit: 755c517fcab89df51e8b0ee4529894372b4d4ec1
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
Dispatch events `onExternalHistorySteps` and `historyResetFromSteps` so that
they can be catched by the html_field to trigger a `refresh_behaviors`, in order
to refresh (instanciate) Behavior components.
Task-3208896
closesodoo/odoo#114262
X-original-commit: 9c6ed77988e20855ca67c5f1e03d9d2e274442cf
Related: odoo/enterprise#37745
Signed-off-by: David Beguin (dbe) <dbe@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
From BS4 to BS5, the `form-control-file` class has disappeared and
became `form-control`.
This commit replaces the occurrences of the old class by the new one.
It is necessary because by letting the old class, it is impossible to
place a form label above a `File Upload` field.
Indeed, since the `.form-control-file` CSS rule setting the `display`
property to `block` has been removed, the file input now has `display:
inline-block` by default, which is why the label would end up on the
same line as the input, instead of on top. With `.from-control`, this
rule is back, allowing to place the label on top again.
After this commit, the look of the file input will change. This is
because in BS4, with the `form-control-file` class, the input was the
browser native one. It could be customized using `.custom-file` (and
the associated `custom-file-*` classes). But in BS5, the file input is
directly a custom one, thanks to custom styles added on top of `.form-
control`.
task-3071151
closesodoo/odoo#114261
X-original-commit: 7dcfe19c15bd96d65e5fda463ad65d083c6b8fcf
Related: odoo/enterprise#37744
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Before this commit, in a grouped kanban view, a lot of rerenderings
were done when the user dragged a record from a column to another.
This commit adds an option to Record.update to bypass the rendering
part, and we use this option for calls during the record move and
resequencing, as we know that the view will be rendered at the end
anyway.
Fixes performance issues spotted on odoo.com (Project task grouped
kanban view).
closesodoo/odoo#114225
X-original-commit: 3aa91db099532c09b12f1a4148ae3829a1a9593b
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The evalContext getter is called a lot of times during a rendering
of a view, by several components (the renderer, the fields...).
It is a getter better it can evolve (with reloads, changes...) and
we wanted to ensure that it's always up to date. This causes
performance issues, in particular in grouped kanban views where
we can have a lot of displayed records, and fields.
To mitigate the issue, we introduce a brief cache that is reset
after a micro tick. The rationale is that during a rendering, the
evalContext doesn't change, so we'll compute it once and then
retrieve the same object. After a micro tick, the value is reset,
so it will be recomputed the next time we need it.
Mitigating perf issue on odoo.com (Project tasks grouped kanban
view, when resequencing records).
X-original-commit: 7ec8e3124325da65031c6c7c392c34f56c534cc5
Part-of: odoo/odoo#114225
If the IBAN includes a non-ASCII alphanumeric character and has just the right length, the IBAN validation crashes with a KeyError before validation can take place.
Fictional example: The supposed IBAN code "Bank München-Wiesn GmbH" gets normalized to "BankMünchenWiesnGmbH"; a string that starts with a valid country code ('BA', ie. Bosnia-Herzegovina) and happens to have the same length as Bosnia-Herzegovina's IBAN format (20 characters). Normally this erroneous IBAN would've been rejected as invalid, but Python throws a KeyError when trying to convert 'ü' to an int right before the validation step.
We therefore need to also check if all characters in the IBAN code are within the expected range, namely [a-zA-Z0-9] (strictly speaking, the IBAN's specification range is only [A-Z0-9], but we can be lenient since Python's `int()` is case-insensitive).
closesodoo/odoo#114218
X-original-commit: 99769bad49795ed5eab4c04afc7c37ffd295aa19
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Elias <elre@odoo.com>
Before this commit, it was possible to drop a snippet in a non-editable
area (e.g. dynamic snippets).
Steps to reproduce the bug:
- Drop a "Dynamic Products" snippet in a page.
- Drop a "Columns" snippet in the same page.
- Moves a column from the "Columns" snippet into the "Dynamic Products"
snippet thanks to the "drag and drop" button.
- Bugs => It works when it shouldn't.
task-3054763
closesodoo/odoo#113796
X-original-commit: 4d61c356b7deed7fd0b01cb817c274afe384c0ac
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Adding a div above the two buttons allows to do a xpath more readable. In the enterprise PR, a new module bridge has been added between base_geolocalize and account_avalara that hides the refresh button when the address has been validated by avalara.
closesodoo/odoo#113210
Task-id: 3186071
Related: odoo/enterprise#37157
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
The workorder wizard helping to track the time spend on the workorders has been automated.
The name of the employee will automatically be the name of the admin of the session.
The productivity will also be updated based on the duration
The duration, start date and end date will update based on the two other ones.
This changes will ease the addition of time trackings.
closesodoo/odoo#107473
Related: odoo/enterprise#34786
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This main feature of this commit is adding the possibility to login with multiple employees on the list view of workorders.
There is now a button in the header that will allow to log in as an employee in the list view.
The flow is the following :
- The employee logs in
- He becomes the "admin" of the session and his name appears next to the log out button.
- If another employee logs in, he will become admin and the first one will no longer be visible in the header.
- The employee will start timesheeting on the workorder if he press the start button. Notice that the employees working on the workorder will appear in the last column of every work_order record.
- If this second employee logs out, the first one will not become admin automatically. He will first need to click on his name/avatar in the popup and will be asked his pin code (if needed) to log in again.
There is also a way to assign employees to a workorder.
A filter will help retreive the workorder on wich the admin of the session has been assigned.
In addition, a new button in the header allows to mark as done multiple workorders at once.
The timer component has been updated to avoid wrong values if the computer goes to sleep mode.
The wizard of the workorders allowing to see the time traking has also be modified (switching tabs).
From a more technical point of vue, the employees and admin will be saved in the session.
The employees working on a workorder will be saved on the record.
related : https://github.com/odoo/enterprise/pull/34786
Part-of: odoo/odoo#107473
Problem: With Switzerland accounting localization installed,
the user is unable to create vendor payments for non-Swiss contacts or contacts with non-IBAN accounts
because a qr code will try to generate due to compute_qr_code.
Eventually, an error will be thrown since
the raises_error param for _eligible_for_qr_code is True by default.
When _build_qr_code_vals calls _eligible_for_qr_code, it did not explicitly pass the raises_error arg.
Thus, instead of returning None, an error is thrown instead, blocking futher operations.
Proposed Solution: Method _build_qr_code_vals should pass raises_error = not silent_error to _eligible_for_qr_code.
There is an inverse relation between silent_error and raises_error.
By default, silent_error is True so it's safe to assume that raises_error = False
because the compute for the qr code on payments should not raise any error.
This fix will resolve the issue when computing the qr code for payments while being fluid with other method calls.
closesodoo/odoo#114256
X-original-commit: 45d34a8630918abe2f988f7ed0e0df153a3edd51
Signed-off-by: William André (wan) <wan@odoo.com>
Before this commit, the "rank by" parameter was deleted when a visitor
added a search criteria. This commit solves this problem.
Steps to reproduce the issue:
- Go to "/profile/users"
- Click on "Rank by" and select "This week"
- Search for a user (e.g. "admin")
=> The "rank by" parameter is lost and if you click on "This week"
again, the search (admin) will be lost.
task-3058239
closesodoo/odoo#114253
X-original-commit: eed9e3d8c1366f457d2f3170741c09ab2143d912
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Before this commit, search criteria could be lost when a visitor added a
new search criteria on blogs. This commit solves this problem.
Steps to reproduce the issues (with activate the sidebar):
- Go to the /blog
- Click on the adventure tag
- Select a month in the date filter
=> The adventure tag is lost.
- Go to the /blog
- Select a month in the date filter
- Click on the adventure tag
- Remove the date filter
=> The adventure tag is lost.
- Go to the /blog
- Select a month in the date filter
- Search for the blogs containing the word "heli"
=> The date filter is lost.
task-3058239
X-original-commit: 53ac1736b323257b2545946a8f96d06294c7b8c8
Part-of: odoo/odoo#114253
Before this commit, following these steps:
- Have more than 30 attendees for an event
- Go to the event page
- Click on community
- Search for a letter that is in the +30 attendees names
- Go to the second page of search results
=> We lose the filtering of the attendees by the letter. This commit
allows to keep the filters when the user is on a result page and
changes page.
task-3058239
X-original-commit: 2c7d923b11f2c31c3ae2137a7ff9baf0b58c0be6
Part-of: odoo/odoo#114253
Before this commit, following these steps:
- Have more than 30 users
- Go to /profile/users/
- Search for a letter that is in the +30 users names
- Go to the second page of search results
=> We lose the filtering of the users by the letter. This commit allows
to keep the filters when the user is on a result page and changes page.
task-3058239
X-original-commit: dbd52ed56bff2889b0d64b04314e61ff25a6e9c8
Part-of: odoo/odoo#114253
Before this commit, following these steps:
- Go to /blog
- Enable the customize option 'Top banner - Name / Latest Post'
- Disable the customize option 'Full-Width Cover'
- Search for the word 'helicopter' in the blog post search bar
Two problems are then visible:
1) The top banner is always visible with a blog post that does not match
the search. This top banner should not be visible (like for tag and date
searches).
2) There is an alert message 'No results for "helicopter".' while the
blog post 'Maui helicopter tours' matches the search.
This commit corrects both errors.
task-3058239
X-original-commit: c28cf4b44c4fd9a1800d5fb1ad6e8c734feb9057
Part-of: odoo/odoo#114253
Very niche usecase, but still:
\- Create a planning shift, set a recurrence for ever.
\- Go few occurences later (form via kanban) and set...
...recurrence type to "Number of Occurences",
...recurrence nmber to 1.
\- Save.
The write method will update the recurrence
so that it only contains only one occurrence.
Consequently, the record you just updated is deleted.
Then we try to fetch the record to display its form again.
Because de read returns [], _fetchRecord rejects the promise,
and we're stuck.
So, in this commit, we make `FormController.saveButtonClicked` call
`Record.save` with its params, so itself can be called with throwOnError,
and the potential error catched.
We all so cover the case where `BasicModel._fetchRecord`
returns `Promise.reject()`, in `BasicModel.save`.
Also, `Record.save` has an object as a default value for params.
When we call it from `FormController.saveButtonClicked` with params,
say params is an empty dict, the default value will be lost.
Istead of overriding this object, this commit only overrides/adds
the key of the object we give `Record.save` if any.
Also, when investigating on that, we jsut noticed that,
when you click save on a form dialog,
it reloads the record before closing it, which is useless.
closesodoo/odoo#112335
Related: odoo/enterprise#37752
Signed-off-by: Audric Onockx (auon) <auon@odoo.com>
This commit adds the possibility to display a properties field in a list
view.
How it works:
When a properties field is present in the arch of a list view, it will
not be displayed directly. It will display its properties as an optional
column. Now, we will find at the end of the dropdown of the optional
columns a section by record parent of the properties field. The proposed
sections will be the properties linked to the parent record of which at
least one record referring to it has been encountered during the
navigation in this list view.
(A parent record is the record storing the properties definition).
Limitation:
Multi-editing is not applicable on properties fields as you cannot edit
one property without modifying all the others.
closesodoo/odoo#112005
Taskid: 3105039
Related: odoo/enterprise#37004
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: mcm-odoo <mcm@odoo.com>
Co-authored-by: FrancoisGe <fge@odoo.com>
Accounting firms are often connected to customer's company, so often single company database. To know easily in which company they work we think that it should be better to show the name of the company on the top for them. A systray item is therefore generated at the location of the company selector. It is visible only when there is a single company (so no company selector) and only when accounting firms mode is on, i.e. the setting field is set to either one of these values ('customer Invoices', 'Vendor Bills', 'Customer Invoices and Vendor Bills')
closesodoo/odoo#108928
Task: 3110453
Pr: 108928
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Before this commit:
The key used in the foreach, `line`, is an object, which is converted
into the following string `[object Object]`, resulting in duplicate keys
and display a traceback when changing the supplier on an orderpoint.
After this commit:
The key used is `line.name`, which is a unique date across the dataset,
preventing any duplicate keys.
opw-3168077
closesodoo/odoo#114254
X-original-commit: 364ba497fc86928bf4a7be5b6777f8e2fffdf127
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Walravens Mathieu (wama) <wama@odoo.com>
Before this commit, the user had the possibility to spam the "Log in"
button when trying to connect. This could lead to a change of the CSFR
token and an errror of type "werkzeug.exceptions.BadRequest: 400 Bad
Request: Session expired (invalid CSRF token)" could then happen.
This commit makes the “Log in” button un-clickable once it has been
clicked and adds a loading effect to it.
task-2996329
closesodoo/odoo#114226
X-original-commit: e6273856b2f5ef13c5cf965ae79b830498beaa5a
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
When a peer "A" connect to the peer to peer network, if he receive a
stale document from a peer "B", peer "A" will never be able to save.
This situation can make impossible for any new peer to receive a
converging document and block the ability to save until every peer
disconnect from the network.
task-3196778
closesodoo/odoo#114268
X-original-commit: 537f34f764fae3967496d466c420d72d172b241d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
before this commit, on confirming a sale order with a product having Re-Invoice Expenses is set to at cost or sale price and if analytic accounting or full accounting feature is not enabled for user, on confirming sale order access error is shown.
1. create a product with Re-Invoice Expenses as at cost or sale price
2. remove user from analytic accounting group and full accounting feature group (in my case new db with sales and inventory installed only)
3. create a sale order with this product and try confirming it
4. access right error is shown
after this commit, on confirming sale order, access error is not raised.
closesodoo/odoo#114255
X-original-commit: 42206bbd0cc5a86047f3a1b941896c0ceb463efb
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
- Compute the fixed amounts first before managing the percentage.
Suppose a fixed line of 100 plus a percentage line of 100%.
For 1000, the previous behavior was 100 + 1000 = 1100 != 1000
- Manage fixed amounts in multi-currency.
With multi-currency, apply the rate to compute the company amount.
- Ensure the full amount is dispatched exactly with percentages.
Suppose 2 percent lines of 50%. To dispatch 0.03, the previous behavior was computing 0.02 + 0.02 = 0.04 != 0.03 leading to a not balanced journal entry.
- Don't discard the last new line when clicking outside the sheet.
Click on "add new line", then click on the empty space near the form view.
=> The last added line is removed.
closesodoo/odoo#114025
Signed-off-by: Laurent Smet <las@odoo.com>
How to reproduce
=================
Give a badge to an employee, when checking the sent mail, The image and
description of the badge is nowhere to be seens.
Those fields don't display because the description contains P html tags.
The presence of the removed `t-if` is the main cause of the issue.
Adding a `not` to the condition solves the issue. This not was lost
during the Jinja -> Qweb translation (commit 68182ba)
opw-3099419
closesodoo/odoo#114259
X-original-commit: c90add64f91667d5c9f2294029aa674b19981278
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
account_sequence module is adding an extra value to the move name in
order to make it unique. For example if we have more than one vendor
bills with name FA-A 0001-00000088 the result will be:
* record 1: FA-A 0001-00000088
* record 2: FA-A 0001-00000088 (1)
* record 3: FA-A 0001-00000088 (2)
When using document type the vendor bill name should not need to be
unique and it can be repeated, because it depends completely in the
partner, in that case we should not add the "(N)" and leave the name as
it is, because changing the name will result in problems like reporting
VAT BOOK.
latam task 976 / OPW 3204261
closesodoo/odoo#114270
X-original-commit: 6b8f69a8ee51275957346ecf8b72068022096448
Signed-off-by: Josse Colpaert <jco@odoo.com>
To reproduce
============
- on accounting -> Vendor -> Bills
- upload the PDF attached on the ticket
an exception is raised
Problem
=======
PyPDF2 finds that this pdf is encrypted,so we try to decrypt it with empty password,
but the decryption fails which rise an error.
Solution
========
according to this [commit](https://github.com/odoo/odoo/commit/851fe64f7789bb398383c22e3ebbaebb051791f6), when the decryption fails
we skip reading the attachments and carry on to allow the user to upload the document.
opw-3196780
closesodoo/odoo#114269
X-original-commit: 124250d123666ea818d2c8004cadae2ccc43aa0e
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
Prior to this commit, animations on SVG shapes could use a lot of CPU
and make the page stutter on some website + machine combo.
This does not seem to be an "Odoo Only" issue as browsers seem to
struggle to optimise SVG movements and end up consuming a decent amount
of CPU depending on the machine, the size of the SVG and its position
(behind or on top of other elements).
This commit applies a new class which will warn the browser that the
element is animated. Depending on the browser, some optimisations are
done.
On Chrome and Safari, a new layer is created which simplifies the
rendering of the page and sometimes takes advantage of hardware
acceleration.
On Firefox, no optimisation is done yet. This might change in an update
which would take advantage of the CSS Property.
The documentation says to only use `will-change` when an element is
about to change. This is the case however, as most of the shape's
animations are looping. Which is why it's applied to every shape that is
animated.
This optimisation only applies to background shapes with this commit.
Performance improvements observed by (at)rdeodoo on his machine:
- SVG: 200% CPU
- SVG + fix (will-change): 55% CPU
(additional infos available in the PR)
To note: one way to easily see the improvement is on the "Layers" tab of
the Chrome devtools. Before this commit, the entire #wrapwrap is
repainted every time the shape changes (so 60 times per second since
that is the framerate the browser aims for). With this commit, the
#wrapwrap and the shape are contained in their own layers so the
#wrapwrap is only painted once.
Other solutions were considered but not used at this time:
- Reducing the frame rate of the animations. This is not currently
possible because browsers do not offer any way of doing that.
- Removing bits of the shape can reduce its CPU consumption, but
whenever a transform animation is present, the CPU usage remains high.
task-3142001
closesodoo/odoo#114252
X-original-commit: 03418be1c67e71a22f6d2ce79675280f889b663c
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
This commit adds the possibility to navigate between the different views
of the view switcher from the palette command.
closesodoo/odoo#113658
Taskid: 3205658
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the accounting module had a setting on the selection of taxes used by the sales, purchase, website_sale, ... modules. In addition, the website_sale module had the same setting related to the accounting one.
This PR isolates the tax selection parameter in the website_sale module, and instead of using the tax selection, the accounting module will use rounding method (round per line, round globally).
Selecting one of the two will change the display of all account_move or other view using the tax selection setting.
Display changes:
In round per line, a column tax excluded will always be displayed while a column tax included will be in optional hide.
On the other hand, in the round globally, only the tax excluded columns will be available.
closesodoo/odoo#99209
Task-id: 2954332
Related: odoo/upgrade#3826
Related: odoo/enterprise#30853
Signed-off-by: William André (wan) <wan@odoo.com>
To reproduce the issue:
1. Go to 'res.country.state.csv' in base
2. state_ch_sh is "Shaffhausen"
Error: should be "Schaffhausen"
State code is still SH because
ISO 3166 code for this state is CH-SH
OPW-3199628
closesodoo/odoo#114202
X-original-commit: 245804aabb5cd8b3a84b2a4836b188ec9fb144e1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>