Commit Graph
151539 Commits
Author SHA1 Message Date
Sébastien Geelen (sge) fcc035bcaa [FIX] web_editor : ensure break line consistency on delete
When delete backward/forward OR deleteRange,
we need to ensure the break lines stay consistent with the user action.

Some cases where not handled correctly.

Mainly when a <p> tags was removed and not directly adjacent to another block element.
In those case we kept too much or too little break lines.

@see tests added in `test/spec/editor.test.js`

task-2604627

X-original-commit: 9f14422ffceadd48b76ff460e4080e0cf5bc6fa2
Part-of: odoo/odoo#89210
2022-04-21 07:59:43 +02:00
Sébastien Geelen (sge) 4bd57e41a4 [FIX] web_editor : fix element merge on deleteBackward
Ensure we never move nodes that were not initially in the deleted element.

When deleting an element and merging its content with its sibling,
the nodes contained in the removed element will temporary be hosted
in the common parent, beside possible other nodes.
We don't ever want to touch those others nodes when merging.

This change fix some instances where nodes would wrongly be carry
into another element.

@see new "merge node" tests in `test/spec/editor.test.js`

task-2604627

X-original-commit: 0af6e15ba9d15f20ec74144fd3069e6f409ef802
Part-of: odoo/odoo#89210
2022-04-21 07:59:43 +02:00
Sébastien Geelen (sge) 7aaa481ee6 [FIX] web_editor : initialize powerbox property
Ensure the `_active` property on the PowerBox object is always a boolean.

@see test/spec/copyPaste.test.js

task-2604627

X-original-commit: 124298546cfbc129eb9ae934923a5e4e47392797
Part-of: odoo/odoo#89210
2022-04-21 07:59:43 +02:00
Sébastien Geelen (sge) d41bf197d1 [FIX] web_editor : fix some linting errors
task-2604627

X-original-commit: df980347f8c8953c2c938343b1558d1a395c716c
Part-of: odoo/odoo#89210
2022-04-21 07:59:43 +02:00
Sébastien Geelen (sge) f75b0635e2 [FIX] web_editor : add and change unit tests
ADD load of units tests covering :
  * text paste
  * html paste
  * image url embed on paste
  * url embed on paste
  * video url embed on paste

  * better coverage on some delete backward and forward

CHANGE some others unit tests :
  * tests about merging of block elements that where not accurate
  * test about insert HTML ( spec change )

task-2604627

X-original-commit: 378e8d1bd64e3758eb0202be33cb2d8c5bf97eea
Part-of: odoo/odoo#89210
2022-04-21 07:59:42 +02:00
Tommy (tong) 7a83e91319 [IMP] l10n_hk: Update chart of account
- Reason: Due to Hong Kong companies must contribute employees MPF funding by law. Therefore it is better to include MPF in the CoA. Also, Short-term Borrowing is a common used CoA among Hong Kong companies.

task-2777305

closes odoo/odoo#89208

X-original-commit: b4f6cf56b999a42c09ac41ae1449618f2877a9e6
Signed-off-by: Florian Gilbert <flg@odoo.com>
2022-04-21 07:59:30 +02:00
Don Kendall d42d0d656e [CLA] signature for dnplkndll
closes odoo/odoo#89157

X-original-commit: 0e344e2b185d4b362288f765d427e016dd956bed
Signed-off-by: Florian Gilbert <flg@odoo.com>
2022-04-21 07:59:26 +02:00
Don Kendall 7e85404a4f [14.0][fix] ambiguous error due to missing column prefix
X-original-commit: 8ad018ca6050435247ae284444108def3828572f
Part-of: odoo/odoo#89157
2022-04-21 07:59:26 +02:00
Aurélien Warnon afecca5e48 [FIX] im_livechat: avoid using bootstrap for chatbot blocks
Currently, the block showing that the conversation with the chatbot has ended
is hidden/displayed using bootstrap classes (d-none).

This is an issue because when embedding the livechat in a third-party website,
bootstrap classes are not available and the block is displayed when it should
not be ('d-none' is not available).

