In V16.0 it is currently no longer possible to use the POS
if the pos_six module is installed
This bug is a combination of 3 factors
1. the new assets: a single file contains all the JS files, concatenated.
2. one of these files contains the instruction "use strict",
which stiffens the code of the function in which this is mentioned,
and which prevents certain syntactic approximations
(like calling a variable without seeing it declared, this case)
3. We added Sha1, in its file of course, but not in its own function,
the use strict then applies to the entire asset file
This reverts commit e08858e5ed02fe74160dabd6a91e1de88640956f.
closesodoo/odoo#105582
X-original-commit: 2426c26a0fbbb2d5e50203922cb64f9001ac73e0
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
This commit is to compute correct lot number for serial/lot tracked
products on refund invoices
Reproduction:
1. Install Sale, Accounting, Inventor. In setting of Inventory, enable
Lots & Serial Numbers, Display Lots & Serial Numbers on Invoices,
Display Lots & Serial Numbers on Delivery Slips.
2. Create a product with lot/serial number
3. Create a order of this product, confirm. Click the delivery and
validate it.
4. Back to the SO, create an invoice, confirm and print it, the serial
number shows.
5. At the invoice, click “Add credit note”, choose “Full refund” (2
invoices for the SO) or “Full refund and new draft invoice” (3 invoices
for the SO), the lot number doesn’t show in new draft invoice or the
refund invoice
Reason: the current lot number tracking workflow focused on invoicing
different numbers of products and making sure it gets the correct
lot/serial number. It doesn’t include the refund invoice case.
Fix: since the current working logic works great with invoicing products
which are delivered from the warehouse to the customer, we can reuse
this logic for refund invoices for products which are returned from the
customer to the warehouse. In the refund and return case, we switch the
calculation of warehouse and customer. Thus, a return can be seen as a
delivery from the customer to the warehouse.
In the code, we set a new variable, return_source_usage, to check if the
account move type is a delivery or a return. If it’s an invoice for
return, we take the opposite of the previous invoiced product quantity.
Because in a refund, previous invoiced is now considered as refunded.
In the original workflow, when sml.location_id.usage is “customer”, it’s
a return and we update the returned_qty and the related quantities. In
the new workflow, if the invoice is a refund one, we do the same steps
when sml.location_id.usage is “internal”, e.g. when the stock move line
is a delivery, we consider it a return.
For refund invoices. There are two choices of refunding:
1. refund and a refunding invoice: 2 invoices for the order, one is the
original one, another is the refund
2. refund and create a new draft invoice: 3 invoices for the order,
original one, a new draft one and the refund.
In the second case, we will create a new draft invoice. If we simply
apply the original work logic, the lot number will not be printed on the
draft invoice. This is because the previous amls list includes its
original invoice. We have to filter out the duplication of the same
invoice to print the right lot number for the new draft invoice.
Added the report test for two refund cases, one for cancel (Full refund)
and another for modify (Full refund and new draft invoice)
opw-2879714
closesodoo/odoo#105602
X-original-commit: 15194cec233332e787b9f546e39c6127301ff9aa
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
Since Odoo 16 is also responsive in community, we can activate
the mobile main flow tour.
closesodoo/odoo#105606
X-original-commit: 453882a17e27b89b87e2573732d17d96970d4a96
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit fixes the styles applied to the popover in left/right
direction. Since start/end are used as the classname of the popover,
the element was no longer animated, as it is the case for top/bottom
directions.
For example, when adding data-tooltip-position to an element using the
data-tooltip attribute, the element appeared, but without an animation
for horizontal positions only. After the commit, animation is played
for any position.
The commit adapts the stylesheet of the component to adapt to the
renaming of left/right to start/end.
closesodoo/odoo#105144
X-original-commit: 14553007ec2d46cf1a70bf4e5b228d30c7a817b5
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
Steps to reproduce the issue:
- Have the modules `hr_expense` and `account` installed (not `account_accountant`)
- Create a new expense
- Change the category
- Click on analytic distribution field
=> Traceback
The issue comes from the fact that the account field is present but empty (we don't have accounting).
For the old and new account field, we have 2 undefined values.
We then do a shallowEqual of these, where it will compare length attributes, so traceback.
To solve it, we just give it a value false to the field instead of being undefined for the comparison.
closesodoo/odoo#105593
X-original-commit: face5b8f9134fc052ea09742667a610b508a4886
Signed-off-by: John Laterre (jol) <jol@odoo.com>
It can happen that the payment transaction route is called without the
amount kwargs, the code would crash in that case as we tried to access
it either way.
We moved the code after setting the default amount in the kwargs to
avoid a crash.
closesodoo/odoo#105576
X-original-commit: c124fb3292439a6237f16eff406c0a7d375cab65
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
The Accounting Journal Dashboard Kanban view contains direct owl components and directives. This should not be the case as it may cause problems with studio.
This commit replaces the direct owl with
1. a view widget for the file uploader buttons.
2. the kanban record template is extended to add the dropzone and file uploader with context
Task-3040946
closesodoo/odoo#105575
X-original-commit: 5de857d56c5f4cff318ed6b6c7dd15bf426e6a18
Related: odoo/enterprise#33877
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
Due to bc8d7590c04a0f1391021c8d1354f1eabca9742c, the error popups were mistakenly removed.
closesodoo/odoo#105567
X-original-commit: 954d733668f1028fa5ec8471c3cf3a6a6a8246b9
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
This commit restores the `display: inline-block` to the fields' textarea
to match the char field's input and allowing the textarea and the icon
to stand side-by-side. This rules went away in the
odoo/odoo@fb0bebc6cf commit, but should
have been restored in this case afterward.
Although, a tweak is required for the editable ListView as it triggers
a layout shift at the row's height level (ie. bigger when editing). This
is due to the textarea content's vertical alignment which, in its
default setting (ie. baseline) makes room for the descender portion of a
letter (eg. the part below the baseline, as "g", "j", "q", "p", "y"
letters) and, as result, makes the field vertically bigger.
Steps to reproduce:
- In Settings, add (at least) another language
- Open Project
- Open a project
- Edit a kanban stage
=> the description field's translation icon is below the textarea
closesodoo/odoo#105565
X-original-commit: 2168893749c2c361c3c79e8c3879d673e366c36b
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Simplify the arch of the account_tour_upload_bill view.
Use the CSS grid from bootstrap instead of the mulitple cols and colspans.
Steps to reproduce: `-i account_accountant,l10n_fr --without-demo all`
Then, in the accounting dashboard, click on "Upload Vendor Bills".
closesodoo/odoo#105562
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit fixes an issue where if a ticket is free, the registration would
still "need to be paid" by the attendee.
This behavior is contradictory for a free ticket, so the attendee now has to
pay the ticket if it is not paid and is not a free ticket.
task-3012928
closesodoo/odoo#105559
X-original-commit: 2b0587fb52bf50d303e3a99ae8aded942ccb69b1
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
In a grouped KanbanView, long group's title makes the group (aka.
column) grows instead of keeping its original size and truncate the
title using an ellipsis.
This commit fixes it by forcing a maximum width in addition of the
Flexbox rules (`flex-basis`, `flex-grow`) to prevent this effect.
Steps to reproduce:
- Open CRM
- In the KanbanView, create a new Stage with a very long title
=> the column grows instead of keeping its original width
closesodoo/odoo#105554
X-original-commit: d9872ecce78d6d7ad02cdaa16782aa473e5a7655
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
In grouped KanbanView, group's width follows three usecases:
- on smaller screens, the group (aka. column) takes 90% of the viewport
(to give a hint of the next/previous column)
- on desktop-like screens, the group's width is based on the regular record's
width and padding
- on desktop-like screens, a smaller variant of the one above (cf.
`o_kanban_small_column`)
As the definition of those usecases where a bit
all-over-the-place, this commit takes advantage of the CSS custom
properties and the cascade to conditionally define the
`--KanbanGroup-width` property and set only once the group's width (cf.
`flex-basis`).
Note: it fixes a small issue where the "quick create" column was always
set to the smaller variant, even with regular record size.
X-original-commit: d7aa7dc892c9aa7120291e6eedad7f03bf78baf2
Part-of: odoo/odoo#105554
*: website_mass_mailing (tests)
- Web Editor facts:
Since the refactoring of the editor done at [1], the cookies bar popup
is receiving a `contenteditable=true` attribute, making it receive the
chrome default `height` style for such elements.
The problem is that if this cookies bar's modal is hidden, the bar will
be shown as a thin empty white bar.
- Website Builder / Popup Snippet / Cookies bar facts:
A popup element is composed of a `.s_popup` parent containing the actual
`.modal` BS modal. Our internal logic and events are hiding and showing
this inner `.modal` modal element without considering its `.s_popup`
parent. It means that when the `.modal` is hidden, its `.s_popup` parent
is not touched and kept visible.
It might looks like it's not an issue as it would just be an empty
element (its only child is hidden) but it leads to some issues as
explained just above: an ugly white bar is shown.
Note that the cookies bar is nothing more than a `.s_popup` snippet.
- Web Editor facts 2:
During the mentioned refactoring [1], they actually added some code to
hide this bug once you were playing with the edit mode (mainly for when
you clicked on the invisible panel element or before saving).
But this code was actually not fixing the case when you just entered
edit mode.
This commit simply remove that "edit only" web editor logic and add a
new one in charge of simply synchronizing the `.s_popup` snippet
visibility with its `.modal` BS modal in a public widget (which is
obviously also executed in edit mode).
Finally:
- note that if there is no way through regular flow to arrive to the
same result with a normal popup snippet, it is still concerned by this
issue and you can reproduce it by moving it somewhere else in the DOM
and/or simply adding it the `contenteditable=true` attribute.
- we already fixed that issue a few months/years ago, I couldn't find
a commit related to that so I don't know if it was due to the same
root cause
- in case one is wondering why we simply couldn't do that in the already
existing `_onHideModal` of the `PopupWidget`, it is because that
`hide.bs.modal` is not called when entering edit mode, because the
`destroy` is destroying it before hiding the modal. The event is thus
not fired. And we can't move the hide part before the destroy's super
because otherwise, it would go through the normal hidden process which
is creating a "seen" cookie for the popup as if it was closed
manually.
[1]: https://github.com/odoo/odoo/commit/740168ce8d27da3d6a7156d2d79655a898394923
task-2754108
closesodoo/odoo#105553
X-original-commit: 21a5e7000f08fbd1936173937c7d90b152a5414f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Pingen does not support localized country names, as such we need to force English locale.
closesodoo/odoo#105456
X-original-commit: e0233bff032c722cb309357c4b329bf9fe1aae43
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Solan Delvenne (sode) <sode@odoo.com>
This is a port of https://github.com/odoo/enterprise/pull/30046 for wowl
Steps to reproduce:
On a mobile device:
- Go to Inventory > Product Variants
- Switch to the list view
- Long press on a record
-> We can't scroll to select records below the current screen
closesodoo/odoo#105545
X-original-commit: cd874593b2390efba8e92228f85e9cf07c0e1a8c
Related: odoo/enterprise#33861
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Before, the `Layout` component was not friendly enough for
client action. There was no default component for `ControlPanel`
and `SearchPanel` in `Layout`, resulting in the fact that it had to be
defined manually in the client action environment:
```js
useSubEnv({
config: {
...getDefaultConfig(),
...this.env.config,
},
});
}
```
Now, the `Layout` component defines default component for `ControlPanel`
and `SearchPanel`. Making it easier to use for generic usage.
closesodoo/odoo#105413
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The _compute_related function can only update one translation but not all. We
decide not to update all translations to avoid increasing the time complexity.
As a result, the value for related translated fields should always be generated
in the runtime, and storing it is illegal.
A related translated stored field may work as expected in a single language
environment. But in mult languages environment, if you have a name field
name = fields.Char(related="parent_id.name", store=True)
changing parent_id in French, will only change the French translation of the
name field
This PR tries to remove these fields. And a warning is added to prevent
developers creating a related translated stored field in the future.
closesodoo/odoo#102553
Related: odoo/upgrade#4004
Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
... when re-opening the dropdown.
Before this commit, in an autocomplete component with an async
source, when:
- clicking on the input to open the dropdown,
- then typing something to filter the results
- then selecting one of them (which closes the dropdown)
- and finally re-opening the dropdown:
the previously displayed (and filtered) results were briefly
displayed, while the source was being fetched again. It thus
produced a weird and annoying flickering.
This commit fixes the issue by reseting the source before fetching
it.
closesodoo/odoo#105539
X-original-commit: 83769b00837f4eea29586f53709d65d3078ddce3
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
We made the field cumulated balance non exportable
in the GL.
Steps:
- Go to Accounting->Accounting->General Ledger
- Unfold and select one or several lines
- export lines
-> The cumulated balance is not computed
The reason is we don't pass in the compute as we don't
come from the search_read method when exporting, so we don't have a domain
to compute the cumulated balance.
As we can't force the domain, we override the fields_get method
to make the field non exportable.
opw-2800669
closesodoo/odoo#105538
X-original-commit: bd41d369342bfc97161a4190f03c98b718458aea
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
Before this commit, the field opportunity_id was only visible in debug mode in
the sale.order form view. It was correctly pointing to opportunities but, when
used to create new records, it was creating leads instead.
The field is now always visible so users can link sale orders and opportunities
and a context was added so that the field correctly creates opportunities
instead of leads.
Task-3039802
closesodoo/odoo#104123
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
It is really annoying to have thousands of duplicate entries in that
dropdown menu. This commit hacks the problem away, but modifying QUnit
in place. Some day, we should modernize our testing infrastructure, but
this will do the trick in the mean time.
closesodoo/odoo#105483
Signed-off-by: Georis François (fge) <fge@odoo.com>
Using the already existing indexing on the model to slightly improve the perfomance.
closesodoo/odoo#105354
X-original-commit: 4344d399002a32eeca05374527336d77a161c898
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Before this commit, the drag & drop feature for the Project "Tasks"
kanban view did not work if the drag sequence was initiated from the
title of the card.
This was due to the "o_kanban_record_headings" class having the CSS rule
`overflow: hidden`, because of a well known 6 year-long-and-counting
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1352061
Namely: mouse enter|leave events won't fire on anything underneath
elements having `overflow: hidden`.
This commit solves this issue by introducing a dedicated class name
'o_dragged' to all elements dragged using the `draggable_hook_builder`,
and defining on it the CSS attributes that were assigned in JS before,
as well as `pointer-events: none` on itself and all its children to
avoid the issue mentioned above.
Also in this commit: fixed a syntax error in a CSS rule in project's
"task_name_with_subtask_count_char_field" widget.
closesodoo/odoo#105353
Related: odoo/enterprise#33774
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Some tests are running tours, which have triggers on the amount.
The issue is that if the test is running on a company with another
currency than usd, and these tours ends up using a pricelist in USD for
example, then the prices in the website will be adapted and no longer
match the trigger in the tours.
This change aims to correct that by ensuring that only one pricelist
can be used when these tours are running, and that this pricelist
currency matches the one from the company. As such, the prices will be
as expected and the tours will run properly.
closesodoo/odoo#105523
X-original-commit: 9a81cf604bbbc626a0fa68219a4fe017cd781bc7
Related: odoo/enterprise#33836
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Because it causes them to be inconsistent with their images,
and causes issues with some website tours depending on them.
X-original-commit: cfbe95ae05fd0c87e24668fc8550da9fdd7ee70d
Part-of: odoo/odoo#105523
Before this commit, in a grouped list view, it was possible to have
empty groups when changing pages.
Why:
Before this commit, if a grouped list performs a load, then it is
checked if its previousParams are equal to the current one. If so, we
keep all the old groups empty. This requirement is related to the kanban
view, so we will move it to the kanban model.
The kanban view needs it when we archive data but don't want to delete
groups (colomns). So we perform a load but we don't want to delete the
empty columns.
How to reproduce:
- Go to a grouped list view
- Click on a record
- Return to the list view using the breadcrumb
- Go to the next page
Before this commit:
The groups on the first page are always present with those on the second
page. The groups on the first page are empty.
After this commit:
We only have the groups on the first page.
closesodoo/odoo#105488
X-original-commit: 04467197b9ec0851e3f9f7a74d1b97c5e27420bc
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
The valuation field of the product_id is company-dependent.
If the user validate the picking in multi-company context with his current company != picking company, then the checks may fail, and the account move can not be created.
closesodoo/odoo#105476
X-original-commit: c29c668d694ef8d675116d42393e496636072d13
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: David <dafr@odoo.com>
Steps to reproduce:
- Install website_sale_coupon
- Load demo data
- Create a promotion program that applies on the order
- Go to the webshop and add 2 different products to the cart
Bug:
The line of promotion is in second place, instead of at the end.
Fix:
move the old sale order line to the end if it applies on all the order
opw-2985632
closesodoo/odoo#105517
X-original-commit: 48d20d44cf08fee411411665013fdaca72bf39c3
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
This commit fixes a traceback when changing the attributes when the
current page has no products to display
TaskId-3045085
closesodoo/odoo#105515
X-original-commit: b8a1b1143eec4a85b9dc8b2c6fbb0112f6b813d7
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Before this commit, we had an issue with the width calculated
for data cell (see. sizeOfDataCell).
In some case, the width was 50% instead of taking 100% of the
available space.
This was because some elements of the inner groups that should not
have been visible were computed as if they were, taking an effective
slot in an innergroup's row.
E.g. with two labels:
Before:
"invisible label" and "label" on the same line with `style="width: infinite"`
"data field" on a second line with `style="width: 50%"`
After this commit:
"label" and "data field" on the same line with `style="width: 100%"`
Note that as `infinite` is not a valid value, this wasn't interpreted and
style attribute was empty.
Thanks to grid for still aligning elements even if they are technically
in different rows. It's why we only saw this issue because of the
width of the data cell.
Steps to reproduce:
- Go to Accounting
- Customer -> Invoice
- Create a new invoice
-> See Customer field
Thx to @kebeclibre
closesodoo/odoo#105489
X-original-commit: e177c63e3618e4b9e492a27d1301c098a0066cb6
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Before this commit, following this flow in the Website Builder:
- Enter edit mode,
- Drop a snippet with text,
- Paste a youtube video link,
- Click on the "Embed Youtube Video" option of the powerbox,
=> There is a traceback.
This is coming from the bad function calls in the Wysiwyg to create a
video node.
When [1] reworked the MediaDialog in owl, a first implementation was
done exporting some utils (saveVideos, videoSpecificMediaClasses). But
this implementation was not kept and later changed to use static methods
and properties on the VideoSelector class (createElements and
mediaSpecificClasses).
Unfortunately, the outdated util methods used in the Wysiwyg were not
changed, and it was breaking the youtube video instertions.
This commit changes the Wysiwyg to use the existing
VideoSelector.createElements and VideoSelector.mediaSpecificClasses
static method and property to fix this flow.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
closesodoo/odoo#105475
X-original-commit: 4923c20c29170407d43908f983f2a168241f4817
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Younn Olivier (yol) <yol@odoo.com>
When editing a m2m avatar field in the list view, keyboard navigation,
e.g. pressing arrow-left when the focus is on the right-most item,
results to a crash. Also, the "delete" button when in edit mode
is not there anymore so the user is unable to remove items.
This is because we are not building the proper list of tags. More
specifically, we fail to provide `onKeydown` and `onDelete` handler
to the tags, thus, it crashes and no delete button. This proposed
change fixes both issues.
closesodoo/odoo#105467
X-original-commit: 02a046708a96567a41b5f9aec0f71cefc92ab981
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Only server wide modules are being taken into account when calculating translations hash.
So user probably can't get translations of new installed modules unless it is forced by hard page reload (Ctrl+Shift+R).
Problem exists since https://github.com/odoo/odoo/commit/80d74e7ee0eab83dc5100e0776df09d04b882fec and the cause in that `mods = odoo.conf.server_wide_modules or []` string was unpaired with the following `if` statement during refactoring.
This commit restores computation of hash based on all loaded modules.
closesodoo/odoo#105466
X-original-commit: 859cd0463aec4533df30e4839367832fef0685fd
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Before this commit, when uploading an attachment then delete
then re-upload attachment again, the reupload was unsuccessful.
This happens because it should clear the `<input>` of type `file`,
but the condition was wrong and therefore `<input>` was not cleared,
thus keeping same value as before so input was not detected as
changed. A change on this file input is necessary to detect user
interaction file upload.
This commit fixes trigger for clearing the `<input>` of type file,
so that any file upload is properly detected, including uploading
same attachment.
Task-3060429
closesodoo/odoo#105465
X-original-commit: 97f445ae15663486d0100d7127287f9ec3d1d4cc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit fixes premature usage of `purchase_price` field on
sale.order.line model, before its definition in sale_margin module.
Since this test requires both sale_mrp and sale_stock_margin to pass,
this commit adds an auto-install bridge module that solely address this
issue.
Steps to reproduce:
- Install sale_mrp module
- Run tests (at least .test_kit_cost_calculation)
Problem:
Traceback:
AttributeError: 'sale.order.line' object has no attribute 'purchase_price'
See #100126closes#104891closesodoo/odoo#105458
X-original-commit: ac921c88909110deefa9b91be104244bda12458f
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Co-authored-by: Thibault Libioulle <thibault.libioulle@aerospacelab.be>
name, shortdec, summary fields are added to name search based on the fields set in the filter domain of existing search view of apps menu
closesodoo/odoo#105457
X-original-commit: a33165a78ab888b8c690b5424ed997b94ee8be05
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Unused catch block arguments are now forbidden even when prefixed with an
underscore: if the argument on the catch block is not needed, the use of the
optional catch binding is enforced.
Part-of: odoo/odoo#105433
### Steps to reproduce
* go to Accounting > Settings and activate 'Cash Basis'
* got to Chart of Accounts and create a new account of type
`Current Assets`. We'll call it `A`.
* create a new tax, we'll call it `T`, with the following parameters:
* Tax type: Purchases
* Tax computation: Percentage of Price
* Amount: 22%
* Distribution of invoices:
* add a line with the following parameters:
% = 40, Based On = 'of tax' and Account = the tax paid account.
* add a second line with the following parameters:
%= 60, Based On = 'of tax'
* Distribution of Credit Notes: Add the same lines as
'Distribution of invoices'
* In the Advanced Options tab, set :
* Tax Eligibility = 'Based on Payment'
* Cash Basis Transition Account = `A`
* create a new vendor bill and add a product line to it and set
Taxes = `T` on that line
* confirm and register payment
Now go to Accounting > Journal Items, group by Journal. Look through the
'Cash Basis Taxes' group and find the entries related to the vendor bill
you just made. One of the debit lines on account `A` is not correct.
Here, the account should be the one specified on the invoice line.
opw-2796727
closesodoo/odoo#105445
X-original-commit: b69fc397aad019cc18bd00975d38dde9ffcc985b
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
Before in a legacy client action, using a link to change view and
going back to the client action with breadcrumb does not restore the
scroll position.
Now with this commit, the scroll position is restored when going back to``
the client action.
Steps to reproduce:
- Install Accounting
- Go to `Accounting -> Reporting -> Balance Sheet`
- Unfold the tree to make the window scrollable
- Click on a link at the bottom of the window
- Go back to Balance Sheet
closesodoo/odoo#105443
X-original-commit: 225e809aa3ce1c506be69287e8084adf877547d7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Website themes make customizations to the default snippets. In
particular, some are applying shapes on default images. To do that, the
customization is not applied on the image directly but by changing its
src to a special web_editor route in charge of automatically adding the
shape on whatever default image the configurator chose for this snippet.
Typically, in a snippet with an image whose src is:
/web/image/website.my_snippet_default_image
The src is replaced by the theme with:
/web_editor/image_shape/website.my_snippet_default_image/website/some_shape.svg
That controller/route crashed since [1], making those images blank
areas in pages generated by the configurator. Indeed, the image from
the filestore was accessed via `file_open` which only allows reading
inside the addons_paths.
[1]: https://github.com/odoo/odoo/commit/da8def8e410de68256ba4ab09ebf7a8b699355acclosesodoo/odoo#105421
X-original-commit: d536e0a23cf0aa06c3ee13fb2c105e83201434e0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Julien Castiaux <juc@odoo.com>
The search bar had a trace back when searching on a name, and searching on the code prefix did not work.
This was not working because using str(self) does not work in v16, str is not defined in filter domain.
By removing the str and adapting the filter domain logic, it now works as it should. And the behavior of version 15 is restored
closesodoo/odoo#105381
Task-id: 3058778
X-original-commit: 9173e4da3912f8e46f163cc0d38a4a037b591c60
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>