summaryrefslogtreecommitdiff
path: root/addons/web/models
AgeCommit message (Collapse)Author
2019-04-02[IMP] web: fetch records alongside read_groupAaron Bohy
This rev. adds params to the 'web_read_group' method, allowing to search_read records inside each groups in a single RPC, instead of doing a 'web_read_group' RPC followed by n 'search_read' RPCs, where n is the number of opened groups. Part of task 1915702
2019-04-02[IMP] web,board: enable pagination in grouped listsAaron Bohy
With this rev., when there are a lot of groups in a grouped list view, groups are displayed under several pages, whereas they were all displayed in the same page before. This is especially interesting with the new 'expand' attribute, to ensure that we don't read records for a large number of groups. By default, the groups limit is set to 80 (like records), and to 10 is the 'expand' attribute is set to true. This limit can be overriden with the 'groups_limit' attribute. Part of task 1915702
2019-03-25[MERGE] forward port branch saas-12.2 up to 230ad8c381eChristophe Simonis
closes odoo/odoo#32088 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-07[FIX] web,hr: don't display dept complete_name in searchpanelAaron Bohy
The departments being already rendered according to the hierarchy, only the name of the department should be displayed (e.g. 'Direct Sales' instead of 'Sales / Direct Sales'. closes odoo/odoo#31353 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-03-08[IMP] web: add filename to qweb image widgetSébastien Theys
It's better to always have a relevant name in the image URL for SEO. Also make sure there is always an alt on the image. closes odoo/odoo#31705 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-02-14[IMP] web: allow preview_image option for image widget of qweb fieldDharmraj Jhala
With this option we can define which field is going to be displayed by the qweb image widget, while logic is still applied to the original field. For example, we want to show a thumbnail image but when user updates it with the web editor, we want to update the actual field instead of the thumbnail field. This is similar to the preview_image of the JS image widget. task-34045 PR: #30656
2019-02-13[IMP] web: add kanban searchPanelAaron Bohy
This rev. defines a searchPanel widget used in Kanban views to refine search according to specific dimensions. This wigdet is displayed as a sidebar to the left of the kanban view. Part of task 1892462 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Raphael Collet <rco@odoo.com>
2019-02-13[IMP] web, *: remove explicit references to `session_id`Martin Geubelle
Since rev. odoo/odoo@f4d541e the `session_id` cookie uses the `httponly` flag so it cannot be accessed through client side script. But before this rev. the `session_id` was still provided by the server to the webclient (in session_info, mostly) and was stored and accessible. This made XSS injection more dangerous than they should be as it was very easy to steal the `session_id`. As the browser automatically set the `session_id` on every request to the server, the webclient shouldn't need any explicit reference.
2019-02-04[MERGE] forward port branch saas-12.1 up to 4524ad06a8aChristophe Simonis
2019-01-31[MERGE] forward port branch 12.0 up to cb8fefa8999Christophe Simonis
2019-01-17[FIX] web: make the progress bar handle False as selection valueNans Lefebvre
Fine-tuning of commit 92b4e2e866363ecb1b62c2448d40a5fcfc481348, itself a performance fine-tuning of commit b7e2d4759688b4735c78 which added progress bar support for selection fields. However it assumed that every record had a value in the selection, whereas False is (nearly) always a possible value. opw 1916472 closes odoo/odoo#30322
2018-11-29[REF] *: replace deprecated pycompat helpers for builtinsAdrian Torres
This commit replaces calls to pycompat helpers that were intended for python 2 <-> python 3 interoperability for python 3 builtins, as python 2 is no longer officially supported by Odoo. This includes: * calls to imap/izip/ifilter replaced by map/zip/filter * uses of text_type replaced by str * uses of unichr replaced by chr * calls to implements_to_string, implements_iterator removed * string_types and integer_types replaced by str, int respectively * calls to to_native replaced by calls to to_text This is done in preparation to the removal of these deprecated helpers in the following commit.
2018-11-15[FIX] web: fix performance issue with read_progress_barGéry Debongnie
The read_progress_bar method is incredibly not efficient. It is also wrong in other ways (for example, if 2 groups have same labels, there is a collision). But let us talk about efficiency: it iterates on each records on the domain, then, it computes some information. It is really worse for selection fields: it performs a fields_get for each iteration. This commit improves the situation by doing the fields_get only once. Note that this is not the end of the story: this only has a small effect on the performance of this method. It looks like there is a deeper issue in some cases (kanban view for subscription, field 'activity_state')
2019-01-29[ADD] web: server-side-rendered qweb templates as viewsXavier Morel
2018-09-21[IMP]tools, technial modules: Improvement in model descriptionNimesh Jethva
Purpose of this commit is to give description more "business oriented" because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers. Related Task ID : 37311
2018-09-18[FIX] *: adapt calls to _is_superuserAaron Bohy
Rev. 2f7c03d added a second admin user (id 2), the 'human' one, on top of the 'technical' one (id 1, also known as the superuser). Basically, all calls to _is_superuser() should have been changed to _is_admin(). They weren't. As a consequence, some features that were previously available for the admin weren't anymore (e.g. tours). This rev. replaces all calls to _is_superuser() by calls to _is_admin().
2018-09-05[FIX] web: read_progress_bar: convert dates to stringsAaron Bohy
Since rev. 960360af, Date (resp. Datetime) fields return datetime.date (resp. datetime.datetime) objects. This caused an issue in the read_progress_bar method which returns a dict, whose keys are values of the group_by. Indeed, when grouped on a Date or Datetime field, the key was no longer a string but a datetime.date or datetime.datetime object, and it crashed when that dict was turned into a JSON string. This method isn't tested at all for now, but tests will come shortly. Task 1878254.
2018-08-27[MERGE] forward port branch saas-11.4 up to a5187cef107Christophe Simonis
2018-08-24[MERGE] forward port branch saas-11.3 up to 3be46428ccfChristophe Simonis
2018-08-22[FIX] web: allow to bypass postprocess on image widgetToufik Benjaa
- If a CDN is used, this might cause issues for images that need access rights to be display. This is due to the fact that users are not connected on their account under the CDN domain, which makes the CDN requests reject since it is not authorized to access to those resources.
2018-08-13[IMP] base, *: use a many2one for the company report layoutChristophe Matthieu
Before this rev. one could set the report layout on the company using a hardcoded list (background, clean, standard, etc.). Other modules (typically accounting modules) could add options in this list. The used template was built on the layout key. Now, the layout is a many2one field to a newly created model `report.layout`, which is linked to a view with the layout architecture. This gives more control to customize reports and create a new layout (without creating a python module that extend the layout selection).
2018-08-06[REF] *: use native date/datetime for Date/Datetime fieldsRaphael Collet
From this commit onwards, Date fields will return datetime.date objects and Datetime fields will return datetime.datetime objects, this implies a number of things that are clearly explained both in the ORM API for master. This commit also introduces a number of helper functions for dates and datetimes that are exposed in tools.date_utils and fields.Date[time], explained in the documentation as well. Task-ID: 47189
2018-08-01[MERGE] forward port branch saas-11.4 up to 8d9366197e1Christophe Simonis
2018-07-30[MERGE] forward port branch saas-11.3 up to b4555df336dChristophe Simonis
2018-07-30[MERGE] forward port branch saas-11.2 up to 3376bad191dChristophe Simonis
2018-07-27[REF] *: BS4, 'img-responsive' -> 'img-fluid'qsm-odoo
2018-07-26[FIX] web: Make progress bar work with selection fieldsHiral Bhavsar
Purpose ======= The progress bar on a kanban column doesn't work with selection fields Specification ============= In kanban view, subgroupCounts of progressbar should work if columns are grouped with a selection field Currently, progressbar's subgroupCounts only worked if column is grouped by a 'Many2one' field. If column is grouped by a 'selection' field then its not working. For example, If column is grouped by a 'Many2one' field then we've tuple, {'state': (2, 'Signatures in Progress')} So, here for preparing progressBar values for subgroupCounts we'll get {Signatures in Progress: {overdue: 0, planned: 0, today: 1}} But for a selection field, we'll have a string 'sent' i.e a technical value, {'state': 'sent'} So here 'group_by_value' as a 'key' will never be matched as we have 'sent' instead of 'Signatures in Progress'. We've a technical value instead of its UI value and dict of subgroupCounts would be based on UI values that's why it'll never find values. To fix this issue we need to set proper 'group_by_value'. That's why added one condition for 'selection' field to gets its value of specific state inside 'read_progress_bar' method. Related to Task: 1862371
2018-07-26[MERGE] forward port branch 11.0 up to 1353abecbe3Christophe Simonis
2018-07-26[MERGE] forward port branch saas-15 up to ee09d117389Christophe Simonis
2018-07-26[FIX] web: avoid traceback in case of failed loginChristophe Simonis
2018-07-13[MERGE] forward port branch saas-11.3 up to 609491ad0e7Christophe Simonis
2018-07-13[MERGE] forward port branch saas-11.2 up to 87dadc5bc83Christophe Simonis
2018-07-13[MERGE] forward port branch 11.0 up to 6e6e3d4c964Christophe Simonis
2018-07-10[MERGE] forward port branch saas-15 up to c22e479246eChristophe Simonis
2018-07-10[MERGE] forward port branch 10.0 up to 5e682451cbcChristophe Simonis
2018-07-09[FIX] web: allow getting session_info as non-authenticatedMartin Trigaux
The call to /web/session/authenticate should return an empty session_info in case of wrong login/password. It was producing a traceback (due to self.ensure_one() and search) Introduced at d1cd293ece and fdb250942 Fixes #24071
2018-06-28[MERGE] forward port branch saas-11.3 up to 3cdcbce93cbChristophe Simonis
2018-06-28[MERGE] forward port branch saas-11.2 up to d112a163cddChristophe Simonis
2018-06-28[MERGE] forward port branch 11.0 up to f6d36d81f7aChristophe Simonis
2018-06-27[FIX] ir_qweb: send template options in context to the fieldsChristophe Matthieu
Application of a fix more specific to the problem of the contact widget which can not serialize the dictionary because it contains the values of the context of which browse record. (because contact try to json.dumps options for multi-edition feature in web_editor) opw-1859848 https://github.com/odoo/odoo/commit/ab85e9594651fd33ffd2747f4d3c5b360e7c7922
2018-06-27[MERGE] forward port branch saas-11.2 up to 12ddec3a767Christophe Simonis
2018-06-21[MERGE] forward port branch 11.0 up to c5ed3729709Christophe Simonis
2018-06-15[FIX] web_editor: apply cdn for python qweb widget imageChristophe Matthieu
issue: widget image doe not pos processing the attributes
2018-05-28[IMP] web,base_setup: add option to disable special effectsPankaj Kamani
Some people prefer not to be disturbed by any flashy information. In this commit, we add an option to do just that. When the 'show_effect' option is set to false, then the messages that would be displayed by an effect will be displayed in a notification. Task #37712 Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-04-03[REF] web: lint ir_http.pyAaron Bohy
2018-03-15[IMP] web: support famous 'avoid_if_small' parameter in image controller and ↵Parth Gajjar
qweb field options Before this commit there was no option to avoid resizing images when it was smaller than expected size. This leads to several image being displayed with extra and unnecessary padding due to resize. This option will allow to avoid that behavior by allowing to propagate the parameter directly to image_resize_image. This commit is related to task ID 31994 .
2018-01-17[IMP] mail: chatter creation message in formviewAlexandre Kühn
Before this commit, when we create a new object (e.g. task, product, ...), the part of the form for the chatter was blank. After this commit, it displays the chatter with a single temporary message 'Creating a new record...' This message is only visible by the user that is creating the task, and goes away when saving the newly created task. Any interaction with the chatter (buttons and widgets at the top of the chatter, including the message itself) are disabled, so that no interaction from the user is possible.
2017-12-18[FIX] web: fix progress_bar if grouped by date:intervalLucas Perais (lpe)
Before this commit, when grouping a kanban by date with a modifier e.g. crm.lead grouped by create_date:month A traceback was thrown on the python side bacause create_date:month was literally not a field After this commit, the progress bar in that situation displays well, at the price of copying bits of the read_group infrastructure OPW 785021
2017-09-14[IMP] web, *: add kanban column progress barsqsm-odoo
* crm, project Add a new feature which allows to put a progressbar in the kanban columns. The progressbar shows with the same color the amount of records whose value of a given field are the same in the column. It also indicate the sum of another given field or simply the total number of records. It also allows to subgroup the column content. To define a progressbar, add this as a direct child of the kanban arch: <progressbar field="<name of the field to use for subgroups>" colors="{<one possible value for the above field>: <success, warning or danger>, ...}" sum="<name of the field to sum or nothing to use total number of records>"/> Also: - Properly update record model data's parentID when moving a record - ...
2017-08-24[MOV] web(_editor): move image rendering from web_editor to webThibault Delavallée
Currently the image field rendering in QWeb using the /web/image controller is done in web_editor. However there is no link between the web editor and the rendering. The rendering can therefore be moved directly in web. During the move two options have been added to the rendering of image field : * qweb_img_raw_data: fallback on standard base64 behavior that is otherwise impossible to achieve; * qweb_img_responsive: True by default, add the img-responsive class that is not always requested; Thanks.