diff --git a/sao/src/window.js b/sao/src/window.js index e49f651f17..19c9a7a084 100644 --- a/sao/src/window.js +++ b/sao/src/window.js @@ -2053,8 +2053,9 @@ Sao.rpc({ 'method': 'model.ir.export.get', 'params': [ - this.screen.model_name, - ['name', 'header', 'records', 'export_fields.name'], + this.screen.model_name, [ + 'name', 'header', 'records', 'ignore_search_limit', + 'export_fields.name'], this.context, ], }, this.session).done(exports => { @@ -2106,6 +2107,8 @@ 'records': ( JSON.parse(this.selected_records.val()) ? 'selected' : 'listed'), + 'ignore_search_limit': this.ignore_search_limit.is( + ':checked'), }; if (!pref_id) { values.name = name; @@ -2185,6 +2188,8 @@ this.selected_records.val( JSON.stringify(export_.values.records == 'selected')); this.selected_records.change(); + this.ignore_search_limit.prop( + 'checked', export_.values.ignore_search_limit); }, _traverse: function(fields, prefix, parents, i) { var field, item; diff --git a/tryton/tryton/gui/window/win_export.py b/tryton/tryton/gui/window/win_export.py index 65944c574d..ea4fda802e 100644 --- a/tryton/tryton/gui/window/win_export.py +++ b/tryton/tryton/gui/window/win_export.py @@ -238,8 +238,9 @@ class WinExport(WinCSV, InfoBar): def fill_predefwin(self): try: exports = RPCExecute( - 'model', 'ir.export', 'get', self.model, - ['name', 'header', 'records', 'export_fields.name'], + 'model', 'ir.export', 'get', self.model, [ + 'name', 'header', 'records', 'ignore_search_limit', + 'export_fields.name'], context=self.context) except RPCException: return @@ -282,6 +283,7 @@ class WinExport(WinCSV, InfoBar): 'records': ( 'selected' if self.selected_records.get_active() else 'listed'), + 'ignore_search_limit': self.ignore_search_limit.get_active(), } if not pref_id: values.update({ @@ -350,6 +352,8 @@ class WinExport(WinCSV, InfoBar): self.add_field_names.set_active(values.get('header')) self.selected_records.set_active( int(values.get('records') == 'selected')) + self.ignore_search_limit.set_active( + values.get('ignore_search_limit')) def sel_field(self, name): string_, relation = self.fields[name] diff --git a/trytond/CHANGELOG b/trytond/CHANGELOG index 3131395a7c..5db892bae3 100644 --- a/trytond/CHANGELOG +++ b/trytond/CHANGELOG @@ -1,3 +1,4 @@ +* Store the ignore search limit option of export * Make field_names optional in Model.default_get * Remove check_xml_record from ModelStorage * Always synchronize XML data with database diff --git a/trytond/trytond/ir/export.py b/trytond/trytond/ir/export.py index c6a961259e..bd5383f68a 100644 --- a/trytond/trytond/ir/export.py +++ b/trytond/trytond/ir/export.py @@ -52,6 +52,11 @@ class Export(_ClearCache, ModelSQL, ModelView): ('listed', "Listed"), ], "Records", help="The records on which the export runs.") + ignore_search_limit = fields.Boolean( + "Ignore Search Limit", + states={ + 'invisible': Eval('records') != 'listed', + }) export_fields = fields.One2Many('ir.export.line', 'export', 'Fields') @@ -87,6 +92,10 @@ class Export(_ClearCache, ModelSQL, ModelView): def default_records(cls): return 'selected' + @classmethod + def default_ignore_search_limit(cls): + return False + @classmethod def get(cls, resource, fields_names): pool = Pool() diff --git a/trytond/trytond/ir/view/export_form.xml b/trytond/trytond/ir/view/export_form.xml index 8f78405da2..00474437a8 100644 --- a/trytond/trytond/ir/view/export_form.xml +++ b/trytond/trytond/ir/view/export_form.xml @@ -7,10 +7,14 @@ this repository contains the full copyright notices and license terms. -->