Commit Graph
141473 Commits
Author SHA1 Message Date
Didier (did) b51a08a6e1 [FIX] mail: avoid updating a delete isCausal model
task-2453463

closes odoo/odoo#65707

X-original-commit: f6be3fff524d02b08d9fc05b9a90ec133aa77792
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-08 11:12:52 +00:00
Aaron Bohy 7a51632e39 [FIX] web: nested x2many with non inline views
This commit partially reverts commit [1], and backports commit
[2] from 14.0.

Even though [1] correctly fixes the faulty scenario, there is a
variation of this scenario which isn't handled. It has been
fixed in 14.0 by [2], and that fix also fixes the original
issue of [1]. So we keep the tests of both [1] and [2], and
the fix of [2].

[1] dd97d446ee94a32089f200bb7122139d31e69873
[2] f6c06bd0b8

closes odoo/odoo#65705

X-original-commit: f2b9a5502f5cf0ee51f193177c679889c18130a9
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-02-08 11:08:06 +00:00
nounoubensebia 87f86579a1 [FIX] website_event: hide registered badge when registration is canceled
Before this commit, a participating badge was displayed on the event even if
the user's registration has been canceled. This is a strange behavior.

After this commit, the participating badge will be hidden if all the user's
registration have been canceled.

Task ID-2432546

closes odoo/odoo#65702

X-original-commit: 125e5401123d8e4bc7656ac7534cc9290451adbc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-02-08 11:05:41 +00:00
ijas ahammed bd830b35a7 [IMP] {sale_}crm: tone down action buttons on lead/opp form view
Primary action buttons should suggest the next logical flow to the user.
On contrary, the opportunity form view is having too many primary
buttons, losing their actual meaning.

In this case we consider that next logical steps should be:
 - the creation of a new commercial document (Sale / Rental) if
   any / all of those apps are installed;
 - the winning of the deal (as losing would stop the flow);

With this commit, we make following changes to achieve that:
 - rename the 'Mark Lost' and 'Mark as Lost' buttons to simply 'Lost'
   and make them secondary buttons;
 - rename the 'Mark Won' button to simply 'Won', and keep it primary;
 - once the 'sale_crm' is installed, make the 'Won' button secondary;

closes odoo/odoo#64834

Task-id: 2247355
Related: odoo/enterprise#15977
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-28 11:45:53 +00:00
Benjamin Frantzen (bfr) 64e0ee442f [FIX] l10n_be_edi: added the pdf report inside the xml as a base64 string
This is a requirement for the e-fff format.

TASK ID: 2339062
Ticket ID: 2394614

closes odoo/odoo#65683

X-original-commit: 5e16044b8d5194f9ce3aa8d43a9923896b8abfdf
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-02-08 09:05:35 +00:00
Benjamin Frantzen (bfr) 548d08bdc6 [FIX] l10n_be_edi: pdf extracted from e-fff file have correct extension
The text of the node 'cac:AdditionalDocumentReference/cbc:ID', which should contain the name of the pdf file in an e-fff document is incorrectly set by some software, and may contain the path to the file and/or the name of the xml instead of the pdf. Based on this information, we extract the stem only and append the .pdf extension to form a valid filename for the pdf.

TASK ID: 2339062

X-original-commit: f998d96d68e2e153e6061a273eb65ec3699501e4
2021-02-08 08:17:20 +00:00
Benjamin Frantzen (bfr) fbc77a6ecd [FIX] account_edi: a failed import of an attachment with account_edi now allows OCR to run automatically.
Before this commit, account_invoice_extract and account_edi where independent in parsing files uploaded or added as attachment in an invoice. Some tricks where used to avoid clash, but they were not perfect and some bugs appeared like the OCR not triggering automatically or an attachment being parsed twice by account_edi when parsing failed. The goal of this commit is to unify the import of files between the two features and ensure that they will not clash.

For more information about potential problems that appeared before :
See https://github.com/odoo/odoo/pull/61169
See https://github.com/odoo/enterprise/pull/15124/

closes odoo/odoo#65660

X-original-commit: 8435d0e8990509ee67425977f970ab27bea8133a
Related: odoo/enterprise#16172
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-02-05 17:56:12 +00:00
wan b14e5926ae [IMP] codeowners: add accounting
closes odoo/odoo#65571

