[FIX] *: selectors in tours
[FIX][TMP] account: CogMenu selector in tours
[FIX][TMP] web*: Breadcrumb targetting in tours
Adds a `o_breadcrumb` class to target the whole breadcrumb, no matter
how much elements it contains (collapsed parts, visible path, single
name...).
add classname on last breadcrumb item
[FIX][TMP] project: View buttons selector in tours (moved away from CP)
[FIX][TMP] project: Kanban selectors in tours (quick create)
[FIX][TMP] *: SearchBar selectors in tours (toggle menu)
[FIX][TMP] *: ButtonBox selector in tours
[WIP][IMP] web: add toggleSearchBarMenu in search helpers
adapt and unskip 3 list tests
adapt and unskip calendar tests
unskip web_tour test that actually pass
post rebase fix
allow to lose cell focus after multi edition (given to searchbar) - bug reported, to check later
post rebase fixes
fix
Part-of: odoo/odoo#116641
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.
task-2818586
Part-of: odoo/odoo#116641
This commit fixes the ribbons used in `kanban` and `form` views.
The SCSS uses the square root of the parent `div.ribbon` to calculate its
diagonal width and applies that width to the child `span`.
After changing the ribbon's transform-origin, we calculate the ribbon's
position based on CSS variables of the view's top padding,the height of
the ribbon and the shadow's size (to avoid it being cropped by
overflow-hidden).
By changing the values of a few of these variables in the kanban view,
we were able to remove all the specific SCSS related to ribbons in the
modules.
Other changes were applied inside some of the modules to make this
work:
- `event`: padding corrections on the kanban's cards;
- `hr_holidays: replaced `margin:0` in the SCSS with negative margin
utility classes on the element to achieve the same visual result;
- `discuss`: moved the ribbon to the parent element;
- this was also done to `discuss`, `survey` and `helpdesk`;
- `crm_team_view` in `sales_team`: the ribbon's height made it overflow
from the kanban's card. We fixed this by changing the value of one of
the CSS variables in the view's SCSS file;
- the same thing was done in `survey` and `appointment`;
- `website_event_exhibitor` had some SCSS that wasn't being used because
it uses `.o_ribbon` instead of `.ribbon`
task-2818586
Part-of: odoo/odoo#116641
This cancels the changes added to f91782279a
for minor version 16.3 as the server action is completely removed
instead of being fixed in this.
The action is not removed in the upgrade as it is still technically
working. Though it should be considered deprecated.
------------------------------------
We remove the action that was used to conditionally call a window action
The action was not called consistently and added confusing indirection.
To maintain the current behaviour of only suggesting adding a loss
reason for opportunities.
We make the reason fields toggleable in the wizard, and hide them by
default for leads.
This leaves the user with the option to add a reason anyway, and serves
as a confirmation wizard if they don't want to.
-------------------
task-3272955
closesodoo/odoo#118494
Related: odoo/upgrade#4640
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Prior to this we used the context active_ids directly to determine
which leads to mark as lost in the lost reason wizard.
We now use a m2m field to store that value to make the behavior more
obvious and predictable, and to ease debugging.
task-3272955
Part-of: odoo/odoo#118494
The issue with properties fields is that the value in the record
snapshot is not correct. This is caused by convert_to_record()
combining the values with the definition, and in the case of onchange(),
the values don't match the definition, which causes the method to return
the empty list [].
We fix the root cause by changing convert_to_record() to return the dict
itself. The combination of the values with the definition is now only
done in convert_to_read(). Method convert_to_onchange() has only one
hack to retrieve the current definition record from the record snapshot,
as because of cache invalidation, its value is no longer available.
closesodoo/odoo#120457
Signed-off-by: Raphael Collet <rco@odoo.com>
As the pipeline reporting tree view isn't an operational
view but more of a managerial one, remove the email, sms
and snooze buttons from the view as the managers won't
need those.
Task-3204763
Part-of: odoo/odoo#115326
Draw attention to the monthly assigned lead count when
it is exceeding the limit by changing the text color
to orange.
Task-3204763
Part-of: odoo/odoo#115326
*: sale,sales_team
Improve UI of the CRM app:
- Add placeholders and underline m2o fields in the CRM quick create
- In the lead generation form, underline the industries field, add
the avatar widget on the user_id field, add the color attributes on
the tag field, add a placeholder for the states field and set a
longer selection field to avoid the caret from overlapping the content.
- In the opportunity form, align the expected revenue and probability
headers, set a longer width for the expected revenue field,
change the recurring plan placeholder.
- In the contact opportunities page, change the "Open Opportunities"
filter to exclude lost opportunities.
- In the Sales team page, add a groupby on the company_id.
- In the Sales team form, change the assigned lead count to be
a muted text, the pipeline checkbox should be visible only when leads
has been activated, the quotations/pipeline/leads options should be
aligned.
- In the lost lead modal, change the title from "Lost Reason"
to "Lost Lead" and the validate button from "Submit" to
"Mark as lost".
- In the Sales team member form, align the fields on the left and hide
the Create Employee field as it should not be displayed there because
this is not an hr module.
- In the lead analysis tree view, add the lost reason field with optional
hide.
- Align the enrichment company not found message to the left of the chatter.
- Update the crm iap lead role "Search More" list to display human
readable names instead of the technical names.
Task-3204763
Part-of: odoo/odoo#115326
Steps to reproduce:
- Install crm
- Go to settings and activate leads in crm.
- Go to leads list and select any lead, now mark it as lost.
Issue:
It will ask for lost reason. But if we do it from the Leads form view,
we don't get to set any reason. I discussed with the PO and we don't
want to add the lost reason in the leads.
Solution:
Modified action of lost so it takes leads into account.
opw-3119748
closesodoo/odoo#120033
X-original-commit: 3834577a8beec2f9eb4a30dd8a0ae72403041af5
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
Purpose:
The purpose of this commit is to change the current behavior of days to close
graph generating from customizable desk demo data.
Specification:
For the opportunities, the day_close field is a compute field depending upon the
date_closed field. For the customizable desk demo data, the date_closed field
pre-existed, due to that customizable desk opportunity was not won or lost but
the graph report was generated.
so, this commit fixes the current behavior for customizable desk opportunity.
Task-3278039
closesodoo/odoo#120433
X-original-commit: e368725b3a042c4071986d0c8d49f724d76a7416
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
When this option is enabled, the button to create new properties
is invisible. We create a client action instead, and when the user
executes client action for the first time, the button becomes visible
until the user refreshes the page.
This is useful because most of the time, the user will create the
properties and then won't change them. So this button uses space
unnecessarily in the form view (for the most of the use cases).
Task-3188915
Part-of: odoo/odoo#119811
When converting a lead to an opportunity and merging with existing
opportunities, the list view showing opportunities is very tiny.
This is caused by the field not having the correct colspan, as its label is
hidden with the "nolabel" attribute.
This commit fixes it by assigning a colpan of 2.
Task-3179173
closesodoo/odoo#119790
X-original-commit: 6a003a12c92d215f8123538473eeb23a36e9ec7e
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Enforce strict types for returned values for
* create
* write
* unlink
* default_get
to make those methods more consistent and reliable.
Also make sure they can be called with empty self/values,
i.e. that they follow the same behavior as the base methods
defined in the main orm Model.
closesodoo/odoo#116809
Related: odoo/enterprise#38880
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit adds two autoresize hooks for text inputs and textareas to
make it adapt their size (width for text inputs, height for textareas)
depending on their content.
The commit therefore solves the issue of several form view task titles
being restricted to 1 line while it can be annoying if the title is too
long. The autoresizeTextarea feature was moved from TextField to the
autoresizeTextarea hook and the autoresizeInput feature was moved from
the AutoresizeInput mail component to the autoresizeInput hook.
The TextField component has a new option for disabling linebreaks.
task-3138826
closesodoo/odoo#117355
Related: odoo/enterprise#39493
Signed-off-by: Géry Debongnie <ged@odoo.com>
Prior to this notification actions are shown as such:
MODEL RECORD_NAME won | lost | settings
After they will be shown as such:
MODEL won lost settings RECORD_NAME
with the action links colored to match the company color.
The aim is to streamline the layout of e-mails and make actions
clearer.
task-3067315
closesodoo/odoo#106307
Related: odoo/enterprise#34284
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce:
- Install Sales.
- Go to any quotation and toggle mobile device mode in the browser.
- Go to Other Info > click in Sales Team field.
Issue:
We stop supporting the 'kanban_view_ref' in newer versions of odoo. So
we won't be able to get proper view.
Solution:
Changed the way we ref the kanban view to use context to get the
referenced kanban view.
Related to #39499
opw-3152174
closesodoo/odoo#116031
Related: odoo/enterprise#39499
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When using message_post, the body format must be explicitly specified.
If html is expected, a Markup object should be used.
If text is given, the content will be escaped.
Before this PR:
message_post was unaware if the content of a message was HTML or
text. This lead to multiple situation where the content was
incorrectly considered as HTML and led to display errors.
In
self.message_post(body="Hello %s!" % self.name)
if the name contained HTML, it would be evaluated.
In
self.message_post(body="Contact Raoul <raoul@caramail.be>")
the email would not be displayed as considered as unknown HTML and
discarded by the sanitizer
Now each call must explict the type of content.
Use the escape() helper to properly combine Markup and translations.
It would also be acceptable to use Markup() to wrap a static
translation but escape is better as one can not guarantee the content
of a translation.
closesodoo/odoo#111850
Related: odoo/documentation#3612
Related: odoo/enterprise#36728
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, the field node id (`field_id`) uses the field name
for the first occurrence on the arch, and add an underscore and a number
for the rest of the occurrences. This can create inconsistencies when
sombody assumes that the field_id is equal to the name, and don't take
into account the possibility of multiple occurrences.
Now, a unique id is created since the first occurrence, this remove all
ambiguity between the id and the name.
Part-of task-id 3179751
closesodoo/odoo#117799
Related: odoo/enterprise#39511
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit introduces an optimization to reduce the number of read
operations performed in kanban views that are grouped by a field with
a group_by_tooltip. Specifically, we now fetch the required values
from group_by_tooltip only when the tooltip is first opened, instead
of performing a read every time the view is loaded.
Part of Task: 3179751
closesodoo/odoo#117758
Related: odoo/enterprise#39349
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: account, crm, hr_recruitement, im_livechat, point_of_sale,
project, sale_management, website_sale
Purpose
=======
Now, the KPI are computed based on their `company_id` and not based
on the current company. If no company is set on the digest, we compute
it based on the current company.
The KPIs are computed based on their company. Most of the time, they
will all belong to the same company so we can improve the performance
by computing them in batch.
Task-2827996
See odoo/enterprise/pull/27658
Part-of: odoo/odoo#91945
Prior to this all of the context of the action called in the list
action was overriden. We now combine the action context with the
environment context.
This allows keeping the context from the XML action that defines the modal sizing.
task-3235932
closesodoo/odoo#116287
Related: odoo/upgrade#4493
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.
task id: 3162300
closesodoo/odoo#117305
Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
With this PR, the `digest_data` template has been changed, so the `digest_tips`
is not compatible with the new changes.
This commit changes the `digest_tips` data to be compatible with the new changes.
Below are the modules affected:
- account
- crm
- digest
- hr_expense
- hr_timesheet
- im_livechat
- mrp
- project
- purchase
- sale_management
- stock
- website
task-2717426
Part-of: odoo/odoo#89549
The allow_group_range_value option is used in one arch of a kanban in
CRM. We therefore believe that this is not standard behaviour.
So we decided to move this logic to the custom view that uses it.
Part of Task: 3179751
closesodoo/odoo#117023
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: crm
Before this commit, the KanbanColumnQuickCreate receives
the groupByFieldString property as a string.
This commit changes that in order to give the groupByField object.
This change eases the further work in same pull request.
Taskid: 3246042
Part-of: odoo/odoo#115909
The web client has a mechanism to invalidate the action and the view
cache: in the basic model (and the relationalmodel), some code is
looking for updates to some specific models (such as ir.actions) and
trigger a `CLEAR-CACHE` event. This event is then listened by the action
and view services to properly clear the caches. This mechanism was also
used to reload the page after editing a company, or reloading the
currencies after editing some currency.
With this commit, we modify the orm service to trigger an event after
each rpc. This event can then be used by the action/view service, and
also by the currency/company services to perform their specific cleanup.
This work is one step in the future refactoring of the relational model.
closesodoo/odoo#115655
Related: odoo/enterprise#38814
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.
The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.
closesodoo/odoo#116167
Related: odoo/enterprise#38542
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
They dates from < 2027 and are quite outdated. Favour the nl
translation instead.
n_BE is not on Transifex so it was not possible to correct bad
translations.
closesodoo/odoo#115845
X-original-commit: d04c8b7e484db8306d858c891a7a2b11885fdcd9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Move the kanban gauge field from web_kanban_gauge to web.
Also delete the web_kanban_gauge module and remove all its references.
opw-3231911
closesodoo/odoo#115293
Related: odoo/upgrade#4437
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before 16.0 and the "always edit" form views, some fields allowed to
be edited in readonly (e.g. the statusbar in crm lead or project
task). Users could thus change the stage of a record in readonly and
the change was saved directly. If the field was tracked, the change
was even logged in the chatter directly. Since the form view is always
in edition now, we loose that behavior and the user must click on the
save cloud icon to manually save and see the tracking messages. To
mitigate this, those fields that were editable in readonly could save
the record directly when edited, like buttons do.
Changing the values of the following fields should automatically save
the record.
- BooleanToggleField
- PriorityField
- StateSelectionField
- StatusBarField
To accomplish this, we now unconditionally save the record when the above
mentioned fields are changed.
closesodoo/odoo#115500
Task-id: 3175672
X-original-commit: c9b7c43c69eaf87e7900801b926d3868adc36d8c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
* The tours are now run by the `MacroEngine` defined in `macro.js`.
* This is accomplished by converting (at runtime) the user-defined tours to
`Macro`s. See `tour_compilers.js` for the step (and tour-to-macro) compilation.
* API is kept the same as much as possible. Basically, declaring tours stayed
the same with some exceptions:
* `allowInvisible` can be provided in a step to allow consuming the trigger
element even if it is invisible.
* `isCheck` can now be used to replace the no operation `run` that is
traditionally signals the runner to only perform a check.
* Before, multiple `run`s can be called simultaneously. Now, each `run` method
is awaited before proceeding to the next step.
* If the trigger element is `disabled`, the tour runner will *not* proceed on
calling the `run` method and the runner will stay on current step until the
trigger element becomes `enabled`.
* However, the tour runner is okay with `disabled` trigger element if the step
has `isCheck = true`. As long as the trigger element is found for `isCheck`
step, the tour runner will happily move to the next step.
* Some tours are adjusted to properly run with this new tour runner.
* When the tour failed:
* The dom string is not logged anymore.
* However, a warning message containing the relative location of the step will
be logged. This is better in helping the author in locating the failed step.
**Some guidelines learned during the development:**
* Each step may trigger a dom mutation. It's a good practice to insert an
intermediate step that *checks* the existence of an element that result from
the action of the previous step.
* Refrain from using the `run` method for assertions. `run`, in principle, is
provided to perform actions that are not offered by the helper. Use the
`trigger` for assertions.
* During dev, find `SHOW_POINTER_DURATION` and set it to `250`. This will show
the pointer (pointing to the trigger element) for 250ms when watching the
tour.
closesodoo/odoo#107618
Task-id: 3082036
Related: odoo/enterprise#37560
Signed-off-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.
The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.
closesodoo/odoo#114533
Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Make the date field always underlined in the PLS modal in
the settings, to indicate that it is editable and not a
technical constraint.
Also rename confirm button to "update".
Task-3193113
closesodoo/odoo#114223
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit contains mainly code cleaning, docstrings and a small split
for notification tool methods. In this commit we
* make some notification groups variable explicit;
* move the filler of groups into its own submethod to ease being called
from other code (to be used soon);
* fix some strange overrides or code manipulation;
* propagate some additional parameters to ease future commits that will
improve rendering of groups-based notification emails;
* cleanup, fixup and improve docstrings;
This does not change anything from functional point of view, just preparing
further work.
Task-3046371 (Mail: Better Language Support in Composer)
Part-of: odoo/odoo#106177
RATIONALE
Activity report is slow, as it makes a complex query inside mail.message table
which is one of our biggest table with crm.lead table, also a big table. This
activity report could be speeduped by looking only on activities, not including
discussions messages.
SOLUTION
Rationale is that discussions can be about whatever (real discussion with
customers but also internal discussion, notes, ...). What matter here is to
report on activities like phonecalls, followup emails, meetings, ... to have
a global view of sales people activity.
SPECIFICATIONS
Remove inclusion of discussion messages in the query. Keep only activities-based
messages.
Task-3129356 (Crm: Fix activity report performances)
Part-of: odoo/odoo#112535
RATIONALE
Duplicates computation on leads is slow when having a lot of leads. We can
simplify the heuristic to keep only relevant terms and use tailored fields
to find duplicates based on email and phone, to speedup the computation while
loosing few duplicates or avoiding false duplicates.
SPECIFICATIONS
We remove
* an ilike on email_normalized (slow and exact matches are what really
matters);
* an ilike based on partner_name and contact_name (as lead is a contact
oriented record, better optimize email and phone / mobile than names that
are weak criterions);
* an ilike on phone_mobile_search, which was searching on both fields
phone and mobile;
Criterions are now
* email domain exact match;
* phone_sanitized exact match;
* same commercial entity;
Main change is that only phone_sanitized is used for exact match. Partial
matching based on phone and mobile number is lost. That should not be an
issue as real duplicates should come with a complete phone or mobile number
and not partial numbers. First found in phone / mobile populates the phone
sanitized field, meaning if we have two different numbers, only one is used
for duplicate finding. This is considered acceptable.
Other main change is the removal of partner name / contact name search. Those
are weak criterions and did not return any explicit result when used internally.
Task-3142659 (Crm: Fix duplicate leads computation performances)
Part-of: odoo/odoo#112535
RATIONALE
Duplicates computation on leads is slow when having a lot of leads. We can
simplify the heuristic to keep only relevant terms and use tailored fields
to find duplicates based on email and phone, to speedup the computation while
loosing few duplicates or avoiding false duplicates.
SPECIFICATIONS
Index on "phone_sanitized" field of <crm.lead> is added as btree_not_null as
it is mainly used to search for direct matches. Partial searches are not the
main usage of this field.
Task-3142659 (Crm: Fix duplicate leads computation performances)
Part-of: odoo/odoo#112535
The type fields of actions already defaults to
the model name in the base model definition.
Therefore, specifying `ir.actions.server`, `ir.actions.act_window`
& so on as type is useless (and adds noise since it's the same as
the action model).
closesodoo/odoo#114539
Related: odoo/enterprise#37855
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
When logging a meeting linked to a lead we now add a link to the
record. The link takes the place of the subject as it's the same
displayed value.
task-2984657
closesodoo/odoo#106546
Related: odoo/enterprise#32945
Related: odoo/upgrade#3974
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This fulfills the goal of searching and fetching fields in a single SQL
query. We introduce the new method search_fetch() for that purpose.
Also introduce method fetch() to fetch some fields for a recordset if
they are not in cache yet.
The call graph is as follows:
search() calls search_fetch()
search_read() calls search_fetch() and _read_format()
read() calls fetch() and _read_format()
search_count() calls _search()
search_fetch() calls _search() and _fetch_query()
fetch() calls _search() and _fetch_query()
The methods _search() and _fetch_query() are usually the ones to
override to implement business-specific logic. The method _search()
returns a Query object to retrieve the records that satisfy the given
domain and are accessible for reading. The method _fetch_query() uses a
Query object to retrieve fields from the database and store them in
cache.
Also use search_fetch() to save one query in search_read() and the
reading of one2many fields.
Part-of: odoo/odoo#112126
The parameter in search() is redundant with method search_count(), and
was making the calls less readable.
The method _search() is aimed at always returning a Query object. The
method can therefore never return an integer, hence the removal of the
parameter. This does not actually remove any functionality from the
method; counting result is simply given by using it differently.
Part-of: odoo/odoo#112126