Steps to reproduce:
- create a project and a task inside
- set date_deadline on the task
- copy the project
=> the copied task has date_deadline = False
Source:
- date_deadline copy property wasn't changed to True when the field
was merged with planned_date_end in 17.0
Fix:
- copy was removed as its default value is True
closesodoo/odoo#152006
X-original-commit: https://github.com/odoo/odoo/commit/56073896a69d9f68ce7e7938d9dec7ef094e19b3
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
In this commit we add the ability to toggle between showing and not
showing product and category images in the pos ui.
Because this change is done in stable, we store the user's selection in
`ir.config.parameter`.
In the forward port, this will be removed and the settings will be
stored in `pos.config`
Task 3704416
closesodoo/odoo#151823
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Current behavior:
Confirming a Purchase Order with more than 50 lines takes
too much time to be processed. In the case of the client
they had PO with more than 200 lines which makes it
impossible for them to confirm them.
Step to reproduce:
- Install mrp and mrp_subcontracting
- Create PO with more than 50 order lines or more
- Try to confirm it
- Take a long time or timeout
Benchmark (made in 16):
| No. of PO lines | Before | After |
|-----------------|:-------:|:------:|
| 9 | 1s30 | 1s30 |
| 91 | 1min | 16s |
| 273 | 4min | 50s |
| 405 | 4min30s | 1min6s |
Fix:
Batch more actions and records to reduce the number of
queries generated by the ORM.
opw-3625892
closesodoo/odoo#149830
X-original-commit: 7d9d7917948df966ada2055dcfead0cabaaf0651
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
As a result of the Quantitypocalypse (7dda6bb), move lines are being
created for MO components before they're actually consumed. This in turn
automatically creates analytics lines, debiting accounts for these
unconsumed parts. This commit globally prevents any move line that is
not yet picked (i.e. consumed/reserved) from being included in an
analytic entry.
Additionally, an edge case where setting a move's qty to 0 did not
trigger adjustments of dependent models was fixed.
Part-of: odoo#146114
Task-3621105
closesodoo/odoo#146114
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
A recent feature in accounting (odoo#139225) introduces cross analytics,
which allows submitting multiple accounts per line (one account per
plan). This is not done, as would be assumed, by changing the
`account_id` field from a Many2One to a Many2Many, but by adding fields
to `account.analytic.line` every time a new root analytic plan is
created.
This approach has certain advantages, but a particular disadvantage is
that it becomes harder to update existing lines. For MRP, updating
rather unlink-recreating lines is important for employee time tracking,
where the analytic line will be updated every time the time worked is
updated, and the employee's wage can change between updates. In this
edge case, the accumulated cost must remain calculated at the old wage,
and newer costs must accumulate at the new, actual wage.
Concurrent closing line edge case
================================
An analytic distribution assigns divides an expense into smaller
expenses for analytic accounting. Typically, every fractional expense is
credited to a different analytic account, and they total to 100% of the
original expense. With multiple analytic plans, dividing that expense
can happen different ways. For example, one analytic plan may track
expenses per department, while another keeps track of expenses per
region. This means that an analytic distribution may contain accounts
belonging to different plans, with every plan dividing the original
expense in different ways across its own accounts. For cross accounting,
fractional expenses can be assigned simultaneously (i.e. on one line) to
multiple accounts (up to one per analytic plan). In our example, this
would mean that this fraction was spent by a specific department in a
specific region.
For an analytic distribution to be accurate, we must ensure that for
every plan, the sum of all accounts come out to the total percentage
(usually 100%) that was distributed in the first place. Because
multiplying large numbers with small percentages can introduce rounding
errors, we need to correct for any discrepancies. With one account per
line, this is easy; when a line closes out one of the plans in an
analytic distribution, we assign the exact outstanding amount for that
plan to that line, ensuring that the sum across all accounts adds up to
the exact total percentage of the expense that was divided in the first
place. Since every plan closes out on a different line, we can apply
this correction every time and the amounts are always correct across the
entire analytic distribution.
The problem with cross analytics, and thus multiple accounts per line,
is that a line can now sometimes close out two different plans, with
slightly different outstanding amounts. This means we can no longer
guarantee that every plan in an analytic distribution sums out to the
original expense. Luckily, only certain analytic distributions are
vulnerable to this edge case: they must distribute across multiple
plans, and must have at least one line where not all participating plans
are credited. There exists no trivial way to fix this. The current
implementation follows the approach of the accounting module, which
takes no special precautions against this edge case.
Part-of: odoo#146114
Task-3621105
Part-of: odoo/odoo#146114
Revert of commit da251b757d
Problem
---------
In said commit, tests were failing due to
1. the new restrictions on tax
2. default creation of repartition lines.
However, updating the way chart_template._get_chart_template_data is
patched in those tests was not the way to go. Because of that, some
fixes due to migration error to 17.0 failed - PR #149733.
closesodoo/odoo#151189
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The `test_conflict_and_replan` was not properly setup and doesn't
show the real issue when plan workorders in wrong order and use the
replan action.
.workorder_ids return base on the _order of `mrp.workorder` that is the
'leave_id, date_start, id'. However in our case, when the dependency are
not active, we want to do them in the order define on the BoM. So we
sort them before by operation sequence before defining the
`blocked_by_workorder_ids`
closesodoo/odoo#143850
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Issues
------
All manufacturing orders are not having a start date
This commit
-----------
- Fix not updating start date on manufacturing orders.
X-original-commit: 2e5da1130f4a7056f746a4cce6ba75bf699dbe62
Part-of: odoo/odoo#143850
Before this patch, if you once had one module available and, later, remove it, you'd be getting an exception when browsing its form view and trying to get its icon image.
Now it gets the base module icon image, just like it should.
@moduon MT-1524
closesodoo/odoo#151870
X-original-commit: 4543f45e0066814d5722acfcac3c8bc8d09b8cb1
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Co-authored-by: xmo-odoo <xmo@odoo.com>
To reproduce on runbot:
- edit the access rights of internal user 'lauriepoiret' and grant she
the group "Sales / User: own document only" (and ensure she does not
have the group "Purchase / User")
- as 'lauriepoiret', create a sale order for a product without
'service subcontracting' (ex. Bacon Burger) and confirm it
- click on "Cancel" button
In the wizard and warning is shown:
```
There are active purchase orders linked to this sale order that are
not cancelled automatically!
```
As the user is not a member of `Purchase / User`, he has no right
to read the `display_purchase_orders_alert` field which prevent
the invisible attrs to be correctly evaluated, showing the warning
in all cases even when there is no purchase order linked
This commit restrict the PO warning to the same `Purchase / User`
group to ensure that warning information is coherent
closesodoo/odoo#151968
X-original-commit: 6086d6fcc87128a72bad055a9a749c5329c6e901
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Steps:
- Go to any event with tickets and using the ticket confirmation
template, sending 'after new confirmation'.
- Confirm a new attendee.
- An email is sent but the chatter only shows the attachment and the
subject, with no body.
Issue:
Chatter should show full content of the email.
Reason:
Above 16.2+ the 'body' is not implicitely set when genrating the
template in ``mail_template.send_mail()``. As discussed with RETH, when
requesting the 'body_html' for a template, setting the 'body' solves the
problem.
opw-3562438
closesodoo/odoo#151930
X-original-commit: 0a3d4b10a7c81d05d9bf6864b0b9a2f48f09b2a0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit:
When pasting using CTRL+SHIFT+V, if the textFragment includes linebreak(\n),
each textFragment is divided, and each seperated fragment is inserted using
`insert` command, followed by `oEnter` command. However, when `oEnter` is
UNBREAKABLE, the inserted text is ROLLBACKED.
After this commit:
We now check whether the anchorNode's closestBlock is UNBREAKABLE. If so use
`oShiftEnter` command; otherwise, use `oEnter` command which avoids ROLLBACK.
task-3563785
closesodoo/odoo#151911
X-original-commit: f1e35ca82cf72ffb21c586d9bf1714bb388fe257
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
In calendar if you delete the end_date, switch to all_day event and set both
start_date and stop_date and try to create the event, it will raise an error
because `end` is not set. This is due to 'end' being a required field and the
end_date not setting the end value. This commit adds an onchange to properly
set the start and stop values from the start_date and stop_date.
task-3682608
closesodoo/odoo#151910
X-original-commit: ff431fc02df59b731ea2a8a7051c1e1d42581637
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
This commit allow to inherit the method _get_orderpoint_locations to
filter in which location compute orderpoints imrpoving performance and
usability
closesodoo/odoo#151909
X-original-commit: 2f245b40e8cecf87cb3334a80b24a54cd6e99d12
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Before this commit, in the command palette, during a search, it is possible
that the value entered is modified. The problem only occurs if the namespace
has a debounceDelay bigger than 0 and at least one of its command providers is async.
How to reproduce:
=================
- Go to the command palette with the @ namespace.
- Type a few characters
- Re-enter a few characters
If you repeat this operation several times, some characters may disappear.
Why:
====
The value of the input is modified at each "input" event, but the searchValue
in the state is only modified when the debounce trigger "search".
Since the command palette template is contained in a slot, each state
change causes a complete rendering of the command palette. When the search is executed,
the commands are added to the state after each provider has generated them,
so a rendering takes place and it is the value contained in state.searchValue
that is used for the input and not the value contained in it before the rendering.
Solution:
=========
No longer modify state.searchValue during the search, but at each input event.
closesodoo/odoo#151906
X-original-commit: f4e1350e3a03c8a3a2b6bab8f4f74e278b1d2905
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- first install bridge module 'project_account_budget'
- open any project and go to project updates
- in right side panel you see 'Profitability' button
- click the profitability and switch to mobile view
Issues:
- heading of table are not vertically centered
Solution:
- Add style to vertically align center of heading
closesodoo/odoo#151839
Task: 3633405
X-original-commit: 249f8700b9c982c765d712cd27e93bbd7bedfe3e
Related: odoo/enterprise#55460
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
+ website_crm_partner_assign that overrides website_partner
Implement partner slug validation for accurate URL redirection
Prior to this commit, partner slugs weren't verified, leading to Google
indexing outdated partner URLs even after renaming. With this change,
when the virtual slug (fake slug sinc no read access on res.partner)
differs from the actual one, redirection to the correct URL is enforced.
closesodoo/odoo#151824
X-original-commit: a28a9c3a5e635f45e0bfee402b7f0775735adeb7
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
When a button is updated, its `btn` classes are stripped by the editor.
However, in so doing the regex replaces `btn_cta` by `_cta`. This commit
fixes it.
Related to opw-3644220
closesodoo/odoo#151803
X-original-commit: 61735c84445606b97fdf95f35b6e3dd1384b7ea5
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
Have a product template with bom
Ensure the product variant has not the same id of the template
(Add and remove a template variant)
In the product page > Hit "forecasted" smart button > "Manufacturing Forecast"
Error will raise:
Missing record
Record does not exist or has been deleted.
This occurs because when opening the Manufacturing Forecast from the
template product we are searching the variant using the id of the
template product
opw-3636661
closesodoo/odoo#151776
X-original-commit: df7b80f24bc6ef20d3aea25e9597807f5a6a0195
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
Fixes an error where a product cost rounding change
(e.g. from default 2 to 3) would not be reflected
expense product and expense price_unit
task-3679204
closesodoo/odoo#151775
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
To reproduce:
- Log-in as admin
- Switch to debug mode
- Go to Events / Configuration / Event Templates
- Create a new template:
* Name: Online Conference
- Check 'Website menu', 'Community' and 'Allow Room Creation' option,
- Save it
- Go to Events / Events
- Create a new event:
* Name: New Online Conference
* Template: Online Conference
- Save it and click on 'Go to Website' smartbutton
- Then click on 'Community' submenu
- In the right panel, click on "Create a Room"
It crashes with:
```
TypeError: ctx.widget is undefined
template@.../web/assets/1/debug/web.assets_frontend_lazy.js line 13622 > Function:26:29 (/web/static/lib/owl/owl.js:5532)
render@.../web/assets/1/debug/web.assets_frontend_lazy.js:66320:28 (/web/static/src/core/utils/render.js:56)
renderToElement@.../web/assets/1/debug/web.assets_frontend_lazy.js:66272:22 (/web/static/src/core/utils/render.js:8)
_onClickCreate@.../web/assets/1/debug/web.assets_frontend_lazy.js:132115:35 (/website_event_meet/static/src/js/website_event_create_meeting_room_button.js:25)
```
This revert odoo/odoo@065a2f451a change for `website_event_meet`, as
in that case the `csrf_token` value is provided directly as context
value to `renderToElement` (see `websiteEventCreateMeetingRoom`
publicwidget `_onClickCreate` handler)
closesodoo/odoo#151761
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, if the text color of the body was light (e.g., due
to a dark body background), the text in certain modals (for example, in
the "Alternative products" modal displayed when adding a product to a
cart on a product page) was also light, making it not visible on the
white modal background.
Steps to reproduce the bug:
- Install the e-commerce on your website.
- Go to the "Customizable Desk" product page.
- Click on "Edit" to go in edit mode.
- Click on the "Theme" tab.
- Click on the 4th color of the theme colors and choose "black".
- Save the page to leave edit mode.
- Click on the "Add to cart" button.
- Bug: The text in the the modal is not visible because both text and
background are white and the input elements have their background the
same color as the body.
After this commit, we now verify that there is sufficient contrast
between the text color of the body and the background color of the
modals. If this condition is not met, we apply an alternative color
("$color-contrast-dark" or "$color-contrast-light") to the text of the
modal to ensure visibility.
opw-3570774
closesodoo/odoo#151346
X-original-commit: ffd2f2363f20b88ec05c153c57057b538c3885d2
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
This commit corrects commit 7a78839ca6cf45ddec7adb59051da132e0ebceb4
that split the move_orig_ids for new stock moves created in backorder.
The issue is this should only happens in case of subcontracting, not for
every backorders
closesodoo/odoo#151179
X-original-commit: 79f85cba46df610372c740f971182cac8c0498c0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit fixes an issue related to the colorpicker component, present
in both back-end and front-end. They use the same XML template but they
have two different selectors within our SCSS files.
Some months ago, commit[1] removed some `@extend` rules related
to button design within the `web_editor`, and replaced them
with a `.btn` BS class. This affected both colorpicker and causes layout
issues on the "front-end web editor", which was not the expected output.
The issue was fixed directly with commit[2], but by removing the `.btn`
class from the template, it removed the whole styling on the back-end
color picker, making it use the user agent button styling.
== After ==
Since the colorpicker already has some CSS variables to handle its design
depending on the context, we make use of the CSS variables to customize
the design of the component when it is inside the backend, and make it
look as it was before it lost its `.btn` class.
[1]: ee38c69503
[2]: 711fc86368
task-3693078
closesodoo/odoo#150157
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Current behaviour:
When there is too many product categories,
you cannot see the last items, because
the scrollbar is hidden.
This was made to hide the scrollbar on mobile.
Steps to reproduce:
1. Go to Point of Sale
2. Configuration > PoS Product Categories
3. Duplicate one category 12 times
4. Uncheck Restrict Categories
5. Dashboard > New Session
6. The list of categories is too long
7. Cannot see the last items
Cause of the issue:
Introduced by https://github.com/odoo/odoo/commit/60f41b1f831248c58f554dbe40114ef0d4ce42c0#diff-f23069b3927b8544dd51433e277cf8b650b10a67e5b8648155e427aaa31c19a3R838
Fix:
Make the scrollbar disappear on mobile,
and appear otherwise.
opw-3653429
closesodoo/odoo#150154
X-original-commit: 0f7fbede653dcb7c91536ea9c87df7d831a0c8cf
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
To reproduce
============
- On a project, on a task
- create a subtask give it a name and from the list view click on the
"view" button
- you get redirected to form view to create a new task that is not related
to the parent task or the project
Problem
=======
When you click on the "view" button, the task is not saved yet, so the
subtask doesn't exist yet to be viewed in Form view
Solution
========
We prevent the redirection to the form view if the record is not saved yet
same logic as : https://github.com/odoo/odoo/commit/9b136383c2599301413e6770cc0ff204273b589d
opw-3681471
closesodoo/odoo#149753
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Add a notification when closing the wizard that states that invoices
will be processed asynchronously.
- Add notifications when the cron is done processing some invoices.
This notification can either be a successful message or a warning when some
invoices are in error state. The notification can redirect to concerned moves.
closesodoo/odoo#149717
Task-id: 3568549
Signed-off-by: Laurent Smet (las) <las@odoo.com>
When downloading multiple invoices the zip file was not translatable
thus all languages had 'invoices.zip' file.
Task-id: 3568549
Part-of: odoo/odoo#149717
After https://github.com/odoo/odoo/pull/118738, we start generating a single
cron trigger per recurrence, however it fails to create the cron trigger for
daily recurrences. The main issue happens when the cron is run after the first
trigger of the recurrence. Imagine we have an alarm of 5 minutes before the
event, the call for_setup_alarm from _send_reminder will try to get the next
event in the recurrency to notify. However, the SQL query uses
`WHERE start > now` and if the cron trigger runs before the event is started
(most cases) this query will return the event that we're notifying. This commit
fixes this by checking event by event which is the next alarm tha should be
triggered and passing that date in the context of the `_setup_alarms` call.
How to reproduce?
Install calendar
- Create a recurring event with daily recurrence repeating for 3 days. Invite
Demo, set an email alarm for 5 min before the event and create the event
- A cron trigger will be created for 5 min before the event
- Change your computer's time so that it is 5min before the event
- The cron trigger will be called and it should create a new cron trigger for
the other day, however no cron trigger is created
Issue: SQL query in _setup_alarms in calendar.recurrence is getting the first
event with start > now, however it returns the event that was already notified
Solution: process event by event and check if its last alarm was already set.
If it was, we'll generate an alarm for the next event. If not, we'll use the
same event for the _setup_alarms call
For SMS alarms, we would not even create triggers for recurring events, so this
commit also fixes that.
task-3663455
closesodoo/odoo#151623
X-original-commit: 2da5bf6e9184db23836ea458a1fc53e27be49a1e
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
Before this commit, when the company of the employees updated is not
in the allowed_company_ids of the current user (could happen in the
execution of a cron), an error is triggered saying we are not allowed
to create a timesheet for an employee inactive. The reason is because the
employee is not fetched in the check made in the timesheet creation because
of the company of that employee is not in the companies contained in the
environment.
This commit makes sure the companies in the environment are the ones
set on the employees created/updated, to be sure those employees are fetched
in the check made in timesheet creation.
closesodoo/odoo#151656
X-original-commit: ed6b02b6323691f79aa4ff466541eeb9768de1c9
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Currently, if the Send & Print fails in a web-service that happens *after* the PDF generation
(such as UBL) we don't link the PDF and fallback on Proforma if possible.
After this task, if we are in this situation we will link the invoice and not generate the proforma.
Behavior is left unchanged for web-services that fail *before* PDF generation.
closesodoo/odoo#151624
Task-id: 3690897
X-original-commit: b4f051dbdebd71688e13defc993404e9ec8d839a
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
The `sum` function needs to be given a compatible for the `start`
argument.
Instead of using that function for a simple sum of two elements (not
`int`), lets just sum them explicitly instead.
Traceback:
```
TypeError: unsupported operand type(s) for +: 'int' and 'account.analytic.plan'
```
closesodoo/odoo#151738
Signed-off-by: Raphael Collet <rco@odoo.com>
Purpose
=======
This reverts commit https://github.com/odoo-dev/odoo/commit/27a1ccc829d290c8589a535f10b31caaacd6400f which fixed the container height when course name was too long. It added a 'visibility: hidden' style which caused an issue on the course left bar where the progress bar and completed tag are located next to each other.
Instead of adjusting the size of the container we prefer to limit the size of the course name to fit a single line. To do that we use the text-truncate class.
Task-3607404
closesodoo/odoo#151736
Forward-port-of: odoo/odoo#150162
Forward-port-of: odoo/odoo#143136
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Instead of adjusting the size of the container we prefer
to limit the size of the course name to fit a single line
To do that we use the text-truncate class.
Task-3607404
X-original-commit: b94e900b38feac490969d1bb4cb4c0da1a5455a9
Part-of: odoo/odoo#151736
This reverts commit 27a1ccc8 which fixed the container height
when course name was too long. It added a 'visibility: hidden'
style which caused an issue on the course left bar where the
progress bar and completed tag are located next to each other.
Task-3607404
X-original-commit: cac68b35777210c3f96a5bd187b479589716145d
Part-of: odoo/odoo#151736
The `test_complete_chatbot_flow_ui` ensures it is possible to add
reactions to the chat bot messages once the thread is saved on the
server.
This test was sometimes failing because the condition that is used to
wait for the thread to be persisted is incorrect: it checks that a
message with the user response exists but the chat bot question also
contains the response text.
This PR fixes the issue by using the `contains` helper instead: it
will wait until the expected state is reached.
fixes runbot-55291
closesodoo/odoo#151720
Signed-off-by: Didier Debondt (did) <did@odoo.com>
*: test_website
Commit [1] modified the custom page search model so it is adding the
current website in the search domain.
But it was not considering the case of models not having a website_id
field.
The only case was the appoitment.type model.
Steps to reproduce:
- Install website_appointment (enterprise)
- Click on Website > Site > Appointments
- Crash
[1]: https://github.com/odoo/odoo/commit/db670f64f4c2190f1655f9077ea62885049a3c84closesodoo/odoo#151686
X-original-commit: 247a5e157f14ce2cd8fbbe8d191abcb3c2e4ec0d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Add two missing indexes on pos.order and one on pos.payment. These
speed up queries executed when calling create_from_ui from the
pos interface.
opw-3619270
closesodoo/odoo#151441
X-original-commit: 6f1b5bd530dbb211bb0dbc41b523233dfb57d002
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Aurélien van Delft (avd) <avd@odoo.com>
A fix introduced in
https://github.com/odoo/odoo/pull/146836/commits/5fd63c81b092d07c4c92381a0391dad52d9b76aa
resulted to unpredictable server-syncing behavior when deleting an order from
the ticket screen. The value of sync notification message can be different
between the runs of the `pos_restaurant_sync` tour test. To make the behaviour
predictable, we make sure to await the syncing when sending order for
preparation.
Runbot Error: 56341
closesodoo/odoo#151424
X-original-commit: ce1d631fda4cfb3c60598ed06b4e0b695ab1f8bc
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Steps to reproduce:
- open any task from project in form view
- add timesheet to that task
- switch to mobile view
- under the timesheet section in notebook
Issue:
- there is no space between avatar and employee name
Solution:
- add space between avatar and employee to make user friendly view
closesodoo/odoo#151091
Task: 3633405
X-original-commit: 41d4a93100b809d404e8145e3cf14d1dc3b7c208
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, when there was an error while compiling scss,
information was added in the compiled css bundle s.t. the client
is aware there was an issue and can indicate it to the end user.
In particular, a dialog was shown with a static message, and
with what should have been the python stack trace. However, the
stack trace was missing.
In addition, a banner should have been displayed in the bottom left
corner the screen, telling that a former version of the bundle was
used as the new one is in error. This banner wasn't displayed
either.
Finaly, forwarporting odoo/odoo#149230 automatically closed the
dialog, as we close all dialogs when executing an action (in this
case the first action when the webclient starts). As a consequence,
the dialog was no longer displayed either.
To sum things up, before this commit, 1) there's no longer a dialog,
even if there were, 2) the dialog doesn't contain the stack trace,
and 3) there's no banner.
To fix 1), we simply display a notification instead. Opening a
dialog for this simply doesn't fit with odoo/odoo#149230, and a
sticky, danger, notification is totally fine for this.
A notification being smaller than a dialog, it says to open the
console to see the stack trace instead of inlining it.
2) has been inadvertendly introduced by [1]: quotes in the error
were doubly escaped (\\"), meaning that they weren't escaped at
all, so the js couldn't properly read the value
And the source of error for 3) was that the last line of the css
bundle (the sourcemap comment line) wasn't valid. It started with
`//*`. As a consequence, the remaining of the file wasn't processed,
and that's exactly where the assets bundle error handling code
inserted the error information.
[1] 64bbef5bc1closesodoo/odoo#149543
Related: odoo/enterprise#55257
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Have a form view in a dialog with an action button (e.g. a stat
button). Click on it. Before this commit, the action was executed
in the background, but the dialog remained open, which could
confuse the user and was definitely weird UX-wise.
With this commit, we automatically close all dialogs when we
execute an action which will update the main action container.
Note that this was working in previous versions thanks to legacy
compatibility code [1], but this code has no impact on the new
(wowl) dialogs, so as of 16.0, it has very limited impact.
Here's a specific scenario to reproduce the issue:
- go to the project task gantt view
- click on a pill
- in the task for view (in dialog), click on the external button of
the project many2one
- in the project form view (in dialog), click on a stat button (e.g.
"At risk")
-> before this commit, the 2 dialogs remained open.
opw 3644904
[1] https://github.com/odoo/odoo/blob/15.0/addons/web/static/src/legacy/action_adapters.js#L42
X-original-commit: 03fa39738c4f81ae30caaaa032c099797ecba9e7
Part-of: odoo/odoo#149543
Co-authored-by: Aaron Bohy (aab) <aab@odoo.com>
**Current behavior:**
Trying to post journal entries for an expense report sheet
contianing an expense that has:
A) an associated analytic distribution with
both a Project and Department, and
B) a customer to be re-invoiced (requires the expense
to be for a product which permits this operation),
attempting to post the journal entries for the approved expense
sheet will raise a ValueError.
---
**Expected behavior:**
The entries get posted to their respective accounting journals.
---
Steps to reproduce:
0. Install the Project, Accounting, Sales, Expense apps
and enable analytic accounting in the db settings
1. Create a new expense with:
A) an analytic distribution which has
both available fields filled out, and
B) a category that permits a customer to be re-invoiced
(then enter a customer)
2. Create the report, submit it to the manager, approve it,
then attempt to post the journal entries
3. This should cause the traceback, if the process was blocked
try again after deleting any tax rules in the expense
---
Cause of the issue:
The analytic_distribution field in the hr.expense module is
stored as a dictionary. During the process of recording the
journal entries, the keys are converted from a string to
integers. However, when multiple keys are in the dict, the
conversion is set up improperly and fails.
---
Fix:
Modify the conversion sequence so that multiple dict keys are
accounted for.
---
opw-3663082
closesodoo/odoo#147985
Signed-off-by: John Laterre (jol) <jol@odoo.com>
There are a lot of places in the codebase where insuficcient access to a
company blocks a normal flow and raises AccessError. While this should
normally never happen with the protections from company domain check,
the new multi company branch/parent relationships suffers the most of
this behavior; because a children company sometimes requires an
information from their parent's field (e.g. currency_id)
The correct behavior to do here is to let the children get the required
data just for processing the flow in the compute (behind the scenes).
Even though the children should normally have no access to read/write it
on screen, the backend process should be able to run smoothly without
blocking any flow.
Granting a few temporary sudo() is necessary to ensure the flow runs as
expected on some places.
closesodoo/odoo#151562
Task-id: 3551305
Related: odoo/enterprise#55345
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Yosua Nicolaus (yoni) <yoni@odoo.com>