X-original-commit: 41ac5b0ea7429f11b554a822287b37d635103a34
Signed-off-by: William André (wan) <wan@odoo.com>
2021-02-04 16:52:01 +00:00
Mithilesh Rao 6cd42e016d [IMP] hr_holidays,web: Improve the mobile view for calendar and times off
Purpose of the task is to improve mobile interface of the Time Off
and calendar view.

So in this commit, we have improved UI as below:
hr_holidays:
 - Move the leave summary topbar from top to sidebar filter of
calendar for small screen
 - Improve the kanban view of leave for mobile and added the
badge for state.

web:
 - Improve the calendar year mobile view by spliting the month view
in 2 column.

TaskID: 2333778
Related PR: https://github.com/odoo/enterprise/pull/13454

closes odoo/odoo#61474

Related: odoo/enterprise#13454
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-08 08:35:05 +00:00
Thibault Delavallée c146e63779 [FW][FIX] crm: split computed fields linked to partner
RATIONALE

Stored editable fields receive their values either from compute either from
user input. If a user input is given to create / write compute method is not
called. If multiple fields are computed through the same method giving one
field value discard call to compute method and other fields are not called.

SPECIFICATIONS

Split ``_compute_partner_id_values`` compute method so that partner related
fields are independent :

  * have a method for address fields as those are computed in group. Indeed
    either we take all from partner either none. Otherwise it would create mixed
    addresses that make no sense;
  * have a specific computation for partner_name and contact_name coming
    from ``_prepare_partner_values``;
  * have other fields separated (function, title, ...) acting like related on partner
    if not set by user;

LINKS

COM PR odoo/odoo#65381
Task ID-2451339

X-original-commit odoo/odoo@78eb46352e

closes odoo/odoo#65658

X-original-commit: bb13421d3a7f04ede9350b3b28c1650c3d9890f8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-02-05 17:51:33 +00:00
Thibault Delavallée fa20c36a63 [FW][IMP] crm: add tests about lead / partner synchronization and computed fields
Add tests related to lead / partner contact fields synchronization. Add tests
with user input and/or partner synchronization to ensure editable stored fields
work as expected on lead model.

Warning: those tests are failing. Next commit will split computed fields into
several methods in order to fix computation.

LINKS

COM PR odoo/odoo#65381
Task ID-2451339

X-original-commit odoo/odoo@18cd93ded8

X-original-commit: 94d618ff3ff8ee13d23f893836d00a5a71981938
2021-02-05 17:51:32 +00:00
Goffin Simon fa0b098900 [FIX] website_blog: Traceback on archived blog
Steps to reproduce the bug:

- Create a blogpost in the the blog 'travel
- Archive the blog 'travel'
- Open the blogpost

Bug:

A traceback was raised

opw:2444406

closes odoo/odoo#65576

X-original-commit: 196d96ef8eaf8aa06e16c9768ed595fca1c315ff
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-02-04 17:51:29 +00:00
nie 2d5ab66dec [FIX] stock_account: total quantity can be zero
Follow-up of https://github.com/odoo/odoo/pull/64942

Explanation:
When computing the total quantity, summing negative and positive values
can sometimes lead to zero even if the scoped quantity is not zero.
E.g.: Warehouse 1 has 10 items and Warehouse 2 has -10 items.
Scoping on Warehouse 1 results in 10 items but the total quantity is 0.

This commit also takes into account float precision.
Inspired by:
https://github.com/odoo/odoo/blob/d9b409247303c6b165a7df381169f2480a19900f/addons/stock_account/models/stock_quant.py#L36-L38

closes odoo/odoo#65661

X-original-commit: 3547b15cb362f73c60354070da5e49ffa674e432
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-02-05 17:56:57 +00:00
Raphael Collet 2f93046cf7 [FIX] core: writing on one2many field on new record
When using command "6" (SET), the one2many field's inverse was not
assigned on the lines.

closes odoo/odoo#65675

X-original-commit: ba733a9ac73dcf978ed7eaab7681781b2d5a9bfc
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-02-07 14:32:19 +00:00
Ivan Yelizariev ed02c1a2db [FIX] core: fix adding a field related to Binary or x2many
such fields have store=True, but they don't exist in table.

---

https://github.com/odoo/odoo/pull/65232#issuecomment-773298323
https://github.com/odoo/odoo/commit/02417290191c22c9c99e6dc96a572c21f38e64f1

