Commit Graph
143632 Commits
Author SHA1 Message Date
alt-odoo 0c8816cc2b [FIX] lunch: access rights error on ir.cron for lunch manager
Small fixup of recent commit https://github.com/odoo/odoo/commit/5b8eff9d771a9071327473d2185624f69e1057c1.

closes odoo/odoo#73587

X-original-commit: d98a005c88b932a459b634cf811fb320cbea1357
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2021-07-12 15:09:18 +00:00
Ivan Yelizariev 5ed4559f6e [FIX] point_of_sale: fix error on reading multiple pos.session
Fixup for https://github.com/odoo/odoo/pull/69933

Standard deployment is not affected, because the computed fields is used in form
only, so `self==session` there, but it may be not the case with customization

Thanks @mahmoudfakhereldin for pointing the problem

closes odoo/odoo#73584

X-original-commit: 0a57e10accfa12dae5fea5bb8cb65b90bdf6e839
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-07-12 14:45:23 +00:00
Aaron Bohy 4b3dc07b52 [FIX] web: better handle error in actions
Before this commit, if there was a crash in a view or client
action during an update (i.e. the action is already in the DOM,
but an update triggers a re-rendering), the error was caught by
the action service, it wasn't displayed to the user, and the
action was re-rendered again (which could obviously result in the
same error being thrown again and again).

With this commit, we properly show the error, and we do not try
to re-render the action.

closes odoo/odoo#73507

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-12 13:40:26 +00:00
Aaron Bohy a8976144fe [FIX] web: correctly call dialog service 2021-07-12 13:40:26 +00:00
William Henrotin 7e83421308 [FIX] purchase_stock: merge PO in predefined date range
Before this commit, two POs are merged if their scheduled date is set on
the same day. To relax a little bit this constrain, this commit adds a
system parameter to extend the delta days between two scheduled dates of
POs to be merged.

closes odoo/odoo#73068

Opw: 2557125
X-original-commit: 883112c8db1d3c5cc87715e6b2028e84d09512de
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-07-01 10:51:52 +00:00
Ivan Yelizariev c5b91225c6 [FIX] mrp: fix backorder name generation
backorder name is generated in `_get_name_backorder`, which tries to change last
numbers first or adds new number to the end. The problem comes when we need to
generate more than 1000 backorders (e.g. on using mrp_subcontracting with
products tracked by serial): in that case the name would be

> WH/XXX/00001-1000-1001-1002-1003-1004-1005-1006-1007-1008-1009-...

Which is not user friendly and may lead to postgres constrain errors:

> psycopg2.errors.ProgramLimitExceeded: index row size 2712 exceeds btree version 4 maximum 2704 for index "mrp_production_name_uniq"

Fix it by using `re.sub`

STEPS:
Create a few test products (4 or 5) with route Buy + Resupplier subcontractor
from order.
Then make product which:
- has BoM and BoM type = subcontracting with components test 2, test 3, test 4, ...
- has costing method = FIFO , inventory valuation = automated, Tracking = unique SN
Now Create a receipt transfer of 4000 units. Click "Validate" and use "Create backorder" option.

---

opw-2579461

closes odoo/odoo#73578

X-original-commit: 9220ff89659898df2a1e1951b0466fc5adaa2c97
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-07-12 13:26:19 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
xO-Txandqsm-odoo 92b184f6e2 [FIX] web_editor: set style for selected color combination
Part of https://github.com/odoo/odoo/pull/69857
task-2431484

closes odoo/odoo#73562

X-original-commit: 6e6adad730956c6ddceb1f2461a0eb341edf7433
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-07-12 11:21:02 +00:00
xO-Txandqsm-odoo 54fbee30c7 [FIX] web_editor: fix shapes snippet option
- Exclude '.o_we_pager_header' from click behaviour so clicking on the
  shape dropdown does not close it if an user misclicks next to a pager
  button.

- Add borders on navigation buttons in shapes option to improve
  visibility.

- Cut the last visible option in the shapes list, this way the user
  will understand that he can scroll.

Part of https://github.com/odoo/odoo/pull/69857
task-2431484

