-
-
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 3c68f22
Showing
16 changed files
with
109 additions
and
120 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,13 +17,13 @@ POS Session Pay invoice | |
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html | ||
:alt: License: LGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github | ||
:target: https://github.com/OCA/pos/tree/14.0/pos_session_pay_invoice | ||
:target: https://github.com/OCA/pos/tree/16.0/pos_session_pay_invoice | ||
:alt: OCA/pos | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_session_pay_invoice | ||
:target: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_session_pay_invoice | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=14.0 | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
@@ -68,7 +68,7 @@ Bug Tracker | |
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_session_pay_invoice%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_session_pay_invoice%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
|
@@ -85,6 +85,9 @@ Contributors | |
|
||
* Enric Tobella <[email protected]> | ||
* Jordi Ballester <[email protected]> | ||
* Tecnativa (https://www.tecnativa.com): | ||
|
||
* Carlos Lopez | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
@@ -99,6 +102,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose | |
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/14.0/pos_session_pay_invoice>`_ project on GitHub. | ||
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/16.0/pos_session_pay_invoice>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
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,17 @@ | ||
from odoo import models | ||
|
||
|
||
class PosSession(models.Model): | ||
_inherit = "pos.session" | ||
|
||
def button_show_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 <[email protected]> | ||
* Jordi Ballester <[email protected]> | ||
* 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
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 cash_invoice_in | ||
from . import cash_pay_invoice | ||
from . import pos_box_cash_invoice_in | ||
from . import pos_box_cash_invoice_out |
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,21 @@ | ||
# Copyright (C) 2017 Creu Blanca | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | ||
|
||
from odoo import api, models | ||
|
||
|
||
class CashPayInvoice(models.TransientModel): | ||
_inherit = "cash.pay.invoice" | ||
|
||
@api.model | ||
def default_get(self, fields_list): | ||
values = super().default_get(fields_list) | ||
if "invoice_type" in fields_list and self.env.context.get("pos_session_id"): | ||
values["invoice_type"] = "vendor" | ||
return values | ||
|
||
def _prepare_statement_line_vals(self): | ||
vals = super()._prepare_statement_line_vals() | ||
if self.env.context.get("pos_session_id"): | ||
vals["pos_session_id"] = self.env.context.get("pos_session_id") | ||
return vals |
Oops, something went wrong.