Commit Graph
147686 Commits
Author SHA1 Message Date
Thibault Delavallée fd1007749e [FIX] mass_mailing: fix report grouping / filtering on wrong field
Oversight of odoo/odoo@f16dbbcaec

closes odoo/odoo#75430

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-23 09:05:46 +00:00
Alvaro Fuentes d766744b1c [FIX] base: fix ir_attachment read_group
When called with a `srt` as readgroup parameter we get a traceback.
Example:
`read_group([('partner_id', 'in', self.ids)], 'partner_id', 'partner_id')`
TB:
```
 Traceback (most recent call last):
   File "/home/odoo/src/odoo/14.0/odoo/tools/safe_eval.py", line 330, in safe_eval
    return unsafe_eval(c, globals_dict, locals_dict)
   File "", line 2, in <module>
   File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_attachment.py", line 420, in read_group
    if any('(' in field for field in fields + groupby):
 TypeError: can only concatenate list (not "str") to list
 ```

 Observed on the upgrade request 22627.

closes odoo/odoo#75416

X-original-commit: 8e7990dd5c069f7b0dba9f3d27f620f0fcad5441
Signed-off-by: Christophe Simonis <chs@odoo.com>
2021-08-20 18:52:19 +00:00
Kartik Chavda 9f519c44b3 [FIX] sale_timesheet: fix access right error while opening sale order
Purpose of this commit to fix access right error while user try
to open sale order when he has no acces right of timesheet.

So, In this commit improve code for timesheet_total_duration
compute method to directly compute timesheet_total_duration
from unit_amount of timesheets without any access right.

closes odoo/odoo#75272