To fix the issue, we use standard "display: none" style and jQuery show/hide.

Task-2822240

closes odoo/odoo#89158

X-original-commit: bee70eb3bf1cb5c9069340891b250c8c443dbf55
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-04-21 07:02:57 +02:00
Romain Derie 346360cc27 [FIX] website: give unlink access right on assets to website editor
Commit [1] was not enough, expecting that the unlink right was not
needed. But it is.

A recent test highlighted that issue.

[1]: https://github.com/odoo/odoo/commit/e3515a7b73c3e173a3ddf0bc48e4a888024c8817

closes odoo/odoo#89211

X-original-commit: 19a97fcaf1fd2f762522d171e98d9942fb45e9d1
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-04-20 22:56:12 +02:00
Romain Derieandroen-odoo b8bd897fe4 [FIX] website: allow user to access HTML/CSS editor
Current behavior:
When an admin user modified a file with the HTML/CSS/JS editor in a
website, users that had "editor and designer" right couldn't access
the HTML/CSS/JS editor anymore.

Steps to reproduce:
- Have user 1 (U1) admin
- Have user 2 (U2) with website access set to "Editor and Designer"
- U1 modify the css user_custom_rules.scss with the HTML/CSS Editor
- U2 can't open the editor of that website because he is not in the
setting groups or the one that created it

opw-2733109

X-original-commit: d20468c3463927a54c34688769a22b3949c5c465
Part-of: odoo/odoo#89211
Co-authored-by: roen-odoo <roen@odoo.com>
2022-04-20 22:56:11 +02:00
Yolann Sabaux 7f081cffaa [FIX] hr_holidays: set correct default date
Steps to reproduce:
- Go to time off - >New Time Off-> in the list you will see the all the times that are possible to take(that require allocation and not)
- Go to time off->My time off->create
- Select Sick Time Off

Issue:
If you want to select "Paid Time Off" it won't be displayed anymore

Cause:
When selecting a leave_type that does not require allocation the "default_date_from" is False. And so the get(key, default) does not return the default.

opw-2813263

closes odoo/odoo#89196

X-original-commit: ee6e6cb26528f42de9652b88fe022ebae2cfacfc
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: yosa-odoo <yosa@odoo.com>
2022-04-20 22:56:07 +02:00
roen-odoo e9bf6c6364 [FIX] point_of_sale: prevent showing downpayment as discount on receipt
Current behavior:
When applying a discount and a downpayment on a product in the PoS
the discount line on the receipt would be the sum of the discount
and the downpayment. But the downpayment is not a discount.

Steps to reproduce:
- Install PoS
- Change discount policy to Show public price & discount to the
  customer, in the public pricelist
- Create a promotion program that applies 10% discount
- Use this promotion program in the PoS
- Create a quotation for any product (e.g with a product that cost
  1000$)
- In the PoS go in the quotation/order and apply a downpayment to
  this quotation.
- Pay the downpayment, and go in the quotation/order again. But this
  time settle the order.
- After the payment on the receipt you will see the discount line
  value is not correct. It's the sum of the discount + the downpayment

opw-2792417

closes odoo/odoo#89213

X-original-commit: fc546e0481ae0159e67791240833bc1e38a4440f
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-04-20 21:57:15 +02:00
dbkosky 4c3545731a [FIX] l10n_it_edi: DatiPagamento non-mandatory
DatiPagamento is non mandatory, and it's contents 'DettaglioPagamento'
can be multiple (e.g. when there are payment terms, and amounts are
receivable upon different days). This commit adapts the DatiPagmento
section of the invoice template to not occur when the invoice is a
credit note (there is no sense in providing payment info for a credit
note) and creates a number of payment lines if there are multiple payments.

closes odoo/odoo#89163

X-original-commit: 2aa09ba39aed1a34f59914124fc9dcf11787e75b
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-04-20 18:49:11 +02:00
Benoit Socias 998dc0bbe2 [FIX] website: avoid traceback during edition of menu missing URL
Before this commit if a menu had been saved without URL, a string +
boolean concatenation error could happen when updating the menu.

After this commit the False boolean is replaced by an empty string to
avoid the problem.

task-2781260

closes odoo/odoo#89147

X-original-commit: 0288e0e91a071c7ec4b8adb0474d82a46dea9c9c
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-04-20 18:49:07 +02:00
Benoit Socias 38872576e5 [FIX] website, web_tour: send parent menu id as integer in menu update
Since [1] nested menus were not saved anymore because model ids do not
support `str` anymore.

After this commit the menus update data contain an integer `parent_id`
making them understood again by the model.
The `parent_id`s returned by `nestedSortable()` are the ones obtained
through a regex match, and therefore are strings.

Steps to reproduce:
- go to the 'Home' web page
- click on 'Edit Menu' in the 'Pages' menu
- drag and drop a menu item to nest it (e.g. put 'Contact Us' inside
'Home')
- click on 'Save'
=> nested entry disappeared from the menu instead of being nested under
its parent

[1]: https://github.com/odoo/odoo/commit/534087fa8d3c9947a918aa109f4030b5628a80d1

task-2781260

X-original-commit: d7bfb935580d6cc70dc213657c1a6dbc85dfa756
Part-of: odoo/odoo#89147
2022-04-20 18:49:07 +02:00
Audric Onockx (auon) cd7dc4f2c8 [FIX] l10n_fi : set confrorm payment ref on invoice
Steps :
Install eCommerce and l10n_fi.
Create a Payment Acquirer with a new Journal.
Change this Journal's type to Sales.
Go to Website, order a Product with this Acquirer.
Go to Sales > the consequent SO. Note the Payment Ref.
Confirm, Create Invoice and Post.
Note the same Payment Reference.

Issue :
This reference is not valid in Finland accounting because letters are
not allowed.

Cause :
First, a Journal linked to an Acquirer should be
of type Bank or Cash. Such Journals do not have Payment References
specifications. So, in the current state of affairs, it would not be
possible to set a localized reference on the SO.
Second, SO's payment reference is its name or CUST/its partner's id.
Then it is copied to its Invoice's payment reference.
Upon posting this invoice, if it has a reference, it is not modified.

Fix :
Limit the modification of the Type of a Journal linked to a
Payment Acquirer to : Bank and Cash.
Create a Finnish Sale module to compute SaleOrder.reference form itself
the same way AccountMove.invoice_payment_ref is computed from its name.

opw-2745902

closes odoo/odoo#89122

X-original-commit: 7e0c436e5817722c0cb3c223a75def3b701535a4
Signed-off-by: Onockx Audric (auon) <auon@odoo.com>
2022-04-20 18:48:55 +02:00
Thanh Dodeur 6217bed174 [IMP] mail: show rtc candidate types
This commit adds a way to see the candidateType of the inbound and
outbound peer connections. This information allows for example to
determine whether the peer connection is being relayed (using a TURN).

task-2766401

closes odoo/odoo#85104

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-20 18:48:51 +02:00
Andrea Grazioso (agr-odoo)andoco-odoo e260bc94e3 [FIX] account,purchase_stock: caba entry not fully registered for bill
Have a purchase tax with cash basis payment enabled
Have a product with said tax
Create a bill with the product, save and confirm
Register a payment

Check CABA entries
There should be 4 entries, but only 2 have been generated

opw-2782561

closes odoo/odoo#89101

X-original-commit: d8d255ec68ab4f220da51fb2be7292dcc74d5783
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Co-authored-by: oco-odoo <oco@odoo.com>
2022-04-20 17:46:28 +02:00
dbkosky e3b6b33f57 [FIX] l10n_it_edi_sdicoop: fix confusing successful transmission message
closes odoo/odoo#88362

X-original-commit: 9b3f2a5211bb703b98b66dc71d933c8900e03b0f
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2022-04-20 17:46:25 +02:00
Dossogne Bertrand bd8a6ef7ef [IMP] lunch: add lunch tour for users
This commit adds a tour for users to order their lunch.

taskID 2810265

