-
-
Notifications
You must be signed in to change notification settings - Fork 603
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 e710136
Showing
21 changed files
with
225 additions
and
477 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,7 @@ | ||
#. Go to *Point of Sale / Configuration / Point of Sale* and activate the | ||
'Cash Control' setting. | ||
#. Go to *Point of Sale / Configuration / Payment Methods* | ||
and ensure that at least one payment method with a journal type "cash" | ||
is created (or create one if it does not exist). | ||
|
||
#. Go to *Point of Sale / Configuration / Settings* | ||
Select a Point of Sale and ensure than in the payment methods section, | ||
at least one payment method has a journal type "cash" |
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 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,7 +1,8 @@ | ||
#. Go to *Point of Sale / Dashboard* and create and open or access to an | ||
already open POS Session. | ||
#. Press the button **Pay Invoice** to pay a Supplier Invoice or a Customer | ||
#. Open the POS Session form view on the Backend. | ||
#. Press the button **Pay Supplier** to pay a Supplier Invoice or **Pay Refund** for a Customer | ||
Refund. It will be paid using Cash. | ||
#. Select **Collect Payment from Invoice** in to receive a payment of an | ||
#. Select **Get Payment from Invoice** to receive a payment of an | ||
existing Customer Invoice or a Supplier Refund. You will need to select | ||
a Journal if the POS Config has defined multiple Payment Methods. |
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.