-
-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] pos_session_pay_invoice: Migration to 16.0
- Loading branch information
1 parent
a7f9b43
commit 644c9fd
Showing
19 changed files
with
196 additions
and
465 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 +1,2 @@ | ||
from . import pos_order | ||
from . import pos_session |
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,35 @@ | ||
from odoo import models | ||
|
||
|
||
class PosSession(models.Model): | ||
_inherit = "pos.session" | ||
|
||
def button_show_wizard_pay_in_invoice(self): | ||
action = self._get_action_wizard_pay_invoice() | ||
action["context"]["pos_pay_invoice_type"] = "vendor" | ||
action["context"]["pos_pay_invoice_domain"] = "in_invoice" | ||
return action | ||
|
||
def button_show_wizard_pay_out_refund(self): | ||
action = self._get_action_wizard_pay_invoice() | ||
action["context"]["pos_pay_invoice_type"] = "vendor" | ||
action["context"]["pos_pay_invoice_domain"] = "out_refund" | ||
return action | ||
|
||
def button_show_wizard_pay_out_invoice(self): | ||
action = self._get_action_wizard_pay_invoice() | ||
action["context"]["pos_pay_invoice_type"] = "customer" | ||
action["context"]["pos_pay_invoice_domain"] = "out_invoice" | ||
return action | ||
|
||
def _get_action_wizard_pay_invoice(self): | ||
cash_journal = self.cash_journal_id | ||
action = self.env["ir.actions.actions"]._for_xml_id( | ||
"pos_session_pay_invoice.action_pos_invoice_in_control" | ||
) | ||
action["context"] = { | ||
"active_ids": cash_journal.ids, | ||
"active_name": cash_journal._name, | ||
"pos_session_id": self.id, | ||
} | ||
return action |
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,5 @@ | ||
* Enric Tobella <etobella@creublanca.es> | ||
* Jordi Ballester <jordi.ballester@eficent.com> | ||
* Tecnativa (https://www.tecnativa.com): | ||
|
||
* Carlos Lopez |
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,5 +1,2 @@ | ||
* Cannot pay invoices in a different currency than that defined in the journal | ||
associated to the payment method used to pay/collect payment. | ||
|
||
* Should depend on `pos_invoicing` but it requires a refactoring of `pos_invoicing`. | ||
It will be improved when migrating to 13.0 |
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
Oops, something went wrong.