- Remove FEC from res.config.settings - everything is now linked in the import guide (in enterprise)
- Compute debit and credit from opening_balance
- Update import templates for account.account, account.move, res.partner
- Small UI changes in base_import: add an action title and improve the template button design
task-2888243
closesodoo/odoo#96291
Related: odoo/enterprise#29627
Related: odoo/upgrade#3794
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Since the new Overview report can compute the lead days and availability
delays from a BoM and all of its components and/or subassemblies, we can
use this data to compute the days that would be required to resupply all
components from a BoM.
So we add a button to compute it directly on the product form.
Task-2628323
Part-of: odoo/odoo#93194
Add additional requirement to identify buy route in BoM Overview report
if mrp_subcontracting is installed to not get confused between the two
cases.
Task-2628323
Part-of: odoo/odoo#93194
The 'Structure & Cost' report has been changed to 'Overview', changing
some of its functionnalities. The override previously done in
mrp_subcontracting must be adapted to match the changes done in the mrp
module.
Also, the report has been converted to OWL in the process, requiring
changes in the overriden files as well.
Finally, the now obsolete code only related to the old 'Structure &
Cost' report has been removed.
Task-2628323
Part-of: odoo/odoo#93194
Add support for "buy" route recognition in the BoM overview report, as
well as calculating receipt delay for this kind of route
Task-2628323
Part-of: odoo/odoo#93194
Changes "Structure & Cost" report to "Overview", as the goal for this
report is improved.
The point is to have on a single report all components and sub-assemblies
that make it up, in parallel with the route and lead times associated to
each. This way it becomes easier to identify issues, such as:
- Missing routes.
- Longer lead times on a specific sub-assembly.
- Unavailable component in the foreseable future.
- ...
Also did the conversion to OWL, changing drastically the structure of
the report.
Task-2628323
Part-of: odoo/odoo#93194
This adds many improvements to table editing in Odoo Editor, as well as some styling improvements.
New features :
- Rectangular cell selection
- Changing the color of a cell
- Buttons to add/remove/move rows/columns
- Resize rows/columns
task-2858455
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#92200
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The commands to add rows and columns in certain positions were
superfluous as commands to add rows and columns suffice if you pass them
a position argument.
Part-of: odoo/odoo#92200
When the user picks a color, the colorpicker closes, triggering
color_leave. This is conceptually wrong and can cause issues as it
reverts the current history step.
Part-of: odoo/odoo#92200
This adds a menu to manipulate table rows and columns when hovering
over them. Hovering over the first row shows the menu for the hovered
column.
Hovering over the first column shows the menu for the hovered row.
The buttons in the menu allow the user to add/move/remove rows/columns.
task-2858455
Part-of: odoo/odoo#92200
With this, when whole table cells are selected and the user picks a
color in the toolbar's colorpicker, that color is applied to the whole
cell rather than to the text only.
task-2858455
Part-of: odoo/odoo#92200
This adds the feature of showing the appropriate resize cursor depending
on which border (vertical or horizontal) is hovered in a table.
task-2858455
Part-of: odoo/odoo#92200
This adds the possibility to select whole cells, rectangularly rather
than line per line from left to right then top to bottom.
task-2858455
Part-of: odoo/odoo#92200
- reduce the default row height to get a padding of .5rem instead of .75
- use a darker grey for table border color
task-2858455
Part-of: odoo/odoo#92200
When converting a paragraph to a checklist, we first apply the checklist
class and then take the paragraph's attributes and apply it to the new
list. If said attributes included the "class" attribute, it wrote over
the checklist class.
Part-of: odoo/odoo#92200
When the editor's test utils set the selection, they did not trigger the
selectionchange event, which means the editor's listener didn't get
called.
Part-of: odoo/odoo#92200
`getDeepRange` fetched a range on potentially the wrong document and
`getTraversedNodes` created a node iterator on potentially the wrong
document, when the editable was not in the DOM.
Part-of: odoo/odoo#92200
If an error was thrown during a call to `testEditor` (eg, a test
failed), we never went through the code that destroys the editor and
cleans the DOM. This catches any error to throw it only at the end of
the function.
Part-of: odoo/odoo#92200
Introduce a new Dynamic Placeholder Generator
in mass mailing and SMS creation.
Using a specific character (#) in subject or via the PowerBox in body
we open a field selector popup, which can be use to select
the wanted field and enter a default value. on validation, the dynamic
placeholder will be inserted in the corresponding input/editable.
task-2154624
closesodoo/odoo#71878
Related: odoo/enterprise#30333
Related: odoo/upgrade#3766
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
We remove the existing dynamic placeholder generator tab,
in mail and sms creation views.
In preparation of the implementation of a new way to generate
the dynamic placeholders
task-2154624
Part-of: odoo/odoo#71878
To Reproduce
=============
- share a project with a portal user (with editing rights)
- connect to portal with this user and try to group tasks by deadline
Problem
=======
An access error is raised stating that this user doesn't have right to read
`deadline_field:week` field.
The issue comes from this line :
https://github.com/odoo/odoo/blob/42cb8ad0a31162d9d1b93e4eae0562c89685fe3c/addons/project/models/project.py#L1621
where `fields` contains `date_deadline:week` but `self.SELF_READABLE_FIELDS` contains `date_deadline`
that's why `date_deadline:week` will remain in `unauthorized_fields` .
Solution
=========
To solve the issue we take only the field name from the groupby when computing `fields_list` that
will be checked by `_ensure_fields_are_accessible`
opw-2949047
closesodoo/odoo#98953
X-original-commit: 1d0a62d0d235a4f0686e17033bb9d144d5583907
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
Before this fix, resequencing would use values from _get_sequence_format_() run from an empty model.
This method result is influenced by the sequence_override_regex param of the move journal.
This means that if the journal of the moves that are resequenced has a sequence_override_regex param, it will be ignored in the wizard.
This fix run the _get_sequence_format_() method on the first move to take the journal into account.
Note that the wizard only allows resequencing moves from one same journal.
closesodoo/odoo#98926
Task: opw-2825699
X-original-commit: b22c37a5f173161b4a5f798462ea05142bb9334a
Signed-off-by: William André (wan) <wan@odoo.com>
If datetimepickers were used too soon after page loading, they would use
the wrong format and UI options as the code in charge of initializing
those options was not fully lazy loaded yet.
With this patch, we prevent the tempusdominus lib to consider pickers
that are in a body that is marked by the lazyloader during the lazy
loading of JS files. We could potentially not add the lib attribute
(data-toggle="datetimepicker") on those elements and let the business
code initializing the pickers add it but that would not have been a
stable fix and it may be better this way as this works generically.
opw-2944720
closesodoo/odoo#98917
X-original-commit: 7e012340d3adcd64e829a5dca34173da24d649bc
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Steps :
In a ONE company environment,
\- Go to Project Task list view.
\- Display 'Customer' column.
\- Select multiple records (multi-edit).
\- Click on a 'Customer' cell to display the dropdown list.
Issue :
Traceback : company not found.
Cause :
partner_id's domain refers to company_id,
which is not present in the vue if not in multicompany.
Fix :
Add it in ivisible.
closesodoo/odoo#98913
Signed-off-by: Xavier <xbo@odoo.com>
- fix typo in model manager: "return" -> "continue" in loop
- fix typo in model field: "models" read from record not from field itself
- fix reading obsolete fields in message view
- move listeners on records directly rather than storing a map on model manager
(code a bit easier to read, and issues on deleted records easier to debug)
- remove obsolete trigger of listener in _created (not possible to observe a
record before it exists)
closesodoo/odoo#98892
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Fixes a traceback due to Visitor/country being a computed field
that is imperatively updated by server data.
Task-2962126
closesodoo/odoo#98847
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
PURPOSE
Improve performance of activities creation and management. Improve overall
code.
SPECIFICATIONS
Main code changes are
* classify activities by model, to browse related records in batch per model
instead of one by one;
* rewrite create and _action_done main methods to be done in batch;
* skip useless computation (use categories before browsing records, avoid
useless ref / direct xml ID check, ...);
* globally batch when possible;
See sub commits for more details.
LINKS
Task-2884301 (Voip synchronization simplification)
Task-2883589 (Activity creation performance)
closesodoo/odoo#93682
Related: odoo/enterprise#28421
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Update counters after all previous performance commits. It is done as a single
update due to frequent conflicts and difficulty to keep updated counters for
each commit separately.
Task-2883589 (Activity performance and cleaning)
Part-of: odoo/odoo#93682
When assigning activities to people we check target user has the rights to
access to document. Otherwise they end up with notifications and activities
for records they can't see.
This code is currently a loop doing browse and access checks one record
at a time. We improve it by grouping activities by related record model
and target user, allowing to batch some calls.
Note that this somehow reverts odoo/odoo@c38a0d6768 and odoo/odoo@a98c15f443
as normally odoo/odoo@16351e4879 should be sufficient to handle MC use
cases. Lack of clear unit tests for those corner cases make it difficult to
clearly reproduce issue anyway.
Task-2883589 (Activity performance and cleaning)
Part-of: odoo/odoo#93682
MailActivity model has an ``_action_done`` method that is quite heavily
used and overridden. It notably posts messages, create next activities but
also has some specific behavior depending on category.
Purpose of this commit is to improve code of this method to avoid useless
queries, improve performance, and rethink the computation with batch in
mind.
Task-2883589 (Activity performance and cleaning)
Part-of: odoo/odoo#93682
Purpose of this commit is to improve batch creation of activities by trying
to group checks by user and/or model when possible.
Notably
* subscribe partners in batch when several activities are assigned to the
same user (use case: batch assign on leads, users may be assigned on
several records in a single udpate);
* check in batch access on partners;
Task-2883589 (Activity performance and cleaning)
Part-of: odoo/odoo#93682
Change some ``ref`` to low level method ``_xmlid_to_res_id``. The latter one
does not call exists, which allows to gain one query that we do not need
here.
Default methods on activity / activity mixin to find the default activity
type (todo, model-based, generic) are cleaned. Notably code was duplicated
between mixin and activity, it now always call the same code.
Remove an unnecessary ref, probably a leftover of new rendering methods on Qweb.
Remove an unnecessary sudo.
Task-2883589 (Activity performance and cleaning)
Part-of: odoo/odoo#93682
No need to send bus notifications one by one, we may use sendmany. Various
activities crud methods send notifications, better group them when possible.
Task-2883589 (Activity performance and cleaning)
Part-of: odoo/odoo#93682
Improve performance by batching activities creation through the mixin. This
helps saving some queries.
Task-2883589 (Activity performance and cleaning)
Part-of: odoo/odoo#93682
Purpose is to add helpers on activity model, notably to ease batching based
on models. As activities are linked to records using a res_model / res_id
pair most code is not optimized (checking records one by one). Purpose of
this tool is to ease doing computation by batch of models.
Task-2883589 (Activity performance and cleaning)
Part-of: odoo/odoo#93682
We now return generated records when calling ``_action_send_mail`` on mail
composer. This allows to have access to generated emails (in mass mode) or
posted messages (in comment mode). Otherwise we have to access sub-fields
like activity_ids / message_ids, which may be inefficient or generate extra
ACLs checks.
Also replace some |= with += when usage of OrderedSet is not necessary. To
keep ordering, ordered sets are used when doing an or between record sets.
However in some cases we know we are simply adding records not already in
a previous record set, meaning we can just use +.
Task-2883589 (Activity performance and cleaning)
Part-of: odoo/odoo#93682
Purpose is to use it notably in Voip where we link activities / phonecalls
to partners when possible. Future commits will use it more often in thread
methods.
Method to have the primary email is moved with that helper method in a sub
section, in order to have "model" helpers in the same section. Its code is
also simplified and fixed (return missing). Its name is made coherent with
other naming in the file.
Task-2884301 (Voip activity synchronization simplification)
Part-of: odoo/odoo#93682
This patch discard the fields to delete from data structures like field
triggers, field inverses, and fields to compute.
This is quite useful when uninstalling modules. This commit fixes the
uninstallation of modules base_setup, bus, mail, web_tour.
closesodoo/odoo#98668
X-original-commit: 49398a769b2ec4965bf148f10b5e13d0a6c1acff
Signed-off-by: Raphael Collet <rco@odoo.com>
Previous behavior
================
When `editable=bottom`, when we hit tab until the end of the line, the
user starts to create a new record.
But when `editable=top`, when hitting tab multiple until the end of the
line, the user starts to edit the first line that was existing before
instead of creating a new one.
New behavior
============
The behavior is consistent between both cases: the user can always
continue to edit lines one after the other.
The behavior for `editable=bottom` is not changed, but `editable=top`
continues to add lines on top one of each other.
linked to task-2879904
closesodoo/odoo#98603
Signed-off-by: Georis François (fge) <fge@odoo.com>