-
-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] account_cash_invoice: Migration to 16.0
- Loading branch information
1 parent
d176a16
commit 85170f9
Showing
19 changed files
with
253 additions
and
377 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
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,4 +1,4 @@ | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | ||
|
||
from . import account_bank_statement_line | ||
from . import account_bank_statement | ||
from . import account_move |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2021 Creu Blanca | ||
# Copyright (C) 2024 Tecnativa <https://tecnativa.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import models | ||
|
||
|
||
class AccountMove(models.Model): | ||
_inherit = "account.move" | ||
|
||
def _post(self, soft=True): | ||
statement_lines_to_reconcile = self.filtered( | ||
lambda move: move.state != "posted" and move.statement_line_id.invoice_id | ||
).mapped("statement_line_id") | ||
result = super()._post(soft=soft) | ||
for statement_line in statement_lines_to_reconcile: | ||
( | ||
statement_line.invoice_id.line_ids | statement_line.move_id.line_ids | ||
).filtered( | ||
lambda l: l.account_id.account_type | ||
in ("asset_receivable", "liability_payable") | ||
).reconcile() | ||
return result |
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,2 +1,2 @@ | ||
This modules allows to pay an existing Supplier Invoice / Customer Refund, or | ||
This modules allows to pay existing customer invoices/refunds or vendor bills/refunds, or | ||
to collect payment for an existing Customer Invoice from a Cash Statement. |
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,2 +1,3 @@ | ||
* Cannot pay invoices in a different currency than that defined in the journal | ||
associated to the payment method used to pay/collect payment. | ||
* Cannot select a specific journal item on invoice with some lines (i.e. when use Payment terms) |
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,11 +1,8 @@ | ||
#. Go to *Settings* and activate the developer mode. | ||
#. Go to *Settings / Users & Companies / Users* and set the flag | ||
'Show Full Accounting Features'. | ||
#. Go to *Invoicing / Dashboard* and create and/or open an existing | ||
Cash Statement from a Cash Journal. | ||
#. Press the button **Pay Invoice** to pay a Supplier Invoice or a Customer | ||
Refund. You will need to select the expected Journal | ||
#. Select **Collect Payment from Invoice** in to receive a payment of an | ||
existing Customer Invoice or a Supplier Refund. | ||
#. Press **Validate** on the statement. The payment will then be reconciled | ||
#. Go to *Invoicing / Dashboard* from a Cash Journal. | ||
#. On the Additional options, Press the button **Pay Invoice** to pay a Supplier a Customer Invoice/Refund. | ||
#. Select the invoice type and select invoice to pay. | ||
#. Press **Pay invoice** on the statement. The payment will then be reconciled | ||
with the 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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_cash_invoice_in,access_cash_invoice_in,model_cash_invoice_in,base.group_user,1,1,1,1 | ||
access_cash_invoice_out,access_cash_invoice_out,model_cash_invoice_out,base.group_user,1,1,1,1 | ||
access_cash_pay_invoice,access_cash_pay_invoice,model_cash_pay_invoice,account.group_account_invoice,1,1,1,1 |
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
Oops, something went wrong.