closes odoo/odoo#65669

X-original-commit: 2eee717ded0fc702b431f7fe784dc62438aa5603
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-02-06 12:41:03 +00:00
Martin Trigaux ef824bdeff [FIX] base: correct Lesotho's currency symbol
The Lesotho Loti has the symbol M and not L
Example of use:
http://lestimes.com/businessman-xie-in-m27-million-scandal/
http://lra.org.ls/sites/default/files/2020-10/LRA%20Integrated%20Annual%20Report%202019.pdf

Fixes odoo/odoo#62807

closes odoo/odoo#65663

X-original-commit: f6b55a460bd4eb96f543d19694e7239677fd3d5a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-02-05 18:16:42 +00:00
Didier (did) 74c2d7b775 [FIX] mail: add missing useStore props
closes odoo/odoo#65650

X-original-commit: dd850198619f0ce4008118ea00d50f0cb1b40eea
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-05 17:00:11 +00:00
Martin Trigaux 76f305a556 [FIX] base: query company dependant as superuser
When retrieving company dependant values, the computed domain called
search_multi method of ir.property as normal user.
Since odoo/odoo@8f57863707 ir.property records are no longer
readable by a normal classical user.

To reproduce:
Add a domain using a company_dependant field
e.g. on res.partner, with purchase installed, modify the parent_id
field in form view to

  <field name="parent_id" ... domain="[('property_purchase_currency_id','=',property_purchase_currency_id)]" />

When clicking on the parent_id with a low priviledge user, an
access-right error is raised, as the user doesn't have access to
ir.property records

Fixes odoo/odoo#65450

closes odoo/odoo#65643

X-original-commit: 33868b4e14124800035ea99df111b35b4199ae60
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-02-05 16:20:49 +00:00
Iago Alonso ea747950a9 [CLA] signature for os-ia
closes odoo/odoo#65632

X-original-commit: 4a08c12aa04f7131b9c090e71fba6c2b3775932d
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-02-05 14:52:02 +00:00
Adrien Widart 2829ffde9f [FIX] google_calendar: prevent useless partners creation
When syncing with a Google account, if user's email is different from
Google account, the server creates a new partner. Moreover, the synced
event are not linked to the current partner.

To reproduce the error:
1. Have two Google accounts GA01 and GA02
2. With GA01, add an event to Google Calendar and add GA02 to guests
3. In Odoo, sync with Google Calendar using GA02
	- The partner linked to the current Odoo user must have an email
different from GA02's email

Error: The calendar is synced, but the user needs to check "Everybody's
calendars" to see the synced events. A new partner has been created
using GA02's email. The synced events are linked to this new partner
instead of current user's partner (`self.env.user.partner_id`).
Moreover, Google event's organizer is always added to attendees but, if
it this is indeed the case (so if the organizer is also an attendee),
`google_event.attendees` already contains this organizer.

OPW-2440033

closes odoo/odoo#65630

X-original-commit: 12cb76bdfe7a5affb7580485473be71cfa37658a
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-02-05 14:41:43 +00:00
Yannick Tivisse 0506d4e6fa [IMP] hr_contract: Add stat button to access contracts from calendars
Purpose
=======

Currently there's no easy way to retrieve all the contract using a given
calendar.

closes odoo/odoo#65621

Related: odoo/enterprise#16157
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-05 14:06:01 +00:00
Anjali 008c978a16 [IMP] delivery: group sales fields together in contact form
This commit keeps the sales related fields together in a contact form view
by moving 'property_delivery_carrier_id' field at last, instead of after
'user_id' (Sales Person).

Task Id : 2445997

closes odoo/odoo#65030

Related: odoo/enterprise#15946
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-02-04 09:38:30 +00:00
Julien Castiaux d960da8e54 [FIX] base: remove trigger coalescing
You have have a scheduled activity precisely at 8:12:34 AM (send an
email, anything). You trigger the cron using that precise moment. The
cron runs at 8:12:00 AM which is before the scheduled moment so the
activity is skipped. Imagine there is no other scheduled activity that
coudld trigger the cron, it is only run at worst 23h59 minutes later
thanks to the daily cron execution fallback.

