From c37d02babfc79fe5ac4abd8889c32615461f2cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 9 Mar 2015 19:41:16 +0100 Subject: [PATCH] Remove safe_eval We convert all the fields that were storing python code into PYSON. We add a pyson attribute on field tag to store PYSON value. issue4416 review6971002 --- account.xml | 4 +++- party.xml | 3 ++- payment.xml | 16 ++++++++++------ view/payment_journal_form.xml | 3 +-- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/account.xml b/account.xml index ec6a1d9bf8..035654e5aa 100644 --- a/account.xml +++ b/account.xml @@ -8,7 +8,9 @@ this repository contains the full copyright notices and license terms. --> id="act_move_line_form_domain_receivable_mandate"> Receivable with Mandate - ['AND', ['OR', ('debit', '>', 0), ('credit', '<', 0)], ('party.sepa_mandates', '!=', None)] + diff --git a/party.xml b/party.xml index 8783a35e5a..688d00c85b 100644 --- a/party.xml +++ b/party.xml @@ -11,7 +11,8 @@ this repository contains the full copyright notices and license terms. --> Mandates account.payment.sepa.mandate - [("party", "=", Eval('active_id'))] + diff --git a/payment.xml b/payment.xml index 8a627eb3e8..87b796c639 100644 --- a/payment.xml +++ b/payment.xml @@ -55,7 +55,9 @@ this repository contains the full copyright notices and license terms. --> - [('company', '=', user.company.id if user.company else None)] + @@ -128,25 +130,25 @@ this repository contains the full copyright notices and license terms. --> Draft - [('state', '=', 'draft')] + Waiting - [('state', '=', 'waiting')] + Done - [('state', '=', 'done')] + Canceled - [('state', '=', 'canceled')] + @@ -164,7 +166,9 @@ this repository contains the full copyright notices and license terms. --> - [('company', '=', user.company.id if user.company else None)] + diff --git a/view/payment_journal_form.xml b/view/payment_journal_form.xml index 0f2e1b1416..c14b08cf05 100644 --- a/view/payment_journal_form.xml +++ b/view/payment_journal_form.xml @@ -3,8 +3,7 @@ this repository contains the full copyright notices and license terms. --> - +