changeset b9adbdc32c5a in modules/account_invoice:default
details: 
https://hg.tryton.org/modules/account_invoice?cmd=changeset&node=b9adbdc32c5a
description:
        Add monetary field

        issue10598
        review338511002
diffstat:

 invoice.py                               |  114 +++++++++---------------------
 payment_term.py                          |   39 ++-------
 view/invoice_form.xml                    |   10 +-
 view/invoice_line_form.xml               |    4 +-
 view/invoice_line_tree.xml               |    4 +-
 view/invoice_line_tree_sequence.xml      |    4 +-
 view/invoice_tax_form.xml                |    4 +-
 view/invoice_tax_tree.xml                |    4 +-
 view/invoice_tax_tree_sequence.xml       |    4 +-
 view/invoice_tree.xml                    |    8 +-
 view/move_line_list_payment.xml          |    6 +-
 view/move_line_list_to_pay.xml           |    6 +-
 view/pay_ask_form.xml                    |    4 +-
 view/pay_start_form.xml                  |    3 +-
 view/payment_term_line_form.xml          |    2 +-
 view/payment_term_line_list.xml          |    2 +-
 view/payment_term_line_list_sequence.xml |    2 +-
 view/payment_term_test_form.xml          |    2 +-
 view/payment_term_test_result_list.xml   |    2 +-
 19 files changed, 80 insertions(+), 144 deletions(-)

diffs (611 lines):

diff -r 0602dbe90ee3 -r b9adbdc32c5a invoice.py
--- a/invoice.py        Fri Aug 20 23:45:02 2021 +0200
+++ b/invoice.py        Sat Aug 21 09:09:55 2021 +0200
@@ -25,6 +25,7 @@
 from trytond.config import config
 
 from trytond.modules.account.tax import TaxableMixin
+from trytond.modules.currency.fields import Monetary
 from trytond.modules.product import price_digits
 
 from .exceptions import (
@@ -129,8 +130,6 @@
                 | (Eval('lines', [0]) & Eval('currency'))),
             },
         depends=_depends)
-    currency_digits = fields.Function(fields.Integer('Currency Digits'),
-        'on_change_with_currency_digits')
     currency_date = fields.Function(fields.Date('Currency Date'),
         'on_change_with_currency_date')
     journal = fields.Many2One(
@@ -203,15 +202,14 @@
         states=_states, depends=_depends)
     comment = fields.Text('Comment', states=_states, depends=_depends)
     origins = fields.Function(fields.Char('Origins'), 'get_origins')
-    untaxed_amount = fields.Function(fields.Numeric('Untaxed',
-            digits=(16, Eval('currency_digits', 2)),
-            depends=['currency_digits']),
+    untaxed_amount = fields.Function(Monetary(
+            "Untaxed", currency='currency', digits='currency'),
         'get_amount', searcher='search_untaxed_amount')
-    tax_amount = fields.Function(fields.Numeric('Tax', digits=(16,
-                Eval('currency_digits', 2)), depends=['currency_digits']),
+    tax_amount = fields.Function(Monetary(
+            "Tax", currency='currency', digits='currency'),
         'get_amount', searcher='search_tax_amount')
-    total_amount = fields.Function(fields.Numeric('Total', digits=(16,
-                Eval('currency_digits', 2)), depends=['currency_digits']),
+    total_amount = fields.Function(Monetary(
+            "Total", currency='currency', digits='currency'),
         'get_amount', searcher='search_total_amount')
     reconciled = fields.Function(fields.Date('Reconciled',
             states={
@@ -249,12 +247,12 @@
                 'invisible': Eval('state') != 'paid',
                 }),
         'get_reconciliation_lines')
-    amount_to_pay_today = fields.Function(fields.Numeric('Amount to Pay Today',
-            digits=(16, Eval('currency_digits', 2)),
-            depends=['currency_digits']), 'get_amount_to_pay')
-    amount_to_pay = fields.Function(fields.Numeric('Amount to Pay',
-            digits=(16, Eval('currency_digits', 2)),
-            depends=['currency_digits']), 'get_amount_to_pay')
+    amount_to_pay_today = fields.Function(Monetary(
+            "Amount to Pay Today", currency='currency', digits='currency'),
+        'get_amount_to_pay')
+    amount_to_pay = fields.Function(Monetary(
+            "Amount to Pay", currency='currency', digits='currency'),
+        'get_amount_to_pay')
     invoice_report_cache = fields.Binary('Invoice Report', readonly=True,
         file_id=file_id, store_prefix=store_prefix)
     invoice_report_cache_id = fields.Char('Invoice Report ID', readonly=True)
@@ -438,14 +436,6 @@
             return company.currency.id
 
     @staticmethod
-    def default_currency_digits():
-        Company = Pool().get('company.company')
-        if Transaction().context.get('company'):
-            company = Company(Transaction().context['company'])
-            return company.currency.digits
-        return 2
-
-    @staticmethod
     def default_company():
         return Transaction().context.get('company')
 
@@ -502,12 +492,6 @@
             elif self.type == 'in':
                 self.payment_term = self.party.supplier_payment_term
 
-    @fields.depends('currency')
-    def on_change_with_currency_digits(self, name=None):
-        if self.currency:
-            return self.currency.digits
-        return 2
-
     @fields.depends('invoice_date')
     def on_change_with_currency_date(self, name=None):
         Date = Pool().get('ir.date')
@@ -1778,8 +1762,6 @@
     currency = fields.Many2One(
         'currency.currency', "Currency", required=True,
         states=_states, depends=_depends)
-    currency_digits = fields.Function(fields.Integer('Currency Digits'),
-        'on_change_with_currency_digits')
     company = fields.Many2One(
         'company.company', "Company", required=True, select=True,
         states=_states, depends=_depends)
@@ -1845,20 +1827,20 @@
                 Eval('_parent_invoice', {}).get('invoice_date')),
             },
         depends=['type', 'invoice_type', 'company'] + _depends)
-    unit_price = fields.Numeric('Unit Price', digits=price_digits,
+    unit_price = Monetary(
+        "Unit Price", currency='currency', digits=price_digits,
         states={
             'invisible': Eval('type') != 'line',
             'required': Eval('type') == 'line',
             'readonly': _states['readonly'],
             },
         depends=['type'] + _depends)
-    amount = fields.Function(fields.Numeric('Amount',
-            digits=(16, Eval('_parent_invoice', {}).get('currency_digits',
-                    Eval('currency_digits', 2))),
+    amount = fields.Function(Monetary(
+            "Amount", currency='currency', digits='currency',
             states={
                 'invisible': ~Eval('type').in_(['line', 'subtotal']),
                 },
-            depends=['type', 'currency_digits']), 'get_amount')
+            depends=['type']), 'get_amount')
     description = fields.Text('Description', size=None,
         states=_states, depends=_depends)
     summary = fields.Function(fields.Char('Summary'), 'on_change_with_summary')
@@ -2012,14 +1994,6 @@
             return company.currency.id
 
     @staticmethod
-    def default_currency_digits():
-        Company = Pool().get('company.company')
-        if Transaction().context.get('company'):
-            company = Company(Transaction().context['company'])
-            return company.currency.digits
-        return 2
-
-    @staticmethod
     def default_unit_digits():
         return 2
 
@@ -2068,12 +2042,6 @@
             return self.unit.digits
         return 2
 
-    @fields.depends('currency')
-    def on_change_with_currency_digits(self, name=None):
-        if self.currency:
-            return self.currency.digits
-        return 2
-
     @fields.depends(
         'type', 'quantity', 'unit_price', 'taxes_deductible_rate', 'invoice',
         '_parent_invoice.currency', 'currency', 'taxes',
@@ -2543,11 +2511,11 @@
             ('company', '=', Eval('_parent_invoice', {}).get('company', 0)),
             ],
         states=_states, depends=_depends)
-    base = fields.Numeric('Base', required=True,
-        digits=(16, Eval('_parent_invoice', {}).get('currency_digits', 2)),
+    base = Monetary(
+        "Base", currency='currency', digits='currency', required=True,
         states=_states, depends=_depends)
-    amount = fields.Numeric('Amount', required=True,
-        digits=(16, Eval('_parent_invoice', {}).get('currency_digits', 2)),
+    amount = Monetary(
+        "Amount", currency='currency', digits='currency', required=True,
         states=_states,
         depends=['tax', 'base', 'manual'] + _depends)
     currency = fields.Function(fields.Many2One('currency.currency',
@@ -2869,10 +2837,9 @@
 class PayInvoiceStart(ModelView):
     'Pay Invoice'
     __name__ = 'account.invoice.pay.start'
-    amount = fields.Numeric('Amount', digits=(16, Eval('currency_digits', 2)),
-        depends=['currency_digits'], required=True)
+    amount = Monetary(
+        "Amount", currency='currency', digits='currency', required=True)
     currency = fields.Many2One('currency.currency', 'Currency', required=True)
-    currency_digits = fields.Integer('Currency Digits', readonly=True)
     description = fields.Char('Description', size=None)
     company = fields.Many2One('company.company', "Company", readonly=True)
     invoice_account = fields.Many2One(
@@ -2892,16 +2859,6 @@
         Date = Pool().get('ir.date')
         return Date.today()
 
-    @staticmethod
-    def default_currency_digits():
-        return 2
-
-    @fields.depends('currency')
-    def on_change_with_currency_digits(self):
-        if self.currency:
-            return self.currency.digits
-        return 2
-
 
 class PayInvoiceAsk(ModelView):
     'Pay Invoice'
@@ -2921,23 +2878,23 @@
             'required': Eval('type') == 'writeoff',
             },
         depends=['company', 'type'])
-    amount = fields.Numeric('Payment Amount',
-            digits=(16, Eval('currency_digits', 2)),
-            readonly=True, depends=['currency_digits'])
+    amount = Monetary(
+        "Payment Amount",
+        currency='currency', digits='currency', readonly=True)
     currency = fields.Many2One('currency.currency', 'Payment Currency',
             readonly=True)
-    currency_digits = fields.Integer('Payment Currency Digits', readonly=True)
-    amount_writeoff = fields.Numeric('Write-Off Amount',
-        digits=(16, Eval('currency_digits_writeoff', 2)), readonly=True,
-        depends=['currency_digits_writeoff', 'type'], states={
+    amount_writeoff = Monetary(
+        "Write-Off Amount",
+        currency='currency_writeoff', digits='currency_writeoff',
+        readonly=True,
+        states={
             'invisible': Eval('type') != 'writeoff',
-            })
+            },
+        depends=['type'])
     currency_writeoff = fields.Many2One('currency.currency',
         'Write-Off Currency', readonly=True, states={
             'invisible': Eval('type') != 'writeoff',
             }, depends=['type'])
-    currency_digits_writeoff = fields.Integer('Write-Off Currency Digits',
-            required=True, readonly=True)
     lines_to_pay = fields.Many2Many('account.move.line', None, None,
             'Lines to Pay', readonly=True)
     lines = fields.Many2Many('account.move.line', None, None, 'Lines',
@@ -3018,7 +2975,6 @@
         invoice = self.record
         default['company'] = invoice.company.id
         default['currency'] = invoice.currency.id
-        default['currency_digits'] = invoice.currency.digits
         default['amount'] = (invoice.amount_to_pay_today
             or invoice.amount_to_pay)
         default['invoice_account'] = invoice.account.id
@@ -3053,7 +3009,6 @@
         default['amount'] = self.start.amount
         default['date'] = self.start.date
         default['currency'] = self.start.currency.id
-        default['currency_digits'] = self.start.currency_digits
         default['company'] = invoice.company.id
 
         with Transaction().set_context(date=self.start.date):
@@ -3076,7 +3031,6 @@
                 if not x.reconciliation]
 
         default['currency_writeoff'] = invoice.company.currency.id
-        default['currency_digits_writeoff'] = invoice.company.currency.digits
         default['invoice'] = invoice.id
 
         if (amount_invoice > invoice.amount_to_pay
diff -r 0602dbe90ee3 -r b9adbdc32c5a payment_term.py
--- a/payment_term.py   Fri Aug 20 23:45:02 2021 +0200
+++ b/payment_term.py   Sat Aug 21 09:09:55 2021 +0200
@@ -15,6 +15,8 @@
 from trytond.wizard import Wizard, StateView, Button
 from trytond.config import config
 
+from trytond.modules.currency.fields import Monetary
+
 from .exceptions import PaymentTermValidationError, PaymentTermComputeError
 
 
@@ -105,18 +107,18 @@
             'invisible': ~Eval('type').in_(['percent', 'percent_on_total']),
             'required': Eval('type').in_(['percent', 'percent_on_total']),
             }, depends=['type'])
-    amount = fields.Numeric('Amount', digits=(16, Eval('currency_digits', 2)),
+    amount = Monetary(
+        "Amount", currency='currency', digits='currency',
         states={
             'invisible': Eval('type') != 'fixed',
             'required': Eval('type') == 'fixed',
-            }, depends=['type', 'currency_digits'])
+            },
+        depends=['type'])
     currency = fields.Many2One('currency.currency', 'Currency',
         states={
             'invisible': Eval('type') != 'fixed',
             'required': Eval('type') == 'fixed',
             }, depends=['type'])
-    currency_digits = fields.Function(fields.Integer('Currency Digits'),
-        'on_change_with_currency_digits')
     relativedeltas = fields.One2Many(
         'account.invoice.payment_term.line.delta', 'line', 'Deltas')
 
@@ -140,10 +142,6 @@
             table.drop_column('percentage')
 
     @staticmethod
-    def default_currency_digits():
-        return 2
-
-    @staticmethod
     def default_type():
         return 'remainder'
 
@@ -178,12 +176,6 @@
             self.ratio = self.round(1 / self.divisor,
                 self.__class__.ratio.digits[1])
 
-    @fields.depends('currency')
-    def on_change_with_currency_digits(self, name=None):
-        if self.currency:
-            return self.currency.digits
-        return 2
-
     def get_date(self, date):
         for relativedelta_ in self.relativedeltas:
             date += relativedelta_.get()
@@ -367,10 +359,9 @@
     payment_term = fields.Many2One('account.invoice.payment_term',
         'Payment Term', required=True)
     date = fields.Date('Date')
-    amount = fields.Numeric('Amount', required=True,
-        digits=(16, Eval('currency_digits', 2)), depends=['currency_digits'])
+    amount = Monetary(
+        "Amount", currency='currency', digits='currency', required=True)
     currency = fields.Many2One('currency.currency', 'Currency', required=True)
-    currency_digits = fields.Integer('Currency Digits')
     result = fields.One2Many('account.invoice.payment_term.test.result',
         None, 'Result', readonly=True)
 
@@ -382,12 +373,6 @@
         if company:
             return Company(company).currency.id
 
-    @fields.depends('currency')
-    def on_change_with_currency_digits(self):
-        if self.currency:
-            return self.currency.digits
-        return 2
-
     @fields.depends('payment_term', 'date', 'amount', 'currency', 'result')
     def on_change_with_result(self):
         pool = Pool()
@@ -399,8 +384,7 @@
                 result.append(Result(
                         date=date,
                         amount=amount,
-                        currency=self.currency,
-                        currency_digits=self.currency.digits))
+                        currency=self.currency))
         self.result = result
         return self._changed_values.get('result', [])
 