Taskid: 2514517
X-original-commit: 2f7c5020cdd2073dc55ecda40d45f30c42e508e8
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-18 15:30:44 +00:00
Martin Trigaux d9e3aab69b [FIX] mail: convert res_model_id to selection
Following the removal of read access on ir.model (odoo/odoo#69120),
the mail.activity.type model was not accessible to non-admin users due
to the res_model_id many2one field.

Before this commit, a project user could not access the Activity Type
menu.

Convert it to a selection field with the selection values being
computed in sudo.

closes odoo/odoo#74981

Related: odoo/enterprise#20214
Related: odoo/upgrade#2734
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-23 06:56:00 +00:00
Priyanka Kakadiya e164437fc6 [IMP] product: add color field on attribute values
PURPOSE

Display the color of the attribute value on the product kanban card

SPECIFICATION

Add color field for models `product.attribute.value` and
`product.template.attribute.value`.

Task-2593655

closes odoo/odoo#74356

Related: odoo/enterprise#20048
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-20 05:01:50 +00:00
Valentin Chevalier b0e2c2b945 [REF] sale: make variables name clearer
closes odoo/odoo#74246

Related: odoo/upgrade#2691
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-02 07:50:13 +00:00
Pierre Masereel a46c9b0f21 [IMP] point_of_sale,pos_sale: Sale Order integration
Since now, there was no possibilities to pay a Sale Order in a point of
sale without re-encoding every lines of the sale order in a pos order.

So we've now added the possibility to choose a sale order from the point
of sale, and apply a down payment or settle the selected order. You
still get the possibility to invoice it, and the stock is correctly
managed.

The SO is then updated accordingly to what have been done throught the
POS.

closes odoo/odoo#74096

Task-id: 2500902
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-08-23 12:26:24 +00:00
Demesmaeker e0233a1010 [IMP] payment(_adyen): allow to refund confirmed transactions
Before this commit, it was not possible to refund a payment from Odoo.
Users had to go through the payment acquirer's backend and update the
payment accordingly in Odoo.

With this commit, refunds are made available in Odoo directly from the
payment form, for acquirers that support them. Acquirer can either only
support full refunds or also support partial refunds.

As of now, the only acquirer allowing refunds is Adyen, with partial
refund support.

task-2527891

closes odoo/odoo#70881

Related: odoo/upgrade#2689
Related: odoo/enterprise#19829
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-08-23 10:54:17 +00:00
c90ab7b664 [IMP] website: add templates for masonry snippet
Add an option in the masonry snippet's allowing to choose among multiple
templates for the snippet layout. The usability of the snippet also has
been reviewed (restrict the ability to control background on deeper
boxes). Also reviewed the bg-200 use on boxes and replaced them with
a preset as otherwise it seems buggy to not be able to remove the
bg-200 by selecting a preset (other than hitting the trash icon in the
colorpicker).

Part of https://github.com/odoo/odoo/pull/67361
task-2463033

closes odoo/odoo#67361

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: smottet <oms@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-08-23 12:20:17 +00:00
qsm-odoo bebb45e6d5 [FIX] website: restore the masonry snippet's options
Since [1], it was not possible to control the color of colored boxes in
the masonry snippet. Hopefully, the new selector to exclude some options
on "snippets inside snippets" is now more limited.

[1]: https://github.com/odoo/odoo/commit/58503a248e7ab6b66d61d00869cdae6719e5a068

Part of https://github.com/odoo/odoo/pull/67361
task-2463033
2021-08-23 12:13:14 +00:00
William Braeckman 10b5a5f819 [FIX] hr_attendance: fix wrong timezone comparison
When computing the overtime hours we use localized datetimes in order as
much as possible but we were localizing UTC datetimes to the wrong
timezones without converting them first which caused issues with company
thresholds.

Task ID: 2607436

closes odoo/odoo#74241

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-08-23 08:09:47 +00:00
William Braeckman 57f9b798af [FIX] hr{,_holidays}_attendance: compute correct default time off type
Previously the default time off type computed when pressing the deduct
extra hours button would not always be valid, this commits aims to
change that behaviour.

The form would also not recognize the fact that we are in a overtime
deductible context when the time off type was not bound to a company.

Task ID: 2607436
2021-08-23 08:09:47 +00:00
William Braeckman 2e17db2f51 [FIX] hr_attendance: fix necessary fields not present
`attendance_state`, `hours_today` and `last_attendnace_id` are required
to open up the attendance app, but were not available to the public user
since commit b429fce0e6

Task ID: 2607436
2021-08-23 08:09:46 +00:00
William Braeckman 06cdd9a92f [FIX] hr_attendance: fix overtime settings checks
Fixes minor problems encountered while doing task : 2607436.
A traceback when disabling the setting and the checks weren't disabled
if the option was completely disabled.

Task ID: 2607436
2021-07-27 08:23:03 +00:00
William Braeckman 1ac39f6ef8 [FIX] hr_holidays_attendance: fix deduct extra hours not showing
Fixes the deduct extra hours option not showing in time off type form
views if no company is linked, it will now use the current company to
fetch the setting if no company is linked.

Task ID: 2607436
2021-07-27 08:22:48 +00:00
William Braeckman e4a4d498ef [FIX] hr_holidays_attendance: fix archived time off
When installing the `hr_holidays_attendance` module without demo data,
and having the count extra hours options enabled, the extra hours time
off type would remain archived instead of being enabled.
This commit fixes that behaviour and will now start in sync with the
company option(s).

Closes odoo/odoo#74241

Task ID: 2607436
2021-07-26 12:43:50 +00:00
William Braeckman 25f8554426 [IMP] project: add project stages
Adds new optional stages for the project.project model.

Previously projects would stay dormant when they were finished, we can
now define stages for those projects to determine where a stage is in
it's lifecycle.

Also adds some small changes to the project itself, such as adding tags.

Closes odoo/odoo#73648

Task ID: 2581575

Related: odoo/upgrade#2646
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-08-23 07:45:56 +00:00
Leonardo Pavan Rocha 7e5b14c40f [IMP] sign: signature wizard behavior improvements
Improves overall signature wizard usage. Signature will adjust its size to best
fit the canvas, but maintaining its ratio.

task-2596079

closes odoo/odoo#73493

Related: odoo/enterprise#19577
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-16 12:49:53 +00:00
David BeguinandAurélien Warnon 409ccc833d [IMP] base_import: add import progress bar for batch mode
This commit adds a progress bar that is displayed during the import (or import
test). It is only displayed when importing in batch mode.

The user can decide to stop the import. If it's the case, the current
batch is finalized and the import is interrupted afterwards.

The user can easily resume the import later starting from the line where the
batch was interrupted
e.g: interrupted after 300 / 500 lines, when you resume, it will start from
line 301.
(The above behavior is not applied in test mode, we never alter the starting
line when testing).

Side note: This commit also removes the alert-info box from batch import
disclaimer, for design beauty purpose.

Task-2567591

closes odoo/odoo#73243

Related: odoo/enterprise#19467
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
2021-08-23 09:02:08 +00:00
Victor Feyens d1dda79c2f [IMP] product: clean product pricelist report code & logic
* Linting, typos & cleanup
* Avoid using the context to pass data to the server
* JS: let the web client service manage the data transfer
    instead of "manually" specifying it in the report_name

closes odoo/odoo#73198

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-23 09:33:19 +00:00
Shweta Goltar 1ad72def2a [IMP] product: improve for the pricelist report
PURPOSE
------
In the new pricelist report, showing the resulting price of a product in the
situation of a pricelist or another, for certain quantities, the specified
quantities are shown as "X Units".

This can be misleading when using multiple Unit of Measure, because
the quantites are expressed in the products unit of measures, thus
not always in "Units".

We should probably either group the products by UoM, to display
adequates column titles, or we should update the display to make sure the user
understands clearly that the prices are /unit in the product uom.

users should be able to 'hide' pricelist name on the PDF.

TaskID-2360597
2021-08-23 09:31:54 +00:00
Krina Oza cfd5837a24 [IMP] rating: improvement for the ratings view
The purpose of this commit is to make improvements in ratings
views.

so in this commit did the following changes:
Graph View
  - rename 'Rating Value' to 'Rating Value (/5) in measures
  - remove 'document' and 'parent document' measures
Kanban view
  - only display the name of the rated operator, not his company
list view:
  - resequence the fields and change attrs
search view:
  - added various filter

Related Enterprise PR: https://github.com/odoo/enterprise/pull/19415

closes odoo/odoo#72965

Taskid: 2531491
Related: odoo/enterprise#19415
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-19 04:32:46 +00:00
Valentin Chevalier 716d616a3a [IMP] sale: add the qty to deliver only in the reporting view
Currently, user needs to extract the report and compute the quantity to deliver through a spreadsheet.

Task #2537839

closes odoo/odoo#71549

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-06 15:46:46 +00:00
sal-odoo f2be38bbd3 [ADD] l10n_ae_pos
closes odoo/odoo#75425

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-08-23 08:56:13 +00:00
Hubert Van de Walle (huvw) 696dff64d6 [FIX] account: don't print invoices for miscellaneous journal entries
Step to follow

- Trigger the Print > Invoices action
- An error is displayed but the PDF is still attached

Cause of the issue

> The PDF is generated before the error

Solution

> Show an error earlier

opw-2625480

closes odoo/odoo#75379

X-original-commit: b324ba12b4af2d00c696bc5c42896c7c431d863c
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
2021-08-20 11:05:22 +00:00
Jorge Pinna Puissant a81ba713ff [FIX] web: parse and format dates of mock server
On 00e3cb74c4 the migration of the code to
parse and formate dates on the mock server from moment to luxon was
done. Two issues were introduced on that commit: Parsing a date
displayed on quarter wasn't possible; And the ISO week year wasn't used
to format the date, but it was used to parse the date, for symmetry's
sake, now the ISO week year is used on both.

closes odoo/odoo#75354

Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2021-08-23 08:08:38 +00:00
Nathan Marotte (nama) e4d214d430 [FIX] account : Missing onchange for tax recompute
Issue: With a custom tax computation that depends on the quantity, when
the price of the item is 0, when changing the quantity,
the taxes are not changed

Steps to reproduce :
 1) Install Accounting, and account_tax_python
 2) Accounting > Configuration > Accounting > Taxes : create
 a task :
   Tax Computation: Python Code
   Python code : `result = quantity * 0.3`
 3) Accounting > Customer Invoices > New Invoice
 4) Add a line with a product, unit price = 0, quantity = 2
 5) Change the quantity, the tax does not change

