[tryton-commits] changeset in weblate:default Translated using Weblate (Dutch)
changeset bd75fe6f66e2 in weblate:default details: https://hg.tryton.org/weblate?cmd=changeset;node=bd75fe6f66e2 description: Translated using Weblate (Dutch) Currently translated at 100.0% (7 of 7 strings) Translation: Tryton/account_statement_aeb43 Translate-URL: https://translate.tryton.org/projects/tryton/account_statement_aeb43/nl/ diffstat: modules/account_statement_aeb43/locale/nl.po | 25 ++--- 1 files changed, 22 insertions(+), 3 deletions(-) diffs (54 lines): diff -r 0b6a7fce23ea -r bd75fe6f66e2 modules/account_statement_aeb43/locale/nl.po --- a/modules/account_statement_aeb43/locale/nl.po Wed Sep 11 07:51:51 2019 + +++ b/modules/account_statement_aeb43/locale/nl.po Wed Sep 11 07:42:16 2019 + @@ -1,13 +1,13 @@ # msgid "" msgstr "" -"PO-Revision-Date: 2019-07-17 16:40+\n" +"PO-Revision-Date: 2019-09-12 08:20+\n" "Last-Translator: Bert Defoor \n" "Language: nl\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.7.1\n" +"X-Generator: Weblate 3.8\n" msgctxt "" "model:account.statement.origin.information,selection:information_record_type" @@ -32,6 +32,25 @@ "98:Cancellations and seat corrections\n" "99:Others" msgstr "" +"01: Terugbetalingen\n" +"02: Opbrengsten\n" +"03: Afschrijvingen(debet)\n" +"04: Transfers\n" +"05: Aflossing van leningen\n" +"06: Belastingen\n" +"07: Abonnementen\n" +"08: Dividenden\n" +"09: Aandelentransacties\n" +"10: Benzinecheques\n" +"11: Geldautomaten\n" +"12: Creditcards\n" +"13: Buitenlandse activiteiten\n" +"14: Retourzendingen en onbetaald\n" +"15: Payroll en sociale verzekeringen\n" +"16: Broker\n" +"17: Rente, commissies en kosten\n" +"98: Annuleringen en (seat corections)\n" +"99: Anderen" msgctxt "" "model:account.statement.origin.information,string:information_document_number" @@ -46,7 +65,7 @@ msgctxt "" "model:account.statement.origin.information,string:information_operation_date" msgid "Operation Date" -msgstr "" +msgstr "datum van de operatie" msgctxt "" "model:account.statement.origin.information,string:information_record_type"
[tryton-commits] changeset in weblate:default Translated using Weblate (Dutch)
changeset 0b6a7fce23ea in weblate:default details: https://hg.tryton.org/weblate?cmd=changeset;node=0b6a7fce23ea description: Translated using Weblate (Dutch) Currently translated at 93.6% (131 of 140 strings) Translation: Tryton/account_statement Translate-URL: https://translate.tryton.org/projects/tryton/account_statement/nl/ diffstat: modules/account_statement/locale/nl.po | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diffs (42 lines): diff -r 7bd60e956421 -r 0b6a7fce23ea modules/account_statement/locale/nl.po --- a/modules/account_statement/locale/nl.poMon Sep 09 19:07:41 2019 + +++ b/modules/account_statement/locale/nl.poWed Sep 11 07:51:51 2019 + @@ -1,7 +1,7 @@ # msgid "" msgstr "" -"PO-Revision-Date: 2019-09-08 08:20+\n" +"PO-Revision-Date: 2019-09-12 08:20+\n" "Last-Translator: Bert Defoor \n" "Language: nl\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -394,20 +394,29 @@ "To post statement \"%(statement)s\" you must create lines for pending " "%(amount)s of origin \"%(origin)s\"." msgstr "" +"Om een rekeningafschrift \"%(statement)s\" te boeken, moet u eerst lijnen " +"aanmaken voor het openstaand bedrag van %(amount)s uit \"%(origin)s\"." msgctxt "model:ir.message,text:msg_statement_wrong_end_balance" msgid "" "To validate statement \"%(statement)s\" you must change lines to have end " "balance of %(end_balance)s instead of %(amount)s." msgstr "" +"Om verklaring(statemet, relevé,kontoauszug) \"% (statement)s\" te valideren, " +"moet u regels wijzigen om een eindsaldo van%(end_balance)s te hebben in " +"plaats van %(amount)s." msgctxt "model:ir.message,text:msg_statement_wrong_number_of_lines_add" msgid "To validate statement \"%(statement)s\" you must add %(n)s line(s)." msgstr "" +"Om het rekening uittreksel \"%(statement)s\" te kunnen valideren , moeten " +"nog %(n)s line(s) lijnen toegevoegd worden." msgctxt "model:ir.message,text:msg_statement_wrong_number_of_lines_remove" msgid "To validate statement \"%(statement)s\" you must remove %(n)s line(s)." msgstr "" +"Om het rekening uittreksel \"%(statement)s\" te kunnen valideren , moeten " +"%(n)s line(s) lijnen verwijderd worden." msgctxt "model:ir.message,text:msg_statement_wrong_total_amount" msgid ""
[tryton-commits] changeset in weblate:default Translated using Weblate (Dutch)
changeset c700606c8069 in weblate:default details: https://hg.tryton.org/weblate?cmd=changeset;node=c700606c8069 description: Translated using Weblate (Dutch) Currently translated at 100.0% (7 of 7 strings) Translation: Tryton/stock_supply_production Translate-URL: https://translate.tryton.org/projects/tryton/stock_supply_production/nl/ diffstat: modules/stock_supply_production/locale/nl.po | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diffs (44 lines): diff -r 3d2d0da14dc9 -r c700606c8069 modules/stock_supply_production/locale/nl.po --- a/modules/stock_supply_production/locale/nl.po Wed Sep 11 07:43:44 2019 + +++ b/modules/stock_supply_production/locale/nl.po Wed Sep 11 07:29:01 2019 + @@ -1,13 +1,13 @@ # msgid "" msgstr "" -"PO-Revision-Date: 2019-07-27 19:17+\n" +"PO-Revision-Date: 2019-09-12 08:20+\n" "Last-Translator: Bert Defoor \n" "Language: nl\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.7.1\n" +"X-Generator: Weblate 3.8\n" msgctxt "field:production.configuration,supply_period:" msgid "Supply Period" @@ -19,20 +19,20 @@ msgctxt "model:ir.action,name:act_production_request" msgid "Request Productions" -msgstr "Request Productions" +msgstr "Vraag productie aan" msgctxt "" "model:ir.action.act_window.domain,name:act_order_point_form_domain_production" msgid "Production" -msgstr "Production" +msgstr "Productie" msgctxt "model:ir.message,text:msg_late_productions" msgid "There are some productions that are late." -msgstr "" +msgstr "Er zijn enkele producties die te laat zijn." msgctxt "model:production.configuration.supply_period,name:" msgid "Production Configuration Supply Period" -msgstr "" +msgstr "Productieconfiguratie Leveringsperiode" msgctxt "selection:stock.order_point,type:" msgid "Production"
[tryton-commits] changeset in trytond:default Ensure view arch is defined on test...
changeset ea13ee4088c1 in trytond:default details: https://hg.tryton.org/trytond?cmd=changeset;node=ea13ee4088c1 description: Ensure view arch is defined on test_view issue8603 review270141003 diffstat: trytond/tests/test_tryton.py | 6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diffs (16 lines): diff -r 743f684556ef -r ea13ee4088c1 trytond/tests/test_tryton.py --- a/trytond/tests/test_tryton.py Wed Sep 11 23:50:20 2019 +0200 +++ b/trytond/tests/test_tryton.py Thu Sep 12 18:54:25 2019 +0200 @@ -256,6 +256,12 @@ ('model', '!=', ''), ]) for view in views: +if not view.inherit or view.inherit.model == view.model: +assert view.arch, ('missing architecture for view "%(name)s" ' +'of model "%(model)s"' % { +'name': view.name or str(view.id), +'model': view.model, +}) if view.inherit and view.inherit.model == view.model: view_id = view.inherit.id else:
[tryton-commits] changeset in modules/account:default Hide closed period when man...
changeset c57340cb7d4f in modules/account:default details: https://hg.tryton.org/modules/account?cmd=changeset;node=c57340cb7d4f description: Hide closed period when manually creating moves issue8634 review280081003 diffstat: move.py | 6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (17 lines): diff -r 4cc6cceb9b2f -r c57340cb7d4f move.py --- a/move.py Sat Sep 07 23:45:08 2019 +0200 +++ b/move.py Thu Sep 12 18:44:47 2019 +0200 @@ -59,8 +59,12 @@ period = fields.Many2One('account.period', 'Period', required=True, domain=[ ('company', '=', Eval('company', -1)), +If(Eval('state') == 'draft', +('state', '=', 'open'), +()), ], -states=_MOVE_STATES, depends=_MOVE_DEPENDS + ['company'], select=True) +states=_MOVE_STATES, depends=_MOVE_DEPENDS + ['company', 'state'], +select=True) journal = fields.Many2One('account.journal', 'Journal', required=True, states=_MOVE_STATES, depends=_MOVE_DEPENDS) date = fields.Date('Effective Date', required=True, select=True,
[tryton-commits] changeset in modules/stock_supply:default Remove view definition...
changeset d5837d954a97 in modules/stock_supply:default details: https://hg.tryton.org/modules/stock_supply?cmd=changeset;node=d5837d954a97 description: Remove view definition with non existent file issue8603 review270141003 diffstat: purchase_request.xml | 6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diffs (16 lines): diff -r b1418ad355b1 -r d5837d954a97 purchase_request.xml --- a/purchase_request.xml Fri Aug 09 16:41:08 2019 +0200 +++ b/purchase_request.xml Thu Sep 12 18:55:20 2019 +0200 @@ -3,12 +3,6 @@ this repository contains the full copyright notices and license terms. --> - -purchase.configuration - -purchase_configuration_form -
[tryton-commits] changeset in modules/account_payment_sepa:default Include only v...
changeset da434be20358 in modules/account_payment_sepa:default details: https://hg.tryton.org/modules/account_payment_sepa?cmd=changeset;node=da434be20358 description: Include only validated mandates on lines to pay domain issue8636 review273951003 diffstat: account.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 65bda58083a6 -r da434be20358 account.xml --- a/account.xml Fri Aug 09 16:33:49 2019 +0200 +++ b/account.xml Thu Sep 12 18:50:03 2019 +0200 @@ -9,7 +9,7 @@ Receivable with Mandate
[tryton-commits] changeset in sao:default Use synchronous call in CSV windows
changeset 10d5a25dd646 in sao:default details: https://hg.tryton.org/sao?cmd=changeset;node=10d5a25dd646 description: Use synchronous call in CSV windows This simplify the code and avoid race condition when selecting deferred fields. issue8633 review267911002 diffstat: src/window.js | 136 - 1 files changed, 48 insertions(+), 88 deletions(-) diffs (231 lines): diff -r c50ce8b4fe43 -r 10d5a25dd646 src/window.js --- a/src/window.js Wed Sep 11 23:43:30 2019 +0200 +++ b/src/window.js Thu Sep 12 22:45:20 2019 +0200 @@ -930,11 +930,8 @@ }).css('cursor', 'pointer') .appendTo(column_fields_all.find('.panel')); -var prm = this.get_fields(this.screen.model_name) -.then(function(fields){ -this.model_populate(fields); -this.view_populate(this.fields_model, this.fields_all); -}.bind(this)); +this.model_populate(this._get_fields(this.screen.model_name)); +this.view_populate(this.fields_model, this.fields_all); this.column_buttons = jQuery('', { 'class': 'col-md-2' @@ -1102,19 +1099,17 @@ this.el.on('hidden.bs.modal', function() { jQuery(this).remove(); }); -return prm; }, -get_fields: function(model) { +_get_fields: function(model) { return Sao.rpc({ 'method': 'model.' + model + '.fields_get' -}, this.session); +}, this.session, false); }, on_row_expanded: function(node) { var container_view = jQuery('').css('list-style', 'none') .insertAfter(node.view); -this.children_expand(node).done(function() { -this.view_populate(node.children, container_view); -}.bind(this)); +this.children_expand(node); +this.view_populate(node.children, container_view); }, destroy: function() { this.el.modal('hide'); @@ -1274,17 +1269,11 @@ }.bind(this)); }, children_expand: function(node) { -var dfd = jQuery.Deferred(); if (jQuery.isEmptyObject(node.children)) { -this.get_fields(node.relation).done(function(fields) { -this.model_populate(fields, node.children, -node.field + '/', node.name + '/'); -dfd.resolve(this); -}.bind(this)); -} else { -dfd.resolve(this); +this.model_populate( +this._get_fields(node.relation), node.children, +node.field + '/', node.name + '/'); } -return dfd.promise(); }, autodetect: function() { var fname = this.file_input.val(); @@ -1306,20 +1295,18 @@ }, complete: function(results) { results.data[0].forEach(function(word) { -if(word in this.fields_invert || word in this.fields) { -this.auto_select(word); -} -else { +if (!(word in this.fields_invert) && !(word in this.fields)) { var fields = this.fields_model; var prefix = ''; -var parents = word.split('/'); -this.traverse(fields, prefix, parents, 0); +var parents = word.split('/').slice(0, -1); +this._traverse(fields, prefix, parents, 0); } +this._auto_select(word); }.bind(this)); }.bind(this) }); }, -auto_select: function(word) { +_auto_select: function(word) { var name,field; if(word in this.fields_invert) { name = word; @@ -1343,30 +1330,20 @@ .siblings().removeClass('bg-primary'); }).appendTo(this.fields_selected); }, -traverse: function(fields, prefix, parents, i) { -if(i >= parents.length - 1) { -this.auto_select(parents.join('/')); -return; -} +_traverse: function(fields, prefix, parents, i) { var field, item; var names = Object.keys(fields); -for(item = 0; item= parents.length-1) { -this.sel_field(parents.join('/')); -return; -} +_traverse: function(fields, prefix, parents, i) { var field, item; var names = Object.keys(fields); -for(item = 0; item < names.length; item++) { +
[tryton-commits] changeset in sao:4.6 Set focus on the form if it does not have it
changeset 96bf15741342 in sao:4.6 details: https://hg.tryton.org/sao?cmd=changeset;node=96bf15741342 description: Set focus on the form if it does not have it When set_cursor is called, it should force to set the focus on the first focusable widget of the form. issue8604 review258011002 (grafted from d8401a59de642e154d99c4f48c04bc29e9a44f28) diffstat: src/view/form.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines): diff -r aa97eafa0442 -r 96bf15741342 src/view/form.js --- a/src/view/form.js Wed Aug 28 22:27:30 2019 +0200 +++ b/src/view/form.js Mon Sep 02 18:33:18 2019 +0200 @@ -372,8 +372,8 @@ var widgets, error_el, pages, is_ancestor; var currently_focused = jQuery(document.activeElement); -var has_focus = currently_focused.closest(this.el) > 0; -if (reset_view || has_focus) { +var has_focus = currently_focused.closest(this.el).length > 0; +if (reset_view || !has_focus) { if (reset_view) { for (i = 0; i < this.notebooks.length; i++) { notebook = this.notebooks[i];
[tryton-commits] changeset in tryton:5.2 Replace child_of target only if it is no...
changeset fc9c75402e3a in tryton:5.2 details: https://hg.tryton.org/tryton?cmd=changeset;node=fc9c75402e3a description: Replace child_of target only if it is not a related field issue8609 review285911002 (grafted from 4cd1ebee3cd56cf5c58144c50f845af519b9fc7a) diffstat: tryton/common/domain_inversion.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 95afb03bd50c -r fc9c75402e3a tryton/common/domain_inversion.py --- a/tryton/common/domain_inversion.py Fri Aug 30 08:59:18 2019 +0200 +++ b/tryton/common/domain_inversion.py Mon Sep 02 18:34:55 2019 +0200 @@ -140,7 +140,7 @@ if domain in ('AND', 'OR'): return domain elif is_leaf(domain): -if 'child_of' in domain[1]: +if 'child_of' in domain[1] and '.' not in domain[0]: if len(domain) == 3: return domain else:
[tryton-commits] changeset in sao:4.6 Replace child_of target only if it is not a...
changeset 21b2e1c58f78 in sao:4.6 details: https://hg.tryton.org/sao?cmd=changeset;node=21b2e1c58f78 description: Replace child_of target only if it is not a related field issue8609 review285911002 (grafted from c0d29e5b871ab60855a8cb6dd0e8a6d8916fe75c) diffstat: src/common.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 96bf15741342 -r 21b2e1c58f78 src/common.js --- a/src/common.js Mon Sep 02 18:33:18 2019 +0200 +++ b/src/common.js Mon Sep 02 18:34:55 2019 +0200 @@ -2144,7 +2144,7 @@ if (~['AND', 'OR'].indexOf(domain)) { return domain; } else if (this.is_leaf(domain)) { -if (domain[1].contains('child_of')) { +if (domain[1].contains('child_of') && !domain[0].contains('.')) { if (domain.length == 3) { return domain; } else {
[tryton-commits] changeset in sao:5.0 Replace child_of target only if it is not a...
changeset ca9898677cfb in sao:5.0 details: https://hg.tryton.org/sao?cmd=changeset;node=ca9898677cfb description: Replace child_of target only if it is not a related field issue8609 review285911002 (grafted from c0d29e5b871ab60855a8cb6dd0e8a6d8916fe75c) diffstat: src/common.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 68c47b51bdd4 -r ca9898677cfb src/common.js --- a/src/common.js Mon Sep 02 18:33:18 2019 +0200 +++ b/src/common.js Mon Sep 02 18:34:55 2019 +0200 @@ -2167,7 +2167,7 @@ if (~['AND', 'OR'].indexOf(domain)) { return domain; } else if (this.is_leaf(domain)) { -if (domain[1].contains('child_of')) { +if (domain[1].contains('child_of') && !domain[0].contains('.')) { if (domain.length == 3) { return domain; } else {
[tryton-commits] changeset in tryton:5.0 Replace child_of target only if it is no...
changeset edef4ae57a20 in tryton:5.0 details: https://hg.tryton.org/tryton?cmd=changeset;node=edef4ae57a20 description: Replace child_of target only if it is not a related field issue8609 review285911002 (grafted from 4cd1ebee3cd56cf5c58144c50f845af519b9fc7a) diffstat: tryton/common/domain_inversion.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r fd018ede3d51 -r edef4ae57a20 tryton/common/domain_inversion.py --- a/tryton/common/domain_inversion.py Sun Sep 01 23:38:34 2019 +0200 +++ b/tryton/common/domain_inversion.py Mon Sep 02 18:34:55 2019 +0200 @@ -140,7 +140,7 @@ if domain in ('AND', 'OR'): return domain elif is_leaf(domain): -if 'child_of' in domain[1]: +if 'child_of' in domain[1] and '.' not in domain[0]: if len(domain) == 3: return domain else:
[tryton-commits] changeset in sao:4.4 Set focus on the form if it does not have it
changeset b96e0f2f2edb in sao:4.4 details: https://hg.tryton.org/sao?cmd=changeset;node=b96e0f2f2edb description: Set focus on the form if it does not have it When set_cursor is called, it should force to set the focus on the first focusable widget of the form. issue8604 review258011002 (grafted from d8401a59de642e154d99c4f48c04bc29e9a44f28) diffstat: src/view/form.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines): diff -r 824156aac1d9 -r b96e0f2f2edb src/view/form.js --- a/src/view/form.js Wed Aug 28 22:27:30 2019 +0200 +++ b/src/view/form.js Mon Sep 02 18:33:18 2019 +0200 @@ -386,8 +386,8 @@ var widgets, error_el, pages, is_ancestor; var currently_focused = jQuery(document.activeElement); -var has_focus = currently_focused.closest(this.el) > 0; -if (reset_view || has_focus) { +var has_focus = currently_focused.closest(this.el).length > 0; +if (reset_view || !has_focus) { if (reset_view) { for (i = 0; i < this.notebooks.length; i++) { notebook = this.notebooks[i];
[tryton-commits] changeset in sao:5.2 Add input-icon classes on date widget of Dict
changeset bffee0edee06 in sao:5.2 details: https://hg.tryton.org/sao?cmd=changeset;node=bffee0edee06 description: Add input-icon classes on date widget of Dict issue8608 review277761002 (grafted from 518497a4ae4325b83fb83835c39b16a2d6d7e2dd) diffstat: src/view/form.js | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r 5dce4c85f6b8 -r bffee0edee06 src/view/form.js --- a/src/view/form.js Sat Sep 07 23:27:37 2019 +0200 +++ b/src/view/form.js Mon Sep 02 18:31:43 2019 +0200 @@ -4335,6 +4335,7 @@ create_widget: function() { Sao.View.Form.Dict.Date._super.create_widget.call(this); this.date = this.input.parent(); +this.date.addClass('input-icon input-icon-primary'); Sao.common.ICONFACTORY.get_icon_img('tryton-date') .appendTo(jQuery('', { 'class': 'datepickerbutton icon-input icon-primary',
[tryton-commits] changeset in proteus:4.6 Do not send empty x2Many fields when sa...
changeset 85f84f12f161 in proteus:4.6 details: https://hg.tryton.org/proteus?cmd=changeset;node=85f84f12f161 description: Do not send empty x2Many fields when saving issue8588 review264091002 (grafted from 25198402e9f72c848b450c7ca6398fbbc442dcf2) diffstat: proteus/__init__.py | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diffs (26 lines): diff -r dcbcac53f006 -r 85f84f12f161 proteus/__init__.py --- a/proteus/__init__.py Mon Apr 22 10:41:39 2019 +0200 +++ b/proteus/__init__.py Sat Aug 31 01:40:47 2019 +0200 @@ -855,8 +855,20 @@ 'Return dictionary values' if fields is None: fields = self._values.keys() -return dict((x, getattr(self, '__%s_value' % x)) for x in fields -if x not in ('id', '_timestamp')) +values = {} +for name in fields: +if name in ['id', '_timestamp']: +continue +definition = self._fields[name] +if definition.get('readonly') and definition['type'] != 'one2many': +continue +values[name] = getattr(self, '__%s_value' % name) +# Sending an empty X2Many fields breaks ModelFieldAccess.check +if (definition['type'] in {'one2many', 'many2many'} +and not values[name]): +breakpoint() +del values[name] +return values @property def _timestamp(self):
[tryton-commits] changeset in proteus:4.4 Do not send empty x2Many fields when sa...
changeset 0400337794ee in proteus:4.4 details: https://hg.tryton.org/proteus?cmd=changeset;node=0400337794ee description: Do not send empty x2Many fields when saving issue8588 review264091002 (grafted from 25198402e9f72c848b450c7ca6398fbbc442dcf2) diffstat: proteus/__init__.py | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diffs (26 lines): diff -r 0017c5300994 -r 0400337794ee proteus/__init__.py --- a/proteus/__init__.py Mon Apr 22 10:42:23 2019 +0200 +++ b/proteus/__init__.py Sat Aug 31 01:40:47 2019 +0200 @@ -821,8 +821,20 @@ 'Return dictionary values' if fields is None: fields = self._values.keys() -return dict((x, getattr(self, '__%s_value' % x)) for x in fields -if x not in ('id', '_timestamp')) +values = {} +for name in fields: +if name in ['id', '_timestamp']: +continue +definition = self._fields[name] +if definition.get('readonly') and definition['type'] != 'one2many': +continue +values[name] = getattr(self, '__%s_value' % name) +# Sending an empty X2Many fields breaks ModelFieldAccess.check +if (definition['type'] in {'one2many', 'many2many'} +and not values[name]): +breakpoint() +del values[name] +return values @property def _timestamp(self):
[tryton-commits] changeset in sao:5.2 Replace child_of target only if it is not a...
changeset ed2e5f9404c7 in sao:5.2 details: https://hg.tryton.org/sao?cmd=changeset;node=ed2e5f9404c7 description: Replace child_of target only if it is not a related field issue8609 review285911002 (grafted from c0d29e5b871ab60855a8cb6dd0e8a6d8916fe75c) diffstat: src/common.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 0ccf80b0aead -r ed2e5f9404c7 src/common.js --- a/src/common.js Mon Sep 02 18:33:18 2019 +0200 +++ b/src/common.js Mon Sep 02 18:34:55 2019 +0200 @@ -2167,7 +2167,7 @@ if (~['AND', 'OR'].indexOf(domain)) { return domain; } else if (this.is_leaf(domain)) { -if (domain[1].contains('child_of')) { +if (domain[1].contains('child_of') && !domain[0].contains('.')) { if (domain.length == 3) { return domain; } else {
[tryton-commits] changeset in sao:4.8 Set focus on the form if it does not have it
changeset 1f6f4158f261 in sao:4.8 details: https://hg.tryton.org/sao?cmd=changeset;node=1f6f4158f261 description: Set focus on the form if it does not have it When set_cursor is called, it should force to set the focus on the first focusable widget of the form. issue8604 review258011002 (grafted from d8401a59de642e154d99c4f48c04bc29e9a44f28) diffstat: src/view/form.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines): diff -r c1ebd7702b2a -r 1f6f4158f261 src/view/form.js --- a/src/view/form.js Wed Aug 28 22:27:30 2019 +0200 +++ b/src/view/form.js Mon Sep 02 18:33:18 2019 +0200 @@ -395,8 +395,8 @@ var widgets, error_el, pages, is_ancestor; var currently_focused = jQuery(document.activeElement); -var has_focus = currently_focused.closest(this.el) > 0; -if (reset_view || has_focus) { +var has_focus = currently_focused.closest(this.el).length > 0; +if (reset_view || !has_focus) { if (reset_view) { for (i = 0; i < this.notebooks.length; i++) { notebook = this.notebooks[i];
[tryton-commits] changeset in sao:5.2 Set focus on the form if it does not have it
changeset 0ccf80b0aead in sao:5.2 details: https://hg.tryton.org/sao?cmd=changeset;node=0ccf80b0aead description: Set focus on the form if it does not have it When set_cursor is called, it should force to set the focus on the first focusable widget of the form. issue8604 review258011002 (grafted from d8401a59de642e154d99c4f48c04bc29e9a44f28) diffstat: src/view/form.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines): diff -r bffee0edee06 -r 0ccf80b0aead src/view/form.js --- a/src/view/form.js Mon Sep 02 18:31:43 2019 +0200 +++ b/src/view/form.js Mon Sep 02 18:33:18 2019 +0200 @@ -334,8 +334,8 @@ var widgets, error_el, pages, is_ancestor; var currently_focused = jQuery(document.activeElement); -var has_focus = currently_focused.closest(this.el) > 0; -if (reset_view || has_focus) { +var has_focus = currently_focused.closest(this.el).length > 0; +if (reset_view || !has_focus) { if (reset_view) { for (i = 0; i < this.notebooks.length; i++) { notebook = this.notebooks[i];
[tryton-commits] changeset in tryton:4.8 Replace child_of target only if it is no...
changeset d512f2d0974a in tryton:4.8 details: https://hg.tryton.org/tryton?cmd=changeset;node=d512f2d0974a description: Replace child_of target only if it is not a related field issue8609 review285911002 (grafted from 4cd1ebee3cd56cf5c58144c50f845af519b9fc7a) diffstat: tryton/common/domain_inversion.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 119c2187f365 -r d512f2d0974a tryton/common/domain_inversion.py --- a/tryton/common/domain_inversion.py Sun Sep 01 23:39:08 2019 +0200 +++ b/tryton/common/domain_inversion.py Mon Sep 02 18:34:55 2019 +0200 @@ -105,7 +105,7 @@ if domain in ('AND', 'OR'): return domain elif is_leaf(domain): -if 'child_of' in domain[1]: +if 'child_of' in domain[1] and '.' not in domain[0]: if len(domain) == 3: return domain else:
[tryton-commits] changeset in sao:4.8 Replace child_of target only if it is not a...
changeset 274f475e7c03 in sao:4.8 details: https://hg.tryton.org/sao?cmd=changeset;node=274f475e7c03 description: Replace child_of target only if it is not a related field issue8609 review285911002 (grafted from c0d29e5b871ab60855a8cb6dd0e8a6d8916fe75c) diffstat: src/common.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 1f6f4158f261 -r 274f475e7c03 src/common.js --- a/src/common.js Mon Sep 02 18:33:18 2019 +0200 +++ b/src/common.js Mon Sep 02 18:34:55 2019 +0200 @@ -2153,7 +2153,7 @@ if (~['AND', 'OR'].indexOf(domain)) { return domain; } else if (this.is_leaf(domain)) { -if (domain[1].contains('child_of')) { +if (domain[1].contains('child_of') && !domain[0].contains('.')) { if (domain.length == 3) { return domain; } else {
[tryton-commits] changeset in proteus:4.8 Remove unknown breakpoint call
changeset 48b0f939d0b7 in proteus:4.8 details: https://hg.tryton.org/proteus?cmd=changeset;node=48b0f939d0b7 description: Remove unknown breakpoint call issue8588 (grafted from ebc47cb5291adf1c748f22ff8fe3c3e101352834) diffstat: proteus/__init__.py | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diffs (11 lines): diff -r 1fefe6d2f903 -r 48b0f939d0b7 proteus/__init__.py --- a/proteus/__init__.py Sat Aug 31 01:40:47 2019 +0200 +++ b/proteus/__init__.py Mon Sep 02 18:22:43 2019 +0200 @@ -904,7 +904,6 @@ # Sending an empty X2Many fields breaks ModelFieldAccess.check if (definition['type'] in {'one2many', 'many2many'} and not values[name]): -breakpoint() del values[name] return values
[tryton-commits] changeset in proteus:4.6 Remove unknown breakpoint call
changeset 817a66368172 in proteus:4.6 details: https://hg.tryton.org/proteus?cmd=changeset;node=817a66368172 description: Remove unknown breakpoint call issue8588 (grafted from ebc47cb5291adf1c748f22ff8fe3c3e101352834) diffstat: proteus/__init__.py | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diffs (11 lines): diff -r 85f84f12f161 -r 817a66368172 proteus/__init__.py --- a/proteus/__init__.py Sat Aug 31 01:40:47 2019 +0200 +++ b/proteus/__init__.py Mon Sep 02 18:22:43 2019 +0200 @@ -866,7 +866,6 @@ # Sending an empty X2Many fields breaks ModelFieldAccess.check if (definition['type'] in {'one2many', 'many2many'} and not values[name]): -breakpoint() del values[name] return values
[tryton-commits] changeset in sao:4.4 Replace child_of target only if it is not a...
changeset 607ba77f7821 in sao:4.4 details: https://hg.tryton.org/sao?cmd=changeset;node=607ba77f7821 description: Replace child_of target only if it is not a related field issue8609 review285911002 (grafted from c0d29e5b871ab60855a8cb6dd0e8a6d8916fe75c) diffstat: src/common.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r b96e0f2f2edb -r 607ba77f7821 src/common.js --- a/src/common.js Mon Sep 02 18:33:18 2019 +0200 +++ b/src/common.js Mon Sep 02 18:34:55 2019 +0200 @@ -2140,7 +2140,7 @@ if (~['AND', 'OR'].indexOf(domain)) { return domain; } else if (this.is_leaf(domain)) { -if (domain[1].contains('child_of')) { +if (domain[1].contains('child_of') && !domain[0].contains('.')) { if (domain.length == 3) { return domain; } else {
[tryton-commits] changeset in proteus:4.4 Remove unknown breakpoint call
changeset c234817708eb in proteus:4.4 details: https://hg.tryton.org/proteus?cmd=changeset;node=c234817708eb description: Remove unknown breakpoint call issue8588 (grafted from ebc47cb5291adf1c748f22ff8fe3c3e101352834) diffstat: proteus/__init__.py | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diffs (11 lines): diff -r 0400337794ee -r c234817708eb proteus/__init__.py --- a/proteus/__init__.py Sat Aug 31 01:40:47 2019 +0200 +++ b/proteus/__init__.py Mon Sep 02 18:22:43 2019 +0200 @@ -832,7 +832,6 @@ # Sending an empty X2Many fields breaks ModelFieldAccess.check if (definition['type'] in {'one2many', 'many2many'} and not values[name]): -breakpoint() del values[name] return values
[tryton-commits] changeset in proteus:5.0 Remove unknown breakpoint call
changeset e58c50e1acd9 in proteus:5.0 details: https://hg.tryton.org/proteus?cmd=changeset;node=e58c50e1acd9 description: Remove unknown breakpoint call issue8588 (grafted from ebc47cb5291adf1c748f22ff8fe3c3e101352834) diffstat: proteus/__init__.py | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diffs (11 lines): diff -r c11ebd904c42 -r e58c50e1acd9 proteus/__init__.py --- a/proteus/__init__.py Sat Aug 31 01:40:47 2019 +0200 +++ b/proteus/__init__.py Mon Sep 02 18:22:43 2019 +0200 @@ -896,7 +896,6 @@ # Sending an empty X2Many fields breaks ModelFieldAccess.check if (definition['type'] in {'one2many', 'many2many'} and not values[name]): -breakpoint() del values[name] return values
[tryton-commits] changeset in proteus:5.2 Remove unknown breakpoint call
changeset 67e2c0f78056 in proteus:5.2 details: https://hg.tryton.org/proteus?cmd=changeset;node=67e2c0f78056 description: Remove unknown breakpoint call issue8588 (grafted from ebc47cb5291adf1c748f22ff8fe3c3e101352834) diffstat: proteus/__init__.py | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diffs (11 lines): diff -r cbe123462712 -r 67e2c0f78056 proteus/__init__.py --- a/proteus/__init__.py Sat Aug 31 01:40:47 2019 +0200 +++ b/proteus/__init__.py Mon Sep 02 18:22:43 2019 +0200 @@ -896,7 +896,6 @@ # Sending an empty X2Many fields breaks ModelFieldAccess.check if (definition['type'] in {'one2many', 'many2many'} and not values[name]): -breakpoint() del values[name] return values
[tryton-commits] changeset in proteus:5.2 Do not send empty x2Many fields when sa...
changeset cbe123462712 in proteus:5.2 details: https://hg.tryton.org/proteus?cmd=changeset;node=cbe123462712 description: Do not send empty x2Many fields when saving issue8588 review264091002 (grafted from 25198402e9f72c848b450c7ca6398fbbc442dcf2) diffstat: proteus/__init__.py | 5 + 1 files changed, 5 insertions(+), 0 deletions(-) diffs (15 lines): diff -r db807e3f6b16 -r cbe123462712 proteus/__init__.py --- a/proteus/__init__.py Mon May 06 14:46:03 2019 +0200 +++ b/proteus/__init__.py Sat Aug 31 01:40:47 2019 +0200 @@ -893,6 +893,11 @@ if definition.get('readonly') and definition['type'] != 'one2many': continue values[name] = getattr(self, '__%s_value' % name) +# Sending an empty X2Many fields breaks ModelFieldAccess.check +if (definition['type'] in {'one2many', 'many2many'} +and not values[name]): +breakpoint() +del values[name] return values @property
[tryton-commits] changeset in proteus:5.0 Do not send empty x2Many fields when sa...
changeset c11ebd904c42 in proteus:5.0 details: https://hg.tryton.org/proteus?cmd=changeset;node=c11ebd904c42 description: Do not send empty x2Many fields when saving issue8588 review264091002 (grafted from 25198402e9f72c848b450c7ca6398fbbc442dcf2) diffstat: proteus/__init__.py | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diffs (26 lines): diff -r c78254fff7df -r c11ebd904c42 proteus/__init__.py --- a/proteus/__init__.py Mon Apr 22 10:38:51 2019 +0200 +++ b/proteus/__init__.py Sat Aug 31 01:40:47 2019 +0200 @@ -885,8 +885,20 @@ 'Return dictionary values' if fields is None: fields = self._values.keys() -return dict((x, getattr(self, '__%s_value' % x)) for x in fields -if x not in ('id', '_timestamp')) +values = {} +for name in fields: +if name in ['id', '_timestamp']: +continue +definition = self._fields[name] +if definition.get('readonly') and definition['type'] != 'one2many': +continue +values[name] = getattr(self, '__%s_value' % name) +# Sending an empty X2Many fields breaks ModelFieldAccess.check +if (definition['type'] in {'one2many', 'many2many'} +and not values[name]): +breakpoint() +del values[name] +return values @property def _timestamp(self):
[tryton-commits] changeset in proteus:4.8 Do not send empty x2Many fields when sa...
changeset 1fefe6d2f903 in proteus:4.8 details: https://hg.tryton.org/proteus?cmd=changeset;node=1fefe6d2f903 description: Do not send empty x2Many fields when saving issue8588 review264091002 (grafted from 25198402e9f72c848b450c7ca6398fbbc442dcf2) diffstat: proteus/__init__.py | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diffs (26 lines): diff -r 49358331105c -r 1fefe6d2f903 proteus/__init__.py --- a/proteus/__init__.py Mon Apr 22 10:40:32 2019 +0200 +++ b/proteus/__init__.py Sat Aug 31 01:40:47 2019 +0200 @@ -893,8 +893,20 @@ 'Return dictionary values' if fields is None: fields = self._values.keys() -return dict((x, getattr(self, '__%s_value' % x)) for x in fields -if x not in ('id', '_timestamp')) +values = {} +for name in fields: +if name in ['id', '_timestamp']: +continue +definition = self._fields[name] +if definition.get('readonly') and definition['type'] != 'one2many': +continue +values[name] = getattr(self, '__%s_value' % name) +# Sending an empty X2Many fields breaks ModelFieldAccess.check +if (definition['type'] in {'one2many', 'many2many'} +and not values[name]): +breakpoint() +del values[name] +return values @property def _timestamp(self):
[tryton-commits] changeset in sao:5.0 Add input-icon classes on date widget of Dict
changeset 126c6d268d82 in sao:5.0 details: https://hg.tryton.org/sao?cmd=changeset;node=126c6d268d82 description: Add input-icon classes on date widget of Dict issue8608 review277761002 (grafted from 518497a4ae4325b83fb83835c39b16a2d6d7e2dd) diffstat: src/view/form.js | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r eb2ba675a419 -r 126c6d268d82 src/view/form.js --- a/src/view/form.js Wed Aug 28 22:27:30 2019 +0200 +++ b/src/view/form.js Mon Sep 02 18:31:43 2019 +0200 @@ -4374,6 +4374,7 @@ create_widget: function() { Sao.View.Form.Dict.Date._super.create_widget.call(this); this.date = this.input.parent(); +this.date.addClass('input-icon input-icon-primary'); Sao.common.ICONFACTORY.get_icon_img('tryton-date') .appendTo(jQuery('', { 'class': 'datepickerbutton icon-input icon-primary',
[tryton-commits] changeset in sao:5.0 Set focus on the form if it does not have it
changeset 68c47b51bdd4 in sao:5.0 details: https://hg.tryton.org/sao?cmd=changeset;node=68c47b51bdd4 description: Set focus on the form if it does not have it When set_cursor is called, it should force to set the focus on the first focusable widget of the form. issue8604 review258011002 (grafted from d8401a59de642e154d99c4f48c04bc29e9a44f28) diffstat: src/view/form.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines): diff -r 126c6d268d82 -r 68c47b51bdd4 src/view/form.js --- a/src/view/form.js Mon Sep 02 18:31:43 2019 +0200 +++ b/src/view/form.js Mon Sep 02 18:33:18 2019 +0200 @@ -404,8 +404,8 @@ var widgets, error_el, pages, is_ancestor; var currently_focused = jQuery(document.activeElement); -var has_focus = currently_focused.closest(this.el) > 0; -if (reset_view || has_focus) { +var has_focus = currently_focused.closest(this.el).length > 0; +if (reset_view || !has_focus) { if (reset_view) { for (i = 0; i < this.notebooks.length; i++) { notebook = this.notebooks[i];
[tryton-commits] changeset in modules/account_payment_stripe:default Remove _even...
changeset c0d479c7d6bb in modules/account_payment_stripe:default details: https://hg.tryton.org/modules/account_payment_stripe?cmd=changeset;node=c0d479c7d6bb description: Remove _event argument when calling webhook_source_failed This argument does not exist on webhook_source_failed. issue8647 review252111337 diffstat: payment.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r b04d9f8129bb -r c0d479c7d6bb payment.py --- a/payment.pyFri Aug 09 16:33:57 2019 +0200 +++ b/payment.pyThu Sep 12 22:58:57 2019 +0200 @@ -611,7 +611,7 @@ return self.webhook_charge_succeeded(payload, _event='charge.captured') def webhook_charge_expired(self, payload): -return self.webhook_source_failed(payload, _event='charge.expired') +return self.webhook_source_failed(payload) def webhook_charge_pending(self, payload): return self.webhook_charge_succeeded(payload, _event='charge.pending')
[tryton-commits] changeset in modules/account:default Update the date of move lin...
changeset 54ee0751982b in modules/account:default details: https://hg.tryton.org/modules/account?cmd=changeset;node=54ee0751982b description: Update the date of move lines when the date on move is changed issue8629 review267891002 diffstat: move.py | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diffs (28 lines): diff -r c57340cb7d4f -r 54ee0751982b move.py --- a/move.py Thu Sep 12 18:44:47 2019 +0200 +++ b/move.py Thu Sep 12 22:47:07 2019 +0200 @@ -183,6 +183,7 @@ date = today else: date = self.period.start_date +self.on_change_date() return date lines = Line.search([ ('journal', '=', self.journal), @@ -198,6 +199,16 @@ date = self.period.start_date return date +@fields.depends('date', 'lines') +def on_change_date(self): +for line in (self.lines or []): +line.date = self.date + +@fields.depends(methods=['on_change_with_date', 'on_change_date']) +def on_change_period(self): +self.date = self.on_change_with_date() +self.on_change_date() + @classmethod def _get_origin(cls): 'Return list of Model names for origin Reference'
[tryton-commits] changeset in trytond:5.2 Use MagicMock for message when testing ...
changeset 9e396c49795e in trytond:5.2 details: https://hg.tryton.org/trytond?cmd=changeset;node=9e396c49795e description: Use MagicMock for message when testing sendmail Since issue8596, sendmail test message contains Date header so message must implement the magic method. (grafted from 464864aedc0460dd6717d6197eb736bfa2433169) diffstat: trytond/tests/test_sendmail.py | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diffs (51 lines): diff -r 87bd1a818284 -r 9e396c49795e trytond/tests/test_sendmail.py --- a/trytond/tests/test_sendmail.pyFri Aug 30 09:08:32 2019 +0200 +++ b/trytond/tests/test_sendmail.pyFri Aug 30 11:32:32 2019 +0200 @@ -3,7 +3,7 @@ import smtplib import unittest from email.message import Message -from unittest.mock import Mock, patch, call +from unittest.mock import Mock, MagicMock, patch, call from trytond.sendmail import ( sendmail_transactional, sendmail, SMTPDataManager, get_smtp_server) @@ -21,7 +21,7 @@ @with_transaction() def test_sendmail_transactional(self): 'Test sendmail_transactional' -message = Mock() +message = MagicMock() datamanager = Mock() sendmail_transactional( 'try...@example.com', 'f...@example.com', message, @@ -32,7 +32,7 @@ def test_sendmail(self): 'Test sendmail' -message = Mock() +message = MagicMock() server = Mock() sendmail( 'try...@example.com', 'f...@example.com', message, server=server) @@ -89,8 +89,8 @@ # multiple join must return the same self.assertEqual(transaction.join(SMTPDataManager()), datamanager) -msg1 = Mock(Message) -msg2 = Mock(Message) +msg1 = MagicMock(Message) +msg2 = MagicMock(Message) datamanager.put('f...@example.com', 'b...@example.com', msg1) datamanager.put('b...@example.com', 'f...@example.com', msg2) @@ -105,7 +105,8 @@ server.reset_mock() -datamanager.put('f...@example.com', 'b...@example.com', Mock(Message)) +datamanager.put( +'f...@example.com', 'b...@example.com', MagicMock(Message)) transaction.rollback() server.sendmail.assert_not_called()
[tryton-commits] changeset in trytond:5.0 Add missing Date header on email sent
changeset f0835831dae6 in trytond:5.0 details: https://hg.tryton.org/trytond?cmd=changeset;node=f0835831dae6 description: Add missing Date header on email sent issue8596 review272091002 (grafted from fc47f7e21925305bbb2d6783e74949ee83186469) diffstat: trytond/sendmail.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diffs (20 lines): diff -r fe9af17f69d3 -r f0835831dae6 trytond/sendmail.py --- a/trytond/sendmail.py Fri Aug 23 18:31:05 2019 +0200 +++ b/trytond/sendmail.py Fri Aug 30 09:08:32 2019 +0200 @@ -3,6 +3,7 @@ import logging import smtplib from email.message import Message +from email.utils import formatdate from urllib.parse import parse_qs, unquote_plus from .config import config, parse_uri @@ -29,6 +30,8 @@ quit = True else: quit = False +if 'Date' not in msg: +msg['Date'] = formatdate() try: senderrs = server.sendmail(from_addr, to_addrs, msg.as_string()) except smtplib.SMTPException:
[tryton-commits] changeset in tryton:4.4 Replace child_of target only if it is no...
changeset 32fb324397a3 in tryton:4.4 details: https://hg.tryton.org/tryton?cmd=changeset;node=32fb324397a3 description: Replace child_of target only if it is not a related field issue8609 review285911002 (grafted from 4cd1ebee3cd56cf5c58144c50f845af519b9fc7a) diffstat: tryton/common/domain_inversion.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r ad099352893a -r 32fb324397a3 tryton/common/domain_inversion.py --- a/tryton/common/domain_inversion.py Sun Sep 01 23:40:05 2019 +0200 +++ b/tryton/common/domain_inversion.py Mon Sep 02 18:34:55 2019 +0200 @@ -105,7 +105,7 @@ if domain in ('AND', 'OR'): return domain elif is_leaf(domain): -if 'child_of' in domain[1]: +if 'child_of' in domain[1] and '.' not in domain[0]: if len(domain) == 3: return domain else:
[tryton-commits] changeset in trytond:5.0 Use MagicMock for message when testing ...
changeset f0f198b463a0 in trytond:5.0 details: https://hg.tryton.org/trytond?cmd=changeset;node=f0f198b463a0 description: Use MagicMock for message when testing sendmail Since issue8596, sendmail test message contains Date header so message must implement the magic method. (grafted from 464864aedc0460dd6717d6197eb736bfa2433169) diffstat: trytond/tests/test_sendmail.py | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diffs (51 lines): diff -r f0835831dae6 -r f0f198b463a0 trytond/tests/test_sendmail.py --- a/trytond/tests/test_sendmail.pyFri Aug 30 09:08:32 2019 +0200 +++ b/trytond/tests/test_sendmail.pyFri Aug 30 11:32:32 2019 +0200 @@ -3,7 +3,7 @@ import smtplib import unittest from email.message import Message -from unittest.mock import Mock, patch, call +from unittest.mock import Mock, MagicMock, patch, call from trytond.sendmail import ( sendmail_transactional, sendmail, SMTPDataManager, get_smtp_server) @@ -21,7 +21,7 @@ @with_transaction() def test_sendmail_transactional(self): 'Test sendmail_transactional' -message = Mock() +message = MagicMock() datamanager = Mock() sendmail_transactional( 'try...@example.com', 'f...@example.com', message, @@ -32,7 +32,7 @@ def test_sendmail(self): 'Test sendmail' -message = Mock() +message = MagicMock() server = Mock() sendmail( 'try...@example.com', 'f...@example.com', message, server=server) @@ -89,8 +89,8 @@ # multiple join must return the same self.assertEqual(transaction.join(SMTPDataManager()), datamanager) -msg1 = Mock(Message) -msg2 = Mock(Message) +msg1 = MagicMock(Message) +msg2 = MagicMock(Message) datamanager.put('f...@example.com', 'b...@example.com', msg1) datamanager.put('b...@example.com', 'f...@example.com', msg2) @@ -105,7 +105,8 @@ server.reset_mock() -datamanager.put('f...@example.com', 'b...@example.com', Mock(Message)) +datamanager.put( +'f...@example.com', 'b...@example.com', MagicMock(Message)) transaction.rollback() server.sendmail.assert_not_called()
[tryton-commits] changeset in trytond:5.2 Add missing Date header on email sent
changeset 87bd1a818284 in trytond:5.2 details: https://hg.tryton.org/trytond?cmd=changeset;node=87bd1a818284 description: Add missing Date header on email sent issue8596 review272091002 (grafted from fc47f7e21925305bbb2d6783e74949ee83186469) diffstat: trytond/sendmail.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diffs (20 lines): diff -r 7e7fe6e2b598 -r 87bd1a818284 trytond/sendmail.py --- a/trytond/sendmail.py Fri Aug 23 18:31:05 2019 +0200 +++ b/trytond/sendmail.py Fri Aug 30 09:08:32 2019 +0200 @@ -3,6 +3,7 @@ import logging import smtplib from email.message import Message +from email.utils import formatdate from urllib.parse import parse_qs, unquote_plus from .config import config, parse_uri @@ -31,6 +32,8 @@ quit = True else: quit = False +if 'Date' not in msg: +msg['Date'] = formatdate() try: senderrs = server.sendmail(from_addr, to_addrs, msg.as_string()) except smtplib.SMTPException:
[tryton-commits] changeset in tryton:4.6 Replace child_of target only if it is no...
changeset 2aa7804c9651 in tryton:4.6 details: https://hg.tryton.org/tryton?cmd=changeset;node=2aa7804c9651 description: Replace child_of target only if it is not a related field issue8609 review285911002 (grafted from 4cd1ebee3cd56cf5c58144c50f845af519b9fc7a) diffstat: tryton/common/domain_inversion.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 80668a6d7cac -r 2aa7804c9651 tryton/common/domain_inversion.py --- a/tryton/common/domain_inversion.py Sun Sep 01 23:39:35 2019 +0200 +++ b/tryton/common/domain_inversion.py Mon Sep 02 18:34:55 2019 +0200 @@ -105,7 +105,7 @@ if domain in ('AND', 'OR'): return domain elif is_leaf(domain): -if 'child_of' in domain[1]: +if 'child_of' in domain[1] and '.' not in domain[0]: if len(domain) == 3: return domain else:
[tryton-commits] changeset in trytond:4.4 Use MagicMock for message when testing ...
changeset 6e3b3d479ff6 in trytond:4.4 details: https://hg.tryton.org/trytond?cmd=changeset;node=6e3b3d479ff6 description: Use MagicMock for message when testing sendmail Since issue8596, sendmail test message contains Date header so message must implement the magic method. (grafted from 464864aedc0460dd6717d6197eb736bfa2433169) diffstat: trytond/tests/test_sendmail.py | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diffs (51 lines): diff -r b0eed47a2fbe -r 6e3b3d479ff6 trytond/tests/test_sendmail.py --- a/trytond/tests/test_sendmail.pyFri Aug 30 09:08:32 2019 +0200 +++ b/trytond/tests/test_sendmail.pyFri Aug 30 11:32:32 2019 +0200 @@ -3,7 +3,7 @@ import unittest import smtplib from email.message import Message -from mock import Mock, patch, call +from mock import Mock, MagicMock, patch, call from trytond.sendmail import ( sendmail_transactional, sendmail, SMTPDataManager, get_smtp_server) @@ -21,7 +21,7 @@ @with_transaction() def test_sendmail_transactional(self): 'Test sendmail_transactional' -message = Mock() +message = MagicMock() datamanager = Mock() sendmail_transactional( 'try...@example.com', 'f...@example.com', message, @@ -32,7 +32,7 @@ def test_sendmail(self): 'Test sendmail' -message = Mock() +message = MagicMock() server = Mock() sendmail( 'try...@example.com', 'f...@example.com', message, server=server) @@ -79,8 +79,8 @@ # multiple join must return the same self.assertEqual(transaction.join(SMTPDataManager()), datamanager) -msg1 = Mock(Message) -msg2 = Mock(Message) +msg1 = MagicMock(Message) +msg2 = MagicMock(Message) datamanager.put('f...@example.com', 'b...@example.com', msg1) datamanager.put('b...@example.com', 'f...@example.com', msg2) @@ -95,7 +95,8 @@ server.reset_mock() -datamanager.put('f...@example.com', 'b...@example.com', Mock(Message)) +datamanager.put( +'f...@example.com', 'b...@example.com', MagicMock(Message)) transaction.rollback() server.sendmail.assert_not_called()
[tryton-commits] changeset in trytond:4.4 Add missing Date header on email sent
changeset b0eed47a2fbe in trytond:4.4 details: https://hg.tryton.org/trytond?cmd=changeset;node=b0eed47a2fbe description: Add missing Date header on email sent issue8596 review272091002 (grafted from fc47f7e21925305bbb2d6783e74949ee83186469) diffstat: trytond/sendmail.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diffs (20 lines): diff -r 33219fbea66e -r b0eed47a2fbe trytond/sendmail.py --- a/trytond/sendmail.py Fri Aug 23 18:31:05 2019 +0200 +++ b/trytond/sendmail.py Fri Aug 30 09:08:32 2019 +0200 @@ -4,6 +4,7 @@ import smtplib import urllib from email.message import Message +from email.utils import formatdate from .config import config, parse_uri from .transaction import Transaction @@ -29,6 +30,8 @@ quit = True else: quit = False +if 'Date' not in msg: +msg['Date'] = formatdate() try: senderrs = server.sendmail(from_addr, to_addrs, msg.as_string()) except smtplib.SMTPException:
[tryton-commits] changeset in trytond:4.8 Add missing Date header on email sent
changeset 28c254f94552 in trytond:4.8 details: https://hg.tryton.org/trytond?cmd=changeset;node=28c254f94552 description: Add missing Date header on email sent issue8596 review272091002 (grafted from fc47f7e21925305bbb2d6783e74949ee83186469) diffstat: trytond/sendmail.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diffs (20 lines): diff -r 4ea8dd226032 -r 28c254f94552 trytond/sendmail.py --- a/trytond/sendmail.py Fri Aug 23 18:31:05 2019 +0200 +++ b/trytond/sendmail.py Fri Aug 30 09:08:32 2019 +0200 @@ -4,6 +4,7 @@ import smtplib import urllib from email.message import Message +from email.utils import formatdate from urlparse import parse_qs from .config import config, parse_uri @@ -30,6 +31,8 @@ quit = True else: quit = False +if 'Date' not in msg: +msg['Date'] = formatdate() try: senderrs = server.sendmail(from_addr, to_addrs, msg.as_string()) except smtplib.SMTPException:
[tryton-commits] changeset in trytond:4.8 Use MagicMock for message when testing ...
changeset 170e9b01a273 in trytond:4.8 details: https://hg.tryton.org/trytond?cmd=changeset;node=170e9b01a273 description: Use MagicMock for message when testing sendmail Since issue8596, sendmail test message contains Date header so message must implement the magic method. (grafted from 464864aedc0460dd6717d6197eb736bfa2433169) diffstat: trytond/tests/test_sendmail.py | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diffs (51 lines): diff -r 28c254f94552 -r 170e9b01a273 trytond/tests/test_sendmail.py --- a/trytond/tests/test_sendmail.pyFri Aug 30 09:08:32 2019 +0200 +++ b/trytond/tests/test_sendmail.pyFri Aug 30 11:32:32 2019 +0200 @@ -4,7 +4,7 @@ import smtplib import sys from email.message import Message -from mock import Mock, patch, call +from mock import Mock, MagicMock, patch, call from trytond.sendmail import ( sendmail_transactional, sendmail, SMTPDataManager, get_smtp_server) @@ -22,7 +22,7 @@ @with_transaction() def test_sendmail_transactional(self): 'Test sendmail_transactional' -message = Mock() +message = MagicMock() datamanager = Mock() sendmail_transactional( 'try...@example.com', 'f...@example.com', message, @@ -33,7 +33,7 @@ def test_sendmail(self): 'Test sendmail' -message = Mock() +message = MagicMock() server = Mock() sendmail( 'try...@example.com', 'f...@example.com', message, server=server) @@ -91,8 +91,8 @@ # multiple join must return the same self.assertEqual(transaction.join(SMTPDataManager()), datamanager) -msg1 = Mock(Message) -msg2 = Mock(Message) +msg1 = MagicMock(Message) +msg2 = MagicMock(Message) datamanager.put('f...@example.com', 'b...@example.com', msg1) datamanager.put('b...@example.com', 'f...@example.com', msg2) @@ -107,7 +107,8 @@ server.reset_mock() -datamanager.put('f...@example.com', 'b...@example.com', Mock(Message)) +datamanager.put( +'f...@example.com', 'b...@example.com', MagicMock(Message)) transaction.rollback() server.sendmail.assert_not_called()
[tryton-commits] changeset in trytond:4.6 Use MagicMock for message when testing ...
changeset d44bb0b91dde in trytond:4.6 details: https://hg.tryton.org/trytond?cmd=changeset;node=d44bb0b91dde description: Use MagicMock for message when testing sendmail Since issue8596, sendmail test message contains Date header so message must implement the magic method. (grafted from 464864aedc0460dd6717d6197eb736bfa2433169) diffstat: trytond/tests/test_sendmail.py | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diffs (51 lines): diff -r 8584fb74574b -r d44bb0b91dde trytond/tests/test_sendmail.py --- a/trytond/tests/test_sendmail.pyFri Aug 30 09:08:32 2019 +0200 +++ b/trytond/tests/test_sendmail.pyFri Aug 30 11:32:32 2019 +0200 @@ -4,7 +4,7 @@ import smtplib import sys from email.message import Message -from mock import Mock, patch, call +from mock import Mock, MagicMock, patch, call from trytond.sendmail import ( sendmail_transactional, sendmail, SMTPDataManager, get_smtp_server) @@ -22,7 +22,7 @@ @with_transaction() def test_sendmail_transactional(self): 'Test sendmail_transactional' -message = Mock() +message = MagicMock() datamanager = Mock() sendmail_transactional( 'try...@example.com', 'f...@example.com', message, @@ -33,7 +33,7 @@ def test_sendmail(self): 'Test sendmail' -message = Mock() +message = MagicMock() server = Mock() sendmail( 'try...@example.com', 'f...@example.com', message, server=server) @@ -91,8 +91,8 @@ # multiple join must return the same self.assertEqual(transaction.join(SMTPDataManager()), datamanager) -msg1 = Mock(Message) -msg2 = Mock(Message) +msg1 = MagicMock(Message) +msg2 = MagicMock(Message) datamanager.put('f...@example.com', 'b...@example.com', msg1) datamanager.put('b...@example.com', 'f...@example.com', msg2) @@ -107,7 +107,8 @@ server.reset_mock() -datamanager.put('f...@example.com', 'b...@example.com', Mock(Message)) +datamanager.put( +'f...@example.com', 'b...@example.com', MagicMock(Message)) transaction.rollback() server.sendmail.assert_not_called()
[tryton-commits] changeset in trytond:4.6 Add missing Date header on email sent
changeset 8584fb74574b in trytond:4.6 details: https://hg.tryton.org/trytond?cmd=changeset;node=8584fb74574b description: Add missing Date header on email sent issue8596 review272091002 (grafted from fc47f7e21925305bbb2d6783e74949ee83186469) diffstat: trytond/sendmail.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diffs (20 lines): diff -r 37ad6c458392 -r 8584fb74574b trytond/sendmail.py --- a/trytond/sendmail.py Fri Aug 23 18:31:05 2019 +0200 +++ b/trytond/sendmail.py Fri Aug 30 09:08:32 2019 +0200 @@ -4,6 +4,7 @@ import smtplib import urllib from email.message import Message +from email.utils import formatdate from urlparse import parse_qs from .config import config, parse_uri @@ -30,6 +31,8 @@ quit = True else: quit = False +if 'Date' not in msg: +msg['Date'] = formatdate() try: senderrs = server.sendmail(from_addr, to_addrs, msg.as_string()) except smtplib.SMTPException:
[tryton-commits] changeset in modules/production_split:default Use material icon ...
changeset 9ed8994406a7 in modules/production_split:default details: https://hg.tryton.org/modules/production_split?cmd=changeset;node=9ed8994406a7 description: Use material icon for split action issue8643 review272161002 diffstat: icons/tryton-production-split.svg | 510 +- 1 files changed, 1 insertions(+), 509 deletions(-) diffs (515 lines): diff -r 99802597c99c -r 9ed8994406a7 icons/tryton-production-split.svg --- a/icons/tryton-production-split.svg Mon May 06 15:07:14 2019 +0200 +++ b/icons/tryton-production-split.svg Thu Sep 12 22:56:56 2019 +0200 @@ -1,509 +1,1 @@ - - -http://purl.org/dc/elements/1.1/; - xmlns:cc="http://creativecommons.org/ns#; - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#; - xmlns:svg="http://www.w3.org/2000/svg; - xmlns="http://www.w3.org/2000/svg; - xmlns:xlink="http://www.w3.org/1999/xlink; - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd; - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape; - width="48" - height="48" - viewBox="0 0 48 48" - id="svg23883" - sodipodi:version="0.32" - inkscape:version="0.46" - version="1.0" - sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions" - sodipodi:docname="edit-cut.svg" - inkscape:export-filename="/home/garrett/edit-cut.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90" - inkscape:output_extension="org.inkscape.output.svg.inkscape"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -image/svg+xml -http://purl.org/dc/dcmitype/StillImage; /> -Edit Cut - - -Garrett Le Sage - - - - -edit -cut -clipboard - - -http://creativecommons.org/licenses/publicdomain/; /> - - -Jakub Steiner - - - - http://creativecommons.org/licenses/publicdomain/;> -http://creativecommons.org/ns#Reproduction; /> -http://creativecommons.org/ns#Distribution; /> -http://creativecommons.org/ns#DerivativeWorks; /> - - - - - - - - - - - - - - - - - - - - +http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 24"> \ No newline at end of file
[tryton-commits] changeset in modules/stock_split:default Use material icon for s...
changeset 53f3722661bf in modules/stock_split:default details: https://hg.tryton.org/modules/stock_split?cmd=changeset;node=53f3722661bf description: Use material icon for split action issue8643 review272161002 diffstat: icons/tryton-stock-split.svg | 1 + setup.py | 2 +- stock.xml| 5 + view/move_form.xml | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diffs (44 lines): diff -r ab3565618575 -r 53f3722661bf icons/tryton-stock-split.svg --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/icons/tryton-stock-split.svg Thu Sep 12 22:56:56 2019 +0200 @@ -0,0 +1,1 @@ +http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 24"> \ No newline at end of file diff -r ab3565618575 -r 53f3722661bf setup.py --- a/setup.py Mon May 06 15:17:23 2019 +0200 +++ b/setup.py Thu Sep 12 22:56:56 2019 +0200 @@ -79,7 +79,7 @@ package_data={ 'trytond.modules.stock_split': (info.get('xml', []) + ['tryton.cfg', 'view/*.xml', 'locale/*.po', -'tests/*.rst']), +'icons/*.svg', 'tests/*.rst']), }, classifiers=[ 'Development Status :: 5 - Production/Stable', diff -r ab3565618575 -r 53f3722661bf stock.xml --- a/stock.xml Mon May 06 15:17:23 2019 +0200 +++ b/stock.xml Thu Sep 12 22:56:56 2019 +0200 @@ -3,6 +3,11 @@ this repository contains the full copyright notices and license terms. --> + +tryton-stock-split +icons/tryton-stock-split.svg + + Split Move stock.move.split diff -r ab3565618575 -r 53f3722661bf view/move_form.xml --- a/view/move_form.xmlMon May 06 15:17:23 2019 +0200 +++ b/view/move_form.xmlThu Sep 12 22:56:56 2019 +0200 @@ -3,6 +3,6 @@ this repository contains the full copyright notices and license terms. --> - +