closes odoo/odoo#88089

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-04-20 16:41:06 +02:00
Patrick Hoste ee0f4b1300 [IMP] website_slides_survey: set slide name when setting survey
PURPOSE

This commit slightly modifies both the slide's backend form view and the
website form to use the certification (survey) title as default name for this
slide if it does not have a name configured yet.

We also removed dead onchange code as the survey_id field is not visible if
slide_category is not set to certification.

LINKS

Task-2810395

closes odoo/odoo#87672

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-04-20 16:41:02 +02:00
Patrick Hoste 727249b3d8 [IMP] survey: propagates name to title field with relational widget
PURPOSE

Currently, when creating a survey through the 'quick create' feature of a
many2one field, the name input by the user is lost and not propagated to the
survey title (the default behavior expects a 'name' field).

This commit correctly takes the passed default_name into account and uses it to
fill the survey title.

LINKS

Task-2810395

Part-of: odoo/odoo#87672
2022-04-20 16:41:02 +02:00
Brieuc-brd d541cef5b5 [REF] mail: MessageInReplyToView, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2826587

closes odoo/odoo#89032

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-20 12:37:44 +02:00
Rahul Prajapati 8fc3df9617 [IMP] mail: remove obsolete method
Before this commit:

There is a obsolete method _action_remove_members in tests which is not
needed now

After this commit:

Removed this obsolete method

Task-2824921

closes odoo/odoo#88988

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-20 12:37:41 +02:00
jlzhouandSplashS 5553615e4f [FIX] web: missing translation terms from Action Menu
This commit adds missing translations in the 'Print' and
'Action' items of the action menu. It also fixes the
current translation (env._t must not be used in the
template directly).

closes odoo/odoo#89094

X-original-commit: c16194c1449edaaf994cb49d2173bdb27253c0cc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: SplashS <sergey@shebanin.ru>
2022-04-20 10:33:04 +02:00
Arnold Moyaux cf9ff8e41a [FIX] mrp: orderpoint for manufacture not trigger twice
Usecase to reproduce:
With BoM structure
- Product A (RR 1-20)
	|
	Product B (MTO)
		|
		Product C (RR 5-50)
			|
			Product D (Buy)

Launch the RR. The MO are:
Current Behavior
- Product A 20
- Product B 20
- Product C 50
- Product C 70

Expected Behavior
- Product A 20
- Product B 20
- Product C 50

It happens because the MO are created as draft during the
`_run_manufacture` and are confirm at the end of
`_procure_orderpoint_confirm` in '_post_process_scheduler`.

However at the first MO for product A, it creates a MO for product B
and since it consumes product c, it checks if the orderpoint should be
trigger. MO for product C still "draft" and the orderpoint forecast is
now -20, so it will create a new procurement for product C with 70 units

To fix it we take the MO draft linked to the orderpoint for the
forecasted quantity.

closes odoo/odoo#89079

X-original-commit: 199a0dd0f013655a3c2345a41bc7c721e09bfc68
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-04-20 10:33:00 +02:00
Vincent Larcin b893695bf9 [IMP] project: merge identical measures in burndown chart
In a project burndown chart, we currently have two measures, "Count" and "# of tasks".
Those measures are identical, but the default "Count" one is less explicit.

We only want to keep "# of tasks", but rather than discarding the default measure,
we could rename it and remove the other one.

This commit removes the "# of tasks" measure, and renames the default "Count"
into "# of tasks".

Task-2734458

closes odoo/odoo#86110

Related: odoo/upgrade#3357
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-04-20 10:32:57 +02:00
Adrien WidartandFlorent de Labarre 707d6f9bf7 [FIX] {mrp_,}account,sale_{stock,mrp}: display lots in invoice
When invoicing a tracked product, the lots/SN delivered (or the related
quantities) are not always the correct ones displayed on the printed
invoice

To reproduce the issues:
1. In Settings, enable "Display Lots & Serial Numbers on Invoices"
2. Create a product P:
    - Storable
    - Tracked by lot
3. Update its quantity > 5 with lot L

Use case 01:

