Before this commit, the number of hours the task is
open is computed using the resource calendar. The same
measure expressed in days simply divide the number of
hour by 24. This is not what we intend: we want to know
the number of working days since the task was created,
and not a simple conversion from hours to days.
Task-37561
closesodoo/odoo#30092
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
This commit simply moves methods from the resource
mixin to the calendar, so it can be use without having
a resource.
Indeed, in some case, we want to know the duration (in
days and hours) according to a working calendar without
any resource attached (typically services using a
working calendar).
Task-37561
Improve the usability of the employees profile / "My Profile"
TaskID: 2048672
closesodoo/odoo#35587
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currenty if the self edit setting is deactivated, a user has to be
hr_user in order to change its employee image through the employee
profile.
The problem is that if the image on the employee is currently
not set, we should copy it through the employee profile whatever the
setting value
closesodoo/odoo#35542
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Follow up of 58a2ffa26f
Variant specific field `image_raw_original` was meant to be renamed to
`image_variant_1920` instead of `image_variant_max` to follow the same naming
convention as the other fields (having the pixel number in the name).
closesodoo/odoo#35493
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Usability improvements:
- Prevent the user from doing actions that will lead to exceptions.
- Improve error messages when exceptions do happen.
Also add more constraints to keep the database in a consistent state.
task-2035609
closesodoo/odoo#34833
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
In master, em tag are not displayed in PDF report.
Strangly, the space to display the element is taken but the element content is
invisible.
If the action report is change from PDF to HTML, the element is displayed as it
should, in italic.
As having `Code:` in italic is not that mandatory, this commit removes the em
tag to display `Code:` again.
closesodoo/odoo#35685
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
When user doesn't use automatically generated move lines, he/she can
copy a list on Serial Number in the `lot_name` field, it will create a
new move line for each value with the corresponding `lot_name`.
Also, as we need a line break char to split the field value, we need the
field is a testarea as a simple input can't have value with breaklines.
So, the `lot_name` need to be a field text instead of char.
Task #2028780closesodoo/odoo#35532
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
In detailed operation view, the method to generate and assign multiple
SN numbers will create a move line depending of the SN name the user
defined and the number of SN to generate. These features are only
accessible if picking option "Pre-fill Detailed Operations" is disabled.
Also, hides the quick "Assign Serial Numbers" button in the same case.
Task #2028780
For picking of type receipt, don't display pre-created moveline so user
are encouraged to create move lines instead of modify the existing ones.
Task #2028780
This way we keep the current behavior of the barcode client action but
we don't display move lines on receipt.
Users could edit the view, display "show_reserved" and check it to get
back the old behavior in the form views.
task-2028780
Co-authored-by: svs-odoo <svs@odoo.com>
PURPOSE
Have a nice ribbon widget to display state of records: part II
SPECIFICATIONS
A POC for a new ribbon widget has been recently introduced at 02fbb73.
It adds a ribbon on the top right of a form to make some status more visible
and more user friendly. This commit greatly improves the design of this
ribbon in order to have a real ribbon.
You have to specify the text attribute to show the text on the ribbon.
You can also specify a bg_color attribute to color the background with a
bootstrap background color class according to the business meaning of the
flag displayed in the ribbon.
CRM: Replace Won / Lost bootstrap badges by ribbon widgets in lead /
opportunity form view.
Various: Next to 883c96b and recent ribbon widget update some form
views have to be updated. It is best displayed following those rules
* after oe_button_box in order to fix overlapping;
* before image to overlap it cleanly;
LINKS
Task ID : 2032621
PR : #34662
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose of this commit is to handle error.datetimepicker event of
datetimepicker element. If not handled then window.onerror will handle it and
give unexpected warning via crashmanager. Note that this issue comes from commit
e6d4ab84da which binds window.onerror in frontend
also and hence uncaught javascript error is also handled by it.
As we do not want to raise crashmanager if user enters wrong value in
datetimepicker let us handle it in survey.js correctly.
Task 2044512
Also see https://github.com/odoo/odoo/pull/32132closesodoo/odoo#35609
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Have a nice ribbon widget to display state of records: part II
SPECIFICATIONS
Next to 883c96b781 and recent ribbon widget update some form views
have to be updated. It is best displayed following those rules
* after oe_button_box in order to fix overlapping;
* before image to overlap it cleanly;
LINKS
Task ID : 2032621
PR : #34662
Task
PURPOSE
Have a nice ribbon widget to display state of records: part II
SPECIFICATIONS
Replace Won / Lost bootstrap badges by ribbon widgets in lead / opportunity
form view.
LINKS
Task ID : 2032621
PR : #34662
PURPOSE
Have a nice ribbon widget to display state of records: part II
SPECIFICATIONS
A POC for a new ribbon widget has been recently introduced at 02fbb737b9.
It adds a ribbon on the top right of a form to make some status more visible
and more user friendly. This commit greatly improves the design of this
ribbon in order to have a real ribbon.
You have to specify the text attribute to show the text on the ribbon.
You can also specify a bg_color attribute to color the background with a
bootstrap background color class according to the business meaning of the
flag displayed in the ribbon.
LINKS
Task ID : 2032621
PR : #34662
* pos_sale, sale, sale_crm, sale_management, sale_stock, website_sale
Purpose of this commit is replace the confirmation date field with
order date from sale. As order_date and confirmation_date of sale order
are having same value so no need to keep two fields, remove confirmation
field and instead use order date.
cretae_date use as order Date and replace the order_date on confirmation
of the order as confirmation date.
task-2027274
closes: #34571
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Before this commit, a discount could only target the whole order, the cheapeast
product or a specific product.
With this commit, it becomes possible to select multiple specific products.
This will ease some realistic ecommerce flows.
For instance, one might create a promotion targetting all his bikes by simply
adding all bikes products into the specific products field. This is easily done
with the many2many widget on the form view.
task-33737
closesodoo/odoo#35500
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Pratima Gupta <pgu@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Commit b62ebab58 refactored "all the brol" but left half the occurences
untouched.
It was therefore hard to read and understand the tests as the same items would
be referenced with 2 names.
In the favorites menu, it was possible to create two
favorites with the same name (contrarily to the
specifications). The root cause of the problem was that
the submenus of the favorites menu were not updated at
all. This commit fixes that situation.
closesodoo/odoo#34902
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When toggling a favorite filter, the options used by
the active date filters/groupbys and the field created
via autocompletion were not correctly cleared, leading
to strange situations. This is fixed by this commit.
A previous commit modifies the way in which
date filters work in the Filters menu.
In particular, the attribute default_period of filters
with date attribute cannot take anymore values
like 'this_week', 'last_7_days',...
This commit modifies the xml acoordingly by replacing
the attributes date and default_period by a suitable
domain.
Task ID: 2028787
This commit modifies the functioning of date filters
in the control panel Filters and Group By submenus.
For a filter with date attribute set, the list of
proposed options is shorter but allows a bigger set of
domains to be quickly created (through combinations of the options).
The resulting list of domains is different of the previous one:
domains like "Today" or "Last Week" are left aside but many others
(and their unions) are now accessible.
The domains generated in that way are no more dynamic but it is still possible
to save dynamic filters in general.
This commit also reintroduces the multi selection of options for groupbys of type
date/datetime in the groupby menu.
Task ID: 2028787
Before this commit, when we use `testUtils.patchDate`,
the function `Date.now` was not using the fake date for reference.
This is an issue with the lib momentjs, which instantiate the
current date as follow:
```
new Date(Date.now())
```
Because of this, we were handling patched date and unpatched moment
objects.
Task-ID 1902848
If "force_create" is false and no account was
previously create, the function will raise an
error. With this fix, an empty recordset is
returned.
closesodoo/odoo#35664
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Selling a product you don't have in stock anymore triggers a message
without pertinent information about available quantity.
This commit adds a little widget on sale order line to inform the salesman
there are not enough quantity available. Clicking on it will reveal:
* The estimated delivery date
* The actual quantity on hand
* The quantity forcasted at the estimated delivery date
For kit product, the quantities are the maximum occurence of kit available
regarding components quantities.
Task 2003485
closesodoo/odoo#34336
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
When updating the schedule date of a picking, the schedule dates of its
stock moves are updated. However, their date field isn't. According to
the help of the date field, its value should be equal to the
expected_date field until the move is done. That's probably why the
virtal_available computed field only take care of the date field its
`to_date` domain.
As this is a long standing issue, it seems safer to adapt the computed
field's domain instead of fixing the date should be equal to expected
date until done thingy.
task-2003485
The forecast report added in b311d9c always shows the stock in all locations
even in multicompany/multiwarehouse.
This commit change the SQL query that gather the product quantities over
time to take the warehouse into account and be able to filter on it.
regarding stock.move, the warehouse is the source location one in cast of outgoing
move and the destination location one in case of the ingoing move.
Furthermore, the SQL query doesn't filter the product on their type. That
means a stock move on consumable product will be shown even if this product
Task : 2003485
The stock module adds 4 quantities on products:
Quantity on hand
Incoming quantity
Outgoing quantity
and Forecast Quantity
Forecast Quantity is equals to Quantity on hand + Incoming quantity -
Outgoing quantity. Those two last ones are computed from the open stock
moves wainting to be validated but the reservation is not taken into account.
This commit introduces a fifth quantity 'free_qty' that acts like the forecast
one but only with reserved quantities.
Since ed18095127, some google fonts are included. The "Open Sans" fonts
prevents RPM packaging to work because of white spaces in file names. This
is a Python setuptools bug (https://bugs.python.org/issue809163) which is
not yet fixed.
With this commit, the "Open Sans" directory and ttf files are renamed
into "Open_Sans", solving the packaging problem.
closesodoo/odoo#35661
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Follow up of 61de1c263a
- Remove the dangerous **kw from the route in favor of specifying useful args.
- Use the existing method to link attachments to message instead of duplicating
the logic in an incomplete manner.
- Fix an issue where the actual email would not be sent if the message was empty
but an attachment was defined.
- Ensure the send attempt is done immediately instead of after the cr commit.
The goal is to show potential error messages correctly to the user with the
crash manager instead of a generic error page.
This also increases the send timeout and prevents the error in the first
place in most situations.
closesodoo/odoo#35263
Signed-off-by: Christophe Simonis <chs@odoo.com>
PURPOSE
Improve daily use of eLearning by improving backend actions (notably
attendees management) and performing a back2basics improvement
flow on front-end (duration computation, allow to install surveys directly
from frontend for certifications, various design improvements).
SPECIFICATIONS
See sub commits and tasks for more details.
LINKS
Task ID 2045620 (PR #35415) allow to remove attendees from backend
Task ID 2007294 (PR #35516) better duration computation
Task ID 2026846 (PR #34592) onboarding and back 2 basics
closesodoo/odoo#35635
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Ease discovering of eLearning features by allowing to install surveys
directly from frontend in order to allow certification.
SPECIFICATIONS
Add a button in Upload a document to install Surveys. This button only
appears if surveys is not installed.
When button is clicked, ask for confirmation before installing survey.
LImitate this feature to group system: system people should see the button
and use standard ACLS about module installation.
LINK
Task ID 2026846
The 'index_content' field was only filled when uploading from the frontend.
That would lead to inconsistent results when creating/updating 'presentation' slides from the slide.slide form view.
The field was also not cleaned if the slide content changed.
As it's usage was not very clear (only on a 'search', and not very intuitive), we simply removed the field.
The completion time of a slide now has default values for slides of type
* video (duration of the YouTube video);
* PDF (number of pages * 5 minutes);
This computation is done when uploading a slide in frontend or by an onchange
in backend. Field can still be given / modified by elearning people as
result may not be reliable (pdf parsing is not accurate, and/or you may
estimate time differently from strict page-based computation).
The course will sum up all durations of its (active) slides. Display has been
changed from "x minutes" to "x hours y minutes".
Task ID 2007294