Skip to content

Commit b0ed40b

Browse files
committed
[MIG] pos_meal_voucher: migration to 16.0
1 parent b7499bc commit b0ed40b

57 files changed

Lines changed: 1141 additions & 1281 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pos_meal_voucher/README.rst

Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,20 @@ Point Of Sale - Meal Voucher
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
20-
:target: https://github.com/OCA/pos/tree/12.0/pos_meal_voucher
20+
:target: https://github.com/OCA/pos/tree/16.0/pos_meal_voucher
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-12-0/pos-12-0-pos_meal_voucher
23+
:target: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_meal_voucher
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=12.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|
3030

31-
This module extend the Point of Sale Odoo module, regarding Meal Vouchers.
32-
33-
Meal voucher is a payment method, available in some countries (France, Belgium, Romania, ...)
34-
that allows customer to buy food products in grocery stores or pay in restaurants.
31+
This module allows to handle meal vouchers in the point of sale.
3532

33+
Meal vouchers are a payment method, available in some countries (France, Belgium, Romania,…) that allows customers to buy food products in grocery stores or pay in restaurants.
3634

3735
**Table of contents**
3836

@@ -45,89 +43,92 @@ Configuration
4543
Products
4644
~~~~~~~~
4745

48-
* go to your products, and click on the 'Meal Voucher' checkbox, if your product
49-
can be paid with meal vouchers.
46+
On a product form, in the "Sales" tab, the "Can be Paid for by Meal Vouchers" checkbox controls whether the product can be paid for by meal vouchers.
5047

51-
.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/product_product_form.png
48+
.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/product_product_form.png
5249

53-
* You can configure your product categories to have a default value for the products
54-
that belong to this category.
50+
Product categories can be configured to have a default value for the "Can be Paid for by Meal Vouchers" field for its products.
51+
The "Apply to All Products" button allows to set the value on all products of the category.
5552

56-
.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/product_category_form.png
53+
.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/product_category_form.png
5754

58-
* configures your Account journals, mentioning the type of Meal Voucher:
55+
Point of Sale Payment Methods
56+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5957

60-
- Paper : the journal will be used when scanning meal voucher barcodes
61-
- Dematerialized: the journal will be used for dematerialized meal vouchers
62-
- Mixed: Specific configuration if your accountant want to use a single journal for Credit card AND dematerialized meal vouchers. In that case, the button of this journal will be duplicated, and an extra text can be set to display an alternative label.
58+
Point of sale payment methods (Point of Sale > Configuration > Payment Methods) have a "Meal Voucher Type" field that defines what type of meal voucher payment method they are:
6359

64-
.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/account_journal_form.png
60+
* (empty): The payment method is not a meal voucher payment method.
61+
* **Paper**: The payment method will be used when scanning meal voucher barcodes.
62+
* **Electronic**: The payment method will be used for electronic meal vouchers.
6563

66-
* go your point of sale configuration form, and set the maximum amount allowed by ticket. (optional)
64+
.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_payment_method_form.png
6765

68-
.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/pos_config_form.png
66+
Settings
67+
~~~~~~~~
6968

70-
Usage
71-
=====
69+
This module adds a "Meal Vouchers" section in the point of sale settings (Point of Sale > Configuration > Settings, or Settings > Point of Sale) with several options:
7270

73-
* Open your Point of Sale
71+
* **Maximum Amount**: Optional maximum amount per order that can be paid by meal vouchers. Set to 0 to disable.
72+
* **Icon on Order Lines**: Whether to display an icon on point of sale order lines (on the product screen) for products that can be paid for by meal vouchers.
73+
* **Information on Receipt**: Whether to display an asterisk (*) on receipts before each product that can be paid for by meal vouchers as well as the total eligible amount.
7474

75-
* Cashier can see the food products, eligible for meal voucher payment, and see the total for
76-
Meal Voucher amount
75+
.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_settings.png
7776

78-
.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/front_ui_pos_order_screen.png
77+
Usage
78+
=====
79+
80+
Product Screen
81+
~~~~~~~~~~~~~~
7982

80-
* go to the payment screen
83+
On the product screen, the products that can be paid for by meal vouchers are (optionally) identified with an icon and the total amount of those products is displayed.
8184

82-
A Meal Voucher Summary is available:
85+
.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_order_screen.png
8386

84-
.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/front_ui_pos_payment_screen.png
87+
Payment Screen
88+
~~~~~~~~~~~~~~
8589

86-
If the amount received is too important, a warning icon is displayed
90+
On the payment screen, a meal voucher summary is displayed:
8791

88-
.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/front_ui_pos_payment_screen_summary.png
92+
.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_payment_screen_meal_vouchers.png
8993

90-
If the cashier try to validate the order, a warning is also display, asking confirmation
94+
If the received amount is too high, a warning icon is displayed:
9195

