Before this commit, those columns are not invisible if the project has
not allow_timesheets enabled (or not allow_subtasks for "Total Hours"
field) in list view of project sharing feature.
This commit changes the attrs of those field to hide the column if the
domain is satisfied.
task-2633229
closes#77156
X-original-commit: 3856024d037a86a07703cc492f7cc41be93169de
Before this commit, when the collaborator clicks on the favorite menu,
he has a traceback because the 'spreadsheet' service is not available.
Since we don't want to use this service and we just want the menu item
to save the current as favorite. This commit override the favorite menu
to remove the registry items to add the menu item and we just add the
one we want.
task-2633229
closes#77156
X-original-commit: d970c13494db2c3e085155b7855b656fbbe26467
Before this commit, when the task has a user assigned to a task and the
current user wants to assign himself to this task. He cannot see the
'Assign To Me' button because this button is only visible if the
`user_ids` field is empty.
This commit changes the visibility of this button to show this button
only if the current user is not yet assigned to the task.
task-2633229
closes#77156
X-original-commit: cfba241bada2b3690b4303b7e01747301925d162
Before this commit, when the portal user has access to a project and a
task has a customer who is not in the same company than the portal user,
the portal user has a AccessError when he wants to consult this task.
This commit uses the task in sudo to have the same information shown in
/my/task/<id of the task>.
Steps to reproduce:
------------------
1. Share in readonly mode a project to the portal user (with
visibility set to 'portal')
2. Create a task in this project and set a Customer A (a customer who
has not the same company than the portal user).
3. Log in as portal user (Joel Willis).
4. Go to '/my/projects' and select the project shared.
5. Select the task created.
Actual Behaviour:
----------------
AccessError exception is displayed because the portal user has no access
to partner in other company than his yours.
Expected Behaviour:
------------------
Display the task portal form view like the one shown in /my/task/<id of
the task created>.
task-2633229
closes#77156
X-original-commit: 3b0d6d0cef73baa5b5f235c3518c8bd698c81e21
Before this commit, we use the defaultOptions and the options passed in
parameter of the `_setOptions` method, but we could have any unupdated
options in the `this.options`.
This commit creates a new object with the defaultOptions and the options
containing in `this.options` before update this object with `options`
given in parameter to have the new `this.options`.
task-2633229
closes#77156
X-original-commit: 5d1a36bdd530d4037d4f29dc607907d79d18dcc6
Before this commit, the user could only see the default kanban state
label in kanban state label. That is, "Ready", "Blocked" and "Normal".
This commit allows to see the custom kanban state label in project
sharing feature.
task-2633229
closes#77156
X-original-commit: a9a884cfe1f8328ae71edc93832e4c4408d9c581
Before this commit, the `priority` field in task was in readonly in
project sharing feature.
This commit allows the `priority` field in task be edited by a portal
user in project sharing.
task-2633229
closes#77156
X-original-commit: 62572e17d6cd62f16287d530c247dbe9b8501e0c
Before this commit, the portal user cannot see the subtask planned hours
because the portal user has not the group implied by the res config
settings of Project App.
This commit removes the check of this group for project sharing feature
to only use the `allow_subtasks` field.
task-2633229
closes#77156
X-original-commit: 466ac140587811f1ca5c8a5f3960a40710ac635d
Before this commit, when we do a fields_view_get in unit test, we get
the form view of project task view in backend and not the project
sharing form view in project sharing feature.
This commit adds in the context the `xml_id` of the form view used in
project sharing feature.
task-2633229
closes#77156
X-original-commit: 7dfb44e703f9ff8293412030cfd308e2545f121c
This commit adds unit tests to check the access of portal user. That is,
we check if the readable fields are only available in read access and
writable fields are available for the edition of the task.
We also check if the other fields in task model raise a AccessError if
the portal user wants to access to one of them.
task-2633229
closes#77156
X-original-commit: 1e7185bcdd8913c006148466dec260b8f6d53c0b
Before this commit, we add the Set a cover image in the kanban view of
task for portal user in project sharing feature. However, the portal
user has not access to `ir.attachment` model. So, those users cannot
selects a cover image for a task.
This commit removes this button in project sharing feature.
task-2633229
closes#77156
X-original-commit: 2f8bb52c942416528de4d7d95c53e0ac1c99bf5b
Before this commit, the border left displayed when the chatter is aside
the task form view is not from the top to the bottom of the page in
project sharing feature.
This commit removes the fit-content set to the height in css to have the
border left displayed from the top to the bottom as expected in project
sharing feature.
task-2633229
closes#77156
X-original-commit: 886bc7577b2d6f437c28ea18e5786b36930a7cc2
Before this commit, the portal user can select multiple tasks in the
list view with the checkboxes but no action is available.
For this reason, this commit removes these checkboxes.
task-2633229
closes#77156
X-original-commit: cef79697a014c6443c1d1dfdcf498c18fcb27fb9
Before this commit, when we use the same widget than backend view, the
problem is the portal user cannot see the avatar picture of the
employees whom are not in the same company than him.
For this reason, this commit removes the avatar widget for this field.
task-2633229
closes#77156
X-original-commit: 3a21160d879d6244527b6b5640f796cfb84edfe2
Before this commit, the user can see the stat button but this button is
disabled. Since this button gives no more information.
This commit removes this stat button in the project sharing feature.
task-2633229
closes#77156
X-original-commit: 0e6995533f6733993a4d2554b2ed407f3a3ba3e1
Before this commit, since we don't have the uom in the session, the
timesheet_uom widgets does not work in project sharing feature.
Because those widgets need the uom stored in the session.
This commit adds the uoms needed in the session used for project
sharing feature.
task-2633229
closes#77156
X-original-commit: a8f27ac776e8f381cb467be3a0256b197d6e688f
Before this commit, we add the same search view than one in backend
views. But some filters are not needed since we display only one
project. For instance, the group by project is not useful since we have
only one project.
This commit removes the groups by project and create_date and add a
separator in filters.
task-2633229
closes#77156
X-original-commit: 1af17e529161bb745a183458b91972fa3a9b69f7
Before this commit, the portal user can see this button, but this button
should not be accessible by collaborators.
This commit removes the import button in project sharing feature to not
allow this to collaborators.
task-2633229
closes#77156
X-original-commit: 74d7308dfb8df0b923e68aa228ec406e36b0b89a
Adding the date of a SM on the picking form allows a user to reschedule
the delivery of a specific product instead of rescheduling the delivery
of all products.
Linked to OPW-2651828
closesodoo/odoo#79413
X-original-commit: 845f5bdde594f37d42ad12adcbe9489b1b64bd83
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
In last added migration script in odoo@b40216a, the code assumes the chart of account of l10n_es is installed. But happens that you may have installed several l10n_* modules, including l10n_es, but not having the chart of l10n_es installed (you have installed the chart of another module).
In this case, then the update crashes because tax_ids is None and tuple(tax_ids) crashes!
closesodoo/odoo#79323
X-original-commit: b7d21a93c9712d96340c5d57eaeb91bae80028b5
Signed-off-by: Olivier Colson <oco@odoo.com>
**Description of the issue/feature this PR addresses:**
There is no message shown to guest user on portal when he tries to reject a quotation.
**Current behavior before PR:**
When a guest user tried to reject am order in quotation state the popup just closed and did not give him any feedback or message that why the order is not getting cancelled.
**Desired behavior after PR is merged:**
In the /decline controller there is already a check via has_to_be_signed() method. If the check fails `message=cant_reject` is added to query_string.
On the XML side there is another check made towards has_to_be_signed method which will not render the message.
This commit removes the duplicate check from XML side and the message is now shown correctly to the portal user.
Fixes#79205
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#79409
Forward-port-of: odoo/odoo#79207
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
`assert_log_admin_access` uses the `name` field of `ir.module.module` for logging.
`assert_log_admin_access` was added to `install_demo` method of `ir.demo` in d345fb649e3e3c1bf141dca49b45503b8b3a7164 but `ir.demo` does not have `name` field, hence causing AttributeError.
The proposed solution here is to use `display_name` instead
closesodoo/odoo#79398
X-original-commit: 9d6f54e7f7219cbbda41129e35682f6a76aae1d4
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Raman Obaid Ahmed (raob) <raob@odoo.com>
This commit will modify some of the tasks from the demo data to place them in different personal stages for the demo users, to better showcase the feature.
Previously, none of the demo tasks belonged to a personal stage of any user.
Task-2657697
Closes#77870
Related: odoo/enterprise#21463
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit will indicate 'fa-lock private' for the 'Project' field for private tasks in the following views: list, calendar popover, kanban, activity.
Previously, this field was left blank.
Task-2657697
Closes#77870
If the multiple quantity of a RR is less than 1.0, the buttons 'Order
Once' and 'Automate Orders' may remain invisible
(Need sale_management,purchase_stock)
1. Create a product P
- Type: Storable
- Add a vendor
- Routes: Buy
- Reordering rule:
- Trigger: Manual
- Min Quantity: 0
- Max Quantity: 0
- Multiple Quantity: 0.01
2. Create and confirm a sale order with 0.50 x P
3. Inventory > Operations > Replenishment
Error: P is present, its qty to order is 0.50, however the button 'Order
Once' is not displayed
OPW-2612472
closesodoo/odoo#79379
X-original-commit: 81b2677677645329999cc496dc961db22bd522dd
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Purpose
=======
Improve frontend onboarding: add placeholders, improve tour, improve experience
when buying course (display what has been bought, avoid displaying buy now on
an already purchased course).
Specifications
==============
The tour of the front-end has been updated. It adds a step to enter fullscreen
mode and allow users to test it.
It updates the placeholders for the quiz creation, adding examples and hints
to ease user filling fields.
The course purchasing flow has been improved. It adds a direct link to the
purchased course(s) when the payment is done with the `sale_purchased_course`
template.
It also blocks the possibility to rebuy a course if the user is already a
member of said course by showing the buying options only if `channel.is_member`
is False. INdeed it makes no sense to display the "Buy" button when having
already bought the course.
This commit also removes the autocompletion of fields in modals.
Task-2623471
closesodoo/odoo#77050
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In a multi-warehouses environment, editing the quantities of the cart
products can lead to incorrect behaviors.
To reproduce the issue:
(Let WH01 be the default company's warehouse)
1. Create a second warehouse WH02
2. In Settings > Website > Products:
- Inventory > Warehouse: WH01
3. Create a product P:
- Type: Storable
- Availability: Show inventory on website and prevent sales if not
enough stock
- Available on eShop
4. Update P's quantity:
- Location: WH01/Stock, Qty: 10
5. Create a sale order SO:
- Lines:
- 100 x P
- Warehouse: WH02
6. Confirm SO
7. Go on eShop
8. Add P to the cart
9. On cart page, increase the quantity of P
Error: The quantity becomes -90 (then the product is automatically
removed from the cart)
The quantity maximum that the user can select is defined thanks to:
https://github.com/odoo/odoo/blob/8d2fd05382705d4b3987ebac4c842d8507ede9cf/addons/website_sale_stock/views/website_sale_stock_templates.xml#L12
When computing all the quantities (in `_compute_quantities_dict`), if
there isn't any warehouse in the context, the quantities will be
calculated on the basis of all warehouses:
https://github.com/odoo/odoo/blob/48698838dd47442145395d3d4396b64b6901dba1/addons/stock/models/product.py#L238-L248
As a result, in the above case, `virtual_available` will be equal to
`10 - 100 = -90`. However, a SO is linked to a specific warehouse, so
the computations should be based on this warehouse. That way,
`virtual_available` will be 10 and, when editing the quantities in the
cart, the maximum value will be correctly computed.
OPW-2667470
closesodoo/odoo#79370
X-original-commit: 2beb6b1b35ef4c02b6ca1494d1b10fb2cd3b752d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Prior to this fix:
The project update stat button is duplicated.
After this fix:
The project update stat button is no more duplicated.
task-2684233
closesodoo/odoo#79347
Signed-off-by: Xavier <xbo@odoo.com>
The component status of a MO is not correctly computed
To reproduce the issue:
(Use demo data)
1. Create and confirm a MO for 1 x [FURN_9666] Table
2. Unlock and edit the target of To Consume Qty:
- For [FURN_8522] Table Top: 0.1
- For [FURN_2333] Table Leg: 0.1
Error: The Component Status of the MO becomes "Available" while Table
Top and Table Leg are not available.
Due to the signature of `float_compare`:
https://github.com/odoo/odoo/blob/56f8c1c0487bf95325ca859e2f266d1beed28ad4/odoo/tools/float_utils.py#L127
`move.product_id.uom_id.rounding` is implicitly given to
`precision_digits`, which is incorrect.
OPW-2669931
closesodoo/odoo#79362
X-original-commit: c7077dedd63ad317517ad383855821e6570b963d
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Currently, when user open the question from helpdesk ticket and
user clicks on the back button of the forum page,
it redirects the user to the app switcher. It happens because the
back button contains the homepage URL as httprequest.referrer
does not support the fragment url with hash(#).
so this commit fixes the issue by binding the onclick event on the
back button so clicking on the back button redirects the user
to the helpdesk ticket.
task-2602604
closesodoo/odoo#77458
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
In 1e93c161ca454313436b65427542db961f6ddcdd we trigger RR when
confirming a MO. Same thing should be done if we changed the product qty
for a confirmed MO.
Task-2653116
closesodoo/odoo#79332
X-original-commit: 22eb5c38ff45f4e5cd5d2025d31960efa051ad6b
Signed-off-by: Arnold Moyaux <arm@odoo.com>
This reverts commit 3b3a47f0d3414ae5bee159f6ec4644e64441040f.
task-2667207
closesodoo/odoo#79333
X-original-commit: 09cb77ebf6915e6a98bc3d36869b71f5b495d878
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Steve Van Essche <svs@odoo.com>
- When locations are activated, fix not being able to add a quant for tracked products just after
creating one from the 'update quantity' window due to Inventory Adjustment location being auto-selected [since it is the last quant]
- Fix quant not properly making fields invisible after confirming from the stock track
confirmation window
closesodoo/odoo#79338
Pr: https://github.com/odoo/odoo/pull/78768
Task-id: 2674732
X-original-commit: ff26704e7afaa537530c0e092a88b73ee791775f
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: npi-odoo <npi@odoo.com>
The warning shown on beforeunload when quiting a page during edition
was missing since the new editor merge.
task-2666177
closesodoo/odoo#79325
X-original-commit: 6a7fa263e72de45d2e92c436321c01c4b70870a8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Steps to follow
- Edit a report with studio
- Add an inline text element
- Select it
- Select the text in the sidebar
-> An error is raised
Cause of the issue
firstButtonEl is undefined because the style section is not always
present in the toolbar
opw-2674302
closesodoo/odoo#79335
X-original-commit: 45b590d8961d56f8d207c22efbf1ba7188a3b1fa
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Previous task: odoo/odoo#61287 improved warnings for when using a
duplicate SN, including an auto-update of the source location when
appropriate. Unfortunately the auto-update is too risky when registering
a subcontracting SN tracked components.
Instead, we no longer update the source location when in a
subcontracting situation and update the warning message to match the
expected flow to fix the issue.
closesodoo/odoo#79334
Task: 2669180
X-original-commit: a430c4d7d6e2a02ef9b3905b554a779fc1643bcf
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
Current behavior:
If you have 2 time the same product in the agreement and you confirm an order with just one line of this item
the 2 lines in the agreement will have the quantity.
Expected behavior:
Only the ordered item should have the quantity applied. In this case the products are compared with the price and
product ID. If you modify the price in the PO the first line of the agreement will have the quantity by default.
Steps to reproduce:
1. Create a new Purchase Agreement
-Add two lines with the same product
- First line has a scheduled date and price that are different from the second line
2. Generate RFQ and confirm PO with only the first product line and a set quantity
3. Once the PO has been confirmed, going back to the Purchase Agreement, the ordered quantities on both lines will be the same, although the PO was generated for only the first line.
opw-2627898
closesodoo/odoo#79322
X-original-commit: c09a16fb2483e8cec4c9c9e6a936ae2bcc490646
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Reproduce :
1. Add a default analytical rule: if Coin Gourmand partner then Administrative analytical account
2. Create a PO at the Coin Gourmand supplier, add a product, and select the Internal analytical account.
3. Bill for this product.
Result :
Internal analytical account has disappeared from the invoice line. It has been replaced by Administrative.
Issue :
AccountMove.create() computes an account in the move and this causes the analytic account to be reset at its default value from the rule.
Fix :
Since the account pocalypse in 13.0, account.move is making magic things during the creation of the invoice to create dynamically the invoice lines like account.invoice did before this huge refactoring.
The create is making a 'New' record to simulate the onchange but this code is a hack triggering unexpected recomputation like the analytic account.
To avoid that, we ensure to assign the minimum number of fields to preserve fields like the analytic account.
closesodoo/odoo#79321
X-original-commit: 876e2d1073312fe65cb6b2e3038235aeaa082c8a
Related: odoo/enterprise#22074
Signed-off-by: Laurent Smet <las@openerp.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
In the website builder, the toolbar was appearing in the theme tab
incorrectly.
task-2664956
closesodoo/odoo#79311
X-original-commit: a2198490befddb8c4cc6f3a543f47bbffe243f64
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, the Replenishment orderpoints `qty_to_order` are
computed according to a precise forecast which take the time in count.
For example, if you plan a consumption for a product with a purchase
lead time of 2 days for the 2021-12-12 at 12:30, if the current date is
2021-12-10, the orderpoint for this product will have a quantity to
order once the hour is meet too but not before. With this commit, it
will take the forecast for the day regardless the time.
task-2652920
closesodoo/odoo#78712
Signed-off-by: Tiffany Chang <tic@odoo.com>
Steps to follow
- Go to email templates
- Select some text
- Click on the code button
- Resize the editor
-> Nothing happens
Cause of the issue
The default view of the editor is resized but not the code view
Solution
Change the code view height with the default view
opw-2669259
closesodoo/odoo#79315
X-original-commit: 3adc1ddb04dfc0dcd3b10e56e9ecaef7b04a18d4
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
This commit fixes a bug when you clicked on a link related to an anchor.
e.g. an <a> tag with an href="#anchor". The scroll to the element
with id="anchor" didn't happen because the position was not found correctly.
The fix uses getBoundingCLientRect to get more precise positions
of the element with the anchor and the scrollable area.
A test is introduced to check scrolling for multiple anchors in a template
with a more complex structure (Note: the test fails without the fix).
The scroll behaves differently depending if the target is an anchor or
an element. An other test has been added for the command palette about this
behavior.
closesodoo/odoo#79310
X-original-commit: b0da44d62f85d6530f8e568025f7fea25c5454c5
Signed-off-by: FrancoisGe <fge@odoo.com>