The assumption of a29bb54 is wrong, it groups the moments the
cron should be triggered by grouping the moments on the rounded down
minute. This is not consistent with the trigger API that promises the
cron will run *as soon as possible but **not before*** the scheduled
moment.

closes odoo/odoo#65555

Task: 2452697
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-02-05 13:44:55 +00:00
Jigar Vaghela 8f647c07e4 [FIX] l10n_in: If vat is not available in delivery address then check same in customer
This below case is not working before this commit:
when Bill to Ship to where Delivery address partner is not registered and not have GSTIN

closes odoo/odoo#65599

X-original-commit: d9b409247303c6b165a7df381169f2480a19900f
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-02-05 12:26:16 +00:00
Kevin Baptiste 3d5e912da7 [IMP] hr: add a model for work locations
The work location of an employee was previously a fields.Char. That was
changed to a Many2one field to a the new model called work.location.
That had some consequences in other modules that had to be slightly
adjusted.  The modules impacted were hr, hr_appraisal, hr_payroll.

Task id: 2335646

closes odoo/odoo#63192

Related: odoo/enterprise#15235
Related: odoo/upgrade#2020
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-05 13:00:09 +00:00
Jeremy Kersten 258ebe1405 [FIX] website: contact us page, don't cache page if prefilled
Before this commit, the page can be set in cache with some data pre-filled.
Now we don't cache anymore the contactus page if you have GET params.

closes odoo/odoo#65608

X-original-commit: 4ce59c3ab26a441ad8b7f2fd038b690cf897231d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-02-05 12:14:10 +00:00
sahista pathanandThibault Delavallee 7bd984dacc [FIX] mail: correctly update new and removed subtypes when updating subscription
Currently, the subtype checked selection is not saved when the user adds and
removes subtypes. Indeed either an addition is performed, either a removal
but having both is not correctly taken into account when updating an existing
subscription.

How to reproduce
  * click on the pencil icon to edit the subscription of the follower;
  * as an example default "Discussions" will be the only one selected;
  * check "Notes" and save;
  * -> this works;
  * click again on the pencil icon and uncheck "Notes" and check "Activities"
    then save;
  * -> this does not work as only removal is performed (Activities is not
    checked);

The problem only occurs when you unchecked subtypes and checked other ones.

This commit fixes that behavior by taking into consideration both new
subtypes and subtypes to remove.

LINKS

Task ID-2205643
Task ID-2241688
COM PR #56775

X-Original-Commit odoo/odoo@d16b036638

closes odoo/odoo#65605

X-original-commit: 18cb4f6d8120a30a7f5d05eef107ac1734dd1431
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Thibault Delavallee <tde@odoo.com>
Co-authored-by: Shahista Pathan <sat@odoo.com>
2021-02-05 12:06:10 +00:00
Thibault Francois f001e026a2 [IMP] mail: improvement perf of find_or_create
Behavior before the commit
--------------------------
find_or_create define in mail module called
super if no partner is found based on the email_normalized

super call find_or_create define in base that make
a search again on the email before the creation

This cost two search every time a new partner should be created
and the search on email is less efficient than the search on
email_normalized

after the commit
----------------
Only the search on email_normalized is done before the creation

drawback: if a module that does not depends on mail module
override find_or_create the code will not be triggered anymore
the module should depends on mail module

closes odoo/odoo#65565

X-original-commit: 49d5b3813e57f2cd91d582de9b9bb534f05d2dc3
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-02-05 10:23:53 +00:00
Martin Trigaux 6e6f5bd599 [FIX] mail: fallback on English message
In case of bad translation that doesn't contain the placeholder

Context:
A bad Japanese translation was inserted

  #. module: mail
  #: code:addons/mail/models/mail_thread.py:0
  #, python-format
  msgid "Create new %(document)s"
  msgstr "新しい%(ドキュメント)を作成する"

The translation has been corrected but use the 14.0 syntax of _ method
to include placeholders and fallback on the English source term in
case of bad translation
cf odoo/odoo#52155

closes odoo/odoo#65586

X-original-commit: 48cc6b1f2b3208e8affd5f6a261751fe973c2091
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-02-05 09:25:40 +00:00
Martin Trigaux 8015bdeb4c [I18N] *: fix bad placeholder in translations
Modify manually for the languages where the language is not on Transifex

closes odoo/odoo#65564