Why is that a bug:
 When the price is 0, changing the quantity doesn't affect
 the price so the onchange is not triggered even though the
 line changed

opw-2559200

closes odoo/odoo#75348

X-original-commit: 44403a6c266313a167b88b2c72c0eb9c70a2b4a4
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nathan Marotte <nmarotte@users.noreply.github.com>
2021-08-20 06:31:21 +00:00
Noe Antoine e1747acc48 [IMP] mass_mailing[_sms]: use simplified form for mailing list quick creation
BEFORE THIS COMMIT

When creating a mailing.mailing from "Create a mailing", the form can contain
a mailing.list field. This is a m2m and one can create and edit lists from
there. However, when using create and edit, the default creation form contained
a few smart buttons that can make the user exit the view. This does not have
much sense for a mailing list being created, and we want the user to stay in
the mailing.mailing being created.

AFTER THIS COMMIT

The view mailing_list_view_form_simplified is used when using create and edit
from there instead of default form one. It does not include any misleading stat
buttons anymore.

The footer including discard and close buttons is removed and is added to a new
primary inheriting view mailing_list_view_form_simplified_footer, used instead
of the previous one in the mailing.list creation form in kanban view, keeping
the previous behaviour and clarifying structure.

Since the field is a many2many in this case, we want the user to be able to save
and create / save and new / discard. This was not the case before, removing the
footer will result in using the default one for m2m. That way, all these actions
will be available as well and work as expected.

