changeset f41e3f7dfd7f in modules/account_invoice:default
details: 
https://hg.tryton.org/modules/account_invoice?cmd=changeset&node=f41e3f7dfd7f
description:
        Prevent delete tax identifier used on invoice

        issue11311
        review386231002
diffstat:

 CHANGELOG  |  1 +
 invoice.py |  4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 6ed44b4db8d3 -r f41e3f7dfd7f CHANGELOG
--- a/CHANGELOG Wed Mar 09 00:57:16 2022 +0100
+++ b/CHANGELOG Fri Mar 25 15:56:45 2022 +0100
@@ -1,3 +1,4 @@
+* Prevent delete tax identifier used on invoice
 * Raise a warning when validating supplier invoice with same reference
 * Add support for Python 3.10
 * Remove support for Python 3.6
diff -r 6ed44b4db8d3 -r f41e3f7dfd7f invoice.py
--- a/invoice.py        Wed Mar 09 00:57:16 2022 +0100
+++ b/invoice.py        Fri Mar 25 15:56:45 2022 +0100
@@ -67,7 +67,7 @@
             depends=['company']),
         'on_change_with_company_party')
     tax_identifier = fields.Many2One(
-        'party.identifier', "Tax Identifier",
+        'party.identifier', "Tax Identifier", ondelete='RESTRICT',
         states=_states, depends=_depends)
     type = fields.Selection([
             ('out', "Customer"),
@@ -114,7 +114,7 @@
             },
         depends=_depends + ['company'])
     party_tax_identifier = fields.Many2One(
-        'party.identifier', "Party Tax Identifier",
+        'party.identifier', "Party Tax Identifier", ondelete='RESTRICT',
         states=_states,
         domain=[
             ('party', '=', Eval('party', -1)),

Reply via email to