@@ -409,7 +393,6 @@
     'Test Payment Term'
     __name__ = 'account.invoice.payment_term.test.result'
     date = fields.Date('Date', readonly=True)
-    amount = fields.Numeric('Amount', readonly=True,
-        digits=(16, Eval('currency_digits', 2)), depends=['currency_digits'])
+    amount = Monetary(
+        "Amount", currency='currency', digits='currency', readonly=True)
     currency = fields.Many2One('currency.currency', "Currency")
-    currency_digits = fields.Integer('Currency Digits')
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/invoice_form.xml
--- a/view/invoice_form.xml     Fri Aug 20 23:45:02 2021 +0200
+++ b/view/invoice_form.xml     Sat Aug 21 09:09:55 2021 +0200
@@ -40,11 +40,11 @@
                     </group>
                     <group col="2" colspan="2" id="amount" yfill="1">
                         <label name="untaxed_amount" xalign="1.0" xexpand="1"/>
-                        <field name="untaxed_amount" xalign="1.0" xexpand="0" 
symbol="currency"/>
+                        <field name="untaxed_amount" xalign="1.0" xexpand="0"/>
                         <label name="tax_amount" xalign="1.0" xexpand="1"/>
-                        <field name="tax_amount" xalign="1.0" xexpand="0" 
symbol="currency"/>
+                        <field name="tax_amount" xalign="1.0" xexpand="0"/>
                         <label name="total_amount" xalign="1.0" xexpand="1"/>