4. Create and confirm a SO with 5 x P
5. Process the delivery
6. Create an invoice
7. Edit the invoice line:
    - Quantity: 1
8. Post and print the invoice
Error: The quantity related to lot L is 5, it should be 1

Use case 02:

4. Edit P:
    - Invoicing Policy: Ordered quantities
5. Create and confirm a SO with 1 x P
6. Create and post the invoice
7. Process the delivery
8. Print the invoice
Error: There isn't any information about delivered lot L

Use case 03:

4. Create and confirm a SO with 3 x P
5. Deliver 1 x P (with backorder)
6. Invoice 1 x P + Post the invoice (-> INV01)
7. Deliver 2 x P
8. Reset, post INV01 again and print it
Error: The quantity related to L is 3, it should be 1. Moreover, if the
user then invoices the 2 others P, posts and prints this second invoice,
it won't contain any information about L

OPW-2730270
closes #81444

closes odoo/odoo#89088

X-original-commit: 3598c0c8cda813efa1aebc17f041e4c0a1a29f06
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Co-authored-by: Adrien Widart <awt@odoo.com>
Co-authored-by: Florent de Labarre <florent.mirieu@gmail.com>
2022-04-20 09:33:05 +02:00
Nicolas Bayet 595daa884a [FIX] web_editor: make o_editable unremovable
`o_editable` is not supposed to be removed.

Example of a problem if o_editable can be removed:
In translation mode, when deleting the text of the `o_editable` container,
that container could be removed but shouldn't.
See https://drive.google.com/file/d/1U_NUFBvUninOuFKn2H2c4BDcka3OetlD/view

task-2810332

closes odoo/odoo#89071

X-original-commit: 2010c0e2c402f5bb423a0fe683e51923e1e14042
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-04-20 09:33:01 +02:00
Nicolas Bayet 3604d1783f [FIX] website: save translation of megamenu items
Before this commit
The items of the megamenu were not saved after being translated

After this commit
The items of the megamenu will be saved after being translated

task-2810332

X-original-commit: d159e7ffd30645d346a8a04ca281a728878c83ed
Part-of: odoo/odoo#89071
2022-04-20 09:33:01 +02:00
Nicolas Bayet 8b521b25f1 [FIX] web_editor: keep contenteditable=true on links
The function `setContenteditableLink` makes all the `contenteditable=true`
that are not the link or in the link being `contenteditable=false`.

Before this commit:
If we click on a link A then we click on link B, and if link B has
elements being `contenteditable=true`, the first click makes them
`contenteditable=false` and the second do not makes them
`contenteditable=true`.

After this commit
If we click on a link A then we click on link B, and if link B has
elements being `contenteditable=true`, the first click makes them
`contenteditable=false` and the second click now makes them
`contenteditable=true`.

task-2810332

X-original-commit: 72dd8d6e3c95f614353b1e87322a67c877c255c7
Part-of: odoo/odoo#89071
2022-04-20 09:33:00 +02:00
Nicolas Bayet 23e81dec46 [FIX] website: do not activate megamenu snippet when translating
task-2810332

X-original-commit: 372909978ac8869ab440bbd06a625afd4dd255a0
Part-of: odoo/odoo#89071
2022-04-20 09:33:00 +02:00
Elena d8b742aa21 [FIX] website_forum: reorder faq question depending of karma required
Order of karma needed is ascending now.

closes odoo/odoo#89087

X-original-commit: b29bfd65c6f55cd9ff4f8a899d8648bb8ba000ca
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-04-19 22:28:18 +02:00
Alexandre Kühn e1b037dc4c [IMP] mail: introduce AutocompleteInputView (step 2)
This commit moves some business logic from component AutocompleteInput
To model AutocompleteInputView, as a step to move further to having essentially
all business code in models.

Having code in models is desirable to have very maintainable code, thanks to
robust and declarative code with an ORM-like architecture.

Task-2817076

