We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce23266 commit 742b184Copy full SHA for 742b184
1 file changed
l10n_ar_tax/__init__.py
@@ -13,7 +13,12 @@
13
14
def monkey_patch_synchronize_to_moves():
15
def _synchronize_to_moves(self, changed_fields):
16
- return super(AccountPayment, self)._synchronize_to_moves(changed_fields)
+ # dynamic_unlink=True allows deletion of withholding move lines with display_type='tax'
17
+ # that are classified as write-off lines by _seek_for_lines. Without it,
18
+ # _prevent_automatic_line_deletion raises a ValidationError even in draft state.
19
+ # This is safe: _synchronize_to_moves only runs on draft moves (posted are skipped),
20
+ # and this is a programmatic sync, not a user UI deletion.
21
+ return super(AccountPayment, self.with_context(dynamic_unlink=True))._synchronize_to_moves(changed_fields)
22
23
AccountPayment._synchronize_to_moves = _synchronize_to_moves
24
0 commit comments