-
-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] edi_account_oca: Migration to V12
- Loading branch information
1 parent
fda0e97
commit 0ca492d
Showing
9 changed files
with
107 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from . import account_move | ||
from . import account_invoice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright 2020 Creu Blanca | ||
# Copyright 2024 ForgeFlow | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class AccountInvoice(models.Model): | ||
_name = "account.invoice" | ||
_inherit = ["account.invoice", "edi.exchange.consumer.mixin"] | ||
|
||
disable_edi_auto = fields.Boolean( | ||
readonly=True, | ||
states={"draft": [("readonly", False)]}, | ||
) | ||
|
||
def action_invoice_open(self): | ||
result = super().action_invoice_open() | ||
# We will use this event to know which documents needs to be executed | ||
if self: | ||
self._event("on_open_account_invoice").notify(self) | ||
return result | ||
|
||
def action_cancel(self): | ||
"""This could be used to notify our provider that we are not accepting the | ||
invoice""" | ||
result = super().action_cancel() | ||
if self: | ||
self._event("on_cancel_account_invoice").notify(self) | ||
return result | ||
|
||
def action_invoice_paid(self): | ||
"""This could be used to notify our provider that we are paying""" | ||
result = super().action_invoice_paid() | ||
if self: | ||
self._event("on_paid_account_invoice").notify(self) | ||
return result |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
* Enric Tobella <[email protected]> | ||
* Jordi Masvidal <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 8 additions & 7 deletions
15
edi_account_oca/views/account_move.xml → edi_account_oca/views/account_invoice.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters