summaryrefslogtreecommitdiff
path: root/addons/web/models/models.py
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-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-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-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-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-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
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 - ...