-                        <field name="total_amount" xalign="1.0" xexpand="0" 
symbol="currency"/>
+                        <field name="total_amount" xalign="1.0" xexpand="0"/>
                     </group>
                 </group>
             </group>
@@ -71,9 +71,9 @@
             <field name="payment_term_date"/>
             <newline/>
             <label name="amount_to_pay_today"/>
-            <field name="amount_to_pay_today" symbol="currency"/>
+            <field name="amount_to_pay_today"/>
             <label name="amount_to_pay"/>
-            <field name="amount_to_pay" symbol="currency"/>
+            <field name="amount_to_pay"/>
             <field name="lines_to_pay" colspan="4" 
view_ids="account_invoice.move_line_view_list_to_pay"/>
             <button name="reschedule_lines_to_pay" colspan="4"/>
             <field name="payment_lines" colspan="4"
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/invoice_line_form.xml
--- a/view/invoice_line_form.xml        Fri Aug 20 23:45:02 2021 +0200
+++ b/view/invoice_line_form.xml        Sat Aug 21 09:09:55 2021 +0200
@@ -19,9 +19,9 @@
             <label name="unit"/>
             <field name="unit"/>
             <label name="unit_price"/>
-            <field name="unit_price" symbol="currency"/>
+            <field name="unit_price"/>
             <label name="amount"/>
-            <field name="amount" symbol="currency"/>
+            <field name="amount"/>
             <label name="taxes_date"/>
             <field name="taxes_date"/>
             <label name="taxes_deductible_rate"/>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/invoice_line_tree.xml
--- a/view/invoice_line_tree.xml        Fri Aug 20 23:45:02 2021 +0200
+++ b/view/invoice_line_tree.xml        Sat Aug 21 09:09:55 2021 +0200
@@ -8,7 +8,7 @@
     <field name="summary" expand="1"/>
     <field name="account" expand="1"/>
     <field name="quantity" symbol="unit"/>
-    <field name="unit_price" symbol="currency"/>
+    <field name="unit_price"/>
     <field name="taxes"/>
-    <field name="amount" symbol="currency"/>
+    <field name="amount"/>
 </tree>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/invoice_line_tree_sequence.xml
--- a/view/invoice_line_tree_sequence.xml       Fri Aug 20 23:45:02 2021 +0200
+++ b/view/invoice_line_tree_sequence.xml       Sat Aug 21 09:09:55 2021 +0200
@@ -8,7 +8,7 @@
     <field name="summary" expand="1"/>
     <field name="account" expand="1"/>
     <field name="quantity" symbol="unit"/>
-    <field name="unit_price" symbol="currency"/>
+    <field name="unit_price"/>
     <field name="taxes"/>
-    <field name="amount" symbol="currency"/>
+    <field name="amount"/>
 </tree>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/invoice_tax_form.xml
--- a/view/invoice_tax_form.xml Fri Aug 20 23:45:02 2021 +0200
+++ b/view/invoice_tax_form.xml Sat Aug 21 09:09:55 2021 +0200
@@ -15,9 +15,9 @@
     <label name="manual"/>
     <field name="manual"/>
     <label name="base"/>
-    <field name="base" symbol="currency"/>
+    <field name="base"/>
     <label name="amount"/>