X-original-commit: 0d8e4368775bf7fd1aca1376e57c5847b283bded
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-07-12 11:21:00 +00:00
Víctor Martínez 5e6fe19455 [FIX] sale: group invoices by partner as expected
Steps to reproduce the problem:

- Create 2 partners A and B.
- Create sales orders in this order: Order Partner A + Order Partner B + Order Partner B + Order Partner A + Order Partner B
- Select all that orders.
- Invoice them.

Current behavior: 4 invoices are created.

Expected behavior: Only 2 invoices are created: Invoice Partner A + Invoice Partner B

This is because itertools.groupby expects elements to be pre-sorted by
the grouping key, so we sort them accordingly.

closes odoo/odoo#73559

X-original-commit: 3b0bd35c6c9e54b7b0c21cc28f55f520c884d9ad
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-07-12 10:57:07 +00:00
Adrien Widart cc5ff7ac8c [FIX] sale_stock: set invoice_status value when delivery is canceled
Suppose the option "Lock Confirmed Sales" enabled and a product with the
invoicing policy set to "Delivered quantities". When cancelling the
delivery of such a product, the invoice status of the associated SO
should be 'Nothing to Invoice'

To reproduce the error:
1. In Settings, enable "Lock Confirmed Sales"
2. Create a product P:
    - Type: Consumable
    - Invoicing policy: Delivered quantities
3. Create a SO with one P
4. Confirm the SO
5. Cancel the SO's delivery
6. Check the invoice status (`invoice_status`)
    - 12.0: Either by modifying the view, or by adding the field with
studio or directly via PSQL
    - 13.0+: The field can be enabled thanks to the options of the tree
view

Error: The invoice status is "Fully Invoiced" but the product hasn't be
delivered and no invoice has been created

OPW-2464343

closes odoo/odoo#73558

X-original-commit: b87d06da379abff8fc40352192699f6b44727797
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-07-12 10:56:37 +00:00
Yannick Tivisse 56d8c387ba [IMP] hr_contract: Display first contract date on employee public form
Purpose
=======

The "first contract date" is a usefull information for anybody who onboards
new colleagues. Issue: this information is not on the "public employee" and so,
visible only by hr officer (minimum).

With this task, we would like make this field public and visible by any internal
user in the system. In this way, we don't have to provide too many access rights
to any employees.

closes odoo/odoo#73552

Taskid: 2584098
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-07-12 10:07:17 +00:00
Thibault Delavallée 38bf2c2de5 [REF] mail: remove plus addressing on bounce alias
Starting from this commit bounce addresses set in emails will not use any
plus addressing. They will always be ``bounce_alias#@alias_domain`` and
not ``bounce_alias+<mail_id>-<mail_model>-<mail_res_id>@alias_domain``.

Reasons are

  * this plus addressing adds information we do not use anymore since a long
    time as bounced messages are found using their message ID and not any
    information coming from this bounce address;
  * this generates unnecessary noise;
  * not all email providers really support plus addressing as a mean to
    generate "fake" additional email addresses;

This is the followup of odoo/odoo#71244 where a solution to avoid plus
addressing was done in table. We can now safely remove this feature in
master as a cleaning step.

Task ID-2577328

closes odoo/odoo#73363

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-07 10:36:36 +00:00
qsm-odoo c8c6e38f97 [FIX] website: restore overlay for timeline cards edition
With [1], not all overlays are displayed anymore but we rather show the
parent one in some cases. The timeline cards were considered as one of
those cases while it should not, as it prevents to use the overlay
buttons allowing to switch the cards order.

[1]: https://github.com/odoo/odoo/commit/9bbe5be3fb0d995374a369851df3641979d8e553

Discovered while working on task-2431484

closes odoo/odoo#73515

X-original-commit: 26708e168c717ae7e3a29c7705c80679b8e45f7d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-12 08:26:28 +00:00
Robin Heinz 0ddb06b5ec [FIX] pos_restaurant: Fix bill receipt
When bill printing, the order was done instead of just going back to the order.
Now we don't validate the order anymore when showing the printbill receipt screen anymore.

closes odoo/odoo#72142

