Skip to content

Commit 644c9fd

Browse files
[MIG] pos_session_pay_invoice: Migration to 16.0
1 parent a7f9b43 commit 644c9fd

19 files changed

+196
-465
lines changed

pos_session_pay_invoice/README.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ POS Session Pay invoice
1717
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
1818
:alt: License: LGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
20-
:target: https://github.com/OCA/pos/tree/14.0/pos_session_pay_invoice
20+
:target: https://github.com/OCA/pos/tree/16.0/pos_session_pay_invoice
2121
:alt: OCA/pos
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_session_pay_invoice
23+
:target: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_session_pay_invoice
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=14.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=16.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -59,16 +59,13 @@ Known issues / Roadmap
5959
* Cannot pay invoices in a different currency than that defined in the journal
6060
associated to the payment method used to pay/collect payment.
6161

62-
* Should depend on `pos_invoicing` but it requires a refactoring of `pos_invoicing`.
63-
It will be improved when migrating to 13.0
64-
6562
Bug Tracker
6663
===========
6764

6865
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
6966
In case of trouble, please check there if your issue has already been reported.
7067
If you spotted it first, help us to smash it by providing a detailed and welcomed
71-
`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**>`_.
68+
`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**>`_.
7269

7370
Do not contact contributors directly about support or help with technical issues.
7471

@@ -85,6 +82,9 @@ Contributors
8582

