Commit Graph
152817 Commits
Author SHA1 Message Date
roen-odoo 1b669d032f [FIX] sale,sale_project : Avoid sending multiple email on upsell
Expected behaviour:
When you create a sale order with a project associated. When the sale order change state
from non upsell to upsell sales person should receive one email.

Current behaviour:
The sales person receive an email for every entry in the timesheet after the sale order goes
from non upsell to upsell.

Step to reproduce:
Create a sale order setup to create a project and task and the invoicing policy is ordered quantities.

Add a timesheet entry which takes it past the ordered quantity.

Create the invoice for the order.

The state of the line and order goes to upsell, and the upsell email is sent to the salesperson.

Add another line in the timesheet and the email is sent again to the salesperson

opw-2581428

closes odoo/odoo#79496

X-original-commit: d9c45eae10a2a6fd42f48112b9dc3ae4ab089ea9
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-08 13:24:08 +00:00
Adrien Dieudonne a8c8707a53 [REM] point_of_sale: HomeCategoryBreadcrumb is not necessary anymore
The only use of 'categ-popup' event has been replaced in https://github.com/odoo/odoo/commit/e3b734c#diff-9fd2302903fcec69ff5d678e535f6b1351fbb2eab99f543fe4bde591bf95cf39L11
So, this component isn't useful anymore.

Note: HomeCategoryBreadcrumb is still used in ProductsWidgetControlPanel component but,
as passed parameters aren't even used in the template, it looks save to inline it.

	#

closes odoo/odoo#79490

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2021-11-08 13:24:03 +00:00
Adrien Dieudonne ec6329ded1 [REM] point_of_sale: keyboard library not used
'onscreen-keyboard' in POS was removed from pos.config in https://github.com/odoo/odoo/commit/1315acceb69b06e650cf2d3cd684e9d4741b8298
which itself points to the actual removal of the onscreen-keyboard feature in https://github.com/odoo/odoo/commit/c6397ab3b3654da336a4269a81d5d91016baf520

I hope that this commit will definitively sign death notice of this library.

Part-of: odoo/odoo#79490
2021-11-08 13:24:03 +00:00
tranngocson1996 bede1fd3b2 [IMP][I18N] l10n_vn: Update name account and translation file
closes odoo/odoo#79493

X-original-commit: eccc92f02bb6731c824b13152c19c917cca2a7b7
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-11-08 12:38:59 +00:00
Tommy (tong) 3944e8903f [FIX] hr_holidays
- fix updating context cannot recompute _compute_leaves method

closes odoo/odoo#79485

X-original-commit: 4bacfb24158e4b32ba8419f0e984a4aea4b20b86
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-08 11:51:48 +00:00
Daniel Blanco d85a8acdcc [FIX] l10n_cl: modifications needed to create electronic vendor bill document type (46) since it is mandatory for some customers.
Adds new account to withhold vat tax, and new vat tax
Enables document type 46
Allow electronic docs in purchase journals
[FIX] l10n_latam_invoice_document Consider doc type 46 as a vendor document
More information -> https://www.sii.cl/preguntas_frecuentes/catastro/001_012_3665.htm

[RM] l10n_cl: remove _filter_taxes_included method

closes odoo/odoo#79479

X-original-commit: 0c34fe795cee7eb6f0c5678f9e505ccc9b6e57e8
Related: odoo/enterprise#22160
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-11-08 11:08:06 +00:00
Thibault Delavallée b109d12671 [FIX] test_website_slides_full: activate variants to avoid deinstallation
We want to activate product variant by default for testing product configurator.
Otherwise Odoo want to de-install the whole module due to dependency chain.

Task-2677144

closes odoo/odoo#79466

X-original-commit: 63211eb48d3ac54e22dbee48f3131bd46aea5599
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-08 10:16:04 +00:00
Nicolas Bayet d5a031a9a3 [FIX] web_editor, website: only save dirty element
Before this commit, when inserting a new snippet or moving a snippet
that was already in the page would temporarily create hooks (`we-hook`)
in the page. The insertion of thoses hooks would trigger mutation
in the dirty observer (observer defined in edit.js) and mark all
oe_structure for which a hook was temporarily inserted.
Thus, creating unnecessary views in the backend.