X-original-commit: 793dc3fc1002aca15f5e0a7c33baf36a4550d180
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-02-04 16:05:39 +00:00
Michael Mattiello (mcm)andAaron Bohy 54ea956490 [FIX] web,base: save when tab/browser closes
PR [1] introduced the auto save feature (changes in form and list
views are automatically saved when the view is left, e.g. with
the pager, breadcrumbs, stat buttons, menus...).

However, there was one case that had been left aside: when we close
the tab or browser. This commit ensures that we also save the
changes in this case.

The record is saved only if it is valid, otherwise the changes are
simply lost (we don't block the tab/browser from closing itself).

Moreover, the beforeunload handler must be *almost* sync (a few
ms setTimeout seems ok, but definitely not an rpc roundtrip). For
that reason, we cannot wait for onchanges to apply before saving.

part of task 2330101

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

closes odoo/odoo#65561

X-original-commit: 9949ea14e4f27ca8c0fc84d726ad0434e2e216b8
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2021-02-04 15:46:28 +00:00
Benjamin Vray 81f907ce1c [FIX] web_editor: allow to center button with summernote
Before this commit, it was not possible to center a button using the
editor option 'align center'.

It is because, using document.execCommand(), the Chrome browser doesnt
want apply 'text-align: center' on nodes with centered children. And
the buttons have the boostrap class '.btn' which adds text-align:
center.

So the hack here is disabling the text-align property from the '.btn'
class during the execution of document.execCommand().

task-2423935

closes odoo/odoo#65566

X-original-commit: d4f38c344360713287eed22872614f46dec7e0f6
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-04 16:14:02 +00:00
Samuel Degueldre 480327381a [FIX] website, web_editor: fix empty parallax snippet not being removed
Previously, when removing all the content of a snippet, that snippet
would get automatically deleted. This was not the case for parallax
snippets because we previously intended the user to drop the parallax
snippet, empty it, and drop other content inside of it.

Recently, we added the parallax option on all snippets, rendering the
previous workflow obsolete. There is now no longer any reason to keep
empty parallax snippets. This commit fixes that.

task-2446008

closes odoo/odoo#65551

X-original-commit: 61f410b57f1c28bd6464b86d1582c22b7fd846d5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-04 15:18:36 +00:00
qsm-odoo 6d6ea9a530 [FIX] web: allow users to zoom on frontend pages
task-2446015

closes odoo/odoo#65536

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-04 13:52:03 +00:00
Xavier Morel 0d9b480ee7 [REM] core: useless translation mark
I misremembered that `_` would go look for the translation stuff
through the stack, but it only goes up to the caller of `_` itself.

Since `clean_filename` has no `cr`, `cursor` or `self` that's never
going to do anything, and it's thus completely useless.

closes odoo/odoo#65534

X-original-commit: ab3122448079d998e88f77704df62d1b1871e918
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-02-04 13:03:44 +00:00
qsm-odoo 98d8d51100 [FIX] website_mass_mailing, *: add test for newsletter popup
*: website

This is the forward-port of a stable dependency fix, needed as it
includes a test. The dependency was properly fixed with [1].

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

closes odoo/odoo#65530

X-original-commit: 76e1495b0d5eab8fc03b6daf51dbc1c148c7de53
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-04 12:10:51 +00:00
wan 49dcee62e3 [FIX] account: track the changes on account.move.line
The method `_mail_tracker`` must be called after the super call on `write`

closes odoo/odoo#65505

X-original-commit: cfd98d7b0e022b876a4cc99becc2da4f972ea030
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-02-04 07:52:03 +00:00
nie 9e6c60140e [FIX] l10n_ch: use commercial partner name instead of computed field
Follow-up of https://github.com/odoo/odoo/pull/65357

closes odoo/odoo#65523

X-original-commit: 38e78a59ace4fb590cc5c138e16acb1013fa193e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-02-04 10:36:03 +00:00
Ivan Yelizariev b09b0f7991 [FIX] l10n_it_edit: use pec addresses to test mail server
WHY: PEC server rejects default addresses, so you cannot test connection

---

opw-2371431

closes odoo/odoo#65516

X-original-commit: 876d3b3b8cf9f91a3609871f69b3ce1186d71ac6
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-02-04 09:54:03 +00:00
Nicolas Pierre bc8a5dc394 [FIX] stock: create backorders from operations in new wh
When a new warehouse is created, the receipts of the purchase orders done in
this new warehouse have different behavior than the ones from the inital
warehouse. With the new warehouse the 'Detailed Operations' tab of the
receipt is visible but not the button next to 'Done' in the 'Operations' tab.
Since no elements are inside the 'Detailed Operations', it requires a manual
entry of all elements for every receipt with backorder.
This aligns the behavior of new warehouses with the inital one, not
showing the 'Detailed Operations' tab in the receipts but allowing to use
the button of the 'Operations' tab.

closes odoo/odoo#65501

X-original-commit: 126102b5b4cd9aa32fb3eb9a763d73e4056d3462
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: npi-odoo <npi-odoo@users.noreply.github.com>
2021-02-04 07:44:30 +00:00
Julien Castiaux a29bb54633 [IMP] ir.cron: trigger on multiple moments
Often the business want to trigger the cron several time at different
moments.  The typical use case is the business holds a recordset and
needs to trigger the cron for every record.  The current solution is to
loop on each record to call `_trigger` times.

We now allow to invoke `_trigger` with an iterable of `datetime`
objects, and isolate the implementation in method `_trigger_list`.

We also removed the `delay` argument as it was not used.

closes odoo/odoo#65459

Task: 2452697
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-02-04 08:55:23 +00:00
Goffin Simon c4b4eb699d [FIX] account: Printing journal entries
Steps to reproduce the bug:

- Accounting - Journal Entries - form view - Print - Invoices

Bug:

A UserError was raised 'Only invoices could be printed.' but in the attachment,
the PDF was generated.

opw:2452278

closes odoo/odoo#65508

X-original-commit: ba32244c10396ff8605e5533e08675a64fbf9d88
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-02-04 08:17:15 +00:00
Goffin Simon 1d995c1fe8 [FIX] payment_alipay, payment_paypal: Online payment with public user
Steps to reproduce the bug:

1) Enable Paypal on the Payment Acquirers and select "BE Company CoA" on the company
2) fill the email and enable the "Add Extra Fees"
3) create an invoice on the company "BE Company CoA"
4) preview it as a public user

Bug:
An access error was raised:

Due to security restrictions, you are not allowed to access 'Companies' (res.company) records.

opw:2439896

closes odoo/odoo#65507

X-original-commit: 6b23ff3bdd1d5a3f34a431e2301db5984e0f761a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-02-04 07:53:12 +00:00
Anh Thao Pham (pta) c695b2a3d1 [FIX] account: fix unselectable Report Line in Tax Adjustments wizard
- Go to Accounting > Configuration > Tax Report
- Create a Tax Report (with Lines having Tag Name)
- Go to Accounting > Accounting > Tax Adjustments
In wizard, no Report Line can be selected for mandatory "Report Line" field.

Report lines are filtered on "report_id" field, which is a related field to the report line field.
Therefore there is no way to select a Report Line.

opw-2449295

closes odoo/odoo#65502

X-original-commit: 0311cffd89c375a6fc1babacaa19029776bfebfb
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-02-04 07:47:03 +00:00
Christophe Monniez 55986ffa21 [IMP] core: bump master version to 14.3 alpha1
closes odoo/odoo#65472

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-02-03 18:16:51 +00:00
Benoit Socias 1044a76a19 [IMP] web_editor, test_website: allow renaming custom snippet blocks
When you save your custom snippet you probably won't give it a
specific name.

Before this commit several custom snippets name was specified on save
and there was no way to modify their name afterwards

After this commit custom snippets are assigned a generated name but they
can be renamed afterwards

task-2374802

closes odoo/odoo#61483

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-03 15:13:19 +00:00
Kamesh Patel 52b87b6948 [IMP] product: Improve pricelist item form view
Purpose of the task is to Improve the current pricelist line
form view for clarity.

SPECIFICATIONS:

 - Move the price computation on top and apply on at bottom.
 - Improve the formula view and calculate dynamic tips based
on formula value.

closes odoo/odoo#63733

Taskid: 2373068
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-02-03 15:41:27 +00:00
ijas ahammed 2689915e3f [IMP] web,sms: limit the clickable area for email/phone/url widgets
The 'o_text_overflow' class whlie provided on any field, is used to
have classic ellipsis (...) for very long string. However, it is
implemented the way that it occupies the available width for the field
tag it even if the the string is small.

The same class is also utilized in some field widgets like  email, phone,
URL etc. But it has a small side-effect due to full width occupancy.

Because the above widgets rendered an anchor tag, the clickable area is on
the whole available width instead of simply on the content provided in anchor
tag. So even if user clicks on the empty area of that field, the click
action is performed (for example, in email field widget, default mail client
pops-up) which should not happen. It should behave like clickable m2o fields
where the action is performed only when clicking the content and not on the
empty area.

With this commit, we wrap the anchor tag, within a container div tag. Here,
the overflow class will be on the container div which will do it's job to
prevent the long strings from breaking the UI, and the anchor tag being its
child, will not be the full width, thus limiting the clickable area. This
commit also makes the related test cases more robust by checking proper
classes for particular widgets.

TaskId - 2345974

closes odoo/odoo#63735

Related: odoo/enterprise#15777
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-15 13:05:54 +00:00
xO-Tx 6186d0e824 [FIX] web_editor: fix background layers buttons
Example to reproduce:

Drop the "Cover" snippet and try to remove the background
image. Clicking on image button has to be done 3 times to land on the
correct result:

- First click removes image, but not filter and leaves both buttons
  checked
- Second click removes the filter and unchecks its button.
- Third click unchecks the image button.

It should be one click to remove image, filter and uncheck both buttons.

The goal of this commit is to prevent _applyOptions() from setting
background-image values if image is not optimizable. This filter will
solve the issues since empty values (badly parsed by getBgImageURL())
won't be added as background urls.

task-2312878

closes odoo/odoo#65438

X-original-commit: aba9056e7baa58decf147313678ad9d1f4522dee
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-03 08:26:36 +00:00
Odoo's Mergebot d5aec6c2f1 [MERGE] sale_timesheet: add some unit tests + clean code
Purpose
======

The goal of this PR is to write some unit tests about the changes made in Task-2388500, Task-2409761 and Task-2424382 to keep the functional features.

## Determined Sales Order Items in task and timesheets
These tests check if the Sales Order Items (SOL) computed in task and timesheets are the ones expected based on the pricing type defined in the project.

- Check if the SOL in task is the same than the one in project when we create a task in project which has a pricing type to project rate or employee rate.
- When the pricing type is employee rate and we timesheet, check if the SOL on these timesheets are the one expected, that is:
  - If the pricing type is employee rate and there are some mapping for employees, normally when we timesheet for an employee in the mapping, we should have the SOL defined in the mapping for this employee in the timesheet.
    - If we timesheet for an employee who is not in the mapping then we should have the SOL of the current task.
  - When the pricing type is task rate and we defined a customer who has some SOs with services products in project, if we create a task in this project then we should have the customer defined in the project and the one of latest SOLs if it is prepaid service and remaining_hours > 0. Otherwise, the SOL is False.
  - When the pricing type is employee rate or project rate and the customer, SO, SOL is defined in the project, if we change the customer then the SO and SOL should be False if the customer in the project is different that the one in SO selected.
    - If the pricing type is employee rate then when the customer changed in the project, the SOL in each mapping should also be removed.

## Remaining hours for prepaid service products

This test checks if the remaining hours is correctly computed in project.task when the Sales Order Item in this task contains a prepaid service product.

## Tour JS to check features in the UI

A tour js has been created to check the process with the UI. The steps are the following:
- Go to the Sales App,
- Create a sales order for Brandon Freeman for instance,
  -  In this Sales Order, we take a prepaid service product (we created this one in a unit test in python as we must not use the demo data to realize the JS tour) and the quantity ordered is 10 hours,
  - Check the product_uom field is set on 'Hours',
  - Confirm the Quotation to create the Sales Order,
- Go to the Project App,
- Create billable project to timesheet for Brandon Freeman,
- Create task in this project and add a timesheet into it,
- Show in this task that we can see the Sales Order Item linked to the createed timesheet, because this field is hidden by default.
- Go to the Settings menu and then Projects submenu.
- Create a project, and show the three different configurations to invoice services in a project. That is:
  - Task rate
  - Project rate
  - Employee rate

## Miscellaneous

The `project.task.create.sale.order` model has been removed because the wizard is unused since these 3 tasks have been merged.

task-2439304

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

closes odoo/odoo#65146

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-03 10:38:51 +01:00