diff --git a/pos_place/README.rst b/pos_place/README.rst index 6b44cf615b..f6d93d897c 100644 --- a/pos_place/README.rst +++ b/pos_place/README.rst @@ -17,13 +17,13 @@ Point of Sale - Places :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github - :target: https://github.com/OCA/pos/tree/12.0/pos_place + :target: https://github.com/OCA/pos/tree/16.0/pos_place :alt: OCA/pos .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_place + :target: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_place :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=12.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| @@ -50,7 +50,7 @@ To configure this module, you need to: * Create your places -.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_place/static/description/pos_place_tree.png +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_place/static/description/pos_place_tree.png Usage ===== @@ -61,16 +61,16 @@ To use this module, you need to * Click on 'Place' Button and select the place where you are -.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_place/static/description/pos_front_end_ui.png +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_place/static/description/pos_front_end_ui.png * All the next Pos Order will be related to this place. -.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_place/static/description/pos_order_tree.png +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_place/static/description/pos_order_tree.png * You can then, make statistic over best places -.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_place/static/description/report_pos_order_graph.png +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_place/static/description/report_pos_order_graph.png Bug Tracker =========== @@ -78,7 +78,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -116,6 +116,6 @@ Current `maintainer `__: |maintainer-legalsylvain| -This module is part of the `OCA/pos `_ project on GitHub. +This module is part of the `OCA/pos `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/pos_place/__manifest__.py b/pos_place/__manifest__.py index 3f22eacaa3..580c1a288c 100644 --- a/pos_place/__manifest__.py +++ b/pos_place/__manifest__.py @@ -2,39 +2,39 @@ # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { - 'name': 'Point of Sale - Places', - 'summary': "Define places on PoS orders", - 'version': '12.0.1.0.4', - 'category': 'Point of Sale', - 'author': 'GRAP,Odoo Community Association (OCA)', - 'maintainers': ['legalsylvain'], - 'website': 'https://github.com/OCA/pos', - 'license': 'AGPL-3', - 'depends': [ - 'point_of_sale', + "name": "Point of Sale - Places", + "summary": "Define places on PoS orders", + "version": "12.0.1.0.4", + "category": "Point of Sale", + "author": "GRAP,Odoo Community Association (OCA)", + "maintainers": ["legalsylvain"], + "website": "https://github.com/OCA/pos", + "license": "AGPL-3", + "depends": [ + "point_of_sale", ], - 'data': [ - 'security/ir_module_category.xml', - 'security/ir_rule.xml', - 'security/res_groups.xml', - 'security/ir.model.access.csv', - 'views/templates.xml', - 'views/view_account_invoice.xml', - 'views/view_pos_config.xml', - 'views/view_pos_place.xml', - 'views/view_pos_order.xml', + "data": [ + "security/ir_module_category.xml", + "security/ir_rule.xml", + "security/res_groups.xml", + "security/ir.model.access.csv", + "views/templates.xml", + "views/view_account_invoice.xml", + "views/view_pos_config.xml", + "views/view_pos_place.xml", + "views/view_pos_order.xml", ], - 'qweb': [ - 'static/src/xml/pos_place.xml', + "qweb": [ + "static/src/xml/pos_place.xml", ], - 'demo': [ - 'demo/res_groups.xml', - 'demo/pos_config.xml', - 'demo/pos_place.xml', + "demo": [ + "demo/res_groups.xml", + "demo/pos_config.xml", + "demo/pos_place.xml", ], - 'images': [ - 'static/description/pos_front_end_ui.png', - 'static/description/pos_config_form.png', - 'static/description/pos_order_search.png', + "images": [ + "static/description/pos_front_end_ui.png", + "static/description/pos_config_form.png", + "static/description/pos_order_search.png", ], } diff --git a/pos_place/demo/pos_config.xml b/pos_place/demo/pos_config.xml index 51f3d99fca..b2c03aaf28 100644 --- a/pos_place/demo/pos_config.xml +++ b/pos_place/demo/pos_config.xml @@ -1,4 +1,4 @@ - + -