X-original-commit: 0e8d86238e56d7a248af340e13036444b0e49d4e
Related: odoo/enterprise#19007
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-12 07:49:00 +00:00
Robin Heinz e7899c2f13 [FIX] point_of_sale: fiscal data module error.
Allow to handle fiscal data module error and to not display the receipt in case the order is not validated
Before, the user couldn't see the error and he could see a receipt that was not validated.
Now we add a mechanism to handle all error that could occur with a fiscal data module.

X-original-commit: 45646762467d589c3fb9c031841ae5f8137cf2cd
2021-07-12 07:49:00 +00:00
Robin Heinz c8ff9d7c46 [FIX] point_of_sale: Disallow to close set closing control when orders in draft
Before, we ended stuck while using cash control and had order in draft. While in the closing control state, we could go back to the pos to end the order but it was needed to close the session.
Now we force all the orders to be done before changing the state of the session.

X-original-commit: 55bd39a9854ed446d45033a3992aab0938d27a86
2021-07-12 07:48:04 +00:00
xO-Tx 6ab57140ef [IMP] website: add background image to quotes snippet
Part of https://github.com/odoo/odoo/pull/68061
task-2431484

closes odoo/odoo#68061

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-12 08:30:57 +00:00
xO-Tx 1bea3d5dd8 [IMP] website, *: expand click handler on theme color palettes
*: web_editor

The goal of this commit is make the whole we-collapse elements
clickable for theme color palettes.

Part of https://github.com/odoo/odoo/pull/68061
task-2431484
2021-07-12 08:30:57 +00:00
xO-Txandqsm-odoo ebba667508 [IMP] website: add titles on table buttons for chart snippet
Part of https://github.com/odoo/odoo/pull/68061
task-2431484

Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-07-12 08:30:57 +00:00
xO-Tx 2ede351fd3 [IMP] website: improve timeline options
In this commit, the following changes have been made:

- Add the "Add Year" option to be able to add new item in timeline.
- Add option to change line color.

Part of https://github.com/odoo/odoo/pull/68061
task-2431484
2021-07-12 08:30:57 +00:00
qsm-odoo a90ddbd420 [IMP] website: allow to add products in pricelist
The goal of this commit is to add the "Add Product" option
for "Pricelist" to be able to add new products in current section.

Part of https://github.com/odoo/odoo/pull/68061
task-2431484
2021-07-12 08:30:57 +00:00
xO-Tx 1f8f4df0ab [IMP] website: allow to add items in table of content
The goal of this commit is to add the "Add Item" option
for 'table of content' to be able to add new items.

Part of https://github.com/odoo/odoo/pull/68061
task-2431484
2021-07-12 08:30:57 +00:00
xO-Tx 0c02acedcc [IMP] website: improve accordion options
In this commit, the following changes have been made:

- Set the "Add Item" button to add new blocks in 'Accordion' snippet.
- Make the scroll animation optional on block reordering and disable it
  for 'Accordion' blocks.

Part of https://github.com/odoo/odoo/pull/68061
task-2431484
2021-07-12 08:30:57 +00:00
xO-Tx 22fdc22cbe [IMP] website: restore tabs text content
The goal of this commit is to fill the Tabs snippet with content
(text snippet template in each tab).

Part of https://github.com/odoo/odoo/pull/68061
task-2431484
2021-07-12 08:30:57 +00:00
xO-Tx e28f264ef6 [IMP] website_form: keep label when input changes
Changing the input type should not change the label name.

The goal of this commit is to keep old label when input type
changes and set the default label names for new fields only.

Part of https://github.com/odoo/odoo/pull/68061
task-2431484
2021-07-12 08:30:57 +00:00
xO-Tx ebfa28638b [IMP] website, *: allow to handle snippets with a list of items
*: web_editor

The goal of this commit is to add the "MultipleItems" option
to be able to add new elements in snippets with a list of items.

In this commit, the option is used for "Media List" & "Tabs".

Part of https://github.com/odoo/odoo/pull/68061
task-2431484
2021-07-12 08:30:57 +00:00
xO-Tx 33b74a0fba [IMP] website: improve carousel options
In this commit, the following changes have been made:

- Add "Add Slide" button for carousel snippet.
- Add tooltips and update style for slide-related buttons.

