WHY: PEC server rejects default addresses, so you cannot test connection
---
opw-2371431
closesodoo/odoo#65516
X-original-commit: 876d3b3b8cf9f91a3609871f69b3ce1186d71ac6
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
When a new warehouse is created, the receipts of the purchase orders done in
this new warehouse have different behavior than the ones from the inital
warehouse. With the new warehouse the 'Detailed Operations' tab of the
receipt is visible but not the button next to 'Done' in the 'Operations' tab.
Since no elements are inside the 'Detailed Operations', it requires a manual
entry of all elements for every receipt with backorder.
This aligns the behavior of new warehouses with the inital one, not
showing the 'Detailed Operations' tab in the receipts but allowing to use
the button of the 'Operations' tab.
closesodoo/odoo#65501
X-original-commit: 126102b5b4cd9aa32fb3eb9a763d73e4056d3462
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: npi-odoo <npi-odoo@users.noreply.github.com>
Often the business want to trigger the cron several time at different
moments. The typical use case is the business holds a recordset and
needs to trigger the cron for every record. The current solution is to
loop on each record to call `_trigger` times.
We now allow to invoke `_trigger` with an iterable of `datetime`
objects, and isolate the implementation in method `_trigger_list`.
We also removed the `delay` argument as it was not used.
closesodoo/odoo#65459
Task: 2452697
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Steps to reproduce the bug:
- Accounting - Journal Entries - form view - Print - Invoices
Bug:
A UserError was raised 'Only invoices could be printed.' but in the attachment,
the PDF was generated.
opw:2452278
closesodoo/odoo#65508
X-original-commit: ba32244c10396ff8605e5533e08675a64fbf9d88
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Steps to reproduce the bug:
1) Enable Paypal on the Payment Acquirers and select "BE Company CoA" on the company
2) fill the email and enable the "Add Extra Fees"
3) create an invoice on the company "BE Company CoA"
4) preview it as a public user
Bug:
An access error was raised:
Due to security restrictions, you are not allowed to access 'Companies' (res.company) records.
opw:2439896
closesodoo/odoo#65507
X-original-commit: 6b23ff3bdd1d5a3f34a431e2301db5984e0f761a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
- Go to Accounting > Configuration > Tax Report
- Create a Tax Report (with Lines having Tag Name)
- Go to Accounting > Accounting > Tax Adjustments
In wizard, no Report Line can be selected for mandatory "Report Line" field.
Report lines are filtered on "report_id" field, which is a related field to the report line field.
Therefore there is no way to select a Report Line.
opw-2449295
closesodoo/odoo#65502
X-original-commit: 0311cffd89c375a6fc1babacaa19029776bfebfb
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
When you save your custom snippet you probably won't give it a
specific name.
Before this commit several custom snippets name was specified on save
and there was no way to modify their name afterwards
After this commit custom snippets are assigned a generated name but they
can be renamed afterwards
task-2374802
closesodoo/odoo#61483
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Purpose of the task is to Improve the current pricelist line
form view for clarity.
SPECIFICATIONS:
- Move the price computation on top and apply on at bottom.
- Improve the formula view and calculate dynamic tips based
on formula value.
closesodoo/odoo#63733
Taskid: 2373068
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
The 'o_text_overflow' class whlie provided on any field, is used to
have classic ellipsis (...) for very long string. However, it is
implemented the way that it occupies the available width for the field
tag it even if the the string is small.
The same class is also utilized in some field widgets like email, phone,
URL etc. But it has a small side-effect due to full width occupancy.
Because the above widgets rendered an anchor tag, the clickable area is on
the whole available width instead of simply on the content provided in anchor
tag. So even if user clicks on the empty area of that field, the click
action is performed (for example, in email field widget, default mail client
pops-up) which should not happen. It should behave like clickable m2o fields
where the action is performed only when clicking the content and not on the
empty area.
With this commit, we wrap the anchor tag, within a container div tag. Here,
the overflow class will be on the container div which will do it's job to
prevent the long strings from breaking the UI, and the anchor tag being its
child, will not be the full width, thus limiting the clickable area. This
commit also makes the related test cases more robust by checking proper
classes for particular widgets.
TaskId - 2345974
closesodoo/odoo#63735
Related: odoo/enterprise#15777
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Example to reproduce:
Drop the "Cover" snippet and try to remove the background
image. Clicking on image button has to be done 3 times to land on the
correct result:
- First click removes image, but not filter and leaves both buttons
checked
- Second click removes the filter and unchecks its button.
- Third click unchecks the image button.
It should be one click to remove image, filter and uncheck both buttons.
The goal of this commit is to prevent _applyOptions() from setting
background-image values if image is not optimizable. This filter will
solve the issues since empty values (badly parsed by getBgImageURL())
won't be added as background urls.
task-2312878
closesodoo/odoo#65438
X-original-commit: aba9056e7baa58decf147313678ad9d1f4522dee
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Purpose
======
The goal of this PR is to write some unit tests about the changes made in Task-2388500, Task-2409761 and Task-2424382 to keep the functional features.
## Determined Sales Order Items in task and timesheets
These tests check if the Sales Order Items (SOL) computed in task and timesheets are the ones expected based on the pricing type defined in the project.
- Check if the SOL in task is the same than the one in project when we create a task in project which has a pricing type to project rate or employee rate.
- When the pricing type is employee rate and we timesheet, check if the SOL on these timesheets are the one expected, that is:
- If the pricing type is employee rate and there are some mapping for employees, normally when we timesheet for an employee in the mapping, we should have the SOL defined in the mapping for this employee in the timesheet.
- If we timesheet for an employee who is not in the mapping then we should have the SOL of the current task.
- When the pricing type is task rate and we defined a customer who has some SOs with services products in project, if we create a task in this project then we should have the customer defined in the project and the one of latest SOLs if it is prepaid service and remaining_hours > 0. Otherwise, the SOL is False.
- When the pricing type is employee rate or project rate and the customer, SO, SOL is defined in the project, if we change the customer then the SO and SOL should be False if the customer in the project is different that the one in SO selected.
- If the pricing type is employee rate then when the customer changed in the project, the SOL in each mapping should also be removed.
## Remaining hours for prepaid service products
This test checks if the remaining hours is correctly computed in project.task when the Sales Order Item in this task contains a prepaid service product.
## Tour JS to check features in the UI
A tour js has been created to check the process with the UI. The steps are the following:
- Go to the Sales App,
- Create a sales order for Brandon Freeman for instance,
- In this Sales Order, we take a prepaid service product (we created this one in a unit test in python as we must not use the demo data to realize the JS tour) and the quantity ordered is 10 hours,
- Check the product_uom field is set on 'Hours',
- Confirm the Quotation to create the Sales Order,
- Go to the Project App,
- Create billable project to timesheet for Brandon Freeman,
- Create task in this project and add a timesheet into it,
- Show in this task that we can see the Sales Order Item linked to the createed timesheet, because this field is hidden by default.
- Go to the Settings menu and then Projects submenu.
- Create a project, and show the three different configurations to invoice services in a project. That is:
- Task rate
- Project rate
- Employee rate
## Miscellaneous
The `project.task.create.sale.order` model has been removed because the wizard is unused since these 3 tasks have been merged.
task-2439304
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#65146
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Generic improvements have been made to improve the Project App and its onboarding.
## Web module
- kankan examples modal: change the 'use this for my kanban' button into 'use this for my project'. To do this, a small change is made in the web module to use the options variable called `applyExamplesText` to change the label of the button in project app.
- A private method called `_getFavoriteIcon` is added in `FavoriteWidget` to easily change the icon based on the boolean value when we override this widget in another module.
## Project App
For project.task model:
- the label of the priority label has been changed from "Priority" to "Starred".
- the user_id field should not be clickable in form view.
For project.project model:
- the fa-star icon has been replaced by the fa-bookmark and fa-bookmark-o icons in the kanban view.
- When the user is the 'Project User', the 'share' button and 'project overview' stat button are hidden in the project form view.
- the 'sales order' stat button is only visible to users who have at least the `sales > all documents access right level` in project form view.
task-2440564
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#65095
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In a multicompany environment, when a expense is created from the
expense email alias, the expense account is computed with SUPERUSER
context, so depending on the SUPERUSER set company, we could get
a mismatch of expense and employee's company and the account one, wich
causes a subsequent error when trying to post the expense.
closesodoo/odoo#65413
X-original-commit: da758c44b19a9339f0c0b1b6a74c11e3e5491a64
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Co-authored-by: simongoffin <sig@odoo.com>
Followup to odoo/odoo#65314: turns out there's a bunch of other leave
requests in the file which will eventually fall on a weekend, and will
probably blow up due to the new validation in 14.0:
- hr_holidays_sl_al in March 2021 because April 17th, 2021 is a
saturday
- hr_holidays_cl_mit_2 in June 2021 because June 5th, 2021 is a
saturday
- hr_holidays_sl_vad in September 2021 because September 25th, 2021 is
a saturday
- hr_holidays_sl_kim in April 2021 because May 1st, 2021 is a saturday
- hr_holidays_sl_kim_2 in March 2021 because July 3rd, 2021 is a
saturday
Solution
========
Instead of hard-coding month-days, move to the first monday after the
original date e.g. if we were looking for the 20, now get the monday
after the 22. In relativedelta terms, `weekday=0` is "the next
monday". The date is then formatted inclusive of the month-day rather
than hard-coding one.
One nit is for the end date:"the next wednesday" may come before "the
next monday" if we're on TU or WE. So we need to first jump to the
next MO *then* to the WE after that, which makes the code a bit
longer (and more redundant). As a result the end date is now "the
wednesday after <the start date>" rather than being a literal 2 days
later or whatever.
The PR updates all the 1-day and 2-day intervals, it also updates the
3 days inclusive (those over 3 which include start and end dates
rather than without) including those updated by #65314 for clarity /
coherence of small intervals. Longer intervals are left untouched,
although we may eventually want to update them so `number_of_days`
computations are more reliable.
Redundancy issues
-----------------
There are a bunch of redundancies / verbosities which don't seem
easy or possible to remove:
* While lxml does resolve entities by default it doesn't load
DTDs (let alone validate them), aliasing various datetimes
& deltas as entities is not an option, not to mention for security
reasons we'd rather stop resolving entities entirely than allow
custom ones.
* While it's possible to define nested safe_eval'd `context` on nodes,
the evaluation context for *those* contains neither datetime nor
relativedelta, so storing a bunch of constants in the (environment's)
context and using that in the expression is not an option either.
* Leaving `date_from`/`date_to` off of some records breaks, probably
because some other field necessary to properly compute *them* is
missing.
Other changes
=============
* Removed explicit settings to `number_of_days` and explicit calls to
`_compute_number_of_days`, seems redundant and unnecessary as the
compute works fine as long as we let it.
* While at it, updated the calls to `action_approve`: moved them next
to the corresponding record (instead of being on the other side of
the file) and used direct references to the subject records rather
than complicated searches.
* Also updated two leave allocations to be created validated OOTB
instead of manually calling action_validate as that's what's being
done elsewhere in the file.
Notes
=====
* In relativedelta lingo, "the next X" is inclusive of the current
date e.g. when looking for the next WE, if the date being offset is
already WE there will be no movement, this can be unexpected.
* Normally relativedelta would be used with the MO/TU/WE/... constants
for weekdays, but we're not exposing those to `@eval` so integer
literals it is.
closesodoo/odoo#65430
X-original-commit: 7840b21483c0012174e6028a39b114ce56f06158
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When changing the bank account by the outstanding account of a payment, invoice's payment_state should be recomputed by the orm.
So, when writing 'account_id' on the liquidity line, 'is_matched' must be recomputed on payment (_compute_reconciliation_status). Then, if reconciled to some invoices, 'payment_state' must be recomputed as well (_compute_amount).
closesodoo/odoo#65427
X-original-commit: 7caf5316407ab8950216592e38551f29207076de
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
The purpose of this task is to clean up and provide clear export
file names.
Currently, When exporting data:
- From a pivot view, the file name is 'table'
- From a list view, the file name is technical name of model
so in this commit, Change the export file name as below:
- For list view quick export and standard record export,
the filename will be 'model_description(model_technical_name)'
- For pivot view quick export,
the file name will be 'Pivot(string set on view)(model_technical_name)'
and if string is not set then 'PivotUntitled(model_technical_name)'
In all the cases space and forward slash will be removed.
closesodoo/odoo#64123
Taskid: 2237840
Related: odoo/enterprise#15579
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Issue
- Install "Field Service" app
- Create new task
- Try to select Planned start/end date and valid
Daterange picker is hiding when trying to scroll down to valid selection.
Cause
The daterange picker is closed when ev.target is not inside the picker,
however ev.target always return the document element.
Solution
Do not hide daterange picker on scrolling if on mobile.
Note : It will only apply if scrolling on the daterange picker and
will still hide if scrolling outside this last one.
opw-2428099
closesodoo/odoo#65435
X-original-commit: 1d9b6f56e70faee13cda0ccb9893ed49904ab319
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Filling the new column in SQL is dramatically faster than doing it via
the ORM, which iterates over all the records in the table.
The test case is creating a related field for 100+ records with distinct
values. Setting the field's value was taking more than 100 queries. It
now takes 3 queries.
task-2449313
opw-2380445
opw-2389376
https://github.com/odoo/enterprise/pull/15910closesodoo/odoo#65432
X-original-commit: d66652b4aa514546356306e3eb48eaecaba07c33
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This tour js is used to check if the process is not broken. To do this,
we create an unit test to launch this tour js.
Before launching this test we create a prepaid service product in the
unit test.
Steps of this tour js:
1) Go to the Sales app,
2) Create a Sales Order with the prepaid service product and we order 10
hours for this product.
3) Go to the Project App,
4) Create a billable project to timesheet for the customer who orders
these hours,
5) Create task in this project and add a timesheet into it,
6) Show in this task, we can see the Sales Order Item linked to the
created timesheet, because this field is hidden by default.
7) Go to the Settings > Projects,
8) Create a new project and show the three different
configurations to invoice services in a project. That is, 'task rate',
'project rate' and 'employee rate'.
task-2439304
This commit add a test for project with pricing_type in ['fixed_rate',
'employee_rate']. This test checks when the user changes the partner_id
in the project, if the SO and SOL in project and also in mapping are
removed if the customer selected isn't the one in the SO.
task-2439304
This commit removes the project.task.create.sale.order model because
this wizard is no longer used. Before we use this wizard to create a SO
from ticket and task, but in reality this feature is no used.
The test using this wizard has been changed to keep the behaviour of it.
This test checks if the invoiced timesheet does not change the project
when the linked task changes the project.
Moreover, the both projects used in this test have been switched because
when we invoice the SO the timesheet is in the template project and this
one is not billable.
Thus, we create no invoice. To create an invoice as we expect, we must
have the timesheet in the global project.
task-2439304
This test check if the compute method for the remaining_hours field in
the SOL containing a prepaid service product is correct and also the one
for the remaining_hours_so field in the task which contains a SOL with
prepaid service product.
task-2439304
This commit adds a test to check if the user can manually edit a
SOL in timesheet model. If he do this, then we also check the SOL
doesn't change when the SOL in task changes. Also, we check the
qty_delivered changed for each SOL impacted.
task-2439304
Before this commit the user who has the
sales_team.group_sale_salesman group can access to the Sales Order stat
button in project and task form view. The problem is if the Sales Order
is not own one, he cannot access to it.
This commit changes the visibility of this button to show it when the
user has sales_team.group_sale_salesman_all_leads group.
task-2440564
Before this commit, the user who is not a Project Manager can access to
the project overview.
This commit removes this access to give this access only for the Project
Manager.
task-2440564
Before this commit, the user who is not a Project Manager can share the
project based on the visibility of the project.
This commit hides this button for this user, only the Project Manager
can use this button.
task-2440564
Before this commit, the user can click on the user_id field in
project.task form view to see the user form view of the user linked in
the current task.
This commit adds an option (no_open=True) in this field to prevent the
user to access the user form view.
task-2440564
Before this commit, the customization of text in button to apply kanban
example is never used because the variable which contains the text is
missspelled and thus is always undefined. That's why, we always have the
default text in this button.
This commit changes the `options.applyExampleText` to
`options.applyExamplesText` to get the text customization in project
module for instance and adds a test in order to check that the text
is well rendered.
Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
task-2440564
Closes#65095
All fields not provided default to 0, so the the exact values are
`%Y-%m-20 00:00:00` - `%Y-%m-22 00:00:00`.
Because this is only 2 days it can entirely overlap with a week-end
(e.g. 2021-02-20/21), leading to `number_of_days` computed to 0 and
triggering an error at confirmation (`"The following employees are not
supposed to work during that period"`).
Change familly trip as the same issue would occure in May 2021
closesodoo/odoo#65326
X-original-commit: ada1da9a0cea6aaa3f91ee34fd3b273be79e1e3d
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Steps to reproduce the bug:
- Let's consider a user U with fr_BE as lang
- Log as U and active developper tool
- Go on any record, click on debug button
- Select Technical translation
- Choose a translation and click on the transifex url button
Bug:
The URL contained the iso code fr_BE but this iso code didn't match
any code in Transifex.
From: https://www.transifex.com/odoo/odoo-14/languages/
We can see that the only iso codes with a '_' are: 'zh_CN', 'zh_TW', 'pt_BR'
opw:2448533
closesodoo/odoo#65308
X-original-commit: d609a75ccbfaa62b6070de4769880a94d896ff73
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Co-authored-by: mart-e <mat@odoo.com>
When the suspense account is not reconcilable, 'suspense_lines.reconciled' always gives 'False' leading to a not reconciled statement line.
closesodoo/odoo#65290
X-original-commit: 73ddcfbcc58b7a6542ced4bd8b20dd67c9f446ee
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Purpose
=======
The parameter "lead_enrich_auto" enable or disable the enrich CRON.
This is done in an onchange and so, if we enable manually the CRON, the
change will not be reflected on the parameter.
Task 2443338
closesodoo/odoo#65007
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps:
- Go to Settings > Companies > Manage Companies
- Create a company (1) with a different currency than the one you're in
- Go to inventory > Products > Products > Create a product (2)
- Storable Product
- Cost: 10
- Click Update Quantity
- Create a new quantity line with 1 in On Hand Quantity
- Switch to company (1)
- Go to Inventory > Products > Products > Edit product (2)
- Storable Product
- Cost: 15
- Click Update Quantity
- Create a new quantity line with 1 in On Hand Quantity
- Go back to the product
- Click the "Forecasted" smart button
Bug:
Traceback here:
https://github.com/odoo/odoo/blob/47bfdf0592a5dd93870ca1a9da326351d70087bb/addons/stock_account/report/report_stock_forecasted.py#L17
ValueError: Expected singleton: res.currency(2, 1)
Explanation:
The amount is the sum of the `stock.valuation.layer`s of a product
across all companies and these companies may have different currencies.
This commit scopes the computation of the amount inside the company of
the current warehouse.
Also the `stock.quant` values displayed in the "On Hand" report are not
correct for the other companies when displaying their data by selecting
all the checkboxes in the global company dropdown.
This commit also fixes the amounts in the On Hand view by using the
standard price per company and attributing the correct currency to the
`stock.quant`.
opw:2444593
closesodoo/odoo#65267
X-original-commit: 67d975be75963678d25ae54289b2f1de639c8bed
Signed-off-by: backspac <backspac@users.noreply.github.com>
What are the steps to reproduce your issue ?
1. Install project
2. Open any project
3. Switch to list view and display by Stage
4. Open categoryA and select some records
5. Open CategoryB
What is currently happening ?
The button create is not displayed
What are you expecting to happen ?
Don't hide create button
opw-2423701
closesodoo/odoo#65266
X-original-commit: 813b9fc42f5d0cc4e35afb642291200b90d1f545
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
By default, the `ls` command has a width limit. Everything after this
limit will be split on a second line.
This happened when listing the modules present on the Iot Box in v12.
The list of modules was split accross two lines, the modules on the
second line were then not loaded when starting the Odoo service.
closesodoo/odoo#65259
X-original-commit: 60b58322dc803dfbf734374b63f9556563a19b8f
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
With commit[1], we introduced a feature that from the sales team, we can
see the overdue opportunities for a particual teams. However, the filter
that we use for related action which is supposed to show overdue opportunities
is not not added, and the filtration is not working as expected, showing us
all the opportunites for a team.
This commit fixes the issue by adding the invisible filter with proper
domain set within opportunities' search view and thus enables us to
filter overdue opportunites.
commit[1] - https://github.com/odoo/odoo/commit/1da63f0ab0fb4212bee46f960c6bbe8ca9251cac
TaskID : 2323612
closesodoo/odoo#65258
X-original-commit: 68577d32c7fe0cb18ba4fb788cee65ec8b54b65b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Scenario:
- create mass mailing with icons and without title
- save and get error "The followign fields are invalid: Subject"
- fill subject and save
- edit
=> the icons have disappeared
This is because mass mailing widget is using:
- a "body_html" field that contains inlined html
- a wysiwyg editor to edit field "body_arch"
- a textarea containing "body_arch" value to be saved
When we save this happens:
1. we save the current value of wysiwyg into textarea
2. wysiwyg content is inlined (eg. transforming font in image)
3. inlined wysiwyg content is set to "body_html" field
4. if there:
- is no error while saving => body_html and body_arch are saved and
will be used on next edition
- if there is an error the fields are not saved, and we now have an
inlined content on wysiwyg, so next time we save the "body_arch" is
going to be inlined:
=> this for example breaking the icons on edition
Issue discovered when fixing opw-2447756
closes#65208closesodoo/odoo#65221
X-original-commit: 0f5f53837bc403960e307ab85e9fe68423c23f5f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Currently, when new alias with an already used prefix is created, it shows the
warning stating "The e-mail alias is already used. Please enter another one."
It does not help much because the user do not know where the alias is used.
This commit improves the warning message by including the document name and
parent model name (if available) if the alias is linked to any model, or it
shows if alias is already used for handling bounce/catchall if that is the
case.
Task Id-2375552
closesodoo/odoo#62367
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>