--- Links ---
Task-Id - 2605436
COM PR - odoo/odoo#74772

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-20 13:58:48 +00:00
Philémon van Helden c976d3765c [FIX] base_vat: properly checks XI VAT numbers
In 12.0+ when adding an XI (Northern Ireland) VAT number on a vendor and specifying the country as United Kingdom, an error shows the VAT number as not valid. This is because the method to check specifically XI VAT numbers doesn't recognize XI as a country, and thus uses the GB VAT number verification, which doesn't recognize XI VAT numbers as it isn't up to date yet.

A temporary method to check XI VAT number was already added, but is never called because XI is not recognized as a country code.
With this commit, we add a list of known legitimate country codes, that are not considered as such in Odoo.

opw-2534541

closes odoo/odoo#75399

X-original-commit: 3a1671470b71892dba3eade8f861faaa9689713e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: pvh-odoo <SwagSamaSempai@users.noreply.github.com>
2021-08-20 15:03:32 +00:00
Jigar Vaghela 907c8442a1 [FIX] l10n_in_sale: only take GSTIN from shipping address if shipping_gstin is set
When there is a bill to ship to and ship to is the third party then GSTIN is set from customer address(partner_id), not from shipping address(partner_shipping_id)

closes odoo/odoo#75400

X-original-commit: c7e0229dd3229a5a79c4a32fc02eab3fad98fccd
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-08-20 15:04:58 +00:00
yhu-odoo 49b544a871 [IMP] mrp: no more changes after apply
Hide the edit button to prevent user editing the file again after
applied the eco change.

Task-2466232
PR #69914
ENT PR odoo/enterprise#17960

Related: odoo/upgrade#2427
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-08-20 13:28:48 +00:00
Swapnesh Shah 80b02ba23f [FIX] repair: do not allow to delete invoiced repair
Before this commit, User was allowed to delete repair order which
is linked to posted invoice by moving it to Draft.

With this commit, user is not allowed to delete repair order linked to
a posted Invoice.

closes odoo/odoo#75109

Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-08-15 17:57:17 +00:00
dht-odoo 3147fb4237 [IMP] {website}_livechat: improve action helper messages
This commit improves action helper message for visitors menus of
website and removes old action helper message from visitor menu
of livechat for better onboarding.

Menus

1) Visitors(action -> website_visitors_action)

Task-2584073
PR odoo/odoo#74082

Related: odoo/enterprise#20125
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-20 13:11:15 +00:00
dht-odoo 5bcc1c65cf [IMP] event: improve action helper messages
This commit improves action helper message for different menus of events
for better onboarding. And also added no create for some menus,
as they are for debugging not to configure.