Part of https://github.com/odoo/odoo/pull/68061
task-2431484
2021-07-12 08:30:57 +00:00
xO-Tx 7ea2350255 [IMP] web_editor: set tooltips on sidebar elements
The goal of this commit is to add BS tooltips for editor
sidebar elements using "data-tooltip" attribute to select targets.

The code used to show tooltips on sidebar tab buttons is removed
in this commit since it has no effect after [1].

[1]: c71cf6c618b48da36fbc5063140703312248bc09

Part of https://github.com/odoo/odoo/pull/68061
task-2431484
2021-07-12 08:30:56 +00:00
Demesmaeker c5e9e03578 [IMP] delivery: mandate the tracking reference for amazon SO
Added a hook in delivery to check if an Amazon order's delivery is Amazon compliant.

task-2573260

closes odoo/odoo#73494

X-original-commit: eb23d10b22c0cafc935d01effc680aebdbdf0057
Related: odoo/enterprise#19578
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-07-09 11:59:31 +00:00
Josse Colpaert 6ab7290c36 [FIX] l10n_latam_invoice_document: do not restrict the inverse/onchange too much
The onchange/inverse would only be triggered in the case of manual document number (vendor bills)
or not highest_name, but in other localizations there are cases where we want to be more flexible
to when we change it and instead of inheriting the method, we can relax it here.

Also, it should have been avoided before already to change the document number and type in those situations
through the attributes in the view e.g.  This seems to have been more like an extra fail-safe blocking us
elsewhere.

closes odoo/odoo#73397

X-original-commit: a3f8e53deb45034250820ff54ba76288af167b6e
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-07 17:42:10 +00:00
Nils Hamerlinck 5b3bf7254f [ADD] http: allow env variable to disable session_gc
Introduce the env variable ODOO_DISABLE_SESSION_GC to disable session_gc
on high-volume systems and avoid random slow calls as discussed in
https://github.com/odoo/odoo/pull/70063

closes odoo/odoo#73376

X-original-commit: a61d459a200a56fba74f655f73b10d1ddd8e3a1e
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-07-07 13:17:03 +00:00
Mohammed Shekha ef21b193cd [FIX] web: datepicker week date offset
PURPOSE

The week dates computed by our datepicker do not meet the ISO 8601 standard:

The ISO 8601 definition for week 01 is the week with the first Thursday of the
Gregorian year (i.e. of January) in it.
The following definitions based on properties of this week are mutually
equivalent, since the ISO week starts with Monday:
- It is the first week with a majority (4 or more) of its days in January.
- Its first day is the Monday nearest to 1 January.
- It has 4 January in it. Hence the earliest possible first week extends from
Monday 29 December (previous Gregorian year) to Sunday 4 January, the latest
possible first week extends from Monday 4 January to Sunday 10 January.
- It has the year's first working day in it, if Saturdays, Sundays and 1
January are not working days.

If 1 January is on a Monday, Tuesday, Wednesday or Thursday, it is in W01. If
it is on a Friday, it is part of W53 of the previous year. If it is on a
Saturday, it is part of the last week of the previous year which is numbered
W52 in a common year and W53 in a leap year. If it is on a Sunday, it is part
of W52 of the previous year.
https://en.wikipedia.org/wiki/ISO_week_date#First_week

Since Jan 1st 2021 falls on a Friday, according to the ISO 8601 standard above,
the first week of 2021 is the one starting on Jan 4th.
Nevertheless, it looks like our datepicker simply assumes that the first week
of the year is simply the one including Jan 1st.

SPECIFICATION

Fix the week dates of our datepicker to meet the ISO 8601 standard.

Task - 2458112

closes odoo/odoo#73270

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2021-07-12 06:44:24 +00:00
Arnaud Joset 48592a6b75 [FIX] account,l10n_be_edi,point_of_sale,sale: improve terms and conditions
Before this commit, the narration field was not filled with default terms and conditions when it was defined in the company settigns.

closes odoo/odoo#73501

Taskid: 2587051
X-original-commit: 49ca71337c8e0f00a5f200d5e97c1c246a6ccd03
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-07-09 13:07:05 +00:00
Alvaro Fuentes d25b4b020d [FIX] account: fix tuple domain
Domains must be lists on calls to `_where_calc`.
```
 Traceback (most recent call last):
   File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 162, in crawl_menu
    self.mock_action(action_vals)
   File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 253, in mock_action
    mock_method(model, view, fields_list, domain, group_by)
   File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 366, in mock_view_tree
    self.mock_web_read_group(model, view, domain, group_by, fields_list, limit_group=5)
   File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 442, in mock_web_read_group
    self.mock_web_search_read(model, view, [group["__domain"]], fields_list)
   File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 402, in mock_web_search_read
    data = model.search_read(domain=domain, fields=fields_list, limit=80)
   File "/home/odoo/src/odoo/14.0/addons/account/models/account_move.py", line 3645, in search_read
    return super(AccountMoveLine, self.with_context(domain_cumulated_balance=to_tuple(domain or []), order_cumulated_balance=order)).search_read(domain, fields, offset, limit, order)
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 4839, in search_read
    result = records.read(fields)
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3020, in read
    return self._read_format(fnames=fields, load=load)
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3040, in _read_format
    vals[name] = convert(record[name], record, use_name_get)
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5666, in __getitem__
    return self._fields[key].__get__(self, type(self))
   File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 1019, in __get__
    self.compute_value(recs)
   File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 1175, in compute_value
    records._compute_field_value(self)
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 4061, in _compute_field_value
    getattr(self, field.compute)()
   File "/home/odoo/src/odoo/14.0/addons/account/models/account_move.py", line 3655, in _compute_cumulated_balance
    query = self._where_calc(self.env.context.get('domain_cumulated_balance'))
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 4247, in _where_calc
    domain = [(self._active_name, '=', 1)] + domain
 TypeError: can only concatenate list (not "tuple") to list
```

Observed on upgrade request 11722
Ref 9d28c71a71 since saas-13.2

closes odoo/odoo#73522

X-original-commit: e24295da8436b4d24cd03f6ac1f22e86465f950d
Signed-off-by: Christophe Simonis <chs@odoo.com>
2021-07-09 20:50:24 +00:00
william-andre 10db78c7a5 [IMP] account: yearly sequence for sales journals
PURPOSE
Align default sequence numbering on customer's expectation per journal.
Because of some feedbacks received, we acknowledge that most users will
want an annual sequence on sales documents and a monthly sequence for
the rest.

SPECIFICATION
By default, on customer invoices/credit notes (the default sequence
should be annual.)
We don't want an option and therefore, we make a decision ; user can
change it by resequencing if he doesn't like it.

task-2591145

closes odoo/odoo#73278

Related: odoo/enterprise#19565
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-09 08:43:59 +00:00
Odoo's Mergebot dfe2380f86 [MERGE][ADD] mail(_list): move mailing lists to their own module
RATIONALE

Discussion channels currently have two main operating modes: Discuss channels
(classic, chat, livechat) and Mailing lists (activated through "send email"
checkbox). This current model has several drawbacks

  * mailing lists are meant to be used by external people. Discuss/Inbox
    display has no use for external people;
  * mailing lists have a frontend page (website_mail_channel) that also
    displays private channels (if people have access) content, which makes
    no sense;
  * moderation is available only on mailing lists, meaning the moderation
    mechanism is useless for a majority of channels;
  * incoming Discord-like behavior of channels will further make mailing
    lists different from chat channels;

PURPOSE

Split mailing list from discussion channels. Purpose of this new module
is to manage the mailing lists. Now they are no more <mail.channel>
with email_send set to True but instead use their own model.

SPECIFICATIONS

The mailing list is basically a public discussion that users can have
by email. They can respond to email, send new messages, etc... All the
members of the mailing list will receive the message by email.

Users can moderate the emails of the mailing list in the same way as
they did with the "email" mail channel.
- *accept*, will accept the emails and send it to the members of the
  mailing list
- *discard*, will drop the email without warning the author
- *reject*, will drop the email and send a notification email to the
  author
- *allow*, will accept the email and all other pending emails of the
  same author and create a whitelist for him
- *ban* will drop the email and all other pending emails of the same
  author and create a blacklist for him

Now a portal view is available (in /groups) and replace the old module
"Website Mail Channel" that was removed in the previous commit. In this
view, users can subscribe / unsubscribe to the mailing lists and some
links to this portal view are added in the footer of the emails of the
mailing list.

