Note that more 'non printable keys' are escaped now, like 'Home'.
This seems like a bit naive solution but it avoids having to list
every key.
The only issue we might have is if a device sends the whole value in the
'key' property directly without sending sequentially several keydown events.
As a reminder, 'ctrlKey', 'metaKey', 'altKey' properties are used
because we also want to ignore keys pressed while this modifier is
active. For example, if you press CTRL+e, we want to ignore 'CTRL'
AND 'e'.
Useful references:
https://w3c.github.io/uievents/tools/key-event-viewer.html
Part-of: odoo/odoo#93387
Before this commit 'tab' was escaped because isSpecialKey was true.
This was strange because this key was defined in 'endRegexp'.
So, there were only 'enter' key who worked as a barcode end key.
Note that it wasn't a big deal if 'tab' was used because checkBarcode
was executed anyway after a timeout.
Now the barcode value is directly checked if the strind ends with
'enter' or 'tab' (by-passing this timeout).
Part-of: odoo/odoo#93387
As we now use 'inputmode=none' on the barcode field, the mobile virtual
keyboard doesn't open anymore. So, there is no need
to have to blur barcode input after receiving a value.
There is no issue to keep the focus on this field. We only did it
to close the virtual keyboard as soon as they pop up after each scan.
Part-of: odoo/odoo#93387
And remove most of barcode_events. The goal is to have a service that
can be used by components to reliably detect a barcode action. For now,
we keep barcode_events around, but the goal is to completely remove it
as soon as all the code using it is updated
Part-of: odoo/odoo#93387
(To be commited with [#94024](https://github.com/odoo/odoo/pull/94024))
Duplicating an email sent from Odoo would raise an error because some required fields could not be set.
Setting those fields on duplication does not make sense, duplication is to be disabled on e-mails.
As this applies to some messages and no use-case could be found for the duplication of messages or notifications,
both also had duplication disabled.
Task-2857244
closesodoo/odoo#95138
X-original-commit: 6f9656fc4ceeecd304f600b7cd65d649618ad182
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit fixes some inconsistencies of the progressbar
field widget since it was converted to Owl. Some behaviors
were wrongly adapted and edition was not enabled in kanban
views. It was also missing an option to allow editing the
field value in readonly mode.
closesodoo/odoo#95033
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The issue:
1.) Switch to German language (or any language that uses , versus . as a point separator
2.) Create a vendor bill
3.) Add items
4.) Click on the pencil/edit icon next to the tax field (below subtotal)
5.) Separator used is . instead of ,
The fix:
the field will use the right separator depending on the currency.
closesodoo/odoo#95147
X-original-commit: 3cca50bfca14f3748d16c43c25119dbe90972f7f
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
The total value of the invoice can be reported in the edi using the
field <ImportoTotaleDocumento>. This commit uses the amount_total of the
invoice to occupy this field.
Adapt the l10n_it_edi_sdicoop tests to include this field in the
expected xml.
closesodoo/odoo#95175
Task-id: 2894623
X-original-commit: 2e0c6def4d9be3b73e874304813ed3bb685ade95
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
Cause:
The tests fails because the expected price is not the right one.
It is because that when installing the l10n module, it changed
the current company currency (if no localisation set) but not the
pricelist.
Solution:
For the tests, change pricelist currency of the main website
with company currency.
opw-2899730
closesodoo/odoo#95080
X-original-commit: ddc802dc3be5e02166ffefe917ebaa3cfdd02e8d
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Leftovers of previous fixes of this issue.
closesodoo/odoo#95162
X-original-commit: dffc184862018670008ff4da839fc520a72bddca
Signed-off-by: Christophe Simonis <chs@odoo.com>
When sending an invoice to the SII edi, the field TipoDesglose is
required. In case we have a foreign customer outside of Spain, we are
filtering the taxes information based on the tax scope (services or
goods). In case the tax scope is not filled in, TipoDesglose is not
provided and this will cause the request to fail, with no clear reason
for the user. We should add an UserError message to make it clear enough
so the user can fix it himself.
closesodoo/odoo#95164
X-original-commit: 7a6b3544d7c3a855489a0d5f7075691e25264e2d
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
Before this commit
When removing the last word of an html container, the last space was
not transformed into an `nbsp`. This caused google chrome to not
render the space.
Task-2809312
closesodoo/odoo#95124
X-original-commit: cd4f1c4bce66817640eea20f0b297095d48ea647
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit removes the css class `.o_kanban_counter_label` which is no
longer being used in Odoo.
The class above is supposed to add styles to text labels inside progress
bars in kanban view mode. However, this feature is no longer used, since
contextual information is already given either by tooltips
(`progress-bar o_bar_has_records`) or by text on a side
(`o_kanban_counter_side`).
Task-2898427
closesodoo/odoo#94884
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Actually we send request to check if the terminal is available when we poll
the status of a payment.
We remove it and need check the availablity before we start the session
closesodoo/odoo#95102
X-original-commit: 215c8fc7cebdb566a008bf2badb6a934af84150a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
This will allow to reduce overrides in enterprise, and we want to display the
feature in community soon as well.
Part of task-2871070
closesodoo/odoo#95085
Related: odoo/enterprise#29036
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
After the payment apocalypse, `payment_test` was cleaned and stripped of
all useless parts. It was a very basic testing acquirer that allowed to
enter fake arbitrary payment details, choose whether they should be
tokenized, and then pay. It was intended to test the payment flow of
various applications (Sales, Subscriptions, Invoicing, ...) for a single
scenario: successful payments with immediate capture.
In order to extensively test an app's payment flow (explore other
scenarios), we need `payment_test` to have additional features.
Now, `payment_test` will allow profound testing of these features:
- separate authorization and capture
- customer fees computation
- tokenization
- refunds
- on the /pay page, users will be able to select the status of the
payment
- on the payment transaction form view, users can change the status of
a payment 'pending' to either succeed or fail
- on the payment token form view, users can change the state of future
transactions made with that token
task-2512196
closesodoo/odoo#78083
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: xlu-odoo <xlu@odoo.com>
In some cases, replanning a work order does not change anything.
To reproduce the issue:
(Use demo data):
1. In Settings, enable "Work Orders"
2. Create two manufacturing orders (MO01, MO02) with 1 x [FURN_8522]
Table Top
3. Confirm MO01 and MO02
4. Set the same Scheduled Start Date (SSD) on the WO of each MO
- A warning should be displayed on the work order line because of
the conflict
5. Open the warning and click on "Replan"
Error: Nothing happens, the warning is still displayed and the scheduled
start date does not change.
For the warning symbol to be displayed, we check (through
`_compute_json_popover`) if two work orders are in conflict:
https://github.com/odoo/odoo/blob/8cb5aad6126e3f63ee4ef91115c8b4a6be571828/addons/mrp/models/mrp_workorder.py#L719-L722
So, we base this information on the `mrp.workorder`
However, the planning logic is based on another model:
`resource.calendar.leaves`. When planning a WO, we create a
`resource.calendar.leaves` and we link this slot to the WO thanks to the
field `leave_id`:
https://github.com/odoo/odoo/blob/4870606b00a758e63713e6e82c0cba9b1e7dd4aa/addons/mrp/models/mrp_production.py#L1238-L1248
Therefore, when replanning a WO, we ensure that the new slot does not
overlap any existing slot in the same workcenter. But, here is the
issue: when writing the start date (step 4), we try to replan the WO of
the MO only if this MO is already planned:
https://github.com/odoo/odoo/blob/4870606b00a758e63713e6e82c0cba9b1e7dd4aa/addons/mrp/models/mrp_production.py#L723-L724
Wich is not the case in the above steps. So, we don't (re)plan anything
=> we don't create any slot.
As a result: the warnings are displayed, which is correct, but when
trying to replan one of the WO (step 5, viathanks to
`_plan_workorders`): There isn't any slot starting from WO's start date
(there isn't any slot at all!), so we can create a new slot -> the start
time of the WO does not change -> considering their start times, there
is still a conflict between both WOs.
Comment: if after the step 5, the user tries to replan the other WO, it
will work: the first replanning fails but a slot has still been created.
Therefore, when replanning the second WO, the newly-created slot will be
detected, a second slot will be created after the first one and the
start date of the second WO will be postpone (according to the second
slot).
(!) Note that nothing creates any slot if we directly define the start
time of the WO during the MO creation (step 2). So this use case will
fail too.
We should ensure a perfect coherence between both models
`resource.calendar.leaves` and `mrp.workorder`.
OPW-2887413
closesodoo/odoo#95087
X-original-commit: 9d4d8d24792933e53a4ca422ccedde8ddc93cdf4
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Purpose
=======
Properly display and resequence articles based on sequence field. Articles are
currently not sorted based on sequence, and when moving articles outside of a
parent resequencing is not applied.
Specifications
==============
Properly resequence articles not only if the parent_id value is non-false but
also if it's in the vals and set to False (when moving an article to the root).
Task-2883368
closesodoo/odoo#95078
X-original-commit: 6dde05e8779feb2ad6f8828e1bc2945fcf403248
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Overriding method has_group() in some extension of model 'res.users' is
not possible because of code invoking model.has_group.clear_cache().
As clear_cache() is no longer invoked on ormcached methods, we can
simply replace the code by a global cache invalidation. In this case,
it is not even necessary, since method call_cache_clearing_methods()
does it already.
closesodoo/odoo#95071
X-original-commit: 2dc80fe49ec2cb11e65465d4616b9bbb136bf6ab
Signed-off-by: Raphael Collet <rco@odoo.com>
Before this commit: If a fixed tax is used for a product with the price
of zero, the tax line sign would be positive and lead to an unbalanced
move. The solution is to use its sign in its context for correct
calculation.
Also, in the PoS front-end, when you want to return a zero amount
product with a fixed tax, its sign would be positive, which is
incorrect.
Steps to reproduce the first issue:
- Install 'Point of Sale' module
- Create a new 'Tax' X with a fixed price (e.g.: 1 $)
- Create a new 'Product' with zero Sales Price
- Create a PoS session
- Add the product to the order
- Close the session
It creates a line for the "Difference at closing PoS session," and
doesn't prevent closing. But the problem is that the tax capture as
debit is incorrect. The tax for the invoice must be credit.
Steps to reproduce the second issue:
- Install 'Point of Sale' module
- Create a new 'Tax' X with a fixed price (e.g.: 1 $)
- Create a new 'Product' with zero Sales Price
- Create a PoS session
- Add the product to the order
- Change the quantity to -1 (refund)
The final amount is positive, while it should be negative.
Solution
The sign must be sent in the context, and for the PoS front-end, it
should consider zero amount cases.
opw-2833590
closesodoo/odoo#95067
X-original-commit: c5fb4f778db95fb33845b9a5e0c2190d4d9037ee
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Currently, in demo data (or data) of some surveys, there are records of
'survey.question' having 'is_page' field value as true and 'question_type'
is not defined. When question type is not defined, default value
'simple_choice' is assigned to the 'question_type' field. Now when we
create a live session of that survey and goes to the page, it tries to read
the data for bar chart but data is not available (undefined) and throws the
traceback. This happens because question types 'simple_choice' and
'multiple_choice') are expected to load a bar chart.
It used to work before commit[1] where default 'question_type' value was
being set to 'text_box' (so attempt to load bar chart was not made).
As a safest fix in stable, this commit adds condition in JS and in template
to make sure that bar chart will be instantiated only if the data needed by
(checked with JS) and when the question is not a 'page' (checked with
template).
commit[1] - https://github.com/odoo/odoo/commit/1fb99d7#diff-cf2aadbf6a252dfca6d3450a0ce6ad280b1924afe9a8fc22f7077c998d080009R52
taskID-2841582
closesodoo/odoo#95055
X-original-commit: d7c485e0b0791b6d3d127fedf867b9664df05463
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The populate JS class has been removed in #94554 but was still
referenced in the view.
closesodoo/odoo#95050
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit fix 3 problem
Don't count studio field
------------------------
the commit https://github.com/odoo/odoo/commit/75b8c4eb1ed6e44f427886eea06ad216995e16c8
was supposed to stop counting count field generate by addins a smart
button with studio.
It works fine when base import module is not installed which is never
the case.
When base_import_module the field is counted as a field that belong
to a imported module installed : studio_customization
studio_customization should not be counted as an imported module
installed
Count Field with standard xml_id
--------------------------------
With https://github.com/odoo/odoo/commit/9afce4805fc8bac45fdba817488aa867fddff69b
Each manual can end up with an xml_id from a standard module:
the original module of the model
A standard module should never create a manual field so we can consider
they should be counted unless they match the criteria of the first
problem
If a field has a standard module xml_id and no other the module
should be odoo/studio and not the name of the standard module
Make possible to exclude some db record from cloc
-------------------------------------------------
It's possible to exclude some file in python module
but it's not possible to exclude some field or SA in
the database from the count
Make it possible if they are link to an xml_id
from the module __cloc_exclude__
The exclude record will be shown in cloc report with
the verbose mode
closesodoo/odoo#95028
X-original-commit: db52fb174461107e26b066147801f54a89d0dbf9
Related: odoo/enterprise#29007
Signed-off-by: Christophe Simonis <chs@odoo.com>
Since https://github.com/odoo/odoo/pull/85176, following a conflict resolution in a forward-bot,
the domain used to show the "Recurrent" option in the form view
of tasks is wrong, and the option is shown for all unarchived tasks,
regardless of whether the setting is enabled.
This commit fixes this domain.
closesodoo/odoo#95015
X-original-commit: f26d864da52a3543d9f9733b2833a3210d5449f6
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Larcin Vincent (vila) <vila@odoo.com>
The test was randomly failing on nightly builds as the timeoff was
considered as started, thus preventing the user from modifying it.
closesodoo/odoo#95010
X-original-commit: 95f84086d15ed0a139e4e145dc2422a949f1ae95
Signed-off-by: Kevin Baptiste <kba@odoo.com>
1f7c83cc3e renamed _notify_compute_recipients to
_notify_get_recipients. This function was not renamed with it so
members of the hr_recruitment.group_hr_recruitment_interviewer group
were receiving chatter they shouldn't be receiving.
The test didn't catch this because:
- the interviewer was not subscribed and thus never received email,
- MockEmail._filter_mail got passed status=False instead of None,
which always made it return an empty mail.mail recordset.
opw-2898730
closesodoo/odoo#95004
X-original-commit: 4dd9d3ee6fb261fd856036ced35bfb15b302b0b7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This will allow to remove AND/OR mix in identifying fields of composer
suggestion view.
Part of task-2741982
closesodoo/odoo#94999
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, subtemplates in kanban did not share the same
ViewCompiler instance, thus losing the aggregation of the dropdowns.
Now, a single ViewCompiler is used for each KanbanRecord, properly
taking into account dropdowns declared in subtemplates.
closesodoo/odoo#94977
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In the new Kanban view, clicking on a BooleanToggle field (on any card)
always toggles the field of the first card. We would like to toggle the
field of the card that is clicked on.
This is because the same id (fieldName) is used for all Checkbox
in the BooleanToggle. If you click on a label, its native behaviour is
to click on the input with the same id. In our case, this will always
create a click on the first ToggleBoolean (the first card).
The solution is to make the id passed to the field unique. To do this,
we will add the datapointID to it.
Before:
Card 1: id = fieldName
Card 2: id = fieldName
After
Card 1: id = fieldName_datapoint_1
Card 2: id = fieldName_datapoint_2
closesodoo/odoo#94966
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This allows to remove the AND/OR mix from message view identifying fields.
Part of task-2741982
closesodoo/odoo#94948
Related: odoo/enterprise#28988
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Clean (demo-)data to be fully editor-friendly (i.e. use `<p><br><p>` instead of
`<br>` between paragraphs), fix some (grammar) typos.
Task-2893398
closesodoo/odoo#94943
X-original-commit: 87b4bc6d19fef947f7bf5d15835f17b9c2019902
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The fix 1b80fe9 removed the behavior that made `.o_not_editable`
`contenteditable=false`. Without this behavior, other issues could
arises.
closesodoo/odoo#94889
X-original-commit: 4e7d6e1a70e44df3476c2602119fbcedc7c04199
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Purpose
=======
Currenlty an error is raise saying that a leave cannot be set accross
overlapping contracts.
But in this special case we could split the time off and allow this simple
action.
Taskid: 2836901
X-original-commit: 1012a7ea8033675b6ebab96922e124b04e5ed884
Part-of: odoo/odoo#94885