The test is running in sudo mode, so we need to specify the company in
the search.
Also do not load the demo data when installing as we would do the work
twice for most localization.
closesodoo/odoo#67235
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
PR #66910 has been created so the MX can print their receipts.
Eventually, this needs to be reverted since printing a receipt is
actually illegal.
closesodoo/odoo#67209
X-original-commit: 7e9261cacd9f6963dca517fe7b1f3de067af1366
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Currently, website_hr_recruitment(online job) is not auto
installed when hr_recruitment and website is installed.
So in this commit, auto install the online job(website_hr_recruitment)
when only website and hr_recruitment is installed.
so removed website_partner dependency from website_hr_recruitment as it's
not really needed. also make the website_hr_recruitment and
google_recaptcha auto install.
closesodoo/odoo#66737
Taskid: 2374617
Related: odoo/upgrade#2201
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, user cannot group the timesheet by inv/so in portal view.
In this commit, add a group the timesheet by inv/so in portal view and
move the `view timesheets` button next th each sol to the top left pannel.
closesodoo/odoo#65932
Taskid: 2451359
Related: odoo/upgrade#2214
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
For example:
User A start a pos session.
Employee B, not related to User A, could close the session and have access to the back end as User A.
This commit also allows to display the select cashier popup correctly in mobile view.
Task-id: 2244289
Display a confirmation dialog when a user creates duplicate expenses.
Two expenses (or more) are considered duplicates when they share the same
date, amount, product, employee, company and currency.
closesodoo/odoo#64190
Taskid: 2368636
Related: odoo/upgrade#2061
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, when the project is employee rate and the user sets
the sale order item to False in a task with this project, the linked
timesheets should have the sales order item to False, but if a
employee mapping is matched for this timesheet, the sales order item of
this mapping is given to the timesheet.
This commit checks if the sales order item in the task linked to the
timesheet and if no sales order item in the task then the sales order
item in the timesheet should also be empty (False).
closes odoo/odoo#67202
Forward-port-of: #67055
X-original-commit: a325e75a8565039d5120d169df67ef2d16c7fdc4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
# Purpose
This PR's primary objective is to ensure that the timesheet uom is working in accordance with the company settings in a multi company environment.
Prior to this PR:
- The timesheet preferences sent to the front end were always those of the default
company of the user.
- The timesheet related widgets initialisation process (adding the correct ones in
the fieldRegistry) was performed before the front end treatment of cids and coockies
which prevented applying the front end selected company settings.
After this PR:
- A dictionnary is used in the session in order to structure the companies info.
- The company timesheet preferences are sent to the front end through the company dict.
- The uom info is sent to the front end through the session.
- The timesheet uom is now managed from the frontend and is now in sync with the settings.
- Timesheet widgets are initialised during the AbstractWebClient init and are in sync with
the multicompany front end settings
task-2168337
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#66551
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
# Purpose
General Marketing usability improvements based on what has been seen observing users on Fullstory.
As the changes are relatively minor and related to specific apps, the rationale and improvements will be explained in more details in each commit.
# Commits
##### [IMP] `base`: modify some displayed texts for res_partner
* Error messages when trying to delete/archive a partner linked to an active user
* Partner Form placeholders
* Update main_flow tour to be consistent with above changes
* Update test_orm to use a model with less functional constraints
##### [IMP] `mass_mailing_sms`: prevent raising an error in sms mailing
* Allow to launch a sms campaign without recipients without raising an error
##### [IMP] `mass_mailing`: add various usability improvements
* Mass mailing preview in a new tab (to prevent data loss when leaving the page)
* Data display adjustments (better wording...)
##### [IMP] `mail`: revamp the activity type form view
* Change "force_next" checkbox into "chaining_type" selection
* Update the Form layout and wording
* Renamed fields :
* default_next_type_id -> triggered_next_type_id
* next_type_ids -> suggested_next_type_ids
* default_description -> default_note
##### [IMP] `event`: improve the event form editor and update the tour
* Fix an undesired behavior with duplicate lines when switching event_type templates
* Remove steps from the event tour
##### [IMP] `web`: add an initial_date context key for CalendarView
* Add a context key ('initial_date') to the calendar view (to open it around a specified date)
##### [IMP] `crm`: add a reschedule action for activities
* Add a reschedule action alongside snooze 7d, for event-related activities
##### [IMP] `crm`: change the search order for a won stage
* In case "not won" stages are placed between "won" stages, put an opportunity marked as "won" in the correct stage (higher sequence if possible)
##### [MOV] `website_event`: move the website_event tour to tests/tours
* The scope of another tour (event_tour) include the scope of this tour and actually starts from the Event module. This smaller tour is thus disabled and kept as a test.
# Links
Task ID : 2410217
ENT PR : https://github.com/odoo/enterprise/pull/15406
UPGRADE PR : https://github.com/odoo/upgrade/pull/2167closesodoo/odoo#63370
Related: odoo/upgrade#2167
Related: odoo/enterprise#15406
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Prior to this commit:
- There were no tests on the timesheet_uom and the fact that the widget
that is loaded in the fieldRegistry is corresponding to the current
company preferences.
After this commit:
- Tests will be performed in order to check that the timesheet_uom that
is loaded in the fieldRegistry is corresponding to the current company
preferences.
task-2168337
Closes: #66551
This commit's primary objective is to ensure that the timesheet uom is working in accordance
with the company settings in a multi company environment.
Prior to this commit:
- The timesheet preferences sent to the front end were always those of the default
company of the user.
- The timesheet related widgets initialisation process (adding the correct ones in
the fieldRegistry) was performed before the front end treatment of cids and coockies
which prevented applying the front end selected company settings.
After this commit:
- A dictionnary is used in the session in order to structure the companies info.
- The company timesheet preferences are sent to the front end through the company dict.
- The uom info is sent to the front end through the session.
- The timesheet uom is now managed from the frontend and is now in sync with the settings.
- Timesheet widgets are initialised during the AbstractWebClient init and are in sync with
the multicompany front end settings
task-2168337
Closes: #66551
Before this commit:
- Some semicolon where missing
- There was a typo in the variable name
After this commit:
- The above problems are solved
task-2168337
Closes: #66551
Convert the override of method `power_on()` to an `@autovacuum` method.
closesodoo/odoo#67178
X-original-commit: f212223305a4d1da0f01f008c3874a72945fcae0
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Steps to reproduce the bug:
- Let's consider an included tax T (10%) and a product P (11€) with invoicing policy based on delivery
- Create a sale order SO with one line L with 2 P and T
- Confirm SO and deliver it
Bug:
The untaxed_amount_to_invoice was 40€ on L instead 20€
opw:2457660
closesodoo/odoo#67188
X-original-commit: 56d92277f20566d5b652ce713551970d0b7784c0
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
PURPOSE
Purpose of this merge is to improve reporting usability
and views in crm, lead generation and iap services.
SPECIFICATIONS
Some usability improvements going to be done by this merge are listed
below.
Improve the action helpers for the actions bound to below listed menus
for better usability:
* My Activities
* Leads
* Leads Analysis
Along with that, this commit also improves the following:
* while generating leads, make 'Industries' field required on the modal so
that results obtained are actionable instead of random leads;
* after trying to generate leads, if no result is found, the same pop-up
opens again with same criteria and displays a waring in the pop-up. It
informs users that leads are not found and no credits are spent for their
last search;
* improve the warning message for unsuccessful enrichment due to invalid
email;
This merge adds the color_picker widget for setting valid color of
CRM tags in the form view.
With this merge, the 'Enrich' button on lead now appears only after the
email is set and valid, which previously appeared even if no email is set
or if the value is not a valid email.
Right now, for the fetched contacts through enrichment, we display
name and title in separate columns (in the chatter), that leaves
lesser space for email and phone.
With this commit, we merge name and title columns, and provide a bit
extra space to email and phone so that chances for them being wrapped
in a new line are less. Also, if phone number is not available in any
contacts, the 'Phone' column is hidden, giving even more space for the
Name/Title and Email columns.
LINKS
COM PR odoo/odoo#64075
ENT PR odoo/enterprise#15561
Task ID-2393253
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The color_picker widget, that can be seen for example in the track form
view for event tracks, had an issue: if the user clicked on it, then
pressed TAB, a traceback was displayed.
The problem comes from the fact that the color picker widget inherits
from FieldInput, but is not a fieldinput, so many expectations made by
the FieldInput code do not hold, such as the code run when handling
navigation (by TAB and such keypress). Because of that, the code in
_onNavigationMove crashed, because it expected an input.
Since this is a bug fix, I simply disabled the navigation in that case,
so no crash happens. Sadly, this widget has still a big issue: it
clearly does not work as most users would expect: pressing TAB or arrows
should update the selection. But this would be a more complicated
refactoring, for a bug which is clearly not critical, therefore this
commit implements the simple and safe solution.
Also, we disable the focus outline to minimize the wrong expectation.
Seeing them kind of implied that one could update the selection with the
keyboard.
Note that the widget color_picker was moved from another addon to web/, without
any tests nor documentation.
OPW 2467369
closesodoo/odoo#67195
X-original-commit: 580456b6ab36d16195eae9ffd776ff245ecd936e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Right now, for the fetched contacts through enrichment, we display
name and title in separate columns (in the chatter), that leaves
lesser space for email and phone.
With this commit, we merge name and title columns, and provide a bit
extra space to email and phone so that chances for them being wrapped
in a new line are less. Also, if phone number is not available in any
contacts, the 'Phone' column is hidden, giving even more space for the
Name/Title and Email columns.
Task ID-2393253
COM PR odoo/odoo#64075
With this commit, the 'Enrich' button on lead now appears only after the
email is set and valid, which previously appeared even if no email is set
or if the value is not a valid email.
Task ID-2393253
COM PR odoo/odoo#64075
This commit improves the action helpers for the actions bound to below listed
menus for better usability:
* My Activities
* Leads
* Leads Analysis
Along with that, this commit also improves the following:
* while generating leads, make 'Industries' field required on the modal so
that results obtained are actionable instead of random leads;
* after trying to generate leads, if no result is found, the same pop-up
opens again with same criteria and displays a waring in the pop-up. It
informs users that leads are not found and no credits are spent for their
last search;
* improve the warning message for unsuccessful enrichment due to invalid
email;
COM PR odoo/odoo#64075
ENT PR odoo/enterprise#15561
Task ID-2393253
This line was an hack to manage the custom register payment wizard of hr_expense.
Since this wizard is gone and 'payment_id' is a related stored field in account.move.line, we should not write such data explicitely.
closesodoo/odoo#67162
X-original-commit: 2d7f45e76607736bcc4f37bec480967ae2b373d7
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
PURPOSE
Improve certification templates and make them more aligned with current
state of the art certifications.
SPECIFICATIONS
Design has been completely redone to be more modern.
Also displays dynamic certification number based on the ID of
certification record for both modern and classic layouts. It consists in
minimum 10 digits. It means that if the ID of the record is 5 it is displayed
as 0000000005.
Also improves the behavior by adding name of the certification in page title
so that use can see the proper string on browser tab. For doing so, we create
a new wrapper template that sets the title for the page, and use an iframe
to loads the pdf file from existing controlloer (which returns response for the
preview pdf).
LINKS
Task ID-2341847
COM PR #66028
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Right now while previewing the certification template, the proper title is not
displayed on the tab of browsers.
This commit improves the behavior by adding name of the certification in title
so that use can see the proper string on browser tab. For doing so, we create
a new wrapper template that sets the title for the page, and use an iframe
to loads the pdf file from existing controlloer (which returns response for the
preview pdf).
Task ID-2341847
COM PR odoo/odoo#66028
This commit displays dynamic certification number based on the ID of
certification record for both modern and classic layouts. It consists in
minimum 10 digits. It means that if the ID of the record is 5 it is displayed
as 0000000005.
Task ID-2341847
COM PR odoo/odoo#66028
Improve certification templates and make them more aligned with current
state of the art certifications.
Task ID-2341847
COM PR odoo/odoo#66028
Co-Authored-By: Elisabeth Dickinson <edi@odoo.com>
Co-Authored-By: Dharmrajsinh Jhala <dja@odoo.com>
The underscore (_) library has a bug in which the _.each method does not
work with object which contains a "length" property. This is because it
does look for that key and if it is a number, it will assume that it is
an array with that length value. Nicely done...
If that length value is set to 0, then it will just do nothing, since it
thinks that it is dealing with an empty array.
Note that if the value is set to an object, _.each is smart enough to
notice that it cannot be an array, and will do the correct thing in this
case.
Usually, our _.each calls are safe, since we usually iterate on arrays,
or on object with safe keys, or on object with values that cannot be a
number.
But there was 2 unsafe calls in basic_model, which leads to strange
bugs: some code is skipped, and the form view is then confused. The
motivation for this fix is the fact that onchanges are not applied at
all, if there is a length field set to 0.
To fix this, we can just avoid using _.each. Note to every Odoo JS
developers reading this: new Odoo code should avoid using the _ and $
libraries, because we do not really need them, and we want to keep our
dependencies to the strict mininum.
OPW: #2465808closesodoo/odoo#66126closesodoo/odoo#67172
X-original-commit: 8dbd1efef899fb637acca3c318ae99cb23838b8f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
* Reassign the "event" tour to a classic test
- Only the "event_tour" that starts from the Event App should be kept from a
user perspective.
- The "event" tour that launched itself once upon installing the Event App
from the Website (Website App) and only covered the front-end part of
the event creation will now only be kept as a classic test tour.
- This tour is renamed "website_event_tour" instead of "event" for
disambiguity with the other tour called "event_tour"
* This tour is now only intended to be used as a test, and as such, is moved
to `tests/tours`
Task ID : 2410217
PR : #63370
* The "Mark As Won" button should first look for "won stages" that
have a higher sequence than the one the opportunity currently is.
If none is found, then it's "ok" to go to a stage with a lower sequence.
* In Fine, we would like to prevent a "not won" stage to have a higher
sequence than any "is won" stage. But while this is not the case, searching
for the "is won" stage while alterning the sequence order will correctly
handle the following case :
- stage sequence :
[x] [x is won] [y] [y is won] [z] [z is won]
- scenario :
an opportunity in [y] and marked as "won" should go to [y is won].
(not in [x is won] nor [z is won])
Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
* Replace the "Snooze 7d" action for lead-related activities linked to
a calendar event by a "Reschedule" action, which will redirect the user
to the calendar view with the focus on the next event related to the
opportunity
- The "Snooze 7d" action only impacted the activity and not the meeting,
and snoozing a meeting is not very logical anyway. The "Reschedule" fits
better in this use case.
* It was discussed to show only a modal allowing to reschedule the next
calendar event, but that could lead to inconsistent states (out of order
sequence of scheduled events, if the first is rescheduled after the
second).
* The reschedule option will be shown next to any activity related to a
calendar_event regardless of its activity type. There are some edge cases
that we may want to change in the future :
- When changing the activity type of a 'meeting' activity associated to
a calendar event to any other activity type, but without removing the
calendar event, the reschedule action is still showing (since the event
is still ongoing and was not deleted from the calendar).
- Conversely, with a meeting which is not (yet?) related to a calendar event,
the reschedule action will not be available.
* Add a new field to MailActivityMixin in the calendar module context. This
field is the event linked to the next activity, if there is one such event.
It is used to check whether the reschedule action should be available to the user.
* Add a test for this new field to validate the expected behavior.
* Add the priority widget to the priority field in the opportunity tree view
Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
* This feature will be useful when the user needs to "reschedule" an event.
It is more convenient to open the CalendarView around the original start date of the
event instead of "Today"
* Add a test to ensure that the context key is correctly passed to the view as the initialDate
Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
* In the Communication tab, prevent inserting multiple duplicate lines
upon switching template.
- Before, when the user was switching between templates, the lines
introduced with the last template were not removed, and the amount of
lines only kept increasing.
- Now, only the lines that are linked to a registration are kept
* In the Tickets tab, prevent inserting multiple duplicate lines upon
switching template (Ticketing) if there was already tickets linked to a registration.
- Same problem as in the Communication tab, multiple lines could be introduced.
- Now, only the lines that are linked to a registration are kept
* Add 2 tests (compute mails and tickets) to ensure those behaviors are properly
maintained in future updates. As the issue occured only in a non-saved Form when
switching event_type templates, the tests are a little low level (since we have
to check the computed results directly in the Form).
* Remove the last 2 steps of the event_tour :
- They are a bit out of scope and they break the rythm (better to end on a high note)
Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
* Reorganize and reword some of the fields for the activity form type view
* The fields `force_next` from `mail.activity.type` and its related
field from `mail.activity` are removed.
Instead, a new field `chaining_type`, which is a `selection` will
improve the readability of the activity_type form. (It is made more
obvious that the user has to choose between 2 modes :
- 'Trigger Next Activity': used when the user wants to specify the type of the
next activity, which will be triggered once the current activity is done
- 'Suggest Next Activity': used when the user wants to recommend the
next activity for the user to schedule once the current activity is done
* To be consistent with this change :
- The field `default_next_type_id` is renamed `triggered_next_type_id`
- The field `next_type_ids` is renamed `suggested_next_type_ids`
* The field `default_description` is renamed `default_note` to better match the
`note` field from `mail.activity`
* About the specific case of activity_type.category = 'upload_file' :
An activity which has this type's category is automatically marked as done as soon as
the file is uploaded. This prevents the user from choosing a "next activity type".
As such, an activity_type with this category can only make use of the
chaining_type = "trigger", to be part of an automated process.
An activity_type with this chaining_type should have the
triggered_next_type_id set (usually required in the Form).
But, since it does not make sense to set suggested_next_type_ids in this case :
- chaining_type will stay hidden in the Form
- triggered_next_type_id will always be shown and is not marked as required in the Form
- if triggered_next_type_id is not set, chaining_type will be "suggest"
Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
UPGRADE : https://github.com/odoo/upgrade/pull/2167
* When clicking on a button that is a preview for a "mass mailing",
always open it in a new window for the user that is editing the form, so
that changes are not discarded (when leaving the page).
- The option "Open in a new window" remains effective for the recipients of the mail.
* Rename Mailing Campaign to Campaign : this is just a mailing campaign,
they are used everywhere in the marketing scope now. And it can be part of
a multi-channel campaign.
* Show/hide mailings count depending on settings :
- Mailing Campaign must be activated in the email marketing settings in
order to display the Mailings count in the utm.campaign kanban view
* When there is no matching recipient for a mailing campaign,
properly display 0 / 0 instead of 0 / 1 to better indicate that it is
not expected that anyone will receive an email.
Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
* When the option "Skip Queue" is enabled, there shouldn't be an error
raised in case there is no matching record for the specified domain
when clicking on "Launch now".
(i.e. : no partner/contact associated with a certain number)
In other words, the user should be allowed to launch a campaign without
recipient whether its mails or sms, even without a cron rule.
This was already the case when launching the campaign without skipping
the queue (= handled by cron).
Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
* Add a new error message upon deleting the partner linked
to an active user.
* Improve the error message wording upon archiving the partner
linked to an active user. Add the linked users names at the end of
the message.
* If the user has 'write' access on res.users, raise a RedirectWarning
instead of a ValidationError, to offer an easy access to the related users :
- If there are multiple Users, redirect to a list view.
- If there is only one User, redirect to the form view.
* Adapt the test_access_deleted_records from test_orm.py to use a more
basic model : `res.partner.category` (with less business logic), because the
new unlink error message is dependent on a condition that will throw an error
in case of multiple unlinks of the same record (MissingError).
* Force close the frontend archive confirmation Dialog since _toggleArchiveState
may be interrupted by another Warning/Error Dialog. If the new Dialog was the
redirectWarning, and the user chose to be redirected, the first Dialog would
stay open even thought the context already changed.
* Modify the placeholders for a partner Name/Company
-> placeholders will change according to an Individual or a Company.
* Adapt the main_flow tour to correctly select the partner name field on
mobile (tested in enterprise).
Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
Some requests are sended without specific action.
So we need set these call to fit to a default action
who is a empty string.
Pull requeste related: 63375
closesodoo/odoo#67089
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
this commit aims at refining the UX for events, notably:
- create a helper for the magic button on the event_track form, because without
this the user won't be able to understand what the button does.
- on stage update, the kanban state will be automatically set to "gray"
beacause when changing stages it does not make sense to keep the previous
kanban state especially when it is set to "green" or to "red".
- make the cost of the event registration product demo data lower then the sale
price as it is not normal to have a sale price lower then the cost.
- change the style of the "discover all our events" marketing link in the event
reminder email template in order to make it pop a bit more for the user as
this is an important link
Task-2451125
closesodoo/odoo#65613
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit aims to force to open in a new tab out-of-domain hyper-links
in backend html fields.
Previously:
When a user adds a link in an html backend field, the user is free to
choose if the link will open in a new tab or not with a check box.
After this commit:
When a user adds a link in an html backend field, this link opens a new
window if those two conditions are met:
- The url doesn't begin with the current location origin;
- The url doesn't begin with a "/", i.e. an internal link
that has been stripped.
The user doesn't have the check box option.
Remark:
This doesn't affect previously added links BUT if a previously added
link is opened in a LinkDialog, it will be re-rendered following the
conditions hereabove.
Part of https://github.com/odoo/odoo/pull/64622
task-2377544
closesodoo/odoo#64622
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit aims to change the behaviour of <a> links in readonly pad
widgets.
If the <a> redirects to a page that isn't in the domain (hostname
different of the current location hostname), we open it in a new
browser tab by adding a target.
Limitation: If you use the collaborative pad for a while and then
go back to a web editor html field, you'll have to edit each link
in order that the link opens a new tab by clicking on it.
Part of https://github.com/odoo/odoo/pull/64622
task-2377544