As before with mail channels, you can send guidelines to the members,
notify the moderators whose an action is required (in a CRON), send back
an email to the author of an email to say "Your message is waiting
moderation"...

LINKS

Task-2510267
See odoo/odoo/pull/71599
See odoo/enterprise/pull/19296
See odoo/upgrade/pull/2600

closes odoo/odoo#71599

Related: odoo/enterprise#19296
Related: odoo/upgrade#2600
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-09 20:07:18 +02:00
Jeremy Kersten f7c43b4343 [FIX] website: parse result of_render as html
`_render('<h1> quick &amp; flupke </h1>') `=>` '<h1> quick & flupke </h1>'`
what cannot be parsed in xml after.

Before this commit, if you try to install a page that contains a '&' via
the configurator, you had a traceback:
   xmlParseEntityRef: no name, line 1, column 13

closes odoo/odoo#73509

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-09 14:42:10 +00:00
Ivan Yelizariev 9289cc03ab [IMP] point_of_sale: store related company_id field in pos.payment
it speeds up checking multi-company rule, partically, computed field
`total_payments_amount` works faster in large databases: 2,8 sec -> 0,01
sec (see fe3e84085f )

closes odoo/odoo#73505

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-09 13:53:48 +00:00
std-odoo 8b814947d3 [ADD] website_mail_group: re-add the <mail.group> website snippets
Purpose
=======

This snippets was originally in the "Website Mail Channel" module,
but it has been removed.

The snippet allow the user to subscribe to a specific mailing list.

If the current user has no access to the mailing list (because of ACL
rule) the widget will be invisible for him.

Links
=====

Task-2510267
See odoo/pull/71599
See odoo/enterprise/pull/19296
See odoo/upgrade/pull/2600
2021-07-09 12:32:28 +00:00
std-odoo 2d359b909b [ADD] mail_group: add a new module to manage the mailing lists
Purpose
=======

The purpose of this new module is to manage the mailing lists. Now they
are no more <mail.channel> (will email_send set to True) but they have
their own model.

Specifications
==============

The mailing list are basically a public discussion that users can have
by email. They can respond to email, send new messages, etc... All the
members of the mailing list will receive the message by email.

Users can moderate the emails of the mailing list in the same way as
they did with the "email" mail channel.
- *accept*, will accept the emails and send it to the members of the
  mailing list
- *discard*, will drop the email without warning the author
- *reject*, will drop the email and send a notification email to the
  author
- *allow*, will accept the email and all other pending emails of the
  same author and create a whitelist for him
- *ban* will drop the email and all other pending emails of the same
  author and create a blacklist for him

Now a portal view is available (in /groups) and replace the old module
"Website Mail Channel" that was removed in the previous commit. In this
view, users can subscribe / unsubscribe to the mailing lists and some
links to this portal view are added in the footer of the emails of the
mailing list.

As before with mail channels, you can send guidelines to the members,
notify the moderators whose an action is required (in a CRON), send back
an email to the author of an email to say "Your message is waiting
moderation"...

Links
=====

Task-2510267
See odoo/odoo/pull/71599
See odoo/enterprise/pull/19296
See odoo/upgrade/pull/2600
2021-07-09 12:32:28 +00:00
xO-Tx a075536837 [FIX] website, web: fix first link of table of content snippet
The first element is now selected once the snippet is visible at the
bottom of screen.

task-2431484

closes odoo/odoo#73499

X-original-commit: e2cfaf8e58c3f267503fc7ec81d78f728e75b506
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-09 12:07:24 +00:00
std-odoo 583cc5d439 [REM] website_mail_channel: remove the module "website_mail_channel"
Rationale
=========

Currently, mail channels have 2 modes
- They can be used like Discuss channel (chat, livechat, group)
- They can be used like a Mailing List (with the "email_send" field)

The mix of both feature in the same model cause some code complexity.
Several fields are not used in both cases (moderation related field)
and the future "Discord like" Discuss will even push the mail channel
further than the usage of the mailing list.

Because of all those reasons, we want to split the 2 mains features of
the mail channels into 2 different modules and models.

Purpose
=======

