Commit Graph
135062 Commits
Author SHA1 Message Date
Aurélien Warnon aaf3cb50c3 [IMP] survey: improve sessions fade in/out delays
PURPOSE

Improve the various sessions flow to make it easier for attendees to reach the
session and to allow better interactions between the host and his audience.

This comes with small usability improvements as well as increased
"beautifulness" by using custom layouts & animations.

SPECS

This commit changes the survey sessions fade in/out delay for both the host
and the attendees.

When going from one question to another, the total delay is now 1 second
(instead of 2 previously), with 500 ms for fade out and 500 ms for fade in.

The previous delay gave an impression of "slowness".

The delays and "server lag reduction" on the attendees side were adapted
accordingly.

LINKS

PR #46768
Task 2208574
2020-03-31 15:12:05 +00:00
Aurélien Warnon a330099b92 [IMP] survey: improve session "short link" management
PURPOSE

Improve the various sessions flow to make it easier for attendees to reach the
session and to allow better interactions between the host and his audience.

This comes with small usability improvements as well as increased
"beautifulness" by using custom layouts & animations.

SPECS

- For live session only:
  Currently, the "short link" feature is good but it still needs to be improved
  with the following points:
    - Make the default "code" shorter (4) and digit only.
    - Allow to customize the "code"
    - Check for potential collisions

Added at the same time:
- input element is focused when you land on the '/s' page.

LINKS

PR #46768
Task 2208574
2020-03-31 15:12:04 +00:00
Nasreddin (bon) c5807af0ab [IMP] event: Clarify attendee display
Clarify the kanban view to clearly display how many attendees
could show up as well as other places where attendees are mentionned.

Task ID 2205701

closes odoo/odoo#48584

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-30 10:05:19 +00:00
Nisha patel 433246a69a [IMP] base: Display warnning to user while view modification
Purpose of the task is, Warn the user that we do not recommend editing
the architecture of standard views because During migration if the
client does standard views modification then during migration all views
will be updated according to the new odoo version and all customization
will be lost.
So during upgraded database testing issues will come about that views
or client will post issues and ask about where our customization
is gone.

So in this commit, we added alert message on edit of view like:
'Be aware that editing the architecture of a standard view is not
advised, since the changes will be overwritten during future module
updates. We recommend applying modifications to standard views through
inherited views or customization with Odoo Studio.'

closes odoo/odoo#48492

Taskid: 2219956
Closes: #48492
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-30 11:52:32 +00:00
Kevin Baptiste f32067cb95 [IMP] hr_expense: add accounting_date in expense
Add a related field `accounting_date` in the expense to the expense
report.

 - Should represent the accounting_date field from the expense report
 linked to this expense
 - Only visible if the status of the report is approve, post or done
 - Only visible if the user has at least the Accounting > Auditor access
 right level
 - Should be in read-only
 - Should be stored

closes odoo/odoo#48238

Taskid: 2221668
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-31 14:00:14 +00:00
fja-odoo 388c222c6c [IMP] base, *: allow html fields not to sanitize forms
* = event, website_event_track, website_sale, website_hr_recruitment,
website_livechat, website_sale, website_slides

The option to sanitize or not the forms was not available, this will
allow better flexibility on whether forms should be sanitized or not on
an HTML field.
Also we use this new param to allow forms to be added on some already
existing html fields where forms where sanitized out.

task-2209554

closes odoo/odoo#47318

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-03-31 14:22:43 +00:00
Victor Feyens 0d52f9c379 [IMP] sale_management: default template by company.
closes odoo/odoo#41499

Related: odoo/upgrade#854
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-31 10:44:41 +00:00
Kevin Baptiste 79e79d0fd0 [IMP] project: add new kanban examples
Add new Kanban examples and improve the usability of the dialog.

closes odoo/odoo#48620

Taskid: 2210279
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-31 10:58:14 +00:00
Jeremy Kersten bf37ca2a34 [REV] base: server_attachment add max-age when unique is provided"
This reverts commit f7d7c53cd5.

Need to investiguate debug=assets mode.
Revert to unlock others devs

closes odoo/odoo#48675

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-03-31 14:22:17 +00:00
oco-odoo dcdf00ccb5 [FIX]account_qr_code_sepa : add missing dependency to base_iban
closes odoo/odoo#48660