-    <field name="amount" symbol="currency"/>
+    <field name="amount"/>
     <separator name="legal_notice" colspan="4"/>
     <field name="legal_notice" colspan="4"/>
 </form>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/invoice_tax_tree.xml
--- a/view/invoice_tax_tree.xml Fri Aug 20 23:45:02 2021 +0200
+++ b/view/invoice_tax_tree.xml Sat Aug 21 09:09:55 2021 +0200
@@ -7,6 +7,6 @@
     <field name="description" expand="1"/>
     <field name="account" expand="1"/>
     <field name="manual"/>
-    <field name="base" symbol="currency"/>
-    <field name="amount" symbol="currency"/>
+    <field name="base"/>
+    <field name="amount"/>
 </tree>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/invoice_tax_tree_sequence.xml
--- a/view/invoice_tax_tree_sequence.xml        Fri Aug 20 23:45:02 2021 +0200
+++ b/view/invoice_tax_tree_sequence.xml        Sat Aug 21 09:09:55 2021 +0200
@@ -3,8 +3,8 @@
 this repository contains the full copyright notices and license terms. -->
 <tree sequence="sequence">
     <field name="description" expand="1"/>
-    <field name="base" symbol="currency"/>
-    <field name="amount" symbol="currency"/>
+    <field name="base"/>
+    <field name="amount"/>
     <field name="sequence" tree_invisible="1"/>
     <field name="manual" tree_invisible="1"/>
     <field name="account" tree_invisible="1"/>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/invoice_tree.xml
--- a/view/invoice_tree.xml     Fri Aug 20 23:45:02 2021 +0200
+++ b/view/invoice_tree.xml     Sat Aug 21 09:09:55 2021 +0200
@@ -7,11 +7,11 @@
     <field name="reference"/>
     <field name="invoice_date"/>
     <field name="party" expand="2"/>
-    <field name="untaxed_amount" symbol="currency"/>
-    <field name="tax_amount" symbol="currency"/>
-    <field name="total_amount" symbol="currency"/>
+    <field name="untaxed_amount"/>
+    <field name="tax_amount"/>
+    <field name="total_amount"/>
     <field name="state"/>
-    <field name="amount_to_pay_today" symbol="currency"/>
+    <field name="amount_to_pay_today"/>
     <field name="description" expand="1"/>
     <button name="cancel" tree_invisible="1"/>
     <button name="draft" tree_invisible="1"/>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/move_line_list_payment.xml
--- a/view/move_line_list_payment.xml   Fri Aug 20 23:45:02 2021 +0200
+++ b/view/move_line_list_payment.xml   Sat Aug 21 09:09:55 2021 +0200
@@ -3,7 +3,7 @@
 this repository contains the full copyright notices and license terms. -->
 <tree>
     <field name="date"/>
-    <field name="debit" sum="Debit" symbol="currency"/>
-    <field name="credit" sum="Credit" symbol="currency"/>
-    <field name="amount_second_currency" sum="Amount Second Currency" 
symbol="second_currency"/>
+    <field name="debit" sum="Debit"/>
+    <field name="credit" sum="Credit"/>
+    <field name="amount_second_currency" sum="Amount Second Currency"/>
 </tree>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/move_line_list_to_pay.xml
--- a/view/move_line_list_to_pay.xml    Fri Aug 20 23:45:02 2021 +0200
+++ b/view/move_line_list_to_pay.xml    Sat Aug 21 09:09:55 2021 +0200
@@ -3,7 +3,7 @@
 this repository contains the full copyright notices and license terms. -->
 <tree>
     <field name="maturity_date"/>
-    <field name="debit" sum="Debit" symbol="currency"/>
-    <field name="credit" sum="Credit" symbol="currency"/>
-    <field name="amount_second_currency" sum="Amount Second Currency" 
symbol="second_currency"/>
+    <field name="debit" sum="Debit"/>
+    <field name="credit" sum="Credit"/>
+    <field name="amount_second_currency" sum="Amount Second Currency"/>
 </tree>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/pay_ask_form.xml
