From 99c0d46d0f4a9d09d5400c35361229a5b1a886cd Mon Sep 17 00:00:00 2001 From: "Jorge E. Gomez" Date: Thu, 16 Dec 2021 16:20:20 -0500 Subject: [PATCH] [ADD] Patches OCA Invoice Force Number and rejects extended module from Special --- apply_patches.sh | 9 +++++++++ ...oice-force-number_post-instead-of-action.patch | 15 +++++++++++++++ rejected_special_modules.txt | 1 + 3 files changed, 25 insertions(+) create mode 100644 patches/20211216_account-invoice-force-number_post-instead-of-action.patch diff --git a/apply_patches.sh b/apply_patches.sh index 6fcb338..d762be0 100755 --- a/apply_patches.sh +++ b/apply_patches.sh @@ -91,6 +91,15 @@ pt_community () DEST=$DESTDIR/community/auth_oauth_multi_token/ OPTIONS="--directory=$DEST --strip=1" patch $OPTIONS < patches/20210420_auth-oauth-multi-token_error-in-login.patch + + SRC=$PWD + DEST=$DESTDIR/community/account-invoicing/ + OPTIONS="-p1 --verbose" + + pushd $DEST + git apply $OPTIONS $SRC/patches/20211216_account-invoice-force-number_post-instead-of-action.patch + popd + } pt_all () diff --git a/patches/20211216_account-invoice-force-number_post-instead-of-action.patch b/patches/20211216_account-invoice-force-number_post-instead-of-action.patch new file mode 100644 index 0000000..821ebbb --- /dev/null +++ b/patches/20211216_account-invoice-force-number_post-instead-of-action.patch @@ -0,0 +1,15 @@ +diff --git a/account_invoice_force_number/models/account_move.py b/account_invoice_force_number/models/account_move.py +index 50e2df99..2b3e7217 100644 +--- a/account_invoice_force_number/models/account_move.py ++++ b/account_invoice_force_number/models/account_move.py +@@ -29,8 +29,8 @@ class AccountMove(models.Model): + ) + return super(AccountMove, self).unlink() + +- def action_post(self): ++ def _post(self, soft=True): + for move in self: + if move.move_name: + move.write({"name": move.move_name}) +- return super(AccountMove, self).action_post() ++ return super(AccountMove, self)._post(soft=soft) diff --git a/rejected_special_modules.txt b/rejected_special_modules.txt index e69de29..a9e5508 100644 --- a/rejected_special_modules.txt +++ b/rejected_special_modules.txt @@ -0,0 +1 @@ +account_invoice_force_number_extended