Related: odoo/upgrade#1014
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-03-31 10:36:07 +00:00
Barad Mahendra 14137c8d09 [MOV] hr_timehseet: set default value '/' for name(description) on timesheet.
Currently the code for default name is inside the timesheet_grid
so on community the name(description) of the analytic line is
required.

so move the default name code from timesheet_grid to hr_timesheet.

TaskID: 2176065
Related Enteprise PR: https://github.com/odoo/enterprise/pull/9561

closes odoo/odoo#48657

Closes: #48657
Related: odoo/enterprise#9561
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-31 10:03:43 +00:00
Benjamin Frantzen (bfr) def8817d72 [IMP] accounting : several misc improvements
- open accounts in a full view instead of a modal
- ability to reverse entries at their own accounting date
- don't create draft closing entries and reminder if no configuration for tax groups
- reordered account menus
- improved invoice form view

Task ID : 2209497

closes odoo/odoo#48355

Related: odoo/upgrade#1001
Related: odoo/enterprise#9485
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-03-31 11:15:11 +00:00
Lucas Lefèvre 69686efcd5 [IMP] hr_timesheet: Round timesheet when created from timer
Because.

Mighty PO said: "We'll need this in internal"

Don't ask me, it's changing every two days.

Task 2204084

closes odoo/odoo#48097