Remove the module "website_mail_channel" because we will merge it into
a new one, "mail_group" and "website_mail_group".

This new module "website_mail_group" will contains the website snippets
but this snippets will only work the the new <mail.group> model and
not with <mail.channel> like before.

Links
=====

Task-2510267
See odoo/odoo/pull/71599
See odoo/enterprise/pull/19296
See odoo/upgrade/pull/2600
2021-07-09 11:16:38 +00:00
std-odoo 9183a86fde [REM] mail: remove "email_send" field on the mail channel
Purpose
=======

Remove the "email_send" field on the <mail.channel> (mass_mailing named
on the JS side).

This feature will be introduced with a new model (<mail.group>) in a
new module in the next commit.

Remove the email notification support on the channel, so now the mail
channels work only by chat.

Remove the "subject" on the Discuss side because this was used only on
"email" channel.

Technical
=========

In the mail channel model we can drop the usage of the blacklist as well
as the usage of the "email_to" field. Those two features were mainly
used for mailing list and have no utility for "chat like" channel.

Links
=====

Task-2510267
See odoo/odoo/pull/71599
See odoo/enterprise/pull/19296
See odoo/upgrade/pull/2600
2021-07-09 11:16:38 +00:00
std-odoo 59d6bb23d7 [REM] mail: remove mail channel moderation
Rationale
=========

Currently, mail channels have 2 modes
- They can be used like Discuss channel (chat, livechat, group)
- They can be used like a Mailing List (with the "email_send" field)

The mix of both feature in the same model causes some code complexity.
Several fields are not used in both cases (moderation related field)
and the future "Discord like" Discuss will even push the mail channel
further than the usage of the mailing list.

Because of all those reasons, we want to split the 2 mains features of
the mail channels into 2 different modules and models.

Purpose
=======

This commit remove the moderation feature of the mail channel
(email_send=True). This will be re-implemented in a separate module
in the next commit.

Do not be able to check messages in Discuss anymore because this
feature is only used to moderate the message and this feature will be
spitted in a new module "mail_group".

Links
=====

Task-2510267
See odoo/odoo/pull/71599
See odoo/enterprise/pull/19296
See odoo/upgrade/pull/2600
2021-07-09 11:16:38 +00:00
Francois (fge)andSergey Shebanin 7f10ca0d7c [IMP] web: make the hotkey service overlay modifier customizable
From this commit:
- It is possible to modify the overlayModifier allowing to display the
overlay and to access the data-hotkeys defined in the Dom.
- Adding a hotkey using the service or hook does not add the
overlayModifier anymore.

closes odoo/odoo#73279

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Sergey Shebanin <sergey@shebanin.ru>
2021-07-09 09:16:57 +00:00
Francois (fge) 20e157dd01 [FIX] web: doesn't apply the invisible data-hotkey
The purpose of this commit is to prevent the activation of data-hotkeys
associated with hidden elements of the dom.

Task-2591069 - BUG 1
2021-07-09 09:13:58 +00:00
Nicolas Bayet 4600086e7a [IMP] web_editor: move odoo-editor into odoo
The code of the Odoo editor was on another repository
and that created unnecessary overhead. This commit move
the code inside Odoo and slightly change the folder
structure.

Related PR:
saas-14.3: #73345
saas-14.4: #73348

closes odoo/odoo#73272

Master: #73272
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-07-08 15:31:45 +00:00
Younn Olivier ea3b1ec9a0 [IMP] web_tour: center tip on texts in tours
Before, the tour tip was centered on the container tag instead of the
text content. That asymmetry was visible for text with a text-align
different than center.

Therefore the _reposition method of the tip has been modified to better
handle such text elements. If its anchor element has inner text we
use a range to get the width of the text.

task-2477212

closes odoo/odoo#67771

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-09 07:53:06 +00:00
Florent de Labarre d6217a86a7 [FIX] point_of_sale : show reversed payment
- In POS with pos_six installed
- create an order
- add a payment with SIX, paid
- Click on reversed
- Pay in cash

--> Issue on the receipt the payment and refund by SIX doesn't appear on the ticket

closes odoo/odoo#73498

X-original-commit: 3e8d921318e86631b73c8c92c2e462fd0d761582
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-09 11:49:25 +00:00