Menus

1) Events(action -> action_event_view)
2) Events > SomeEvent > Attendee stat button(action -> act_event_registration_from_event)
3) Events > SomeEvent > Tracks stat button(action -> action_event_track_from_event)
4) Registration Desk > Select Attendees(action -> event_registration_action)
5) Reporting > Events(action -> event_event_action_pivot)
6) Reporting > Attendees(action -> action_registration)
7) Event Templates(action -> action_event_type)
8) Event Stages(action -> event_stage_action)
9) Event Tags Categories(action -> event_tag_category_action_tree)
10) Tracks(action -> action_event_track)
11) Events Mail Schedulers [no create added](action -> action_event_mail)
12) Track Location(action -> action_event_track_location)
13) Track Tags(action -> action_event_track_tag)
14) Track Visitors [no create added](action -> event_track_visitor_action)
15) Sponsor Levels(action -> event_sponsor_type_action)
16) Quizzes [no create added](action -> event_quiz_action)
17) Quiz Questions [no create added](action -> event_quiz_question_action)
18) Website Menus [no create added](action -> website_event_menu_action)

Task-2584073
PR odoo/odoo#74082
2021-08-20 13:11:10 +00:00
dht-odoo 37d94d3f98 [IMP] mass_mailing(_sms), link_tracker: improve action helper messages
This commit improves action helper message and sample data for
different menus of link tracker for better onboarding.

Menus (link tracker)

1) Mediums(action -> utm_medium_action)
2) Source(action -> utm_source_action)

Menus (mass mailing)

1) Mailings(action -> mailing_mailing_action_mail)
2) Mailing Lists(action -> action_view_mass_mailing_lists)
3) Campaign Tags(action -> action_view_utm_tag)
4) Blacklisted Email Addresses(action -> mail_blacklist_action)

Menus (mass mailing sms)

1) SMS Marketing(action -> mailing_mailing_action_sms)
2) Mailing Lists(action -> mailing_list_action_sms)
3) Mailing List Contacts(action -> mailing_contact_action_sms)
4) SMS Marketing Analysis(action -> mailing_trace_report_action_sms)
5) Blacklisted Phone Numbers(action -> phone_blacklist_action)

Menu name changed for following menu.

1)Contacts Lists to Mailing Lists
2)Contacts to Mailing List Contacts

Task-2584073
PR odoo/odoo#74082
2021-08-20 13:11:03 +00:00
dht-odoo 10c5feab12 [IMP] crm: improves action helper messages
This commit improves action helper message for the crm menus
for better onboarding.

Menus

1) Activity Types(action -> mail_activity_type_action_config_sales)
2) Sales Teams(action -> crm_team_action_config)
3) Lost Reasons(action -> crm_lost_reason_action)

Task-2584073
PR odoo/odoo#74082
2021-08-20 13:10:59 +00:00
dht-odoo a02a258451 [IMP] contact: improve action helper messages
This commit improves action helper message for different
contact menus for better onboarding.

Menus

1) Contact Tags(action -> action_partner_category_form)
2) Contact Titles(action -> action_partner_title_contact)
3) Contact Industries(action -> res_partner_industry_action)
4) Countries(action -> action_country)
5) Fed. States(action -> action_country_state)
6) Country Groups(action -> action_country_group)
7) Banks(action -> action_res_bank_form)
8) Bank Accounts(action -> action_res_partner_bank_account_form)

Task-2584073
PR odoo/odoo#74082
2021-08-20 13:10:55 +00:00
qsm-odoo 3845b650e6 [FIX] website: make robust IDs for visibility conditions on snippets
As nicely pointed by @kig-odoo at [1], the new feature of snippet
visibility conditions introduced in [2] has some issues. This fixes
the fact that condition identifiers were built by combining IDs without
a separator. A condition targeting a lang with ID:4 and another one with
ID:5 could thus produce the same condition identifier as another
condition targeting a lang with ID:45 (as 4 and 5 side-by-side makes
45...). Now, all parts of the identifiers are separated with '_'.

