- Many ui/text updates
- Fix To consume field display
- Add Draft/Done filters to Scrap views
- Fix BoM name_create problems due to _rec_name set to product_tmpl_id
Task: 3094741
Part-of: odoo/odoo#108446
currently in the db creation page in the db manager, except phone number and demo data fields use camel case lettering. this pr will make phone number and demo data fields with camel case lettering, which will unify the form.
closesodoo/odoo#108326
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Before this commit, when saving a language change in My Profile,
nothing happened. The expected behavior is a page reload.
How to reproduce:
- Go to the "My profile" tab in the User Menu
- Edit the language
- Click on save
Before this commit:
The record is save.
After this commit:
The record is saved and the page is reloaded.
closesodoo/odoo#109508
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
`fields.Json` is introduced in v16. There are just few usage of it in standard
code. It's usually used via `widget="analytic_distribution"`. However, user may
add the field to list view via a Studio. To prevent errors, this commits adds
basic formatter for the field.
STEPS:
-In the Purchase app, add a new Menu based on the existing Model "Purchase Order Lines"
-In the list view of that new Menu, add the existing field "Analytic
-Distribution"
opw-3055926
closesodoo/odoo#109573
X-original-commit: d0621a2aec9cdc4bad348804fe5ada974b75f322
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Before this commit when a color was applied on a text that spans several
nodes, it was wrapping each text node in a font node to which the color
was applied. Because of this, applied gradient colors were restarting on
each text part. (e.g. before a bold section, on the bold section, after
the bold section: each had a distinctly drawn gradient)
After this commit the bold and italic nodes are considered similar to
text nodes and are wrapped inside a common font node to which the color
is applied - using the mechanism that already existed for text nodes.
Actually applied on all visible inline & inline-block elements that do
not contain a font node (and are not buttons).
task-2666200
closesodoo/odoo#109537
X-original-commit: 8c965cad4d3fdbfefbbd5caa43d8c21e3a8e064f
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Since [1] the gradient text image was reset within each font or span
block (e.g. for applying bold style).
The change was done because Chrome does not inherit the involved styles
when a transform is used, which is the case in animated texts.
After this commit the inherit style is only applied on animated texts.
This lets the gradient span across style changes.
Note that there is no solution yet for animated texts: they still have
a restarted gradient.
Steps to reproduce:
- Drop a Title block in a website page.
- Add a few words.
- Select the whole title's text.
- Make its text color a gradient. (Not the background color)
- Select the second word (avoid picking the word in the middle to
easily see the visual impact).
- Make that word bold.
=> The gradient restarts within the bold word instead of continuing
across the whole text - even though no text animation is used.
[1]: https://github.com/odoo/odoo/commit/187acb938f70a2130d25fa76079221339c742f1e
task-2666200
X-original-commit: 372eeebb47b93890d567185879981e817cdc1326
Part-of: odoo/odoo#109537
On the PR https://github.com/odoo/odoo/pull/107558 some performance improvements were made when computing the weights.
Unfortunately, this caused some slowdown on other cases.
This PR keeps the read_group introduced on https://github.com/odoo/odoo/pull/107558 but reduces the number of 'get' by taking all the information needed only once before entering the for loop.
For comparison, these are the differences on _compute_bulk_weight when going to Inventory/Receipts:
| Before PR 107558 | After PR 107558 | After this PR
| ------------- | ------------- | ------------- |
| 550 ms | 10.30 s | 560ms |
And these when removing the filter by default (leading it to fetch heavier records):
| Before PR 107558 | After PR 107558 | After this PR
| ------------- | ------------- | ------------- |
| 2.27 s | 24.48 s | 1.89 s |
OPW-3107540
closesodoo/odoo#109481
X-original-commit: 4bbf782505e72761c7c77abfe4fbd53e151e5bf0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Purpose
=======
As an Event seller, I might not use the /shop page
because I do not sell goods, only tickets.
That being said, I do this in multi-currency for example,
and need visitors to be able to pick the relevant pricelists.
Specifications
============
Adding the price currency on the event ticket
so that users will know which currency is used.
Adding a pricelist picker on the website event
front-end and on the ticket registration page
to allow the user to display the prices depending
on a selected pricelist.
Task-3081384
closesodoo/odoo#106980
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Purpose
=======
Reduce the daterange widget width in the add
event website modal to avoid unecessary white
gaps.
Task-3081384
Part-of: odoo/odoo#106980
Adding a pricelist picker on the website event
front-end to allow the user to display the prices
depending on the selected pricelist.
Adding a picker to change the ticket pricelist
on the ticket registration page.
Task-3081384
Part-of: odoo/odoo#106980
The current domain on the forum post child_ids field is not guaranteed to work
since it requires the recordset on which it is applied to be a singleton.
closesodoo/odoo#109596
X-original-commit: d9983167a7c534a08854ad5327e36a8343ef1e5d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, setting a disabled attribute on a <button> tag in
the arch of a list view was ignored.
How to reproduce:
Going into a list view with a <button disabled="1"> tag.
Click on the button
Before this commit:
The button is not disabled and a crash is displayed on click.
After this commit:
The button is correctly disabled and there is no crash on click.
closesodoo/odoo#109337
X-original-commit: c8ef3262e3aa167a520dcb0d1b229e61e5e2e362
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
All the localisation should be written in english and then translated to the native language of the country. In this case, the Venezuelian localisation was written is Spanish, this PR translate the module in english and add the corresponding PO file in spanish.
closesodoo/odoo#109494
Task-id: 3126154
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Before this commit if there is a rounding error in product list prices,
a note is added to the invoices indicating that a discount is in
effect, while that is not the case.
Exact steps to reproduce:
1. Create a new tax with the amount of 21%
2. Make it included in the price
3. Create a new product with price of 1.65$ (1.36$ excluding tax)
4. Open a PoS session, add the product to the error
5. Enable invoicing and validate the payment
To fix this, the float comparison methods should be used.
opw-3121143
closesodoo/odoo#109585
X-original-commit: 238532f396bbc3d4fbe14d75e756307536dfe3c6
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Khanalizadeh Ahmad (khah) <khah@odoo.com>
Issue:
On expense sheet form:
- Choose an employee not like current user.
- Create an expense from expense list.
- Edit expense list and save expense sheet.
=> Error: "You cannot add expenses of another employee."
Purpose:
- Expense list has not `employee_id`.
- When save form, `employee_id` on expense list is current user.
Solution:
- Add `employee_id` on expense list.
closesodoo/odoo#109575
X-original-commit: 5558bfada8212106cee730357620000b726549cd
Signed-off-by: Kevin Baptiste <kba@odoo.com>
foreign_currency_id & currency_id must always be different on a statement line.
However, this happens sometimes when importing statement lines in csv.
closesodoo/odoo#109574
X-original-commit: 0b2cb4c82fa38ca1242c2344546768e481841116
Related: odoo/enterprise#35630
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
The tree view `view_module_category_tree` was unused, remove it.
The form view (`view_module_category_form`) of `ir.module.category` is
still used in the `view_groups_form` view.
Part-of: odoo/odoo#109420
Since https://github.com/odoo/odoo/pull/87522 (landed in v16),
`fields_view_get`, `_fields_view_get` and `load_views` are deprecated.
Remove it for maintenance (and it is the last usage of
the useless field `field_parent`).
Part-of: odoo/odoo#109420
Before this commit, when the user creates a task in the (quick create)
form view of task, he can select the internal project. The goal of this
project is to contain the timesheets representing the time offs of each
employee.
This commit filter the projects available for the task creation/edition
to be sure the user cannot select internal project.
closesodoo/odoo#109002
Related: odoo/enterprise#35377
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
The PR improves user experience and database consistency for triggered questions.
* Deleting questions/answers used in triggers will clean those triggers to avoid corrupt
trigger configurations.
* Questions and Survey are saved during edition allowing to add questions with score,
validation parameters (checked against SQL constraints), and triggers on the fly
without having to save the survey and reenter edit mode. This required to modify the
basic_relational_model `Record` `save` method to be able to display a notification
instead of another modal in case of `ValidationError`.
* Questions that are moved and placed before their trigger will show the icon in
`text-danger` with a warning message on hover, because other forms of feedback
would be too strong to be given when users are busy reordering.
Tests are included to ensure the specific behavior and needs of this module in case
some JS framework implementations change later on.
See details on each commit.
Task-2623482
See odoo/upgrade#3613closesodoo/odoo#78705
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
## Survey
Due to the behavior of X2Many fields, the questions created when editing
a survey were not usable immediately after creation to be conditional
triggers for new questions. The whole survey had to be saved first, which
wasn't a smooth experience for the user.
This commit will save the survey and question at several times:
### For each new question added
Similarly to what was implemented for chatbot scripts, enables the
immediate computation of allowed question/answer triggers, permitting their
use when chaining question creation.
This also enables to check the answers "validation" fields immediately, and
activating scoring and add scores to question/answers without requiring the
extra steps of saving and re-entering edit mode for the survey.
### When rows are deleted
This will trigger the immediate removal of the triggers icons on
questions that were triggered by an answer to the deleted question.
### NOT when questions are moved
As there is no convenient way to ensure questions are properly ordered with
respect to their triggers (order dependency) without popping error messages
at every step when reordering questions, we chose to mark the misplaced lines,
missing trigger records or triggers that will be ignored (with the new
`trigger` widget).
This could have been done entirely with 'server' logic, but that would have
required additional saves and cleaning fields even more often, even during a
temporary reordering step, which isn't convenient.
### Misc
Finally, note the extra fields added on the question_and_page_ids field of the
survey form view, required to trigger these fields' update consistently
(required after reordering or removing records which sometimes doesn't occur
without these).
Tests ensuring the behavior of the X2Many (saving parent on open/edit and show
notifications on error) and the trigger widget are included.
## web
To support the functionality described above, we need to allow the caller of
'save' to catch errors to prevent default handling (here to use a notification
instead of an additional Dialog).
Task-2623482
Part of odoo#78705
Part-of: odoo/odoo#78705
Before this commit, the state of a question triggering fields could be
inconsistent/corrupted:
* If a question used as trigger for another question was deleted,
`is_conditional` would stay `True` even as `triggering_question_id` would be
`False`, which would eg. prevent saving the question edit form unless this
is not manually fixed.
* If an answer used as trigger was deleted, the triggered question
would never show on a survey session, but still appear as "triggered" and
causing the same trouble on form edition.
In this commit, we
* update `unlink` methods to remove the triggering fields on triggering
question/answer deletion
* add SQL constraint to ensure DB consistency (also improving the survey
cloning/copying behavior robustness)
* add a python test checking this
Task-2623482
Part of odoo#78705
See odoo/upgrade#3613
Part-of: odoo/odoo#78705
Purpose: Showing validation parameters with an arrow on one line (when
possible) is prettier.
Additionally, we now
- Improve data consistency by preventing saving `validation_required` without
setting validation parameters (also allows to keep arrow invisible when no
value is set)
- Explicitly add required flags to float values as they cannot be not set (see
c5ae9b38).
Task-2623482
Part of odoo#78705
Part-of: odoo/odoo#78705
Issue: `node.data` is an unescaped text content and used as an escaped
content just after (set `innerHTML`) which remove some of the escaping.
Without the fix, the 2 new first assertions would fail:
- first one with 'https://example.com/?¤cy_id' instead of
'https://example.com/?&currency_id' in the text node
- second one with `&` replaced by & and `>` replaced by >
other assertions ensure that use case before the fix (special char and
URL regex, smileys, ...) still work the same after the fix.
opw-2525028
Fixes#70485closesodoo/odoo#109357
X-original-commit: 4938af5dd8bfb4ea0722e3de8340ff6437329b48
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
After https://github.com/odoo/odoo/pull/99386, clicking on the email button in
calendar.event form view would give a traceback as it tried accessing event_id
on a calendar.event record. This commit fixes this error as the object in the
template already is an instance of calendar.event.
task-3127534
closesodoo/odoo#109549
Signed-off-by: Arnaud Joset <arj@odoo.com>
Steps to reproduce:
- go to "Link Tracker" app;
- go to "Campaigns" tab (UTMs);
- create a new campaign;
- leave and return in this record.
Issue:
A traceback appears.
Error message:
`Invalid props for component 'Notebook': 'defaultPage' is not a string`
Cause:
The `defaultPage` prop must be a string.
When the record is new, it will be `undefined`,
so it will pass props validation because this prop is optional.
But when we try to calculate it and it does not return a value,
the `defaultPage` is null.
The variable is therefore declared but it is empty
(and therefore not a string).
`null` value does not pass the props validation test.
The problem appears in the "Campaigns" tab
because there is a notebook without content.
Solution:
Test if it is possible to have a value.
If not, set the `defaultPage` prop to be `undefined`.
opw-3109327
closesodoo/odoo#109533
X-original-commit: 402b1a822c3983af33aa1d3a3c7e93d8836c60d8
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
Since the rewriting of the views in OWL2, it is not possible to clear a
set many2one field.
In this commit, we restore the clear button.
Steps to reproduce:
* Go to Sales (on Mobile)
* Create a new Quotation
* Select a customer
* Try to remove the selected customer => BUG
closesodoo/odoo#109531
X-original-commit: 57cb2a34c8211352baa439ee784dc370cc6abb1b
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Detailed Reason in Employee Departure wizard now has a placeholder, and an
unnecessary visual separator is removed.
task-3046435
closesodoo/odoo#108314
Related: odoo/enterprise#34288
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Steps to reproduce:
* Go on `res.partner` form view
* Add field `sale_order_ids` visible in the view
* Try to open one of the partner SO's by clicking on it
* Traceback, unable to read 'modifiers' on undefined
Unexpectedly, the field `order_line` is not available in the Sale Order
`activeFields` on the client side when opening the SO form view that
way, which leads to a traceback when trying to know whether that field
is readonly.
This commit makes sure the field is in the SO `activeFields` before
checking whether it is readonly.
opw-3097134
closesodoo/odoo#109541
X-original-commit: b37a2cf45e1f5b1422cd19269cd2b85085d75558
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
## Steps to reproduce
- install l10n_gcc_invoice module
- switch to a company in Saudi Arabia (SA company)
- create and print an invoice that has a payment term with a translated
note
We expect the payment term's note to be displayed both in English and
Arabic. But instead, the note is displayed twice in the customer's
preferred language.
## Cause
`t-field` does not use the context defined on the field itself. It uses
the rendering context.
opw-3101387
closesodoo/odoo#109330
X-original-commit: 8a3049a63c7e9b13892278784781a793f8e0ab4f
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
This commit adds default groupBy for task list view
to represent data properly menu vise.
- add default groupBy stage for tasks from project action.
- add default groupBy personal stage for `My Task` menu.
- add default groupBy project for `All Tasks` menu.
task-3084850
closesodoo/odoo#109281
Related: odoo/documentation#3311
Related: odoo/enterprise#35504
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit when user creates a private task user
still able to customer and sol field which no use for
private task.
This commit hide customer and sol field for private task
and reset customer field when user make non private task
to private task.
task-3084850
Part-of: odoo/odoo#109281
Before this commit it is not possible to add default
groupBy in list if users want default groupBy a list
then they have to pass default groupBy in action and
passing default groupBy in action groupBy other views
in action, so priorer to this commit users cannot add
default groupBy in list view without impacting other
view.
In, this commit add default_group_by in list view
attribute so users can add default groupBy in list
view without impacting other views in action.
task-3084850
Part-of: odoo/odoo#109281
Purpose:
User should be abled to delete him time off (time off that needs to be
validated by both, manager and time off officer), if it has not been validated
by officer yet.
The manager that validated the time off, should be notified
if/when the time off is canceled by the user.
Both manager and user should be notified if officer refused time off,
validated by manager.
This commit also fixes traceback on time off form in development mode.
If there is
<field name="A"/>
<label for="A"/>
we get traceback in dev mode.
Instread it should be
<label for="A"/>
<field name="A"/>
task - 2857233
closesodoo/odoo#94533
Related: odoo/upgrade#3809
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Some additional changes in mail composer tests before going into some rewriting
and improvements
* some improved messages in asserts;
* additional tests for attachments in mass mailing mode, using sub tests;
* additional tests for configuration (auto_delete_* fields, email fields,
subtype, ...);
* removed some wrong tests not failing due to current code: when testing
template values, do not give a creation value at the same time as it
will fail when moving to editable stored fields;
Task-2710804 (Mail: Clean MailThread Posting API)
closesodoo/odoo#109522
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Current behavior
In the recruitment module, if you set an email template for the first step of
a job recruitment process you cannot send any other email using the full
composer. This happen because the partner type goes from 'contact' to 'private'
and this type cannot be set as recipient in the full composer.
Steps to reproduce
- Go to any job recruitement and set an email template for the first
step
- Go on the website and apply for this job
- Go back to the job application and send an email using the full
composer, the email is not sent to the applicant. And the applicant
is not added to the followers.
Fix is to somehow improve support by adding asked partners from default in
context.
Note that this does not change anything from ACLs point of view, as trying
to access private partners without the necessary group or ACLs will raise an
access error anyway.
Also note that private partners defined on a template are still stripped
as they do not respect the new (nor the old) domain. That would be tricky
to solve, better not use private partners in templates.
opw-3010308
closesodoo/odoo#109451
X-original-commit: 12b25f21216b11511d5fed22fb3564d9dc297559
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Part-of: odoo/odoo#109522
Co-authored-by: Robin Engels <roen@odoo.com>
Add tests showing current behavior of partner_ids fields on composer when
dealing with private partners. Some use cases are added as unit tests
* default_partner_ids: coming notably from suggested recipients;
* template usage adding a partner (e.g. partner_to);
* when not having the rights to see private partners, access error should
be raised;
* mail gateway when a private partner sends an email;
X-original-commit: 2153eec790b730761fe50d6bea5cd4bacedce97a
Part-of: odoo/odoo#109522
Co-authored-by: Robin Engels <roen@odoo.com>
Before this commit, the ´.ace_gutter´ overlapped the beginning
of the ace widget text content.
It only happens in read-only mode if it's a one-liner content.
Note that ´aria-hidden´ attribute is not set on BS modal. So,
it seems useless to remove it. Maybe a relicate of Bootstrap 3.
Steps to reproduce:
In debug mode,
- Open Settings
- Technical
- Scheduled Actions
- Open any
closesodoo/odoo#109519
X-original-commit: dc65d3de3a02a8f196eb22348bdfe41ede23f5d1
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
**Issue:**
- Try resizing a column.
- Bug: After releasing the resize, the column being resized is also reordered.
- This results to automatic resizing of the columns, not respecting
the current resize made by the user.
**Solution:**
1. Keep the size of the columns after reordering. Better UX because any resize
made by the user won't change when reordering the list (accidentally or purposely).
2. During resize, we track state variables - `resizing` and `preventReorder`.
- When resize starts, `resizing` is set to `true`.
- When the mouse pointer is released (mouseup), and before the `mouseup` event
reaches the `window`'s `mouseup` listener, the column title handles the `mouseup`
first, setting another state variable `preventReorder` to `true`.
- `mouseup` will eventually reached `window` which stops the resize, setting
`resizing` to false.
- Then, click event happens on the column header. And since the `preventSort` is
true, it will return early but resets the `preventReorder` to `false`.
- If the click event happened to be in the resizer span element, we should not
prevent it from bubbling so that `preventReorder` is properly reset.
**TASK-ID:** 3109501
closesodoo/odoo#109518
X-original-commit: 7a71a0974164277ac7fd382391684b078b71bf7d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the behavior disabling the unused snippet assets
performed two checks:
1. It was looking for occurrences for its use in the snippet template
2. It was looking for occurrences for its use in the HTML fields
3. Checked on the occurrences of step 1 and 2 and return result.
In many cases there are already coincidences in the first step, making
the second step unnecessary since this second one is the slowest.
Matches are now checked between steps 1 and 2 to skip the second if
matches are already found.
closesodoo/odoo#109488
X-original-commit: 56100532dbcbdeb5487662d0cbf35ba6d62b15b5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The placeholder may be too long and not fit the screen. In this
situation it would not been shown at all. Using the `text-trauncate`
bootstrap class, the end of the text is truncated with an ellipsis in
case it doesn't fit on screen.
task-id-3098157
closesodoo/odoo#109424
X-original-commit: dc7e4c90c9c28c456c1dfbdd503a4cb9095a1292
Signed-off-by: Julien Castiaux <juc@odoo.com>
This commit is to convert the client actions in misc.js into the new
architecture.
We remove the client actions login and logout because they are no
longer used in the code base.
closesodoo/odoo#109332
Task-id: 3099992
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Add link to see rescue session on each `pos_config`
- Change error popup by a alert popup when closing a pos.
Before the user wasn't notified when a rescue session isn't closed.
The popup isn't an error but a notification that inform the user that the session is already closed and a rescue session was created.
closesodoo/odoo#107000
Taskid: 2817110
Related: odoo/upgrade#4111
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>