8683
* Enric Tobella <etobella@creublanca.es>
8784
* Jordi Ballester <jordi.ballester@eficent.com>
85+
* Tecnativa (https://www.tecnativa.com):
86+
87+
* Carlos Lopez
8888

8989
Maintainers
9090
~~~~~~~~~~~
@@ -99,6 +99,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
9999
mission is to support the collaborative development of Odoo features and
100100
promote its widespread use.
101101

102-
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/14.0/pos_session_pay_invoice>`_ project on GitHub.
102+
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/16.0/pos_session_pay_invoice>`_ project on GitHub.
103103

104104
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

pos_session_pay_invoice/__manifest__.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@
33

44
{
55
"name": "POS Session Pay invoice",
6-
"version": "14.0.1.1.0",
6+
"version": "16.0.1.0.0",
77
"category": "Point Of Sale",
88
"author": "Creu Blanca, Odoo Community Association (OCA)",
99
"website": "https://github.com/OCA/pos",
1010
"summary": "Pay and receive invoices from PoS Session",
1111
"license": "LGPL-3",
1212
"depends": ["point_of_sale", "account_cash_invoice"],
1313
"data": [
14-
"security/ir.model.access.csv",
15-
"wizard/pos_box_cash_invoice_out.xml",
16-
"wizard/pos_box_cash_invoice_in.xml",
17-
"wizard/cash_invoice_in.xml",
14+
"wizard/cash_pay_invoice.xml",
1815
"views/pos_session.xml",
1916
],
2017
}
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
from . import pos_order
2+
from . import pos_session
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from odoo import models
2+
3+
4+
class PosSession(models.Model):
5+
_inherit = "pos.session"
6+
7+
def button_show_wizard_pay_in_invoice(self):
8+
action = self._get_action_wizard_pay_invoice()
9+
action["context"]["pos_pay_invoice_type"] = "vendor"
10+
action["context"]["pos_pay_invoice_domain"] = "in_invoice"
11+
return action
12+
13+
def button_show_wizard_pay_out_refund(self):
14+
action = self._get_action_wizard_pay_invoice()
15+
action["context"]["pos_pay_invoice_type"] = "vendor"
16+
action["context"]["pos_pay_invoice_domain"] = "out_refund"
17+
return action
18+
19+
def button_show_wizard_pay_out_invoice(self):
20+
action = self._get_action_wizard_pay_invoice()
21+
action["context"]["pos_pay_invoice_type"] = "customer"
22+
action["context"]["pos_pay_invoice_domain"] = "out_invoice"
23+
return action
24+
25+
def _get_action_wizard_pay_invoice(self):
26+
cash_journal = self.cash_journal_id
27+
action = self.env["ir.actions.actions"]._for_xml_id(
28+
"pos_session_pay_invoice.action_pos_invoice_in_control"
29+
)
30+
action["context"] = {
31+
"active_ids": cash_journal.ids,
32+
"active_name": cash_journal._name,
33+
"pos_session_id": self.id,
34+
}
35+
return action
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
* Enric Tobella <etobella@creublanca.es>
22
* Jordi Ballester <jordi.ballester@eficent.com>
3+
* Tecnativa (https://www.tecnativa.com):
4+
5+
* Carlos Lopez
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
* Cannot pay invoices in a different currency than that defined in the journal
22
associated to the payment method used to pay/collect payment.
3-
4-
* Should depend on `pos_invoicing` but it requires a refactoring of `pos_invoicing`.
5-
It will be improved when migrating to 13.0

pos_session_pay_invoice/security/ir.model.access.csv

-3
This file was deleted.

pos_session_pay_invoice/static/description/index.html

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
32
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
43
<head>
@@ -9,10 +8,11 @@
98

109
/*
1110
:Author: David Goodger (goodger@python.org)
12-
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
1312
:Copyright: This stylesheet has been placed in the public domain.
1413
1514
Default cascading style sheet for the HTML output of Docutils.
15+
Despite the name, some widely supported CSS2 features are used.
1616
1717
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1818
customize this style sheet.
@@ -275,7 +275,7 @@
275275
margin-left: 2em ;
276276
margin-right: 2em }
277277

278-
pre.code .ln { color: grey; } /* line numbers */
278+
pre.code .ln { color: gray; } /* line numbers */
279279
pre.code, code { background-color: #eeeeee }
280280
pre.code .comment, code .comment { color: #5C6576 }
281281
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@
301301
span.pre {
302302
white-space: pre }
303303

304-
span.problematic {
304+
span.problematic, pre.problematic {
305305
color: red }
306306

307307
span.section-subtitle {
@@ -369,7 +369,7 @@ <h1 class="title">POS Session Pay invoice</h1>
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370370
!! source digest: sha256:6eac7dbff1f6e08ae835df882a549b193c4d037be692dfd6913960c06245184b
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<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&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<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&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>This modules allows to pay an existing Supplier Invoice / Customer Refund, or
374374
to collect payment for an existing Customer Invoice, from within a POS Session.</p>
375375
<p><strong>Table of contents</strong></p>
@@ -411,16 +411,14 @@ <h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1>
411411
<ul class="simple">
412412
<li>Cannot pay invoices in a different currency than that defined in the journal
413413
associated to the payment method used to pay/collect payment.</li>
414-
<li>Should depend on <cite>pos_invoicing</cite> but it requires a refactoring of <cite>pos_invoicing</cite>.
415-
It will be improved when migrating to 13.0</li>
416414
</ul>
417415
</div>
418416
<div class="section" id="bug-tracker">
419417
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
420418
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>.
421419
In case of trouble, please check there if your issue has already been reported.
422420
If you spotted it first, help us to smash it by providing a detailed and welcomed
423-
<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>
421+
<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>
424422
<p>Do not contact contributors directly about support or help with technical issues.</p>
425423
</div>
426424
<div class="section" id="credits">
@@ -436,16 +434,22 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
436434
<ul class="simple">
437435
<li>Enric Tobella &lt;<a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a>&gt;</li>
438436
<li>Jordi Ballester &lt;<a class="reference external" href="mailto:jordi.ballester&#64;eficent.com">jordi.ballester&#64;eficent.com</a>&gt;</li>
437+
<li>Tecnativa (<a class="reference external" href="https://www.tecnativa.com">https://www.tecnativa.com</a>):<ul>
438+
<li>Carlos Lopez</li>
439+
</ul>
440+
</li>
439441
</ul>
440442
</div>
441443
<div class="section" id="maintainers">
442444
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
443445
<p>This module is maintained by the OCA.</p>
444-
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
446+
<a class="reference external image-reference" href="https://odoo-community.org">
447+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
448+
</a>
445449
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
446450
mission is to support the collaborative development of Odoo features and
447451
promote its widespread use.</p>
448-
<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>
452+
<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>
449453
<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>
450454
</div>
451455
</div>

0 commit comments

Comments
 (0)