As there is no session object, it is not possible to generate a randomised set
of questions that will be displayed for all the clients.
When getting the most voted answers while checking which question is the next
one to display, or if this question is the last one, predefined questions are
regenarated each time a fake user input is created (the most voted answers.)
So at the end, while checking if a question is the last one, we compare
different objects.
This is not an issue for non-randomised survey, as everything is constant.
So, until a solution is found to keep information related to a session in
particular, randomised questions mode will be ignored in live session mode.
Task ID: 2230980
X-original-commit: 7f0981c4a61429802a5fe24dd794221b1275dfe3
In Session Mode:
Before this commit, autosubmit was only dependant of the back button,
but not of the session mode. In session mode, back button is ignored,
and auto-submit sould not happen in session as user has not the possibility
to go back in case he misclicked.
After this commit, the auto-submit only happens if back button is activated AND
if we are not in session mode. This is already checked inside
survey._can_go_back method and already given to the template.
When selecting 'other' option:
For a single or multiple choice question, if the user is selecting the
'Other' choice, Auto submit should not happen. Otherwize, the user has not the
possibility the type his custom answer.
Also, if the question has comment that does not count as answer, the user
should still be able to add a comment after having selected the answer.
The comment can be a complement of answer.
Task ID: 2230980
X-original-commit: 7f03380b49a55f3c2e36f379043c33a8a17f49ed
Unanswered questions or sections are now hidden in the survey review mode.
Only the question answered by the user will be visible.
If the survey was done during a session, the users will see their own answers,
even if the theme they selected was not the most voted one (in case of
conditional questions).
To get the questions to display :
- questions that have been answered
- + the ones that should have been answered = active questions
In session, active questions are based on most voted answers)
This commit also fixes the randomized questions handling in most voted answers,
as copied predefined questions where <NewIds> and those was not usable in
some templates.
Task ID: 2230980
X-original-commit: 8ca79727d5a93b91746c1e63d59d08550417906c
Before this commit, during a session, it was still possible to select another
choice (in a multiple choice question) even after having selected and submitted
an answer.
After this commit, if the question has already been answered or time limit
already ran out, it's not possible to use key to select another choice.
Task ID: 2230980
X-original-commit: e1acda0493092f5020576fc30768141a99b9fd48
Before this commit, is_last_page_or_question was determined only in function
of next active questions : If there are no active question after the current
one, current question is the last one.
But, in conditional questions context, if the current question is conditionning
the display of latter questions, when we display the current question, we
cannot already know if we are on the last question, as user did not answered
yet.
After this commit, the current question is the last one only if
- there are no active questions that follows
- AND the current question is not conditionning the display of other questions
For page_per_section, we check the same rule for all section's questions.
Task ID: 2232973
X-original-commit: 12d962e579d2480fbf821fb381adebf47668dbcc
Before this commit, after each scored question, a intermediate leaderboard was
shown, before going to the next question, even if no 'nickname' question was
present in the survey. So that the leaderboards were display only 'anonymous'
attendees, which is not really useful. Also, after last question, the final
leaderbaord was not shown and the survey was closed immediatelly, which was not
really coherent (show intermediate leaderboards but not the final one).
After this commit, the leaderboards and the final one are shown only if a
nickname question is present on the survey, so attendees can identify
themselves and retreive their ranking on each leaderboards.
Task ID: 2230980
X-original-commit: dd409de096c48f22476aff3f37526bc76c1cde12
As section with description are now considered as potential questions to
display, the method to get the next question to display needs to check if
the next section should be displayed or not, depending on conditional
configuration and user inputs.
For page_per_question and page_per_section layout, the following rule now
applies:
If the section is empty (has no sub-questions):
Show it if section has description, else skip it. (in both layout)
If the section has sub-questions:
If a least one sub-question is active:
In page per section: show it.
In page per question: show if section has description, else skip it.
If no active sub-question: Hide it.
Apply also empty section rules to non conditional survey :
If a section is empty (no description and no active questions inside), the section
should not be displayed.
Task ID: 2230980
X-original-commit: f0ce3623e3cfc2451e3f7359ec09399e6e474c10
Currently, In the project module, the archived/deleted sub-task is
not deducted from the count of the 'sub-tasks' stat button.
Steps to reproduce:
- Go to Project > Configuration > Settings > Enable 'sub-tasks'
- Go to a Project with sub-tasks enabled, open a task and create a sub-task
- Archive/Delete this sub-task
So in this commit, we applied filter on sub-task which show only active
sub-task on the stat button.
closes odoo/odoo#55347
Taskid: 2304887
Closes: #54904
X-original-commit: 81db237e3324922ff16f2b290922f21d98046738
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This allows get to be simplified to only handle local id.
Part of task-2308312
closesodoo/odoo#55346
X-original-commit: fa013d1d29e64706a08499d0f564327766410f8e
Related: odoo/enterprise#12159
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
- use Map for _toComputeFields
- factorize const access out of loops
- avoid Object.entries
- introduces `exists` method to avoid costly call to `get`
- ensure compute are using update to trigger potential _updateAfter
Part of task-2308312
X-original-commit: e364886c2450872a7e42cef549f253b10e55158d
Currently, the "Chat" button appears in the form view when it is
displayed as a modal and on click sends to the app switcher
because js_class is not loaded on the dialog when employee
form view is opened through the one2many(dialog).
For ex: in online appointment when on click on 'available
emloyee' it will open the employee form view in dialog and there
is a chat icon but it does not work.
So in this commit, we fix this issue by hiding the "chat" button
when the view is displayed as a modal. make a button visible
based on action context and when form view is oped through the
click of one2many then do not display the chat icon on modal
dialog.
closes odoo/odoo#55345
Taskid: 2291340
Closes: #54381
X-original-commit: e2bac64411f80a3fcf2c5d5d60ad3eccf6517e56
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, the address of the company in the boxed template was not properly aligned with the tag line.
closesodoo/odoo#55344
Taskid: 2287262
X-original-commit: 03cfc283df715247fc33ce78698582788c1d4aa9
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In the commit, https://github.com/odoo/odoo/commit/3bd345597fa932abdaf780f72bacf331690f549b#diff-4b74c5cd47565e7fbe2a526d12a577c4L300
which convert the onchange to compute, there was onchage on
number_of_hours_display and on number_of_days_display which
going to write the value to number_of_days. but it was missed
in above commit so value was no upated in number_of_days.
So due to that when we try to allocate the duration in terms of days
or hours in time off allocarion and save it, it will be automatically
takes the default value.
So in this commit, Fix the issue and update the number of days based on
number_of_days_display and number_of_hours_display also set the default
value for number of days/hours when change allocation type or holiday
status type.
closes odoo/odoo#54715
Taskid: 2275933
Closes: #53014
X-original-commit: 5fe6ae94bb61cc27f8f3326408d749680e4f79e1
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
After #56a8c9e4311d24c33b7ad08b8230e4be345a85b8 we check access rights in function fields_view_get,
so a user with only 'Kiosk Attendance' right can't see public
employee profile.
After this commit:
In attendance application, we always show public employee profile
as it not usefull to show more information in this application.
closesodoo/odoo#55341
Taskid: 2298803
X-original-commit: 1fbb8f1ebcb805317b93e0b4ea363aaec8e3e36e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Followup of 69d2513de21c2e80de605f77912a3687b8a79c6d : fix computation of menu fields values to
be more inlined with base menu option (website_menu) + True by default when
activating menus.
Also force update when writing directly on a menu field to ensure coherency
of website.event.menu.
PR #55325closesodoo/odoo#55340
X-original-commit: 19d028aa885d5623ae98b26ad135a1b29c89d5ee
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Allow to finely tune display of datetimes in front-end by adding support of
tzinfo parameter of babel format_datetime. See babel for more details about
its use.
Also add some missing translations bits due to last QWeb options added.
LINKS
Followup of 69d2513de21c2e80de605f77912a3687b8a79c6d
PR #55325
X-original-commit: c7d6e90c93e505950496eec382c89a9936d243be
Wrong usage of self in for loop
closesodoo/odoo#55334
X-original-commit: 5a0b06ab0447f2b09e71934f2cc3209e6ebe9359
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Before this commit, footer were too small for "clean" template wieh the company address is displayed on 5 lines.
closesodoo/odoo#54330
Taskid: 2287262
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The first Journal Entry of a tuple (period, journal) has a name set by
default so that the user can change it before posting.
If we changed the date after the name has been given, it never changed
anymore; meaning the number could not be of the same period as the date
of the Journal Entry.
We now always reset the name to the default one if the name has to be
recomputed (change of date/journal)
closesodoo/odoo#55321
X-original-commit: 0c5d71aab8eefb57116a5b93b4c67222a080ddec
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
Purpose
=======
There are several places where the duration is expressed in hours even though the encoding unit is in Days.
Specifications
===========
The duration should be expressed in days instead of hours in the following places:
[x] Timesheet Entries
[x] Portal > Tickets
[x] Portal > Timesheets
[x] Portal > Tasks
[x] Portal > Sales Orders
[x] Project Overview
[x] Project task form view (in this case, the label of the field should be 'Planned Days')
[x] Timesheets > HR Timesheet/Attendence Report
[x] Project > All Tasks
Hide the following elements if the encoding unit is in days:
[x] 'Timesheet Timer' feature on the project form view
[x] 'Timesheet Timer' feature on the Helpdesk team form view
[x] the 'Round timesheets' feature in the settings of Timesheets (except if the 'Awesome Timesheet' feature is enabled)
Bonus point:
[x] Timesheet form view: 0.00 Days should be displayed in read-only if the duration = 0
Some labels need to be adapted to explicit the unit of measure (is it carrots? potatoes?): e.g. Duration (Days) or Time Spent (Hours) :
[x] Timesheet entries report
[x] on the portal
[x] Project overview: add 'recorded' next to Hours/Days
[x] Project overview: add 'Days/hours Spent' above the total by employee
[x] task form view: make sure the 'sub-tasks days spent' button/label stays on one line
[x] hide the 'start' button on project tasks and helpdesk tickets if the encoding unit is in days
Task ID : 2152322
closesodoo/odoo#46184
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- Default quantity on MO is 1.0
- Default quantity to consume on move is 1.0
- No open on the company_id from BoM form
- Optional=Hide for product, qty on BoM form
- Backorder button renamed to Validate
- Date deadline and origin to Miscellaneous tab
- Be able to remove stock_move when the MO is draft
- Some renaming in the menu and run scheduler under planning item
[FIX] mrp: fail to create stock.move after MO confirmation
Since the product_id on stock.move is readonly once it is set and the
MO is confirmed, it's not send to the server and the create crash
since product_id is NULL.
closesodoo/odoo#55270
Related: odoo/enterprise#12148
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Display Days instead of Hours in project overview if encoding unit for timesheets is set to Days
[IMP] sale_timesheet: update some labels in Project Overview
[IMP] sale_timesheet: fix style in Project Overview
[IMP] sale_timesheet: clean code
[IMP] sale_timesheet: add some rounding in project overview
[IMP] hr_timesheet: hide the "Timesheet Timer" feature in the project form if encoding unit is not Hours
[IMP] hr_timesheet: clean display of Days for timesheets
A computed field has to be added to retrieve the encoding uom of the current company and be used in the views.
FieldTimesheetFactor field has to be registered to "float_factor" widget for the "planned_hours" field to work correctly with Days
(for the conversion from hours to days to be computed and to be able to set a greater value than 1 day)
If encoding unit for timesheets is set to Days:
- Display Days instead of Hours in Portal > Timesheets
- Display Days instead of Hours in Portal > Tasks
- Display Days instead of Hours in Portal > Invoices & Bills
- Display Days instead of Hours in Portal > Tickets
[IMP] hr_timesheet: display clean duration in Timesheet Entries
Display Days instead of Hours in Timesheet Entries (print action) if encoding unit for timesheets is set to Days
[IMP] hr_timesheet: correctly display timesheets in Days if configured to
- correctly display remaining days in project.task kanban and list view
- hide timer start button if timesheet is configured in Days
- update several column names
[IMP] hr_timesheet: clean code
[IMP] hr_timesheet: small improvements when displaying timesheets in days
- Rename some labels
- Fixes style
- Prevent fields displayed with widget "timesheet_uom" to change when timer is on
- Display correctly "Initially Planned Days" field in task creation form
When creating a new delivery method with a provider based on rules, if the base list_base_price was equal to x.8, that ended to a float with endless decimal. (eg: 2.8000000000003)
This fix modify the display to show a rounded value.
closesodoo/odoo#54177
Task-id: 2272472
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
The code was wrongly always taking the reserved quantity on the already
returned moves, but if they're done their value is zero.
task-2291973
closesodoo/odoo#54807
X-original-commit: 7b08f0ae0a39e8f575b21e744de16264b6365704
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Create a product category with no accounts defined
Create a product [DEMO] in such category with no account defined
Create an invoice with the default journal which will have the default
account
Create an invoice line with [DEMO]
Upon selecting the product the default account taken from the journal
get cleared and there will be no replacement.
Since the account field is mandatory the account should be preserved
opw-2299228
closesodoo/odoo#54751
X-original-commit: f4c41997cfd560ded6d387324e5dbcf1b7183a36
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
On a chatter portal, when the user is using access token to display
record and is not connected, the message will be posted as the record
partner_id.
But then the preview of avatar in the composer is wrong: you see a
broken image (because you don't have access to "public user" partner
avatar) and when you post it anyway you see the avatar of the record
partner and not public user.
In this commit, if we are seeing the record with token and are logged
out as public user, we will not show the avatar in composer.
(note: before 13.0, the "public user" partner avatar was working)
opw-2276498
closes#54720closesodoo/odoo#54782
X-original-commit: 97473f6a25336e8994730e7722cffb6fd0dbc6d7
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
**PURPOSE:**
When there's only one CTA, the Action button is not necessary and add one extra clicks.
**SPECIFICATION:**
When there's only one CTA, do no group in an Action button.
**LINKS:**
Task ID: 2225270
closesodoo/odoo#51265
Related: odoo/enterprise#10602
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Now that for a single visible button there is no 'Action' dropdown, the
tour helper function has to be adapted.
Related PR odoo/enterprise#10602
Task ID: 2225270
Commit 987951a8d4 moved the CSS file from `point_of_sale` to
`pos_hr`. A file was forgotten.
opw-2293465
closesodoo/odoo#54771
X-original-commit: c0fd47d0993cdbf84cf4d13723e172399d119da5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Clicking on the delete button of custom snippets was not working anymore
since [1]. Indeed, that button is placed inside the snippet thumbnail
which is the drag handle for the drag and drop feature. Since we now
start the drag as soon as the mouse is mousedown-ed, then the click on
the delete button cannot be intercepted.
This commit solves the problem by placing the delete button out of the
thumbnail element.
[1]: https://github.com/odoo/odoo/commit/ab72fe6c4681f62dc670f1cf1ac6fa47abd301f6closesodoo/odoo#54770
X-original-commit: dac122935ac5c20526e529b09bf019f15a290d59
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
RATIONALE
Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.
PURPOSE
Prepare Event Online support by providing fixes and preparatory cleaning
commits.
SPECIFICATIONS
event_sale: do not copy SO information when duplicating a registration.
Indeed it makes no sense and leads to incoherent billing information.
website_event: fix ACL issue when updating menus through event fields
while not being website editor.
website_sale: fix visitor tests, make them independent from demo data.
LINKS
Task ID-2300907 (Event Bugprovements 2)
Prepares Task ID-2283796 (Event B2Basics)
Prepares Task ID-2252655 (master Online Event task)
closesodoo/odoo#54769
Forward-port-of: odoo/odoo#54627
Forward-port-of: odoo/odoo#54621
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>