Related: odoo/enterprise#9394
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-31 09:26:00 +00:00
Lucas Lefèvre 09ea34ace7 [IMP] hr_timesheet: Always display timer button in list view
Purpose
=======
It might look weird if the play button is displayed on some lines and not others.
It might seem even weirder if we have the Timer functionalities (such as the
timer bar we'll introduce with task 2217930) available even though the timer
is disabled on all projects. In this case, if we wanted something clean, we
would need to introduce a setting to disable the feature in Timesheets as well,
but that seems overkill. At last, you may not want the timer on the task form
view but find it still useful in the Timesheets app.

Specification
=============
Always display the start button, even if allow_timsheet_timer is False on the
selected project.

Task 2204084
2020-03-31 09:26:00 +00:00
Lucas Lefèvre 5024d3a522 [IMP] hr_timesheet: Add some optional fields to timesheet list
Displayed optional fields:
- task_id
- name
- is_timer_running
- unit_amount

Task 2204084
2020-03-31 09:26:00 +00:00
Odoo's Mergebot ca3b3aae28 [MERGE][IMP] website_event_questions: allow 'free text' questions
PURPOSE

Allow "free text" questions in the event questions asked to attendees, in
addition to the existing "selection" type.
e.g: "What are your allergies?"

Rework existing reporting on Questions to ease implementation and give more
meaningful answers analysis.

SPECS

**Free Text Questions**

The implementation is heavily based on the modelisation we chose for the survey
module since the features become similar in terms of question types and inputs.

- Introduce a 'question_type' that is either 'simple_choice'
  (= previous behavior) or 'text_box' that will contain the attendee text
  answer.
- Rename the event.answer model to event.question.answer to make it more
  obvious that it contains answer "suggestions" to a question of type
  'simple_choice'.
- Introduce a 'event.user_input.line' that is an answer to a specific question
  for a specific registration.
  It works very similarly to 'survey.user_input.line' but it's not contained in
  a 'user_input' model, it's directly linked to the registration using a
  'user_input_line_ids' o2m field.

The frontend view has been adapted accordingly to display either a selection
input or a textarea based on the question type.
The frontend orm processing now takes in both answer types (id of suggested
answer or text input).

On the backend side, views have been adapted to display event questions and
attendee answers in a more convenient and logical manner.

**Questions Reporting**

Based on latest testing, the reporting on event questions was completely
unusable if you have more than a hundred questions (all events combined) and
needs to be refactored based on new specifications.

We dropped the current reporting and re-introduced a new one after the commits
that let us handled free text questions.

The new reporting allow users to conveniently analyze attendees answers on a
per-question basis. It shows:
- A graph view showing counts of each suggestions for simple_choice questions
- A pivot view showing registrations vs answers for simple_choice questions
- A tree view showing textual answers values for text_box questions

FIXIMP

When changing the event.type, configured event questions that have answers
(type 'simple_choice') new have their answers properly copied onto the event.

LINKS

Upgrade PR odoo/upgrade#799
Task ID 2189529

closes odoo/odoo#45497

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-31 14:03:14 +02:00
Aurélien Warnon 42cac02d17 [IMP] website_event_questions: allow analyzing attendees answers to event questions
This commit adds necessary views and actions for users to be able to
conveniently analyze attendees answers.

- A graph view showing counts of each suggestions for simple_choice questions
- A pivot view showing registrations vs answers for simple_choice questions
- A tree view showing textual answers values for text_box questions
  (Tree view is also available for simple_choice)

LINKS

PR #45497
Task 2189529
2020-03-31 10:44:00 +00:00
Aurélien Warnon 1e693d0de4 [MOV] website_event_questions: split views to appropriate files
This commit does not change anything functionally, we just move views around to
appropriate xml files so that everything is organized better.

At the same time, a few views were renamed to match guidelines and we removed
a useless view on event.question.answer, that will only ever be edited inline
or inside many2many_tags.

LINKS

PR #45497
Task 2189529
2020-03-31 10:44:00 +00:00
Aurélien Warnon f508a09640 [IMP] website_event_questions: improve question_ids copying from event.type
When applying an event.category on an event.event, we copy the event.questions
from the event.type, but we don't immediately copy the answers associated to
these questions.

This was not done for technical reasons, we were limited by the JS framework.

Since #46807
We now correctly handle nested o2m when triggering compute/onchange.

This commit cleans the code by correctly copying the answers along with the
questions when changing the event.type of an event.event.

LINKS

PR #45497
Task 2189529
2020-03-31 10:39:05 +00:00
Aurélien Warnon a1d6b6af5d [IMP] website_event_questions: correctly show question answers on event form view
This commit adds the display_name to the list of fields so that the view will
correctly compute it and store it in the record state to be displayed by the
associated m2m_tags widget.

Without that small trick the display_name is never computed and the m2m_tags
widget shows empty strings.

LINKS

PR #45497
Task ID 2189529
2020-03-31 10:39:05 +00:00
Aurélien Warnon 0132ab608a [IMP] website_event_questions: add test tour for event questions
This commit adds a test tour that will fill up two tickets with a few questions
answers and then assert that the answers are correctly saved for each attendee.

This will help ensuring that the new "free text question" feature works
correctly, along with existing "suggestion question".

LINKS

PR #45497
Task ID 2189529
2020-03-31 10:39:05 +00:00
Aurélien Warnon 6d2bee710d [IMP] website_event_questions: improve demo data to showcase 'free_text' questions
This commit improves the demo data of the event application by adding a few
questions to better showcase the new 'free text question' feature.

LINKS

PR #45497
Task ID 2189529
2020-03-31 10:39:05 +00:00
Aurélien Warnon 7b79c3244d [IMP] website_event_questions: allow 'free text' questions
PURPOSE

Allow "free text" questions in the event questions asked to attendees, in
addition to the existing "selection" type.
e.g: "What are your allergies?"

SPECS

The implementation is heavily based on the modelisation we chose for the survey
module since the features become similar in terms of question types and inputs.

- Introduce a 'question_type' that is either 'simple_choice'
  (= previous behavior) or 'text_box' that will contain the attendee text
  answer.
- Rename the event.answer model to event.question.answer to make it more
  obvious that it contains answer "suggestions" to a question of type
  'simple_choice'.
- Introduce a 'event.user_input.line' that is an answer to a specific question
  for a specific registration.
  It works very similarly to 'survey.user_input.line' but it's not contained in
  a 'user_input' model, it's directly linked to the registration using a
  'user_input_line_ids' o2m field.

The frontend view has been adapted accordingly to display either a selection
input or a textarea based on the question type.
The frontend orm processing now takes in both answer types (id of suggested
answer or text input).

On the backend side, views have been adapted to display event questions and
attendee answers in a more convenient and logical manner.

LINKS

PR #45497
Upgrade PR odoo/upgrade#799
Task ID 2189529
2020-03-31 10:39:05 +00:00
Aurélien Warnon 278fb50dbc [REM] website_event_question: remove unusable questions reporting
PURPOSE

The commit removes the reporting on the event.question model along with its
created SQL view 'event.question.report' because they're simply not usable.

SPECS

Based on latest testing, the reporting was completely unusable if you have more
than a hundred questions (all events combined) and needs to be refactored based
on new specifications.

As we need to re-work event questions to be able to add "free text" questions,
we prefer to temporarily drop the reporting instead of having to adapt it.

LINKS

PR #45497
Upgrade PR odoo/upgrade#799
Task 2189529
2020-03-31 10:39:05 +00:00
Tiffany Chang (tic) 69e5f59005 [IMP] web: scope list table selection
Prior to this commit, the list_editable_renderer was grabbing the first
table in the DOM. This made it so extending list views with another table
could cause the new table to resize unexpectedly when changing the column
width of the list view generated table (i.e. o_list_table).

While this double table situation may not arise very often, it directly
hindered task: 2198420 and may hinder other customized view tasks.

Related to task: 2198420
("Requests for Quotations KPI's" subsection)

closes odoo/odoo#46654

Related: odoo/upgrade#877
Related: odoo/enterprise#8945
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-31 10:31:35 +00:00
Tiffany Chang (tic) fe41c92771 [IMP] purchase: Add purchase order dashboard
Adds a customized table to top of list and kanban views of requests for
quotation (RFQs). This table includes the following values:
- RFQs to Send (PO.state = 'draft')
- RFQs Waiting (PO.state = 'sent' and PO.date_order >= now)
- RFQs Late (PO.state = 'sent' and PO.date_order < now)
- Avg Order Value (specifically only for POs)
- Avg Days to Purchase (PO.date_approved - PO.date_created and PO.state
  in ('purchase', 'done'))
- Purchased Last 7 Days (specifically only for POs)
- RFQs Sent Last 7 Days (hacky calculation looking at chatter for state
  change 'RFQ' => 'RFQ Sent')

This change corresponds to "Requests for Quotations KPI's" subsection of Purchase
KPIs task.

Task: #2198420
2020-03-31 10:31:35 +00:00
Tiffany Chang (tic) 1ac243c21c [IMP] various: Replace incorrect use of "edition"
"Edition" is a French-English false friend word. "Edition" in English
means "version" whereas "edition" in French means "editing". This commit
updates user facing strings/documents that incorrectly use "edition" instead
of "edit" or "editing". Attempts were made to clean up English around
"edition" usage so please excuse any errors from lack of context
knowledge. Code comments and names incorrectly using "edition" were NOT
updated.
2020-03-31 10:31:35 +00:00
Tiffany Chang (tic) 52dc25d428 [IMP] purchase(_stock): Add more reporting values
Added new values "Average Days to Purchase" and "Average Receipt Delay" to be
used in purchase enterprise reporting tab where:

  Days to Purchase = confirmation date (i.e. 'date_approved') - creation date
  Receipt Delay: effective Date - ('date_planned' or 'expected_date' if
                 no 'date_planned)

Note that these 2 new values are specific to purchase orders only.
Because of this the standard query result cannot be used since it is
done at the purchase order line level. This means duplication of PO
values occur and results in incorrect aggregation calculations. A hack was
done to ensure that these value will aggregated correctly when used at the
enterprise level. Therefore these 2 new values should only be used in
aggregate.

To support these new measures the following updates were also done:
- Addition/improvement of help descriptions for other date related
  measures to avoid confusion
- Change state string to "Status" to match purchase.order (for
  consistent filtering purposes)

This commit supports "Adapt Reporting" subsection of Purchase KPIs task.

Upgrade PR: odoo/upgrade#877
Enterprise PR: odoo/enterprise#8945
Task: 2198420
2020-03-31 10:31:35 +00:00
Tiffany Chang (tic) 18e96c6be2 [IMP] purchase(_stock): Add more and update PO dates
Adds "Expected Date" and "Effective Date" fields to purchase orders to
match what exists in sales orders. "Effective Date" mirrors sales logic
(= first completed stock move). "Expected Date" has simplier logic due
to simplier nature of receiving stock vs shipping (= earliest "Scheduled
Date" of all PO lines). Form view has been updated to include these new fields.

Additionally code was changed to not have PO 'order_line.date_planned' be
overwritten by the 'purchase_order.date_planned' value. Previous behavior
was both confusing and made it so info was lost. Also logic for related
stock move picking line expected date values has been updated to now consider
'purchase_order.date_planned' value if set. Related changes include:
    - not overwriting when PO is edited+saved (this only occurred in write()
      logic, not create() which caused inconsistent behavior anyways.),
    - updating related tests,
    - removing PO line date_planned editing restriction when PO date_planned
      is set
    - updating of relevant stock moves/picking expected date due to
      PO.line.propogate_date = True ('purchase_order.date_planned' if
      exists, otherwise 'order_line.date_planned')

This change also includes some small related improvements:
- Removal of outdated code comment.
- Addition of Help strings to better explain fields.
- Prevent copy of 'date_planned' value into new POs (now mirrors sales
  logic).

This change corresponds to "Receipt Date on PO's" subsection of Purchase
KPIs task.

Task #2198420
2020-03-31 10:31:34 +00:00
Jeremy Kersten f7d7c53cd5 [IMP] base: server_attachment add max-age when unique is provided
Similarly to method _binary_set_headers, when we serve an attachment
(e.g. image) where an unique is present in URL we add a long time of cache.

We considere that the hash will be changed if attachment is updated, so
while we ask for same checksum, lets the browser return the cached response.

closes odoo/odoo#48653

Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-03-31 08:54:52 +00:00
Denis Ledoux 66409d470e [FIX] purchase_requisition: state_blanket_order on multiple records
Reading `state_blanket_order` on multiple records was failing.

e.g.
```python
env['purchase.requisition'].create({})
env['purchase.requisition'].create({})
env['purchase.requisition'].search([]).mapped('state_blanket_order')
```
raised
```python
ValueError: Expected singleton: purchase.requisition(5, 1, 4)
```

closes odoo/odoo#48642

X-original-commit: 031c3f3b0b387cfaf4257cf769c0523097723fc5
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-03-30 23:44:07 +00:00
william 79f36c31c6 [FIX] account: allow showing draft invoice from partner view
There is a default filter on Posted, no need to add it in the domain.
This prevented seeing draft invoices.

closes odoo/odoo#48635

X-original-commit: ca67c83e8d36ececaf97a7579c3ff2529b3e227c
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-03-31 07:07:43 +00:00
Thomas Carlier 6dc2835814 [FIX] hr_expense: remove the expense_extract options from hr_expense
before this commit:
- the selection field with OCR options was in hr_expense module

after this commit:
- the selection field is now in expense_extract module

closes odoo/odoo#48617

X-original-commit: 9440139105825d4efa5fda23149c60179870f9f3
Related: odoo/enterprise#9553
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Thomas Carlier <Explicitapps@users.noreply.github.com>
2020-03-30 14:08:07 +00:00
Aurélien Warnon c5ae9b38d1 [FIX] survey: fix some issues
== Fix results scored question display ==

This commit fixes the display for scored choice question.
The text "Right answer" was displayed twice.

== Add default values to avoid constraints inconsistencies ==

This commit adds a 0 default values to some of our validation fields on survey
questions.

Without a default value, the ORM would store "NULL" in the fields and then
allow users to define a "min" without a "max", that would result in an error
while trying to validate the answers to that question.
Furthermore, when creating a question from the frontend, the web framework will
always send 0 for all field values anyway.

The code change adds consistency and avoids potential errors on that issue.

LINKS

Task 2208574

closes odoo/odoo#48371

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-31 07:33:52 +00:00
Thibault Delavallée 549968bdfe [IMP] survey: perform a quick linting in tests
Notably

  * have tools and helpers in a SurveyCase and let SurveyCommon bet the
    one with data;
  * remove unnecessary with_user, replaced by standard one;
  * move all tools in SurveyCase to help reusing them;
2020-03-31 07:33:50 +00:00
Paul Morelle b105240252 [FIX] survey: ignore extra questions of random surveys
When a random survey does not use all the questions available in a page
because of the random_questions_count field, _get_answers_correctness
was still including them in the skipped category.

This commit ensures that those questions are not included in the result,
and adds a test that checks it.

closes odoo/odoo#47362

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
X-original-commit: 4df43478979766112ae70624deae9c25f40a3349
2020-03-31 07:33:43 +00:00
Swapnesh Shah 4d352c17b9 [FIX] account: Set accounting_date readonly when confirmed
Before this commit, `accounting_date` was editable when Bank Statement is confirmed which doesn't make any sense as it is meant to be used for creating accounting entries on Confirming.

In this commit, we set `accounting_date` readonly when Statment is confirmed

closes odoo/odoo#48298

X-original-commit: 0ca74b447313325be8f4a29a0e0ae3c9056e8039
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-03-25 08:22:09 +00:00
Laurent Stukkens (LTU) 38294dbc99 [IMP] purchase, purchase_requisition: improve UX
Several improvements in order to improve user interface are done here.

[IMP] purchase: Prevent create PO&RFQ in calendar
   It was possible to create PO's and RFQ's from the calendar view.
   The Product Owner wanted to prevent the users from doing so.

[IMP] purchase: Add tooltip to Receipt Date

[FIX] purchase: Align report & stat button data on product form
   The use of Last 365 days time_range in the purchase analysis was automatically
   excluding today's purchases wich was confusing users as the stat button info
   was taking those into account.

   Different behaviours were implemented for product template and product product
   in the filters that were used which makes no sense.

   Use of context_today() instead of datetime.now() in order to take the user's
   timezone into account.

[IMP] purchase: Use relevant dates for RFQ's and PO's in calendar view
   The date used in order to display RFQs and POs in the calendar was date_planned
   which is not mandatory and so not always filled. It has been decided to use the
   order_date for the RFQ's and date_approve for PO's.

[IMP] purchase_requisition: Making Agreement selection type more explicit

[IMP] purchase: Show UOM menu only if installed

[IMP] purchase: Add product variant in settings

[IMP] purchase: Remove Favorites predefined filters

[IMP] purchase: Rephrase PO action helper

[IMP] purchase: Allow open/edit Agreement Type

[IMP] purchase: Rephrase RFQ action helper

[IMP] purchase: Remove PO's and RFQ's name from fields in calendar
   The Product Owner originally wanted to have a link on the PO name field
   that was shown in the calendat popover. As the Edit button already allows
   to edit the PO's or RFQ's from the popover it was decided to simply remove
   the field (as it was already displayed at the top of the popover)

[IMP] purchase: Open the right view when click on Reporting top menu

Task ID #2196688
Closes #47810

Related: odoo/enterprise#9294
Related: odoo/upgrade#961
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-31 08:08:22 +00:00
Samuel Degueldre 30ab8ac022 [FIX] web_editor: use media-container width to determine optimized width
In 644572819ab9a1525af6077dd20c63957eb9271c the mediaWidth which was
previously useless has been changed to default to the media's own width.
This causes problems when there is a small image in a large container,
because when replacing it, it would still suggest a very small size.
This commit makes the mediaWidth default to the container's width
instead to fix those issues.

closes odoo/odoo#48631

X-original-commit: 3d8b56b2c9c7486430f2e947fecfe07d7163a732
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-31 05:57:43 +00:00
Odoo's Mergebot 8aa35a2c9e [IMP] event: change event form view to improve usability
PURPOSE

Change the event form view to improve its usability and make it clearer

SPECIFICATION

- Change some stats button icons
- Change order of the fields
- Put the date fields just below the title since it's a mandatory field.
- Convert the note field into an html field.
- Convert seats_availability selection field into seats_limited a boolean field.
- Move 'website_menu', 'website_track' and website_track_proposal' to the customize dropdown menu in the frontend.

LINKS

Task ID : 2198660
Enterprise PR : odoo/enterprise#8954

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#46659

Related: odoo/upgrade#1002
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-31 09:49:27 +02:00
Odoo's Mergebot 0e9f4e6cde [IMP] web: convert FieldBoolean to Owl
This commit aims to convert the FieldBoolean into Owl. For this,
we also add missing features to AbstractFieldOwl (and to the
renderers that will use them), like the keyboard navigation.

Enterprise PR: https://github.com/odoo/enterprise/pull/8041
Task 2193996

closes odoo/odoo#44267

Related: odoo/enterprise#8041
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-31 09:49:08 +02:00
Michael Mattiello (mcm) 72feab43b1 [FIX] test_new_api: fix tour, autocomplete in modal
In tour widget_x2many at "open the many2one to select another user",
sometimes the autocomplete dropdown is openned on the wrong field.

This bug is due to the new field boolean.
Before the legacy fields were loaded/saved synchronously but now
component fields are asynchronous. This causes the modal to open later
but the tour is still running and it plays with a field in the main
renderer.

This commit changes the trigger to use the field with name=author
(which is in the modal) and not any field that has a dropdown.

task id: 2193996
2020-03-31 07:11:01 +00:00
Michael Mattiello (mcm) 4520a09f2c [REF] web: convert FieldBoolean to owl
This commit does 4 things:
- adds a file for deprecated legacy fields.
- moves legacy FieldBoolean into this file.
- converts FieldBoolean to owl component.
- adds a new xml file for component fields' templates.

task id: 2193996
2020-03-31 07:11:01 +00:00
Michael Mattiello (mcm) 9324282b01 [REF] web,*: add new field registry for components
* account

This commit adds a new field registry for component fields.
This field registry is used to only register the new field components
and the other one should register the legacy fields.
Those two registries will be used together while all legacy fields are
not converted to owl component.

As the legacy registry now throws an error when adding a component
field the existing component fields (account.ShowGroupedList and
account.ShowResequenceRenderer) are moved into the new registry.

This commit also refactors some field managers (form renderer, list
editable renderer, calendar popover) to use the new registry and thus
support the component fields.

task id: 2193996
2020-03-31 07:11:01 +00:00
Patrick Hoste bd99cc24b1 [IMP] website_event(_track): improve website and track menus behavior
PURPOSE

Before this commit to activate the sub-menu, the tracks and the track proposal
you had to do it on the event form view. After this commit you'll have to go
on the event website page to change those options (through the customize dropdown)

SPECIFICATION

Remove the 'website_menu' / 'website_track' / 'website_track_proposal' from the
event form view and create a toggle option in the customize dropdown on the event
website page instead.

LINKS

Task ID : 2198660
PR : #46659
2020-03-31 06:34:45 +00:00
Patrick Hoste d2e02976e2 [REF] (website_)event(_sale): change seats_availability field to seats_limited
PURPOSE

Change seats_availability selection field into a boolean field
and rename it to seats_limited for consistency.

SPECIFICATION

Change all the tests accordingly.

Task ID : 2198660
PR : #46659
2020-03-31 06:34:45 +00:00
Patrick Hoste aebe199d80 [IMP] (website_)event(_track): change event form view display
PURPOSE

Change the event form view to improve its usability and make it clearer.

SPECIFICATIONS

- Change some stats buttons icons
- Change order of the fields and put the range date field in second
place since it's a mandatory field.

LINKS

Task ID : 2198660
PR : #46659
2020-03-31 06:31:08 +00:00
Michael Mattiello (mcm) 91c7e574ed [ADD] web: add CustomCheckbox owl component
This commit adds an owl component for the Odoo custom checkbox.

task id: 2193996
2020-03-31 06:13:11 +00:00
Michael Mattiello (mcm) cde276a1ef [REF] web: add missing features of abstract field
This commit adds missing features of AbstractField written in owl.

task id: 2193996
2020-03-31 06:13:11 +00:00
Romain DerieandJeremy Kersten 30f4f610bf [IMP] website: improvement regarding social image
This commit introduce multiple improvements regarding social image:
  - (perf) Don't read ir.attachment through `social_default_image` when it is
    not needed. Use a stored boolean to know if the field should be accessed.
    This will remove one SQL query in attachment for public user.
  - Show website logo, not the company logo since we now have a different logo
    for website.
  - Don't show images lower than 200 width or 200 height px. Logo will be
    shown regardless of his size.
  - Don't show website logo if there is a website social_default_image.
    Indeed, the spec was to prevent showing logo and social_default_image if
    they are the same image. Technically, this is hard to identify as they
    could be the same image uploaded with different resolutions (media dialog),
    especially if one of those was uploaded through the backend and one from
    the frontend.
    It is most likely we will never correctly identify duplicate as they won't
    be exactly the same.
    For this reason, it makes more sense to hide the website logo if the
    social_default_image is set. It avoids every issues while it makes sense
    since you won't want to use the logo over the social_default_image. If you
    really want to, you could reupload it through the SEO media dialog.

closes odoo/odoo#47848

Related: odoo/upgrade#1012
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
2020-03-30 16:06:13 +00:00