Now, the code skip the mutations of the drag and drop hooks.

Task-2567752

closes odoo/odoo#79394

X-original-commit: 1b80fe9b56acea09a6784691561df65fe6349f50
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-08 10:15:56 +00:00
Nasreddin Boulif (bon) 0e50113f69 [FIX] base,l10n_ch,account_qr_code_sepa,payment,websitesale: Display all QR codes in QR bill
Issue:

  When trying to print a Suisse QR bill, if multiple images are presents
  in document and they have a url as src, some pictures will not be
  displayed.
  (Same issue may occur with simple QR code)

Cause:

  It's a known issue with wkhtmltopdf: https://github.com/odoo/odoo/commit/2949138a7d84cd6c925ea1745d62f25ef077bb8b
  Also, adding css class to body by js break wkhtmltopdf.

Solution:

  Replace link by base64 image value (use a function to retrieve base64
  image instead of image_url).
  Remove class 'l10n_ch_qr' added by js (no need since CSS file didacted
  to this report).

  Move `_get_qr_code_base64` and `_get_qr_code_url` logic/flow
  (since generic) to account module.
  Move specific logic like `_get_qr_vals` and
  `_get_qr_code_generation_params` to specific module (ex: l10n_ch).

  extra: Alter some css for better rendering + update unitest.

opw-2620082

closes odoo/odoo#77643

X-original-commit: 699b6eeac993e3a8d97ae7949170f7e18ca05831
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-11-08 09:25:47 +00:00
Laurent Stukkens (LTU) 1a42bd68a9 [FIX] sale_project: use correct filter in sale_project
sale_order_id filter was wrongly labelled and added in #71232.
This commit hides this filter and adds the one that should have
been added.

task-2685356

closes odoo/odoo#79442

X-original-commit: 866143f4dd83b3b22a53262733b3a3d25ee8266c
Signed-off-by: Xavier <xbo@odoo.com>
2021-11-08 08:40:18 +00:00
Laurent Smet 131babe41e [FIX] account_facturx: Don't import the delivery address
When exporting, the delivery address is put inside the xml.
This field is added by the 'sale' module and is not supposed to be displayed for vendor bill.
However, even if this field isn't displayed, the factur-x module was setting the wrong delivery address on it.

closes odoo/odoo#79410

Issue: 2668902
X-original-commit: a127515d890df74e341c0f08406ef451a638f639
Signed-off-by: Laurent Smet <las@openerp.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-11-08 08:40:13 +00:00
luvi ea53ad6af4 [FIX] web: remove a useless import
This commit removes a useless import from the
tests helper

closes odoo/odoo#79252

Related: odoo/enterprise#22022
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-11-08 08:40:09 +00:00
Adrien Widart db95421c7d [FIX] sale_stock_margin: use data of SOL's company
In a multi-company and multi-currency environment, the computation of
the purchase price may be based on the incorrect company (and thus lead
to incorrect results)

To reproduce the issue:
(Use demo data)
1. In Settings:
    - Enable "Multi-Currencies"
2. Update "My Company (Chicago)":
    - Currency: EUR
3. Edit currencies' rate for all companies(!):
    - USD: 1.0
    - EUR: 3.0
4. Create a product category PC:
    - Costing Method: FIFO
5. Create a product P:
    - Type: Storable
    - Category: PC
6. Switch to "My Company (Chicago)"
    - Note that in this company, the costing method of PC is "Standard
Price"
7. Edit P:
    - Cost: 10
8. Create a sale order SO:
    - Pricelist: EUR
    - Lines (add Cost columns):
        - 1 x P (Note that cost is 10€)
9. Confirm SO

Error: The sale order line is incorrect, the cost is now 30€. A rate
conversion has been applied on the amount