[1]: https://github.com/odoo/odoo/pull/67140#issuecomment-902531321
[2]: https://github.com/odoo/odoo/commit/1c442782f887a8c16bae05a43fae13a310ac05df

closes odoo/odoo#75386

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-20 12:14:24 +00:00
Thibault Delavallée 2f21e04e63 [REV] crm: remove unnecessary sudo
Revert "[FIX] crm: allow regular salesman to convert and merge opportunities"
This reverts commit 24db93c0e6b88f89fdf03d63afee05fc858ed977.

Indeed adding a sudo at the end of merge process is a strange way to fix
an unexplained issue about "similar emails". CRM code has been cleaned
since v14+ and flows should not gain random sudo trying to solve an
undefined problem.

closes odoo/odoo#75385

X-original-commit: b4fa19376eb50bf07b5753b4664fcad4d637bcec
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-20 12:08:26 +00:00
Aurélien Warnon 6231608961 [FIX] survey: fix survey form view "conditional" question icon
Since the latest OWL refactoring, "button" DOM element in tree views cannot
be defined without an associated action (it will crash on click).

In the survey module, we use a "fake" button to mark a question as conditional
(based on the answer of another question). The button functions as a simple
icon and has no attached action.

To fix the issue, we now mark the button as "disabled" so the click action will
not trigger anything.

Task-2618108

closes odoo/odoo#75158

Related: odoo/enterprise#20049
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-16 13:18:14 +00:00
Romain Derie fd54179ceb [FIX] website_mass_mailing: improve configuration usability
1. The option to change newsletter becomes a select instead of a button that
   open a modal
2. If no mailing list exists, we show a warning and user can be redirected to
   the backend to create one if he wants.
3. Add name to the snippet so it is not "Block" in the right panel

Community: https://github.com/odoo/odoo/pull/74667
Upgrade: https://github.com/odoo/upgrade/pull/2742
task-2246975

closes odoo/odoo#74667

Related: odoo/upgrade#2742
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-08-20 12:05:23 +00:00
Romain Derie 8873fe7240 [IMP] (website)_mass_mailing: make newsletter popup use popup snippet
Before this commit, the newsletter popup was using its own mechanism instead of
the popup snippet, making a lot of extra code.

Now, the newsletter popup snippet just use the behavior of both the popup
snippet and the newsletter snippet.

Community: https://github.com/odoo/odoo/pull/74667
Upgrade: https://github.com/odoo/upgrade/pull/2742
task-2246975
2021-08-20 12:05:06 +00:00
Touati Djamel (otd) 6bd5c69ed6 [FIX] crm: prevent the display of closed opportunities
Steps to reproduce the bug:
- Go to CRM and create a team.
- Create 2 Opportunities and assign them to the created team
- Put a date in the past for 'Expected Closing'
- Mark one of the opportunities as won
- Go to CRM > Sales > Teams
- You will see that the number of overdue opportunities is 1 but when clicking on it, it shows 2

Problem:
As an opportunity is in a stage with "is_won= True" so it was won (Probability 100%).
It should not be displayed with the overdue opportunities

Lost opportunities should not be displayed also.

Solution:
Opportunities won or lost have a closing date, so we can use this field to filter them:
https://github.com/odoo/odoo/blob/14.0/addons/crm/models/crm_lead.py#L590-L591

opw-2590471

closes odoo/odoo#75376

X-original-commit: b699c3e28c4cf745a91eb29bf5c85c429d152335
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-20 10:30:31 +00:00
Ivan Yelizariev 025d1aad89 [FIX] website_event: fix flag url in dynamic snippet
Since Odoo 14.0 flag image is not a binary field anymore [1] and field name is
changed to `image_url`.
So, fix it by using the url directly.

STEPS:
* Flag image is used when user country_code is provided and there are events for
that country. The user country_code is computed by IP. If you run Odoo locally
you can temporarly update `get_country_events` to force some country code
* In a website page add a header-title block first, then add the dynamic snippet
"Events"

BEFORE: dummy image "no photo yet"
AFTER: flag image

---

[1] https://github.com/odoo/odoo/commit/710705b64c0134a5b568d998d0a3eb0df0f541c0
opw-2625695

