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.
closesodoo/odoo#73507
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
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.
closesodoo/odoo#73068
Opw: 2557125
X-original-commit: 883112c8db1d3c5cc87715e6b2028e84d09512de
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
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
closesodoo/odoo#73578
X-original-commit: 9220ff89659898df2a1e1951b0466fc5adaa2c97
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
- 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>
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.
closesodoo/odoo#73559
X-original-commit: 3b0bd35c6c9e54b7b0c21cc28f55f520c884d9ad
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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
closesodoo/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>
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.
closesodoo/odoo#73552
Taskid: 2584098
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
closesodoo/odoo#73363
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#73515
X-original-commit: 26708e168c717ae7e3a29c7705c80679b8e45f7d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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.
closesodoo/odoo#72142
X-original-commit: 0e8d86238e56d7a248af340e13036444b0e49d4e
Related: odoo/enterprise#19007
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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
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
*: 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
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
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
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
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
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
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
*: 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
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
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
Added a hook in delivery to check if an Amazon order's delivery is Amazon compliant.
task-2573260
closesodoo/odoo#73494
X-original-commit: eb23d10b22c0cafc935d01effc680aebdbdf0057
Related: odoo/enterprise#19578
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
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.
closesodoo/odoo#73397
X-original-commit: a3f8e53deb45034250820ff54ba76288af167b6e
Signed-off-by: William André (wan) <wan@odoo.com>
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/70063closesodoo/odoo#73376
X-original-commit: a61d459a200a56fba74f655f73b10d1ddd8e3a1e
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
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
closesodoo/odoo#73270
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Before this commit, the narration field was not filled with default terms and conditions when it was defined in the company settigns.
closesodoo/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>
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
closesodoo/odoo#73522
X-original-commit: e24295da8436b4d24cd03f6ac1f22e86465f950d
Signed-off-by: Christophe Simonis <chs@odoo.com>
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
closesodoo/odoo#73278
Related: odoo/enterprise#19565
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
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
closesodoo/odoo#71599
Related: odoo/enterprise#19296
Related: odoo/upgrade#2600
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
`_render('<h1> quick & 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
closesodoo/odoo#73509
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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 )
closesodoo/odoo#73505
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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
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
The first element is now selected once the snippet is visible at the
bottom of screen.
task-2431484
closesodoo/odoo#73499
X-original-commit: e2cfaf8e58c3f267503fc7ec81d78f728e75b506
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
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
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
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.
closesodoo/odoo#73279
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Sergey Shebanin <sergey@shebanin.ru>
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: #73348closesodoo/odoo#73272
Master: #73272
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
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
closesodoo/odoo#67771
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- 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
closesodoo/odoo#73498
X-original-commit: 3e8d921318e86631b73c8c92c2e462fd0d761582
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>