diff --git a/sprint_receipt_update_back_office/__openerp__.py b/sprint_receipt_update_back_office/__openerp__.py index 872af5e..7768106 100644 --- a/sprint_receipt_update_back_office/__openerp__.py +++ b/sprint_receipt_update_back_office/__openerp__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "SPRINT - Receipt Update Back Office", - "version": "8.0.2.1.1", + "version": "8.0.2.1.2", "license": "AGPL-3", "category": "Invoicing", "website": "https://simetri-sinergi.id", diff --git a/sprint_receipt_update_back_office/models/account_invoice.py b/sprint_receipt_update_back_office/models/account_invoice.py index c04a3b8..d592900 100644 --- a/sprint_receipt_update_back_office/models/account_invoice.py +++ b/sprint_receipt_update_back_office/models/account_invoice.py @@ -171,15 +171,18 @@ def action_number(self): _super = super(AccountInvoice, self) res = _super.action_number() for document in self: - document._update_payment("Invoice Validation") + if document.type == "out_invoice": + document._update_payment("Invoice Validation") return res @api.multi def action_manual_update_payment(self): for document in self: - document._update_payment("Manual Update") + if document.type == "out_invoice": + document._update_payment("Manual Update") @api.multi def action_manual_cancel_payment(self): for document in self: - document._cancel_payment("Manual Update") + if document.type == "out_invoice": + document._cancel_payment("Manual Update")