In `_compute_purchase_price`, several fields/methods depend on the SOL's
company: `property_cost_method`, `_compute_average_price`,
`cost_currency_id`. Therefore, we should include this specific company
in the environment of the product

OPW-2659265

closes odoo/odoo#79430

X-original-commit: 868142c3885f7bf65a7974066234feb0eb6241ae
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-11-08 07:59:42 +00:00
brsy-odoo eaae9ea8ec [IMP] stock: improve order logic of stock.move.line
Currently, the order of transfer lines makes no sense for a picker
(it's in the order of the creation of the line). We want to have the
lines of the detailed operation in the same order as the picker will be
picking the products, so we order by source location, destination
location, sequence, and then by id (i.e. creation time) respectively
instead.

Also the printing report of the batch transfer is on too many pages,
it's one page by location, but we always group on 'from location'.
So it would be better not to split by location and keep the report
on the least number of pages possible.

task-2496324
odoo/enterprise#21921

closes odoo/odoo#79446

X-original-commit: 9b120caa2a5cd5e2487d663a180b486b5bdb201b
Related: odoo/enterprise#22144
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-11-08 07:07:59 +00:00
Romain EstievenartandAdrien Dieudonné 477a535e03 [FIX] pos_*: add missing translation flag
closes odoo/odoo#79448

X-original-commit: 1ace6a4a51a86922c9632614c4043e85f6ef1d6e
Related: odoo/enterprise#22146
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:50 +00:00
Adrien Dieudonne 9c6cda791e [FIX] point_of_sale: env.isMobile not defined at startup
Before this commit, env.isMobile was defined lately and
you have to wait the next update of the template.

Steps to reproduce:
- Open "bar" POS session
=> 'pos-branding' is present in the header bar

X-original-commit: 931304b9e7085c77e5b9bed8054ae47fc2a6168f
Part-of: odoo/odoo#79448
2021-11-05 19:44:50 +00:00
4bc7fbd720 [IMP] pos_restaurant: add zoom on floor screen
Add possibility to zoom on floor screen on mobile devices.
It should be more easy to navigate when there is a lot of
tables.

Task ID: 2453679

X-original-commit: 43fbe45d4f9fc43477690e3d2fb1bc1299f4824b
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
2021-11-05 19:44:49 +00:00
Romain EstievenartandAdrien Dieudonné 130cfac8b9 [FIX] pos: payment-screen: Highlight button when value is set
On mobile, it wasn't clear if a value was set or not.
Now, we apply the same logic as for invoices:
customer or tip buttons will be highlighted if set.

This also fix the alignement by removing some css rules...

Task ID: 2453679

X-original-commit: ed41b793836e9f9c6ec6c754331f40f4fbdee1b0
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:49 +00:00
Romain EstievenartandAdrien Dieudonné b614509698 [FIX] pos: "Discard" button at the wrong place.
"Discard" button shoud be on the left to respect the intuitive
mobile navigation.

We also take advantage of this commit to show icons and text on
desktop and only show the icons on mobile.

Task ID: 2453679

X-original-commit: f774f07a46197f7e1664aee32723b10bf6df37b4
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:49 +00:00
Romain EstievenartandAdrien Dieudonné 8174f77eb0 [FIX] pos_*: Only show 3 control-buttons in product screen on mobile
Before this commit, when you clicked on "Review" the order lines weren't
visible due to the number of control-buttons.

To fix this, a "More..." button is displayed if there is more than 3 buttons.
When you click on this button, a new modal will display a menu with all controls.
Note that we had to find a way to close this popup after clicking on an action.

Task ID: 2453679

X-original-commit: 430d40f90c1e9a7e8e3663e8f2b129b0c24911e1
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:49 +00:00
Romain EstievenartandAdrien Dieudonné 79882dc4b2 [FIX] pos: Receipt-Screen: elements misaligned on mobile
- Users were automatically redirected to the middle of the
  receipt screen on mobile. It direcly showed the ticket but
  users missed the buttons at the top of the page.
  We changed the DOM to use the right "flex-direction" value.

- "(Both will be sent by email)" appears when you select a customer
  and ask an invoice.
  This text was positioned in absolute to be aligned to the bottom right
  on the input. This can't work when you have a scroll bar like on mobile.
  So we now simply use "text-align: right".

- Email input was too small on mobile.
  To fix this, we decided to only keep the icon and remove "Send" text.

Task ID: 2453679

X-original-commit: ce2c8414333ca3ae6a28da0c59502e44eb16980e
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:48 +00:00
Romain EstievenartandAdrien Dieudonné 0a6c027b94 [FIX] pos: payment-screen button UX on mobile device
- Icons (customer, invoice,...) are now displayed on mobile too.

- Pane buttons (Validate, Review,...) were too tall.
We now better see the content of the primary screen while being
able to click of these buttons.

Task ID: 2453679

X-original-commit: 61ede7cae6e074a9e4eb590ddd9bd126fb214d92
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:48 +00:00
Romain EstievenartandAdrien Dieudonné 8e1a4259a4 [IMP] pos: Show categories on mobile
Before this commit, users had to use a popup window to change
the product category. It wasn't clear for users who are used
to using a large screen.

This commit adapts the breadcrumb navigation to be the same
as on desktop. This avoids the use of this popup.

We also improve the display of products by taking the entire width
of the screen. This allows us to add some space between the products.

Task ID: 2355025

X-original-commit: 9b7d1d6f9ef1342db5bb0d6a31eafa9d2586d171
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:48 +00:00
Romain EstievenartandAdrien Dieudonné a2ddef022f [IMP] pos_*: Ticket/Order kanban screens on mobile
Using a list view isn't the best way to display data on small screen.
We had to change this behavior to display a kanban view of orders.

We also merge design of "Ticket" screen and "Order Management" screen.

Task ID: 2453679

X-original-commit: d0e53721a97c14419a2f81ef8aa8be317cc5644a
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné a4b617dd95 [FIX] pos: Move "back" button in the action pad
When you clicked on "Review", there were not enough space to
properly check the order lines.
The "back" button took a lot of space in this screen.
Additionally, it shouldn't be the primary button in this view...

It's why this button has been moved in the action pad, next to the
payment button.

Task ID: 2453679

X-original-commit: 1418c9f10c80bea6393b47d5ffc1e0217ad1d4ba
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné 7334cd3086 [FIX] pos_restaurant: Reduce "Back to Floor" button size on mobile
The "back to floor" button is currently too big to be used on mobile
To fix this we have no choice but to display the table number only.
It would be good practice for this number to be unique; we will fix
the demo data in master branch.

This also fix a misalignment between arrow and text.

Task ID: 2453679

X-original-commit: 31dc371c824cee431072788faafb7f1dfd4a1335
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné 360a1168cb [FIX] pos: Improve UX on New Orders page on small screen
The top of new order page is currently unusable because it's too large
for small screens.

To improve the UX, we remove the current search box and only keep the
icon and when the search icon is clicked, the search input is shown.

We also had to reduce the font size and paddings to keep filters next
to the search input. As it doesn't change much in desktop, these
changes are also applied for larger screens.

Task ID: 2453679

X-original-commit: 8f4202de307911e4ea54af6c018de87dd94086b6
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné 7594c055de [FIX] pos,pos_restaurant: Improve UX on Search products on small screen
The top of POS is too large and must be scrolled to be used.
To improve the UX, we remove the current search box and only keep the
icon and when the search icon is clicked, the search input is shown.

Task ID: 2453679

X-original-commit: e5d54ac1d30eef789ec1604e3a1212f415224ada
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:46 +00:00
Romain EstievenartandAdrien Dieudonné 3a9bd22ffb [FIX] pos: Improve status-buttons UX on small screen
- Show user avatar logo on desktop and mobile.
  We are now able to know which employee is currently connected on mobile.
  The user name is still shown on desktop but didn't appear for small device.

- Add "sign-out" icon on desktop and mobile.

- Remove label strings like "Close", "Orders" and the username to
  gain some space; the icons will do the job.

- Remove "close_button" unused class

Task ID: 2453679

X-original-commit: 551ef472ec42965af38f68343b9fe50ea7ec4c88
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:46 +00:00
John Laterre (jol) d4823e4067 [FIX] base_address_city: allow conservation of existing required attributes
Currently, the _fields_view_get_address() method replaces the field
'city' and all of its attributes.

That causes problems for attributes that are defined
in other previously installed modules.

This fix allows the 'required' attributes to be conserved.

closes odoo/odoo#79447

X-original-commit: 1ac8b5a40440e6c4fddc0e088064ea1a706d93ab
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: John Laterre <jol@odoo.com>
2021-11-05 18:59:44 +00:00
Odoo's Mergebot be5332fe55 [FW][MERGE] project: Project Sharing feature follow-up
This PR are the follow-up of #73341 PR to fix the various points to finalize the feature for the v.15.

These points are done only in the Project Sharing feature:
- remove import button in favorite menu
- remove some filters in search view and update the search view
- add uom in session to use timesheet_uom widget for timesheets: this widget uses the uom stored in the session to display the unit_amount in hours or in day format.
- remove the using of avatar widget for employees.
- remove checkboxes in list view.
- change label for group by user_ids
- not set by default the height of the chatter
- remove the 'Set a cover' button in kanban view because the portal user has no access to `ir.attachment` model.
- add unit tests for project sharing feature.
- force staying in the project sharing form view when the user wants to see a subtask.
- display subtask planned hours
- allow the portal user to edit priority task when he is in project sharing feature.
- show "Assign to me" button
- see custom kanban state label
- get all options when the chatter is reloaded in project sharing.

In classic portal views:
- use task in sudo for classic portal form view

General point:
- prevent click on avatar user when `noOpenChat` is `true`

task-2633229

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#79429

Forward-port-of: odoo/odoo#77156
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-05 18:33:40 +01:00
Daniel Reis c4dbd18418 [FIX] purchase: display POs maching same commercial partner
The "Auto-complete" bills field does not show all POs for the Vendor that are waiting for invoices.

To reproduce the issue:

    - Create PO1 Vendor = "Supplier"
    - Create PO2 Vendor = "Supplier, John Doe"
    - Create Invoice for PO2
    - In the PO2 Invoice, "Auto-Complete" field try to select PO1, but it is not shown.

The "Auto-complete" bills field should show all POs for the Vendor that are waiting for invoices.
The problem is that the field's domain filters is using the partner_id
field when it should be using teh commercial_partner_id.

opw-2684409

closes odoo/odoo#79438

X-original-commit: d3002116e665d799ba11b9f94e4b45bc4c39bde5
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-11-05 16:51:54 +00:00
Aurélien (avd) f74eb30709 [FIX] mrp: restrict _post_process_scheduler search domain
stock.orderpoint._post_process_scheduler confirms
productions after procurements have been run.

This was introduced to avoid conflict between
procurements, conflicts that can happen e.g. in
the purchase_mrp module.

However, currently action_confirm might
also be called on done or cancelled productions.
That can happen if there are already been lots
of procurements for the same product/orderpoint,
i.e. MO with the same values have been created multiple times.

To avoid this, add ('state', '=', 'draft' in the search_domain.

opw-2666960

closes odoo/odoo#79437

X-original-commit: 11c7b92f90804a4d73833e22c071e1665058fbdb
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-11-05 16:51:51 +00:00
Xavier BOL (xbo) 708861ed3d [IMP] project: manage column_invisible in project sharing list
Before this commit, it was impossible to to hide a column when the
timesheets or subtasks features are not enabled to the project shared.

This commit manages the column_invisible for the list view in project
sharing to compute the domain in this modifiers. We assume all tasks
displayed in project sharing are linked to a project shared.

task-2633229

closes #77156

X-original-commit: ab2b5d1fd1f09d804ab410bc326cfebf26d5a7c6
2021-11-05 17:16:13 +01:00
Xavier BOL (xbo) fbac7f191d [FIX] project: exclude project sharing assets qweb from web.assets_qweb
Before this commit, we import all xml in project module. The problem is
the ones for project sharing should not be included in `web.assets_qweb`.

This commit excludes the project sharing assets from `web.assets_qweb`.

task-2633229

closes #77156

X-original-commit: 21e21d7956d6de1775f4230060cdff7c39015bbc
2021-11-05 17:16:09 +01:00
Xavier BOL (xbo) d3b8d1fd31 [FIX] project: remove 'Share with all users' checkbox in project sharing
Before this commit, the portal user could see the checkbox in search
view to share his favorite item with all users. This action is not
authorize in project sharing feature and should be removed.

This commit removes this checkbox to avoid the portal user to share his
favorite item with others users.

task-2633229

closes #77156

X-original-commit: 19b38074dd8bfe4d8347db31f946beeb2850d453
2021-11-05 17:16:05 +01:00
Xavier BOL (xbo) c2e8148368 [FIX] hr_timesheet: fix access error when load_views in project sharing
Before this commit, when the user chooses to encode in 'Days', the
timesheets, when a collaborator accesses to the project sharing feature
for a shared project. This collaborator has an access error because he
does not have any access to `uom.uom` of the current company. Indeed, we
use this uom to change the label of `unit_amount` field for
timesheets linked to this project shared.

This commit fetches the name of the encoding for the current company in
sudo to change the label of `unit_amount` field of timesheets during
the load_views of project sharing feature.

task-2633229

closes #77156

X-original-commit: 575315744a31a975208c82f72403ecebf3585f37
2021-11-05 17:16:01 +01:00
Xavier BOL (xbo) f7bcc14d25 [FIX] hr_timesheet: show total_hours and progress if allow_timesheets
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
2021-11-05 17:15:58 +01:00
Xavier BOL (xbo) 95c0fe5729 [FIX] project: favorite menu in project sharing
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
2021-11-05 17:15:54 +01:00
Xavier BOL (xbo) 614657d799 [FIX] project: show 'Assign To Me' only if the user is not assigned
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
2021-11-05 17:15:47 +01:00
Xavier BOL (xbo) adf3aca403 [FIX] project: use task in sudo for classic portal task view
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
2021-11-05 17:14:46 +01:00
Xavier BOL (xbo) aeac9052b8 [FIX] portal: get all options when we reload the chatter
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
2021-11-05 17:14:42 +01:00
Xavier BOL (xbo) c0c1af4ca2 [FIX] project: see custom kanban state label
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
2021-11-05 17:14:38 +01:00
Xavier BOL (xbo) 9089dfef5e [FIX] project: allow edit priority task in project sharing
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
2021-11-05 17:14:33 +01:00
Xavier BOL (xbo) 6e53c8e1d5 [FIX] hr_timesheet: display subtask hours in project sharing form view
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
2021-11-05 17:14:30 +01:00
Xavier BOL (xbo) 5eddca2ace [FIX] project: force the project sharing form view for subtasks
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
2021-11-05 17:14:26 +01:00
Xavier BOL (xbo) bd4acaa220 [IMP] project: add unit tests for project sharing feature
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
2021-11-05 17:14:19 +01:00
Xavier BOL (xbo) 0f24225bbe [FIX] project: remove the set a cover button in project sharing
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
2021-11-05 17:13:43 +01:00
Xavier BOL (xbo) 8f84155337 [FIX] project: not set by default the height of the chatter
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
2021-11-05 17:13:24 +01:00
Xavier BOL (xbo) 4c12d0410d [FIX] project: remove checkboxes in list view for project sharing
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
2021-11-05 17:13:19 +01:00