File tree Expand file tree Collapse file tree
shoppingfeed_integration/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Copyright 2025 Juan Carlos Oñate - Tecnativa <juancarlos.onate@tecnativa.com>
22# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
3-
43import io
54import json
5+ import logging
66
77import requests
88
99from odoo import _ , models
1010
11+ _logger = logging .getLogger (__name__ )
12+
1113
1214class AccountMove (models .Model ):
1315 _inherit = "account.move"
@@ -100,8 +102,9 @@ def _shoppingfeed_auto_pay(self):
100102 active_ids = move .ids ,
101103 ).create ({})._create_payments ()
102104
103- def action_post (self ):
104- res = super ().action_post ()
105- self ._shoppingfeed_upload_invoice ()
106- self ._shoppingfeed_auto_pay ()
107- return res
105+ def _post (self , soft = True ):
106+ posted = super ()._post (soft )
107+ invoices = posted .filtered (lambda move : move .is_invoice ())
108+ invoices ._shoppingfeed_upload_invoice ()
109+ invoices ._shoppingfeed_auto_pay ()
110+ return posted
You can’t perform that action at this time.
0 commit comments