-
-
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 443f167
Showing
21 changed files
with
219 additions
and
471 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| | ||
|
@@ -39,14 +39,20 @@ to collect payment for an existing Customer Invoice, from within a POS Session. | |
Configuration | ||
============= | ||
|
||
#. 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" | ||
|
||
Usage | ||
===== | ||
|
||
#. Go to *Point of Sale / Dashboard* and create and open or access to an | ||
already open POS Session. | ||
#. Open the POS Session form view on the Backend. | ||
#. Press the button **Pay Invoice** to pay a Supplier Invoice or a Customer | ||
Refund. It will be paid using Cash. | ||
#. Select **Collect Payment from Invoice** in to receive a payment of an | ||
|
@@ -59,16 +65,13 @@ Known issues / Roadmap | |
* 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 | ||
|
||
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 +88,9 @@ Contributors | |
|
||
* Enric Tobella <[email protected]> | ||
* Jordi Ballester <[email protected]> | ||
* Tecnativa (https://www.tecnativa.com): | ||
|
||
* Carlos Lopez | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
@@ -99,6 +105,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,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 <[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
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
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
|
@@ -9,10 +8,11 @@ | |
|
||
/* | ||
:Author: David Goodger ([email protected]) | ||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ | ||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ | ||
:Copyright: This stylesheet has been placed in the public domain. | ||
|
||
Default cascading style sheet for the HTML output of Docutils. | ||
Despite the name, some widely supported CSS2 features are used. | ||
|
||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to | ||
customize this style sheet. | ||
|
@@ -275,7 +275,7 @@ | |
margin-left: 2em ; | ||
margin-right: 2em } | ||
|
||
pre.code .ln { color: grey; } /* line numbers */ | ||
pre.code .ln { color: gray; } /* line numbers */ | ||
pre.code, code { background-color: #eeeeee } | ||
pre.code .comment, code .comment { color: #5C6576 } | ||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } | ||
|
@@ -301,7 +301,7 @@ | |
span.pre { | ||
white-space: pre } | ||
|
||
span.problematic { | ||
span.problematic, pre.problematic { | ||
color: red } | ||
|
||
span.section-subtitle { | ||
|
@@ -369,7 +369,7 @@ <h1 class="title">POS Session Pay invoice</h1> | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:6eac7dbff1f6e08ae835df882a549b193c4d037be692dfd6913960c06245184b | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> | ||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/pos/tree/14.0/pos_session_pay_invoice"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_session_pay_invoice"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p> | ||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/pos/tree/16.0/pos_session_pay_invoice"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_session_pay_invoice"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p> | ||
<p>This modules allows to pay an existing Supplier Invoice / Customer Refund, or | ||
to collect payment for an existing Customer Invoice, from within a POS Session.</p> | ||
<p><strong>Table of contents</strong></p> | ||
|
@@ -390,15 +390,20 @@ <h1 class="title">POS Session Pay invoice</h1> | |
<div class="section" id="configuration"> | ||
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1> | ||
<ol class="arabic simple"> | ||
<li>Go to <em>Point of Sale / Configuration / Point of Sale</em> and activate the | ||
‘Cash Control’ setting.</li> | ||
<li>Go to <em>Point of Sale / Configuration / Payment Methods</em> | ||
and ensure that at least one payment method with a journal type “cash” | ||
is created (or create one if it does not exist).</li> | ||
<li>Go to <em>Point of Sale / Configuration / Settings</em> | ||
Select a Point of Sale and ensure than in the payment methods section, | ||
at least one payment method has a journal type “cash”</li> | ||
</ol> | ||
</div> | ||
<div class="section" id="usage"> | ||
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1> | ||
<ol class="arabic simple"> | ||
<li>Go to <em>Point of Sale / Dashboard</em> and create and open or access to an | ||
already open POS Session.</li> | ||
<li>Open the POS Session form view on the Backend.</li> | ||
<li>Press the button <strong>Pay Invoice</strong> to pay a Supplier Invoice or a Customer | ||
Refund. It will be paid using Cash.</li> | ||
<li>Select <strong>Collect Payment from Invoice</strong> in to receive a payment of an | ||
|
@@ -411,16 +416,14 @@ <h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1> | |
<ul class="simple"> | ||
<li>Cannot pay invoices in a different currency than that defined in the journal | ||
associated to the payment method used to pay/collect payment.</li> | ||
<li>Should depend on <cite>pos_invoicing</cite> but it requires a refactoring of <cite>pos_invoicing</cite>. | ||
It will be improved when migrating to 13.0</li> | ||
</ul> | ||
</div> | ||
<div class="section" id="bug-tracker"> | ||
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1> | ||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>. | ||
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 | ||
<a class="reference external" href="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</a>.</p> | ||
<a class="reference external" href="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**">feedback</a>.</p> | ||
<p>Do not contact contributors directly about support or help with technical issues.</p> | ||
</div> | ||
<div class="section" id="credits"> | ||
|
@@ -436,16 +439,22 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2> | |
<ul class="simple"> | ||
<li>Enric Tobella <<a class="reference external" href="mailto:etobella@creublanca.es">etobella@creublanca.es</a>></li> | ||
<li>Jordi Ballester <<a class="reference external" href="mailto:jordi.ballester@eficent.com">jordi.ballester@eficent.com</a>></li> | ||
<li>Tecnativa (<a class="reference external" href="https://www.tecnativa.com">https://www.tecnativa.com</a>):<ul> | ||
<li>Carlos Lopez</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="section" id="maintainers"> | ||
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2> | ||
<p>This module is maintained by the OCA.</p> | ||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> | ||
<a class="reference external image-reference" href="https://odoo-community.org"> | ||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /> | ||
</a> | ||
<p>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.</p> | ||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/14.0/pos_session_pay_invoice">OCA/pos</a> project on GitHub.</p> | ||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/16.0/pos_session_pay_invoice">OCA/pos</a> project on GitHub.</p> | ||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> | ||
</div> | ||
</div> | ||
|
Oops, something went wrong.