--- a/view/pay_ask_form.xml     Fri Aug 20 23:45:02 2021 +0200
+++ b/view/pay_ask_form.xml     Sat Aug 21 09:09:55 2021 +0200
@@ -5,13 +5,13 @@
     <label name="type"/>
     <field name="type" colspan="3"/>
     <label name="amount"/>
-    <field name="amount"/>
+    <field name="amount" symbol=""/>
     <label name="currency"/>
     <field name="currency"/>
     <label name="amount_writeoff"/>
     <field name="amount_writeoff"/>
     <label name="currency_writeoff"/>
-    <field name="currency_writeoff"/>
+    <field name="currency_writeoff" symbol=""/>
     <label name="writeoff"/>
     <field name="writeoff" widget="selection"/>
     <field name="lines" colspan="4"
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/pay_start_form.xml
--- a/view/pay_start_form.xml   Fri Aug 20 23:45:02 2021 +0200
+++ b/view/pay_start_form.xml   Sat Aug 21 09:09:55 2021 +0200
@@ -3,7 +3,7 @@
 this repository contains the full copyright notices and license terms. -->
 <form>
     <label name="amount"/>
-    <field name="amount"/>
+    <field name="amount" symbol=""/>
     <label name="currency"/>
     <field name="currency"/>
     <label name="description"/>
@@ -12,5 +12,4 @@
     <field name="payment_method" widget="selection"/>
     <label name="date"/>
     <field name="date"/>
-    <field name="currency_digits" colspan="4" invisible="1"/>
 </form>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/payment_term_line_form.xml
--- a/view/payment_term_line_form.xml   Fri Aug 20 23:45:02 2021 +0200
+++ b/view/payment_term_line_form.xml   Sat Aug 21 09:09:55 2021 +0200
@@ -7,7 +7,7 @@
     <label name="sequence"/>
     <field name="sequence"/>
     <label name="amount"/>
-    <field name="amount"/>
+    <field name="amount" symbol=""/>
     <label name="currency"/>
     <field name="currency"/>
     <label name="ratio"/>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/payment_term_line_list.xml
--- a/view/payment_term_line_list.xml   Fri Aug 20 23:45:02 2021 +0200
+++ b/view/payment_term_line_list.xml   Sat Aug 21 09:09:55 2021 +0200
@@ -7,5 +7,5 @@
     <field name="ratio" factor="100">
         <suffix string="%" name="ratio"/>
     </field>
-    <field name="amount" symbol="currency"/>
+    <field name="amount"/>
 </tree>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/payment_term_line_list_sequence.xml
--- a/view/payment_term_line_list_sequence.xml  Fri Aug 20 23:45:02 2021 +0200
+++ b/view/payment_term_line_list_sequence.xml  Sat Aug 21 09:09:55 2021 +0200
@@ -6,5 +6,5 @@
     <field name="ratio" factor="100">
         <suffix string="%" name="ratio"/>
     </field>
-    <field name="amount" symbol="currency"/>
+    <field name="amount"/>
 </tree>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/payment_term_test_form.xml
--- a/view/payment_term_test_form.xml   Fri Aug 20 23:45:02 2021 +0200
+++ b/view/payment_term_test_form.xml   Sat Aug 21 09:09:55 2021 +0200
@@ -7,7 +7,7 @@
     <label name="date"/>
     <field name="date"/>
     <label name="amount"/>
-    <field name="amount"/>
+    <field name="amount" symbol=""/>
     <label name="currency"/>
     <field name="currency"/>
     <field name="result" mode="tree" colspan="4"/>
diff -r 0602dbe90ee3 -r b9adbdc32c5a view/payment_term_test_result_list.xml
--- a/view/payment_term_test_result_list.xml    Fri Aug 20 23:45:02 2021 +0200
+++ b/view/payment_term_test_result_list.xml    Sat Aug 21 09:09:55 2021 +0200
@@ -3,5 +3,5 @@
 this repository contains the full copyright notices and license terms. -->
 <tree>
     <field name="date"/>
-    <field name="amount" symbol="currency"/>
+    <field name="amount"/>
 </tree>

Reply via email to