Bug
===
If the user doesn't have access to the project / CRM module, those
menus were visible on the addin side.
Now, the sections are not visible if the user doesn't have access to.
Task-2765323
closesodoo/odoo#89260
X-original-commit: 7b7aa72ecdc7e69e425ae08c28e1e7827e423548
Related: odoo/enterprise#26446
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Allow to re-use the method `mock_auth_method` used to mock the Outlook
authentication, to be able to write tests in other sub-modules.
Task-2782150
X-original-commit: 6932f05bfc4b2beabaf7c6390f1d241fff73bd38
Part-of: odoo/odoo#89260
Finetuning of 970904b06f6872aadf69d64c7bc82072a16f1596
Only update the template (& reset the lines if change done through UX) if
the SO wasn't saved already to make sure existing setup is not reset.
This commit restores even more of the previous behavior when the template
was only defaulted to the current company one. Now the default is only
modified if you change the company before saving the record.
In all other cases, the template can only be modified manually/programmatically,
but won't be reset/updated by the compute method.
Task ID - 2798588
closesodoo/odoo#89255
X-original-commit: 7209e391789be6a807bd4eac22257e888cbaf1a6
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Add test for use case fixed by d43e9cb9ad8d1c0c020209de0e8f6ffdcbc960a1
closesodoo/odoo#89237
X-original-commit: 21be0d8e96b9fb6e9fd6476a664ce89b017a7767
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
This commit aims to fix an error created in task 2658415 which prevent to create a new time off.
taskID 2829472
closesodoo/odoo#89221
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit, when the user cancels his validated time off planned
in the future, the timesheets generated for this time off are not
deleted. The problem is since the timesheets are not removed we could
have duplicated timesheets if the user adds a new time off in the same days
for instance, because the newest timesheets are generated and thus we have
duplicated timesheets generated instead of having only timesheets generated
for the newest time off.
This commit removes the timesheets generated for the time off when this
time off is canceled (=archived). Also, It also prevent the user to
manually unarchive the time off since this operation is not really
managed and could introduced eventual problems.
Related PR: #76722
Part of task-2791386
closesodoo/odoo#89246
X-original-commit: a9e63ebe32079e2215acafcd4bca15b371ee9bc2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
Co-authored-by: William Braeckman <wbr@odoo.com>
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
closesodoo/odoo#89123
Related: odoo/enterprise#26379
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
before this commit,
in project update right side panel view rating stat button's icon is
static it does not update depending on rating percentage and percentage
not showing properly.
This commit display rating average percentage in project update right
side panel view's rating stat button instead of just displaying
rating_avg_percentange field's value and rating stat button's icon will
update depending on rating percentage.
task-2758779
closesodoo/odoo#89209
X-original-commit: 549e1750cf51f27befe6278a71250cca0c720139
Related: odoo/enterprise#26423
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
SVG images are considered an xml like format, as a consequence restrictions
apply for manipulating svg type attachments. This poses a problem when a
website designer tries to save a page containing images with svg shapes. This
commit allows writing attachments with an xml like mimetype to anyone with
write access rights on views.
opw-2806930
closesodoo/odoo#89185
X-original-commit: d5aa54ca108eb99c7eb855a7d456bfe2f208a8eb
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this PR, chat window scroll position was reset to top when it was
switched to the left.
This PR introduce a component hit that restore the position saved inside the
models when a chatwindow is switched.
task-2746500
closesodoo/odoo#89134
X-original-commit: 0f11abaf09f08fc9643dac5ee8d4df6d1ef5686b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
we find some bug when backporting to v15 so we fix this in fw-port
value of token_validity is not converted to UTC so fix it,
And groups in the field are wrong like ```account.group_system``` so set right one ```base.group_system```
Also, fix IAP buy credits message where set URL out of the Markup
Task 2179664
closesodoo/odoo#89110
X-original-commit: 1191abca6aa863cbb4a70c0329fd2271547049fa
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
Survey invites sent to contacts are in the user's language and they
should be in the partner's language
Steps to reproduce:
1. Install Surveys and Contacts
2. Install another language (eg. fr_FR) but keep English as the
application language
3. Create a contact with the different language (fr_FR)
4. Create a survey and share it with the french contact (the template
used should have translations in both language)
5. Check the mail sent (Settings > Technical > Email > Emails)
6. The email is written in English but it should be in the contact's
language
Solution:
If all the recipients of the invite use the same language, display the
invite in the recipients' language to the sender so he can modify it or
send it directly
If they use different languages, use the template in the sender's
language
opw-2760489
closesodoo/odoo#89214
X-original-commit: 52f37c061015f5425587d46ff54973f18c0223eb
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
* Avoid auto-transforming an valid url inside an existing <a> tag.
* Ensure the current selection range is deleted
before embedding an image or video.
task-2604627
closesodoo/odoo#89210
X-original-commit: 070bceeadd16e0b5643b91ad583449d31c48313d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
We change the way we handle paste of html data :
The basic flow is :
1. if any range => deleteRange and continue from here
2. if the paste data has only one root <p> :
> we unwrap its content in place
2. if the paste data has two root <p> :
> we unwrap the content of the two p in place
> we force a oEnter between the two contents
3. if the paste data has more than two root <p> :
> we unwrap the content of the first and last p
> we force a oEnter between the two contents
> we insert the rest in between, out of focus block element
@see unit tests in `test/spec/copyPaste.test.js`
task-2604627
X-original-commit: 4dde6d37f30c35714c52e7e28f7011414fed7b6a
Part-of: odoo/odoo#89210
whitelist of html element was not designed to keep the style
set by our own editor ( style on <span>).
We add a system to keep the spans when they meet some requirements.
Requirements are basically having one of the few allowed inline styling css rule.
@see tests in `test/spec/copyPaste.test.js` section 'Html Paste cleaning'
task-2604627
X-original-commit: da92c2335a1241ec9f3974d3bac1c4b7227b2d28
Part-of: odoo/odoo#89210
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
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
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
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
- 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
closesodoo/odoo#89208
X-original-commit: b4f6cf56b999a42c09ac41ae1449618f2877a9e6
Signed-off-by: Florian Gilbert <flg@odoo.com>
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
closesodoo/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>
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>
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
closesodoo/odoo#89196
X-original-commit: ee6e6cb26528f42de9652b88fe022ebae2cfacfc
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: yosa-odoo <yosa@odoo.com>
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
closesodoo/odoo#89213
X-original-commit: fc546e0481ae0159e67791240833bc1e38a4440f
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
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.
closesodoo/odoo#89163
X-original-commit: 2aa09ba39aed1a34f59914124fc9dcf11787e75b
Signed-off-by: Josse Colpaert <jco@odoo.com>
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
closesodoo/odoo#89147
X-original-commit: 0288e0e91a071c7ec4b8adb0474d82a46dea9c9c
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
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
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
closesodoo/odoo#89122
X-original-commit: 7e0c436e5817722c0cb3c223a75def3b701535a4
Signed-off-by: Onockx Audric (auon) <auon@odoo.com>
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
closesodoo/odoo#85104
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#87672
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
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
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
closesodoo/odoo#88988
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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).
closesodoo/odoo#89094
X-original-commit: c16194c1449edaaf994cb49d2173bdb27253c0cc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: SplashS <sergey@shebanin.ru>
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.
closesodoo/odoo#89079
X-original-commit: 199a0dd0f013655a3c2345a41bc7c721e09bfc68
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
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
closesodoo/odoo#86110
Related: odoo/upgrade#3357
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
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#81444closesodoo/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>
`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
closesodoo/odoo#89071
X-original-commit: 2010c0e2c402f5bb423a0fe683e51923e1e14042
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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