Before this rev., the context specified on an x2many fields (in the
arch) wasn't fully propagated to the subrecords. This means that it
couldn't be used, e.g., in the template of the sub kanban view (see
parent commit).
PR: #30881
Task #1902306
Purpose
=======
Preliminary cleanup
---------------------------
survey.question is now also the model used for the survey's pages (with the "is_page" field set to True).
This allows to put all the pages and questions together in a o2m field on the view side and
easily reorganize your survey by dragging the items around.
It also removes one level of encoding by directly having 'Add a page' and 'Add a question'
links on the tree view of questions, enabling a faster encoding.
However, this has the downside of making the code reading a little bit more complicated.
Efforts were made at the model level to create computed fields so that the use of these models
still seems somewhat logical. That means:
- A survey still has "page_ids" (question_and_page_ids filtered on is_page = True)
- These "page_ids" still have question_ids (questions located between this page and the next)
- These "question_ids" still have a "page_id"
That makes the use and display of these information at view and controller levels easier to understand.
Certification
----------------
This commit adds certification capabilities to the survey module.
A certification is a survey with the "certification" flag set to true than can be linked
to a certification email template that contains a certification document (PDF).
This template can be edited by the user in the technical settings to customize the certification email/document.
To be able to implement this certification concept, we also have to add scoring mechanisms to surveys.
survey.questions of type 'simple_choice' and 'multiple_choice' now have scores for the suggested answers.
These question scores allow to compute a global score that is used to determine whether the user has successfully
passed the certification or not.
As additional features, we also have:
- A time limit with an interface timer that limits the test to X minutes
When reached, the survey is automatically submitted and unregistered (= unsubmitted) answers are not taken into account.
- A limited number of attempts for the survey/certification
If reached, the user can't take the survey/certification anymore
The 'survey result' layout was adapted accordingly to show the success rate of participants and the correct answers
to the survey questions.
Randomization and survey layout selection
---------------------------------------------------------
The "page" concept is now only present in the user interface.
Surveys are split in "sections" that have two purposes:
- Organizing a (long) survey/certification
- Allow to pick a random questions count for that section (more information here after)
On the user interface, based on the questions_layout field, surveys are displayed:
- On a single page, where sections still appear but are only used as visual separations
- On multiple pages, having one page per section (this matches the previous behavior)
- On multiple pages, having one page per *question*
On top of that page concept, this commit added randomization for the survey questions.
The randomization mechanism will take X questions per section of the survey.
The survey.user_input is initialized with the selected questions to be sure to keep that
set of questions and avoid showing a new set of questions every time the user refreshes the page.
This also allows to easilly go back and know which question we have to show.
Specs
=======
- Create a new survey :
- Add a description field for the survey
- Options on a survey :
- Passing score : (sum of all good answers) in %
- If No scoring => No passing score, no certificate
- If Scoring with answers => Passing score and can see the answers (can create certificate)
- If Scoring without answers => Passing score but can't review the answers at the end (can create certificate)
- for the questions, if "no scoring" selected, can 't see the option "good answer" and "score" on the questions
- If the 2 others options, can see the options "good answer" and "score" on the questions
- all the types of questions are available for each option.
- Questions
- Add the option correct answer on the multiples questions (one or more good answers)
- Certifications
- If scoring, force "mandatory" for "mutliple choices (1or multiple answers)"
- On the dashboard => visual information that this specific survey is a certification
- Time Limit : The student is informed on the home screen of the survey of the time limit.
The clock start when he clicks on "start survey"
- Template of the certificate : send email with attachment PDF
- Front-end :
- Add some margin
- Replace "Back to survey" with the blue-bar from the portal
- Add a timer (start when the survey starts)
- Add a progress bar (number of section and number of question inside the section)
- Analyse of the results :
- First a global graph with the number of people who''ve participated and passed the test
- Stages of a survey :
- Remove the stage "Permanent"
- 3 stages :
- draft : not on-line but can be tested (with phantom token)
- In progress : on-line
- closed : not on-line
- Who can test a survey : the manager and the user. Add this condition to the phantom token.
closesodoo/odoo#29577
Task #1902306
Purpose
=======
When creating a question of type "matrix", the "matrix_type" field needs to be "required".
(survey UI is broken if left empty).
Task #1902306
Purpose
=======
When you invite people to take a certification multiple times, the user will have his "attempts" count reset
with every invitation.
This is important when there is a limited number of attempts available.
ex: A user invited twice will have 2 x allowed_attempts_count to succeed the survey.
Attempts are now separated in different pools using a "invite_token" field on the survey.user_input.
- Improve warning message when user tries to create credit note
- Hide 'Active' column in Taxes/Currencies and added default 'Active' filter in Taxes
- Removed 'save this page...' under 'Account Follow-up Levels','Budget Management',
'Asset Management','Deferred Revenues Management' section in Accounting Settings
- Fixed margin between Cash Rounding checkbox and it's link in Accounting Settings
- Renamed action menu 'Confirm Payments' to 'Post Payments' for payments to make it
consistent with it's form view
- Hide payment acquirers config for non-adviser users and also restric editing access
rights for non advisior and employee user (only data read access rights on payment acquirers)
- Renamed Journal type from 'Sale' to 'Sales' and journals 'POS Sale Journal, Stock Journal,
Cash Basis Tax Journal to Point of Sale Journal, Inventory Valuation Journal and Cash Basis
Taxes Journal respectively
- Renamed the stat button 'Entries' to 'Items' for account assets form view
- Improved description and name of account_voucher module
- Improved Menu typo, Purchase Receipts to Purchases Receipts
- account_check_printing, hr_expense_check: made field storing check numbers character
instead of integer, integer field for check numbers shows check numbers as amount
(i.e., with thousand separator) on UI, which is wrong, hence replaced it with character
type field and a constraint to allow only numbers to be stored in it.
TaskID: 40157
Co-authored-by: Ravi Gohil <rgo@odoo.com>
closesodoo/odoo#21982
Task #1902306
Purpose
=======
The "page" concept is now only present in the user interface.
Surveys are split in "sections" that have two purposes:
- Organizing a (long) survey/certification
- Allow to pick a random questions count for that section (more information here after)
On the user interface, based on the questions_layout field, surveys are displayed:
- On a single page, where sections still appear but are only used as visual separations
- On multiple pages, having one page per section (this matches the previous behavior)
- On multiple pages, having one page per *question*
On top of that page concept, this commit added randomization for the survey questions.
The randomization mechanism will take X questions per section of the survey.
The survey.user_input is initialized with the selected questions to be sure to keep that
set of questions and avoid showing a new set of questions every time the user refreshes the page.
This also allows to easilly go back and know which question we have to show.
Task #1902306
Purpose
=======
This commit adds certification capabilities to the survey module.
A certification is a survey with the "certification" flag set to true than can be linked
to a certification email template that contains a certification document (PDF).
This template can be edited by the user in the technical settings to customize the certification email/document.
To be able to implement this certification concept, we also have to add scoring mechanisms to surveys.
survey.questions of type 'simple_choice' and 'multiple_choice' now have scores for the suggested answers.
These question scores allow to compute a global score that is used to determine whether the user has successfully
passed the certification or not.
As additional features, we also have:
- A time limit with an interface timer that limits the test to X minutes
When reached, the survey is automatically submitted and unregistered (= unsubmitted) answers are not taken into account.
- A limited number of attempts for the survey/certification
If reached, the user can't take the survey/certification anymore
The 'survey result' layout was adapted accordingly to show the success rate of participants and the correct answers
to the survey questions.
Specs
=======
- Create a new survey :
- Add a description field for the survey
- Options on a survey :
- Passing score : (sum of all good answers) in %
- If No scoring => No passing score, no certificate
- If Scoring with answers => Passing score and can see the answers (can create certificate)
- If Scoring without answers => Passing score but can't review the answers at the end (can create certificate)
- for the questions, if "no scoring" selected, can 't see the option "good answer" and "score" on the questions
- If the 2 others options, can see the options "good answer" and "score" on the questions
- all the types of questions are available for each option.
- Questions
- Add the option correct answer on the multiples questions (one or more good answers)
- Certifications
- If scoring, force "mandatory" for "mutliple choices (1or multiple answers)"
- On the dashboard => visual information that this specific survey is a certification
- Time Limit : The student is informed on the home screen of the survey of the time limit.
The clock start when he clicks on "start survey"
- Template of the certificate : send email with attachment PDF
- Front-end :
- Add some margin
- Replace "Back to survey" with the blue-bar from the portal
- Add a timer (start when the survey starts)
- Add a progress bar (number of section and number of question inside the section)
- Analyse of the results :
- First a global graph with the number of people who''ve participated and passed the test
- Stages of a survey :
- Remove the stage "Permanent"
- 3 stages :
- draft : not on-line but can be tested (with phantom token)
- In progress : on-line
- closed : not on-line
- Who can test a survey : the manager and the user. Add this condition to the phantom token.
Task #1902306
Purpose
=======
survey.question is now also the model used for the survey's pages (with the "is_page" field set to True).
This allows to put all the pages and questions together in a o2m field on the view side and
easily reorganize your survey by dragging the items around.
It also removes one level of encoding by directly having 'Add a page' and 'Add a question'
links on the tree view of questions, enabling a faster encoding.
However, this has the downside of making the code reading a little bit more complicated.
Efforts were made at the model level to create computed fields so that the use of these models
still seems somewhat logical. That means:
- A survey still has "page_ids" (question_and_page_ids filtered on is_page = True)
- These "page_ids" still have question_ids (questions located between this page and the next)
- These "question_ids" still have a "page_id"
That makes the use and display of these information at view and controller levels easier to understand.
The function _compute_parent_rating_percentage_satisfaction used the creation
date of the rating to compute the percentage.
However when a client give a new rating, it updates the old one.
As a result it doesn't give the recent satisfaction percentage,
but the satisfaction percentage of recently created tickets.
In other words recently angry clients from old projects would not appear.
Similarly this method is somewhat reimplemented directly in SQL in the rating
route, which happens to be in the project controller.
opw 1921486
closesodoo/odoo#30752
Priority's star, Kanban State's bullet and name fields should be well aligned
and take less space (specially for small devices).
Related to task 1929034
closesodoo/odoo#28965
Revision on https://github.com/odoo/odoo/commit/0d87b1ccea07b952d9079008cfa3cddaf1ccdbee
The commit above prevents opening a chat window when we do not have
access to messages of the conversation. This may happen when
receiving a notification from a document we do not have access
rights.
However, the changes in the code above has an unintended side-effect
of opening a chat window twice when clicking on a channel preview
from the systray messaging menu.
This happens because when clicking on a preview, it detaches the
thread and opens the chat window. Meanwhile, there is a RPC to
notify that the chat window is detached, and the new window state of
the channel is received on the longpolling. Two concurrent attempts
to open a chat window occur at the same.
It was working fine before the commit above, because the registering
of a newly open chat window was synchronous.
This is however no longer the case, because it fetches messages
beforehand: it has become a requirement to open a chat window. Since
the registering of a newly open chat window is now asynchronous,
it was fetching messages and opening the chat window twice.
This commit fixes the issue by aborting attempt to open a chat
window if it's currently opening a chat window, as this process may
take some time due to the `message_fetch` RPC.
closesodoo/odoo#30741
Before this commit, if the first website in the select was not in your current
company, it raises a traceback.
Now with filter on your own company, and support empty website selected
removing required on related field and using attrs dynamic to make it required
closesodoo/odoo#30769
Open the customers followup report
on a line, click on its contextual menu (the down arrow next to invoice name)
click change expected payment date
Before this commit, there was a traceback, because the new date was a string
which has no strftime function
from 03c40e3104 we learn that it can
either be a string or a date object, as Odoo in v12.0 supports this
After this commit, there is no traceback
OPW 1933953
OPW 1933979
closesodoo/odoo#30756
When we search a partner, there is a system that show partner who match
exactly the searched term with non-alphanumeric character removed.
But since a6e1eb9f0a there is an issue that wrong partner match if:
- they have an empty string as VAT in the database (odd but can happen)
- if the searched term only contains non-alphanumberic characters
eg. i search 'é' -> all partner with empty string vat are found since
the empty search '' matches empty VAT ''
With this changeset, if there is no alphanumeric character we will check
depending on the operator `vat=NULL`, `vat like NULL`, `vat ilike NULL`
that all will not match any result (and in the query plan does not take
time).
opw-1929563
closes#30732
Create a tax of type "group of taxes".
Put taxes in its children_tax_ids field.
Change the type to something else.
The view hides the field children_tax_ids, since it doesn't make sense anymore.
However it doesn't actually remove the children_tax_ids.
As a result the child taxes are use in the computation.
We add on onchange to avoid that unfortunate situation.
opw 1931089
closesodoo/odoo#30727
Through many design refactorings, the community caret position was
broken while the enterprise was not. This commit removes the breaking
rule to put it in enterprise only.
closesodoo/odoo#30799
Have a sales team with one or more orders to invoice.
Open the 'Sales Channels' report in Sales.
Before this commit, the 'Invoicing' progress bar of the report,
showed the number of order to invoice and not the sum of the
invoicing amount.
Now, the 'Invoicing' progress bar of the report shown the sum of the
invoicing amount; and the number of order to invoice are shown in their
own field.
OPW-1922438
closesodoo/odoo#30735
Before that, having a payment with amount_residual=0, but amount_residual_currency!=0 did not display it.
Also, 'outstanding credits/debits' label was displayed in case amount_residual was != 0 with an amount_currency=0 (and of course, a currency_id value was set on the aml). This could for example happen in case of partial reconciliation, were the amount_residual field is used to keep track of what will have to be written in the exchange rate difference entry when the reconciliation becomes full.
closesodoo/odoo#30362
- Create the following BOM for 1 Unit of A:
B: 55 Units
- Create the following BOM for 728 Units of B:
C: 1 Unit
- Create the following BOM for 1 Unit of C:
D: 728 Units
- Go to 'BoM Structure & Cost' of A:
A: 1 Unit
B: 55 Units
C: 0.0755 Units
D: 58.24 Units
- Print Unfolded:
A: 1 Unit
B: 55 Units
C: 0.0755 Units
D: 40040 Units
The unfolded PDF structure is incorrect.
The reference quantity taken into account to compute the BoM subline
should be the quantity on the line, not the quantity on the parent line.
opw-1915546
closesodoo/odoo#30726
If no Undistributed Profits/Losses account can be found, Odoo tries to
create one with number '999999'. However, such an account number might
have been created manually by a user. In this case, the account creation
fails.
opw-1932701
closesodoo/odoo#30719
When a colored kanban tile is colored, and there is a color attribute on
the tile HTML element indicating a color field (eg. when a kanban view
with color dropdown is created in studio), there was a HTML element over
the whole tile preventing to click on links or other sub element of it.
This HTML element is just a transparent used for accessibility to
contain the tile color intelligible name, so this commit just size it
over the area of the color (currently in base bootstrap ~3px at the left
of the tile).
opw-1932283
closes#30717
Only the syntax
<t t-operation="attributes">
<attribute name="foo">bar</attribute>
</t>
was currently supported for attributes while the syntax
<t t-operation="attributes">
<attribute name="foo" value="bar" />
</t>
Is also correct and supported server side.
Using value instead of the node content is needed to avoid translating the node
while it is parsed by babel to extract translatable content
Revision on https://github.com/odoo/odoo/commit/a669d89565ad9904d07886b00665e3940ce04665
The commit above changed the template of the Discuss app in order
to add some features, such as the channel "quick search".
The livechat module extends Discuss app to support livechats. However,
the commit above didn't update it correctly. As a result, pinned
livechats were not shown in the sidebar.
This commit fixes the issue, so pinned livechats should now always
be visible in the sidebar.
closesodoo/odoo#30738
last_year_mo_order was removed in commit 4a350ff8cc. However it was still used in action_view_mos.
This commit adpat the action context in order to keep the same behaviour than previously.
task id 1922547
closesodoo/odoo#30347
As usual, I mess up with forward-ports. This one was actually nasty, as
no syntactic error was introduce, while only failing because of this
left over `console.error` call.