92-
.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/front_ui_pos_payment_screen_warning.png
96+
.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_payment_screen_warning.png
9397

94-
It is a non blocking warning, because we don't want to prevent an order to be done,
95-
if products are not correctly set, or if a recent law changed the maximum amount that can
96-
be used each day. (A recent case occured in France, during the Covid-19 pandemy)
98+
Receipt
99+
~~~~~~~
97100

98-
Informations are printed on the ticket, if the point of sale is so configured.
101+
The receipts can optionally contain information about the products that can be paid for by meal vouchers and the total amount of those products:
99102

100-
.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/ticket_information.png
103+
.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/receipt_information.png
101104

102-
Note
103-
~~~~
105+
Barcodes
106+
~~~~~~~~
104107

105-
A new barcode rule is available for Paper Meal Voucher of 24 chars:
108+
A new barcode rule is defined for paper meal vouchers (with 24 characters):
106109

107110
``...........{NNNDD}........``
108111

109-
If you scan the following barcode ``052566641320080017000000``, a new payment line will be added, with an amount of 8,00€ (``00800``)
112+
If you scan the following barcode: ``052566641320080017000000``, a new payment line with an amount of ¤8.00 (``00800``) will be added.
110113

111114
Known issues / Roadmap
112115
======================
113116

114117
Possible Features
115118
~~~~~~~~~~~~~~~~~
116119

117-
* Introduce the Meal Voucher Issuer model
118-
* When scaning Meal Voucher, deduce the Issuer
119-
* Add a reporting to make easily the deposit of Meal Vouchers, per issuers.
120-
* Add an option to add subtotal of products that can be paid with meal vouchers,
121-
on the bill.
122-
* Prevent to scan twice the same Meal Voucher barcode.
120+
* Introduce the Meal Voucher Issuer model.
121+
* Deduce the issuer when scanning a meal voucher barcode.
122+
* Add a report to easily compute the total deposit of meal vouchers (per issuer).
123+
* Prevent to scan the same meal voucher barcode twice.
123124

124125
Bug Tracker
125126
===========
126127

127128
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
128129
In case of trouble, please check there if your issue has already been reported.
129130
If you spotted it first, help us to smash it by providing a detailed and welcomed
130-
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_meal_voucher%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
131+
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_meal_voucher%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
131132

132133
Do not contact contributors directly about support or help with technical issues.
133134

@@ -151,6 +152,7 @@ The development of this module has been financially supported by:
151152

152153
* Vracoop (https://portail.vracoop.fr/)
153154
* Demain Supermarché (http://www.demainsupermarche.org/)
155+
* Le Drive tout nu (https://ledrivetoutnu.com/)
154156

155157
Maintainers
156158
~~~~~~~~~~~
@@ -173,6 +175,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
173175

174176
|maintainer-legalsylvain|
175177

176-
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/12.0/pos_meal_voucher>`_ project on GitHub.
178+
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/16.0/pos_meal_voucher>`_ project on GitHub.
177179

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

pos_meal_voucher/__manifest__.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Point Of Sale - Meal Voucher",
66
"summary": "Handle meal vouchers in Point of Sale"
77
" with eligible amount and max amount",
8-
"version": "12.0.1.0.8",
8+
"version": "16.0.1.0.0",
99
"category": "Point of Sale",
1010
"author": "GRAP, Odoo Community Association (OCA)",
1111
"maintainers": ["legalsylvain"],
@@ -16,18 +16,20 @@
1616
],
1717
"data": [
1818
"data/barcode_rule.xml",
19-
"views/view_account_journal.xml",
20-
"views/view_pos_config.xml",
19+
"views/pos_payment_method_view.xml",
20+
"views/res_config_settings_view.xml",
2121
"views/view_product_category.xml",
2222
"views/view_product_template.xml",
23-
"views/templates.xml",
24-
],
25-
"qweb": [
26-
"static/src/xml/pos_meal_voucher.xml",
2723
],
24+
"assets": {
25+
"point_of_sale.assets": [
26+
"pos_meal_voucher/static/src/scss/*.scss",
27+
"pos_meal_voucher/static/src/js/**/*.js",
28+
"pos_meal_voucher/static/src/xml/**/*.xml",
29+
],
30+
},
2831
"demo": [
2932
"demo/product_category.xml",
3033
"demo/product_product.xml",
3134
],
32-
"installable": True,
3335
}

pos_meal_voucher/demo/product_product.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
1111
<field name="categ_id" ref="food_category" />
1212
<field name="meal_voucher_ok" eval="True" />
1313
<field name="available_in_pos" eval="True" />
14-
<field name="available_in_pos" eval="True" />
1514
<field name="list_price">5.30</field>
1615
</record>
1716

0 commit comments

Comments
 (0)