Beta License: AGPL-3 OCA/pos Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/pos Translate me on Weblate Try me on Runboat

This module extends the functionality of point of sale to support saling in the street using the point of sale and to allow you to mention on the pos order, the place where the seller is for the time being.

@@ -397,7 +397,7 @@

Configuration

  • Create your places
  • -https://raw.githubusercontent.com/OCA/pos/12.0/pos_place/static/description/pos_place_tree.png +https://raw.githubusercontent.com/OCA/pos/16.0/pos_place/static/description/pos_place_tree.png
    @@ -408,19 +408,19 @@

    Usage

  • Click on ‘Place’ Button and select the place where you are
  • -https://raw.githubusercontent.com/OCA/pos/12.0/pos_place/static/description/pos_front_end_ui.png +https://raw.githubusercontent.com/OCA/pos/16.0/pos_place/static/description/pos_front_end_ui.png
    • All the next Pos Order will be related to this place.
    -https://raw.githubusercontent.com/OCA/pos/12.0/pos_place/static/description/pos_order_tree.png +https://raw.githubusercontent.com/OCA/pos/16.0/pos_place/static/description/pos_order_tree.png
    • You can then, make statistic over best places
    -https://raw.githubusercontent.com/OCA/pos/12.0/pos_place/static/description/report_pos_order_graph.png +https://raw.githubusercontent.com/OCA/pos/16.0/pos_place/static/description/report_pos_order_graph.png
    @@ -428,7 +428,7 @@

    Bug Tracker

    Bugs are tracked on GitHub 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.

    +feedback.

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

    @@ -448,13 +448,15 @@

    Contributors

    Maintainers

    This module is maintained by the OCA.

    -Odoo Community Association + +Odoo Community Association +

    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.

    Current maintainer:

    legalsylvain

    -

    This module is part of the OCA/pos project on GitHub.

    +

    This module is part of the OCA/pos project on GitHub.

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

    diff --git a/pos_place/static/src/js/chrome.js b/pos_place/static/src/js/chrome.js index f95d007dee..7ca4d79dea 100644 --- a/pos_place/static/src/js/chrome.js +++ b/pos_place/static/src/js/chrome.js @@ -4,23 +4,20 @@ Copyright (C) 2015 - Today: GRAP (http://www.grap.coop) License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). **/ -odoo.define('pos_place.chrome', function (require) { +odoo.define("pos_place.chrome", function (require) { "use strict"; - var chrome = require('point_of_sale.chrome'); - var pos_place_widget = require('pos_place.widgets'); + var chrome = require("point_of_sale.chrome"); + var pos_place_widget = require("pos_place.widgets"); chrome.Chrome.include({ - init: function () { this.widgets.push({ - 'name': 'place_name', - 'widget': pos_place_widget.PlaceNameWidget, - 'replace': '.placeholder-PlaceNameWidget', + name: "place_name", + widget: pos_place_widget.PlaceNameWidget, + replace: ".placeholder-PlaceNameWidget", }); return this._super(arguments[0], {}); }, - }); - }); diff --git a/pos_place/static/src/js/gui.js b/pos_place/static/src/js/gui.js index a06eff2ebb..7e3be5383b 100644 --- a/pos_place/static/src/js/gui.js +++ b/pos_place/static/src/js/gui.js @@ -4,16 +4,14 @@ Copyright (C) 2015 - Today: GRAP (http://www.grap.coop) License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). **/ -odoo.define('pos_place.gui', function (require) { +odoo.define("pos_place.gui", function (require) { "use strict"; - var gui = require('point_of_sale.gui'); - var core = require('web.core'); + var gui = require("point_of_sale.gui"); + var core = require("web.core"); var _t = core._t; - gui.Gui.include({ - select_place: function () { var def = new $.Deferred(); var current_place = this.pos.get_place(); @@ -22,12 +20,12 @@ odoo.define('pos_place.gui', function (require) { for (var i = 0; i < this.pos.places.length; i++) { var item = this.pos.places[i]; list.push({ - 'label': item.code + " - " + item.name, - 'item': item, + label: item.code + " - " + item.name, + item: item, }); } - this.show_popup('selection', { + this.show_popup("selection", { title: _t("Select a Place"), list: list, confirm: function (place) { @@ -42,7 +40,6 @@ odoo.define('pos_place.gui', function (require) { } return false; - }, }); @@ -50,7 +47,5 @@ odoo.define('pos_place.gui', function (require) { return place; }); }, - }); - }); diff --git a/pos_place/static/src/js/models.js b/pos_place/static/src/js/models.js index 28fd443f6c..4efc4cb471 100644 --- a/pos_place/static/src/js/models.js +++ b/pos_place/static/src/js/models.js @@ -4,15 +4,15 @@ Copyright (C) 2015 - Today: GRAP (http://www.grap.coop) License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). **/ -odoo.define('pos_place.models', function (require) { +odoo.define("pos_place.models", function (require) { "use strict"; - var models = require('point_of_sale.models'); + var models = require("point_of_sale.models"); var _super_order = models.Order.prototype; // Load pos.place model models.load_models({ - model: 'pos.place', + model: "pos.place", loaded: function (self, places) { self.places = []; for (var i = 0; i < places.length; i++) { @@ -24,12 +24,11 @@ odoo.define('pos_place.models', function (require) { // Make place persistent in the session models.PosModel = models.PosModel.extend({ get_place: function () { - return this.get('current_place') || - this.db.load('current_place'); + return this.get("current_place") || this.db.load("current_place"); }, set_place: function (place) { - this.set('current_place', place); - this.db.save('current_place', place || null); + this.set("current_place", place); + this.db.save("current_place", place || null); }, }); @@ -47,5 +46,4 @@ odoo.define('pos_place.models', function (require) { return json; }, }); - }); diff --git a/pos_place/static/src/js/widget.js b/pos_place/static/src/js/widget.js index 2fc8d14520..c556f10bf3 100644 --- a/pos_place/static/src/js/widget.js +++ b/pos_place/static/src/js/widget.js @@ -4,15 +4,15 @@ Copyright (C) 2015 - Today: GRAP (http://www.grap.coop) License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). **/ -odoo.define('pos_place.widgets', function (require) { +odoo.define("pos_place.widgets", function (require) { "use strict"; - var PosBaseWidget = require('point_of_sale.BaseWidget'); - var core = require('web.core'); + var PosBaseWidget = require("point_of_sale.BaseWidget"); + var core = require("web.core"); var _t = core._t; var PlaceNameWidget = PosBaseWidget.extend({ - template: 'PlaceNameWidget', + template: "PlaceNameWidget", renderElement: function () { var self = this; this._super(); @@ -29,9 +29,12 @@ odoo.define('pos_place.widgets', function (require) { }); }, is_visible: function () { - return this.pos.config.use_pos_place && - this.pos.user.groups_id.indexOf( - this.pos.config.group_pos_place_user_id[0]) !== -1; + return ( + this.pos.config.use_pos_place && + this.pos.user.groups_id.indexOf( + this.pos.config.group_pos_place_user_id[0] + ) !== -1 + ); }, get_name: function () { var place = this.pos.get_place(); @@ -39,12 +42,10 @@ odoo.define('pos_place.widgets', function (require) { return place.code; } return _t("Place"); - }, }); return { PlaceNameWidget: PlaceNameWidget, }; - }); diff --git a/pos_place/static/src/xml/pos_place.xml b/pos_place/static/src/xml/pos_place.xml index 1da144baed..7789dc2190 100644 --- a/pos_place/static/src/xml/pos_place.xml +++ b/pos_place/static/src/xml/pos_place.xml @@ -1,15 +1,14 @@ - + - - + @@ -26,7 +25,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
    - Place:
    + Place:
    diff --git a/pos_place/views/templates.xml b/pos_place/views/templates.xml index e32d3b3618..8dff05e04e 100644 --- a/pos_place/views/templates.xml +++ b/pos_place/views/templates.xml @@ -1,11 +1,11 @@ - +