closes odoo/odoo#75374

X-original-commit: ae8403d08d1877ec35cc25d3eb6ac61cfee20919
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-20 10:26:20 +00:00
Jérémy Hennecart b785cdc211 [MOV] appointment: rename module to match enterprise part
Rename website_calendar module by appointment in order to match
the changes on the enterprise part.

We now no longer use the website module to manage the basics of
online appointments. The portal module is now used in its place.

For additional info, check the enterprise PR.

task-2427015

closes odoo/odoo#72241

Related: odoo/upgrade#2492
Related: odoo/enterprise#18426
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-20 06:50:33 +00:00
dht-odoo 32acd56002 [FIX] website_slides_survey: add context to survey_id
Before this commit when user quick create a certification,
then it will create record in survey but not with certification
equals to True. Due to which it will be excluded from domain and
we will not able to find it in survey_id in elearning.

With this commit we pass certification equals to true and scoring_type
equals to scoring_without_answers in context of survey_id. So now,
it will be not excluded in domain('certificate', '=', True) in elearning.

Task Id: 2621296

closes odoo/odoo#75375

X-original-commit: 47894929591c7f46451242c1d0368094e2b3c295
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-20 10:27:40 +00:00
Adrien Widart 75584fb881 [FIX] crm: invite partners on quick creation of meeting
When creating a meeting from a partner/lead, the invitations won't be
created/sent

To reproduce the error:
1. Open a lead
2. Click on Meeting
3. Create a meeting
    - On meeting creation, directly click on "Create", not "Edit"

Error: No invitation has been sent. When editing the created event,
there isn't any invitation on Invitations tab. Same error will happen
when opening the form of a customer instead of a lead (step 1)

For an attendee to be created, the partners associated with the meeting
must be explicitly listed in the creation values:
https://github.com/odoo/odoo/blob/3e20e68f0790a0b0f3b5c4d43f59f235b7d20fef/addons/calendar/models/calendar_event.py#L710-L713
However, in the above use case, the partners identifiers are given
through the context. This explains why the attendees are not created.

OPW-2531496

closes odoo/odoo#75353

X-original-commit: a8b4f8f6c009d8abd7210973005fd755ac3bc573
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-08-20 07:48:33 +00:00
oco-odoo c47be4bb9a [FIX] account: tax details: fix incorrect test
[FIX] account: tax details: correct taxes computation when using taxes affecting base with repetition

1) Let's consider then following taxes

- tax 1, 42%, affecting the base
- tax 2, 10%

2) Create an invoice with the following lines, and post it:
- price=100, taxes=tax1
- price=100, taxes=tax2
- price=100, taxes=tax1+tax2

=> The tax details should compute the following amounts:

- base amount of tax 1: 200
- tax amount for tax 1: 84
- base amount of tax 2: 242
- tax amount for tax 2: 24.2

Before this fix, the base amount for tax 1 wasn't computed properly, and gave 300 instead of 200. This was because the same tax line (the one from tax1 with no tax_ids) was matching two different base lines: the one with tax1 and tax2, and the one with only tax1.

closes odoo/odoo#75317

Related: odoo/enterprise#20356
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-08-19 14:40:02 +00:00
Younn Olivier 6befbe0642 [FIX] website_sale_stock, *: correctly show continue selling setting
*: website_sale_comparison_wishlist, website_sale_stock_wishlist

This fixes problems introduced with [1].

The config setting to continue selling even with no stock was always
shown as true, even if it was false.

Also, this reindents wrongly indented js files and improve them.

[1]: https://github.com/odoo/odoo/pull/68221

Related to task-2458165

closes odoo/odoo#74917

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-20 06:22:21 +00:00
Nicolas Lempereur 22eacc094b [FIX] stock: update view location name usage
Slight inconsistency, you could have a view location type not update
when the usage was changed to or from view (the hierarchy would be
shown which should not be the case).

opw-2619043

closes odoo/odoo#75338

X-original-commit: 857ab57756e19525681f0abd36e7f07144f56eed
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-08-19 15:57:08 +00:00