* Fix wrong translations for taxes, accounts and tax groups.
* Remove auto_apply for fiscal position israel, because partner from israel can also lead to other fiscal positions (self invoice, eilat,etc).
* Remove the duplicate account Income tax withheld - customers
closesodoo/odoo#105676
X-original-commit: 2e21514eeaabd00aadd80355ccc327667a2c4d14
Signed-off-by: Josse Colpaert <jco@odoo.com>
This commit changes the json widget to no longer edit the `props` of the
component as it might cause reactivity issues.
closesodoo/odoo#105663
X-original-commit: eb4ae1d79c455b1b9e163beebb98fb1935834194
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
\- Add 'Move to next stage'
Generic, we think it is a useful tool to have anywhere.
\- Change the 'Set priority...' command
to 'Set priority as Low/High' :
Only 1 command will be available with the 'not current' priority.
Specific, because it is used on selection fields,
which means there could be more than 2 options.
\- Transform the 'Set kanban state...' command into three commands
Generic. 2 commands will be available.
One for each 'not current' kanban state.
task-2857447
closesodoo/odoo#91821
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit adds the isAvailable option to the command. If you set this
option, then it determines if the command should be displayed or not
in the command palette.
Why add this option?
We want to allow a component to define a command that will be displayed
according to the internal state of the component
Part-of: odoo/odoo#91821
The goal of this commit is to fix indeterministic crashes
in Many2ManyTagsField test suite.
We could see that the wrong helper was used in some tests. We used
selectDropdownItem after an editInput on this same field.
Cause of the error:
editInput => event input debounce which causes the autocomplete to open.
selectDropdownItem => event click which causes the autocomplete to open.
After this event, a second click takes place to
select the dropdown item (call to clickOpenedDropdownItem).
The setTimeout is not patched, it is possible that the input event takes
place after the click which does not cause any crash. But if the click
event happens after the input then the autocomplete is closed before
the dropdown item is selected.
To solve this, we will patch the setTimeout and we will use only
clickOpenedDropdownItem to select the dropdownItem.
We also patched the setTimout in all tests to avoid indeterminate
behavior related to the debounce in the autocomplete input.
closesodoo/odoo#105693
X-original-commit: 36f6e6801166865e0c8047c1c2be43ef8826581f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the modified test sometimes failed on runbot.
We need to wait for an extra tick, because the dialog might be
rendered in another animation frame that the crashing client
action.
X-original-commit: fb73b9f08fbb315544b3a4fce727a4bf2fbaa1bc
Part-of: odoo/odoo#105693
crm_lead.py file does not exist, but models directory is not imported. We
can safely remove the init and the models directory.
Oversight of odoo/odoo@5d4208d44dclosesodoo/odoo#105690
X-original-commit: cf857b86b2073d1e83a5e3e5b009d67058116b69
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
**Issue:**
When moving a record in a kanban view from one column to another,
it is possible to keep holding the record, hover it in one column
for a moment, then move again to another column then eventually
drop the record. Doing this where a folded column is the intermediate
column results to visual issue, such that the darker highlight of
a folded column is lost.
The desired behavior is to keep the background color of a folded
column.
**Solution:**
When moving a record, the hovered column is highlighted, and right
after leaving the column, we remove the highlight. And we are doing
this without exempting the folded column, thus, its darker highlight
is lost during the record-moving-hovering process.
Instead of adding/removing .bg-100 during unhover/hover on each
kanban column to make sure of the "greenish" tint of the column when
hovered, we just make background of the .o_kanban_hover to be important.
closesodoo/odoo#105689
X-original-commit: fdd7f017c73718c9582256dde3124dd2655aeb01
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Before this commit, when using the `many2one_avatar_user` on the `user_id`
field of the crm tree views, an error was thrown because the domain of `user_id`
refers to `user_company_ids` which the view did not have access to, so it
wasn't yet computed.
The field was added in invisible to the tree views so that it can be computed
before being accessed.
Task-3053146
closesodoo/odoo#105688
X-original-commit: 558607d98798d6a55adbcd98a6648a888286c3c9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The goal of this commit is to avoid the execution of code depending
on the validity of the save of a Record.
Before this commit, several override save functions in Record execute
code after the record's save without checking if the record's save has
taken place.
Override before:
export class NewRecord extends Record {
async save() {
const isSaved = await super.save(...arguments);
// doAction
return isSaved;
}
}
Override after:
export class NewRecord extends Record {
async save() {
const isSaved = await super.save(...arguments);
if (isSaved) {
// doAction
}
return isSaved;
}
}
How to reproduce the problem:
Go to a form view with a Record having its save override function.
Edit a record in such a way to have an invalid field
Click on the save button
Before this commit:
The doAction is executed
After this commit:
The doAction is not executed
Real use case
- Go to the form view of a lead in CRM
- Change stage
- Clear the name field
- Click on save button
Before this commit:
A call to get_rainbowman_message is made
After this commit:
No call to get_rainbowman_message is made.
closesodoo/odoo#105687
X-original-commit: 46b93da545b52496196624712c44599fd6467f4e
Related: odoo/enterprise#33913
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The mapped call is supposed to populate the cache, but that's already
taking care of by prefetching. It ends up adding an overhead instead.
The perf improvement is more noticeable on large recordsets.
For example, on a database populated with 100k res.partner records.
Before:
.. code-block:: python
partners = env["res.partner"].search([])
partners.filtered("name") # warm up
timeit.timeit(lambda: partners.filtered("name"), number=10)
# result: 7.15
After:
.. code-block:: python
partners = env["res.partner"].search([])
partners.filtered("name") # warm up
timeit.timeit(lambda: partners.filtered("name"), number=10)
# result: 4.67
closesodoo/odoo#105350
Signed-off-by: Rémy Voet <ryv@odoo.com>
This commit updates the tooltips of disabled form field's duplicate &
remove buttons so that they do not reference the concept of "model".
task-2950433
closesodoo/odoo#105278
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
When copying some list items in the editor and pasting it back into it,
we lost their parent list, leading to paragraphs being pasted rather
than a list. This restores the list.
task-3050150
closesodoo/odoo#105386
X-original-commit: 2333d8470df2fac80247e6f39d740a29f1eeb561
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The feature of not altering pasted content that was copied from the
editor was not enabled for content _cut_ from the editor.
X-original-commit: d79ed0298a8366ca51b1ca54fe725c7a55860254
Part-of: odoo/odoo#105386
Steps to reproduce:
- go to eLearning app;
- select a course and go to its website page;
- the course may (or not) be published;
- join the course;
- click on a course material which is not pusblished.
(the course material does not have to be completed before)
(on loading slide on full-screen mode)
(in debug mode, it is not a "pop-up" but an classic error)
Issue:
A message "Odoo Session Expired" appeard.
Cause:
The course is not marked as completed. The `canSelfMarkCompleted` attribut is always False and will raise the error because we will continue the flow as if the slide is completed and this is not the case.
Solution:
We have to test this `canSelfMarkCompleted` attribut to decide whether or not we continue.
opw-3033797
closesodoo/odoo#105379
X-original-commit: 6ca729d0ada58f2d7db736ecb4fa3aa98fbc9068
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
The class that Odoo adds to nested list items to display them nicely was
not whitelisted for pasting so pasting nested lists ended up looking
ugly.
task-3050150
closesodoo/odoo#105378
X-original-commit: edfc8f318529a7e513c5ef1631461a5dc0258d4f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When using the view "edit view" on the interface as administrator,
the user can see and modify the model of the view as a string, but
cannot navigate to the model easily or edit the model field
by selecting the model in a list.
This pull request adds the possibility to view and edit the model field
as a many2one.
closesodoo/odoo#105356
Task-id: 3007619
Signed-off-by: Raphael Collet <rco@odoo.com>
Before this commit, performing a search in a m2o can block your ui
despite the result already being displayed.
Why?
When you perform your search in a m2o, a set of RPC queries are made
with the different search values (name_search). If the last search value
(the one that will be used by the m2o in its autocomplete) has already
been resolved, but one of the other RPCs has still not been resolved,
then the screen will remain blocked until all the rpc's have been resolved.
Solution:
Since we are only interested in the last rpc, we will cancel all the
others. So with each new rpc, we will cancel the previous one.
How to reproduce:
- Go to a form view with a m2o field
- Edit this field +- slowly (several rpc will be done with different values)
- Receive the result of the search. (The autocomplete is displayed with
the right values)
Before this commit:
If one of the other rpc's is not yet resolved, the ui will block
until all rpc's are resolved.
After this commit:
The ui will not block.
closesodoo/odoo#105286
X-original-commit: 1700416551725a70eca5597b6e106b43282c00d2
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Before this commit, performing a search in a m2o can block your ui
despite the result already being displayed.
Why?
When you perform your search in a m2o, a set of RPC queries are made
with the different search values (name_search). If the last search value
(the one that will be used by the m2o in its autocomplete) has already
been resolved, but one of the other RPCs has still not been resolved,
then the screen will remain blocked until all the rpc's have been resolved.
Solution:
Since we are only interested in the last rpc, we will cancel all the
others. So with each new rpc, we will cancel the previous one.
How to reproduce:
- Go to a form view with a m2o field
- Edit this field +- slowly (several rpc will be done with different values)
- Receive the result of the search. (The autocomplete is displayed with
the right values)
Before this commit:
If one of the other rpc's is not yet resolved, the ui will block
until all rpc's are resolved.
After this commit:
The ui will not block.
closesodoo/odoo#105269
X-original-commit: 9917d841fa38ccc1e6d67875a665494dc22ef92f
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Having a rec_name allows to avoid having breadcrumb items like
crm.reveal.view(1) .
closesodoo/odoo#105091
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit changes the favourtie filter helper icon to
match the one in the mailing.mailing view.
Task-3048050
closesodoo/odoo#104756
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Fix the matrix question type preview display
on small and medium screen size.
Task-3006768
closesodoo/odoo#103294
X-original-commit: 8b008e01bc2c5effe3542ec30ccfe31dbae6840e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
We introduced `odoo.http.Stream` and its `ir.binary` companion model
to refactor all the "stream data over http" bits into a single unified
API. The API takes care of creating a cache-aware, proxy-accelerated,
headers-rich HTTP response out of any path, attachment or binary-field.
closesodoo/odoo#99658
Signed-off-by: Julien Castiaux <juc@odoo.com>
The cron subsystem is the system responsible of running background task
at regular interval, it runs in multiple dedicated threads or workers
that are independent of the regular HTTP threads/workers.
There was a major overhaul of the system in v15 (4b28f1162a) to
introduce cron triggers, a way to run a task at a given moment in
addition to the regular configured interval. Although the cron system
was not extensively tested before that v15 refactor, no new test were
introduced with that refactor leaving the system mostly untested.
Since then we had to fix multiple subtle concurrency bugs such as
b940d1c25f and c06cee44fe. Due to the lack of an existing test suite,
no regression tests were added next to those fixes.
With this commit we introduce the missing cron test suite. The test
suite is separated in two different test cases:
- A standard pre-install TransactionCase to test everything that can be
tested with a single cursor. This case can be run the usual way with
`--test-tags :TestIrCron`.
- A non-standard post-install **database breaking** test case to run
concurrency tests that often require multiple SQL transactions. This
case requires the special `--test-tags database_breaking` to be
executed. You MUST backup your current database before running that
test or you'll loose data.
closesodoo/odoo#97087
Signed-off-by: Julien Castiaux <juc@odoo.com>
Adapt community to make it possible to add employee cost when calculate
bom cost.
closesodoo/odoo#105645
X-original-commit: a239802249b2af2cc3fc2b3bb9fdfd0a408d887a
Related: odoo/enterprise#33898
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
Germany and Switzerland both use the DIN5008 paper layout and encoutered some issues while printing an invoice's pdf.
In Germany, the display of pdf invoices changed with v16.0. The header and footer would always display borders, which would mess up the rest of the display.
Adding the 'table-borderless' class solved this problem.
In l10n_ch, this issue was also encountered, and the general display of the qr bill page was set off. This is problematic since this display is highly rigid.
Those changes seem to be linked to wkhtmltopdf unability to process some of the Bootstrap5 changes.
While waiting for a more long term solution regarding wkhtmltopdf and BS5 compatibility, calling directly the adequate external_layout allows us to get back a correct QR Bill.
task-3037921
closesodoo/odoo#105464
X-original-commit: 627b0f581801705f8e2d2f2bead5176e9af884f8
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
Currently, In account.analytic.account model due to the extra
space in name field string formatting. which generates the issue while
searching on accounts.
This commit fixes this issue by removing extra space and seperator.
closesodoo/odoo#105391
X-original-commit: bff34e0e8a8b2d211ef90ffea4f43c514e8cad28
Related: odoo/enterprise#33781
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit user can directly delete employees even though
employees have timesheets that make employee field in timesheet
black which is not right behavior because in timesheet employee
field is required.
This commit adds a delete wizard for employee delete action
if employees have any timesheet then user cannot delete that
employees without deleting timesheets instead user can archive
that employees.
task-2938632
closesodoo/odoo#98233
Related: odoo/enterprise#30481
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Overall improvement and simplification (along with some minor re-alignment)
for the point of sale.
POS Dashboard:
- added a new check for companies that hasn't installed any chart of account,
this gives them a better understanding of the real problem.
- added a new `menuitem` in the configuration tab that list all the pos configs,
this gives the user a way to access the sub-config of a pos (and indirectly give
access to its whole settings)
Opening/closing control:
- the `MoneyDetailsPopup` is now opened through the `showPopup` method, we're
no longer using the css to show/hide.
- the details of the money (if it exists) is now given to the `MoneyDetailsPopup`
component, this allows to have a record data usable of the details and
the user doesn't have to start from scratch if he just wants to modify
one thing
- opening the `MoneyDetailsPopup` no longer resets the cash input, that way the
user can just quickly check if everything is correct again without having
to recount everything and this won't reset the outcome
Customer display:
- added "Powered by" before the Odoo logo in order to accentuate that
it's from the software used is from Odoo
Product screen:
- visual improvement of the `EditListInput` component which is mostly
used by the lot/serial number, it gives more information to the user
and better UX
- "Cash out" is now automatically selected upon opening the
`CashMovePopup`. No more minus sign (-) in the input amount. This
should give better intuitiveness and one less click to do
- no more clear search button shown if the search input is empty
- removed the hover and clickable effect on `CashierName` component
in the normal point_of_sale since nothing happens when we click on it
- increased the width of the click zone with a label in the
`ProductConfiguratorPopup` which makes it easier to select a radio input
- the `PrintBillButton`, `SplitBillButton`, `RewardButton` and
`ResetProgramsButton` are now disabled when nothing happens
- the `textarea` of the `TextAreaPopup` component has been fixed
and is no longer resizable
Partner list screen:
- fixed phone, mobile and mail icons the contact area
- increased details button size
Floor screen:
- when idle, no longer redirect to the floor screen if there's
an open error popup. An error popup is opened for a specific
reason, we shouldn't redirect while having this open or
automatically close it. Other kinds of popup will be
closed since those are issued by the user that went away.
task-2916197
closesodoo/odoo#97803
Signed-off-by: Masereel Pierre <pim@odoo.com>
Steps to reproduce:
- Create a product and complete a sales order.
- Then try to change the product type.
- The following message is shown:
"You cannot change the products type because it is already used in sales orders."
However, we can close the message and save.
Problem:
If some sales were already made, it should not be possible to change the product type.
There is a warning message on the onchange but it's not blocking.
This causes inconsistencies between the quantities and value shown in the quants and in the valuation layers.
Solution:
Raise an user error when trying to save the changes.
opw-3000886
closesodoo/odoo#105496
X-original-commit: 1b468ad100960cbd6940a24fbfaeeae4f01994de
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Steps to reproduce
==================
- Use a mobile phone / mobile view in devtools
- Go to Purchase > Purchase Orders
- Click on one item
-> A traceback occurs, the uom is missing
Cause of the issue
==================
The field is declared as
`<field name="product_uom" groups="uom.group_uom"/>`
The raw value is accessed with
`<t t-esc="record.product_uom.value"/>`
Solution
========
Add the missing group
opw-3033650
closesodoo/odoo#105487
X-original-commit: bc6c2d8d15e22f6af720db6a28e21739defede94
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
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>