closes odoo/odoo#89077

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 20:37:43 +02:00
Thibault Delavallée d4816d740e [FIX] mail: limit reply-to name part
Python library currently holds a limitation when we use a formatted email
that is longer than 78 characters (e.g. "Long Company Name With Long Record
Name <email@domain.com>"). Python folds address if is longer than 78 chars
and a bad management of quotes breaks the reply-to. Even if anything should
technically be ok with the RFC python seems to incorrectly handle it (please
refer to [1] for more details and discussions).

Until this is finally sorted out we decided to avoid issues by shortening
reply-to. To avoid that issue when formataddr would return more than 78 chars
we return a simplified name/email to try to stay under 78 chars. If not
possible we return only the email and skip the formataddr which causes the
issue in python. We do not use hacks like crop the name part as encoding and
quoting would be error prone.

Task-2602862
OPW-2733513

[1] See https://bugs.python.org/issue44637

closes odoo/odoo#89081

X-original-commit: d2d705708a11de68d8dd9d9edf62e0a33ddb066b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-04-19 19:40:14 +02:00
Alexandre Kühn 5472bec197 [IMP] mail: move component handlers to models (step 6)
This commit moves some handler methods from components to models,
as a step closer to having most of business code in models.

Having business code in models is desirable so that the code is much more maintainable:
easier to change and more robust code.

Task-2579306

closes odoo/odoo#89076

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 19:40:11 +02:00
Huy 76ee79749a [FIX] website_forum: avoid error when the sort param is encoded
Currently, when accessing a URL with a sorting encoded value,
the system will raise an error with a specific message, which
feels unfriendly to the user as well as saves unnecessary logs
in the log file. So we decoded that value, if except then sort
a page without sorting.

closes odoo/odoo#89072

X-original-commit: 33356fcc9867ee23fee2a032dcca7daea1ada4c5
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-04-19 18:39:55 +02:00
Alexandre Kühn a74f159af2 [FIX] mail: properly refresh chatter on attachment deletion
Task-2823317

closes odoo/odoo#89057

X-original-commit: 390d7c1e1b87bbfcd293010b5c74b86d4f68ceb8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 17:41:17 +02:00
Sébastien Theys 6f29cddad8 [FIX] mail: fix compute of isMobileDevice
Follow up of https://github.com/odoo/odoo/commit/2c9da836e5829b8a3d3a36afbeebfdd78f36d542/#diff-f884c81b21062d0a63935bbdbc9c7cf52dc69a6a29ea4dce13130196435b0591R53

Value was permanently undefined: writing value on itself rather than from env.

closes odoo/odoo#89050

X-original-commit: 9dde44b1479118e55eb2e73df56e5e696c2bf850
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-19 17:41:13 +02:00
Brieuc-brd ece6db05c2 [REF] mail: MessageActionList, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2826366

closes odoo/odoo#88996

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 17:41:06 +02:00
Géry Debongnie 0111b77aac [FIX] web: update owl to last version
This commit includes a fix in the way Owl schedule renderings:
https://github.com/odoo/owl/pull/1176/commits

closes odoo/odoo#89034

X-original-commit: 497c754bab4629deb517b7b7995b06d55e41ab2f
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-04-19 16:40:10 +02:00
Thanh Dodeur 841373e2c4 [FIX] mail: prevent incorrect loading of settings from the localstorage
Before this commit, the settings recovered from the localStorage were
incorrectly loaded to the model fields.

This commit fixes this issue.

taskId-2823292

closes odoo/odoo#88828

X-original-commit: 5b429e54b732257075e0925211e9ab9b0b827ca1
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 16:40:06 +02:00
Giang Phạm 2745baaf04 [FIX] hr_timesheet, sale_timesheet: Fix project user cannot access
Project app

If a user has Project/User group but does not have any Timesheets group
or Analytic Accounting group, he cannot access the Project app (a
security error message appears).

The problem is some of 'project.project' model's fields is computing
based on 'account.analytic.line' model, which the Project/User group
does not have the right to read it.

This PR adds corresponding groups to these computed fields, or changing
the computing method to make sure there is no error if project user
reads on the 'project.project' model.

closes odoo/odoo#87393

X-original-commit: 9df63eb25bfe65bce43a557b8635d967fa5a8d6a
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-04-19 16:40:02 +02:00
Kartik Chavda fd3a334637 [IMP] hr_timesheet, **: improve generic ux for timesheet
** = hr_timesheet_attendance,project_timesheet_holiday,
sale_timesheet

Purpose of this commit to improve generic usage of
timesheet app.

So, in this commit done following change:

- change no content helper for reporting menu actions.
- change no content helper for attendance report menu action.
- make timesheet editable in batch.
- add suspicious duration filter in timesheet search view.
- add analytic tags in timesheet views only visible when analytic
  tag feature enable from accounting settings.
- remove group group_no_one from section_leaves div.
- remov group group_no_one from timesheet group in leave type
  form view.
- improve search view.
- remove form view reference from project_id of timesheet.
- add a condition for decoration danger in o2m tree view for
  timesheet_ids in project form view.

task-2725525

closes odoo/odoo#82305

Related: odoo/upgrade#3355
Related: odoo/enterprise#23284
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-04-19 16:39:53 +02:00
Adrien Widart b622f3b9b1 [FIX] mrp: produce a tracked and manufactured component
In some cases, it is not possible to produce a tracked product that has
been used as a component of another product.

To reproduce the issue:
1. Create three products A, B, C:
    - A storable
    - B storable and tracked by lot
    - C consumable
2. Update on-hand qty of B
    - 10 x lot L01
    - 5 x lot L02
3. Create two bills of materials
    - Product: A
        - Components: 1 x B
    - Product: B
        - Components: 1 x C
4. Produce 15 x A (MO01)
    - Note: it should use 10 L01 and 5 L02
5. Produce 15 x B with lot L03 (MO02)

Error: When marking MO02 as done, a user error is displayed: "Cannot set
the done quantity from this stock move, work directly with the move
lines." The user should be able to mark the MO as done.

When confirming MO02, it confirms the associated SMs. Since the
conditions are respected, we try to assign both consumed and finished
moves. Because of step 4, there are two quants for the product B in the
production location (one for L01 and another for L02). Therefore, when
reserving the qty of the finished move, two SML are generated. As a
result, when marking MO02 as done, we write the `quantity_done` on the
finished move. This triggers the inverse method and leads to
`_multi_line_quantity_done_set`, where the error is raised because the
done quantities are not defined on each SML:
https://github.com/odoo/odoo/blob/1354081e43b71edbd434dccc6df6d0881c672a81/addons/stock/models/stock_move.py#L363-L364

Thanks to `_set_quantity_done`, we can write these done quantities on
each SML (and then the incorrect lots will be replaced by the producing
lot).

OPW-2752436

closes odoo/odoo#89015

X-original-commit: 65efb3ec5416fab6bb9ba0a015565b2abb3928cd
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-04-19 15:33:53 +02:00
Brieuc-brd 8edc8c5768 [REF] mail: MessageAuthorPrefix, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2826482

closes odoo/odoo#89002

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 15:33:49 +02:00
Mohammed Shekha 0fc93fb1e4 [IMP] l10n_in: change fiscalyear_last_month to march
With this commit: we are changing fiscalyear_last_month to March if
chart template is Indian chart template as fiscal year ends in 31 March
in India.

task-2723849

closes odoo/odoo#81982

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-04-19 14:19:40 +02:00
Joseph Caburnay 235afe276d [FIX] point_of_sale: access error when limited partners
Steps to reproduce:
1. pos.config is in company1
2. create a partner with company = company2
3. change pos.config to limited partners loading
4. open the pos ui (to call load_pos_data)

old behavior: access error

closes odoo/odoo#89013

Now: method is called without error
X-original-commit: eade911354dac775b3b96212698dbb7e2d644390
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-04-19 13:19:08 +02:00
Ivàn Todorovich 1235cd404b [IMP] point_of_sale: make _onDoRefund overrideable
closes odoo/odoo#89001

X-original-commit: e30ad97449793fc200784b7c70bce271060264de
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-04-19 13:19:04 +02:00