Skip to content

Commit

Permalink
Merge pull request #1079 from Ommo73/12.0-pos_partner_deselection-por…
Browse files Browse the repository at this point in the history
…ting

commit is created by 👷‍♂️ Merge Bot: https://odoo-devops.readthedocs.io/en/latest/git/github-merge-bot.html
  • Loading branch information
itpp-bot authored Jun 12, 2020
2 parents bd8bf2c + edfc80e commit 3f79358
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 18 deletions.
10 changes: 5 additions & 5 deletions pos_partner_deselection/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Maintainers

To get a guaranteed support
you are kindly requested to purchase the module
at `odoo apps store <https://apps.odoo.com/apps/modules/10.0//>`__.
at `odoo apps store <https://apps.odoo.com/apps/modules/12.0//>`__.

Thank you for understanding!

Expand All @@ -34,14 +34,14 @@ Maintainers
Further information
===================

Demo: http://runbot.it-projects.info/demo/pos-addons/10.0
Demo: http://runbot.it-projects.info/demo/pos-addons/12.0

HTML Description: https://apps.odoo.com/apps/modules/10.0//
HTML Description: https://apps.odoo.com/apps/modules/12.0//

Usage instructions: `<doc/index.rst>`_

Changelog: `<doc/changelog.rst>`_

Notifications on updates: `via Atom <https://github.com/it-projects-llc/pos-addons/commits/10.0/.atom>`_, `by Email <https://blogtrottr.com/?subscribe=https://github.com/it-projects-llc/pos-addons/commits/10.0/.atom>`_
Notifications on updates: `via Atom <https://github.com/it-projects-llc/pos-addons/commits/12.0/.atom>`_, `by Email <https://blogtrottr.com/?subscribe=https://github.com/it-projects-llc/pos-addons/commits/12.0/.atom>`_

Tested on Odoo 10.0 db994ca57af4f09953946dede3950c2eb7a94871
Tested on Odoo 12.0 679316344c69f7db545148e24e499375d1959e6b
3 changes: 2 additions & 1 deletion pos_partner_deselection/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73>
# License MIT (https://opensource.org/licenses/MIT).
{
"name": """Partner Deselection""",
Expand All @@ -24,7 +25,7 @@
"post_init_hook": None,
"uninstall_hook": None,
"auto_install": False,
"installable": False,
"installable": True,
# "demo_title": "Deselect Partner",
# "demo_addons": [
# ],
Expand Down
4 changes: 2 additions & 2 deletions pos_partner_deselection/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Configuration
* Open menu ``[[ Point of Sale ]]``

* Select a Point of Sale (POS)
* Click on ``[More]`` at the right corner of this POS and then select ``[Settings]`` inside a POS
* Go to the ``Features`` section
* Click on dropdown menu icon at the right corner of this POS and then select ``[Settings]`` inside a POS
* Go to the ``Customer deselection interval`` section
* Specify a **Customer Deselection Interval** in seconds
* Click ``[Save]``

Expand Down
13 changes: 11 additions & 2 deletions pos_partner_deselection/static/src/js/test_pos_deselection.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,22 @@ odoo.define("pos_partner_deselection.tour", function(require) {

function pos_opening() {
return [
tour.STEPS.SHOW_APPS_MENU_ITEM,
{
trigger:
'.o_app[data-menu-xmlid="point_of_sale.menu_point_root"], .oe_menu_toggler[data-menu-xmlid="point_of_sale.menu_point_root"]',
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]',
content: _t(
"Ready to launch your <b>point of sale</b>? <i>Click here</i>."
),
position: "right",
edition: "community",
},
{
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]',
content: _t(
"Ready to launch your <b>point of sale</b>? <i>Click here</i>."
),
position: "bottom",
edition: "enterprise",
},
{
trigger: ".o_pos_kanban button.oe_kanban_action_button",
Expand Down
9 changes: 5 additions & 4 deletions pos_partner_deselection/tests/test_partner_deselection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# License MIT (https://opensource.org/licenses/MIT).

import odoo.tests
from odoo.api import Environment


@odoo.tests.common.at_install(True)
Expand All @@ -13,9 +12,11 @@ def test_01_partner_deselection(self):
# installed. In js web will only load qweb coming from modules
# that are returned by the backend in module_boot. Without
# this you end up with js, css but no qweb.
cr = self.registry.cursor()
env = Environment(cr, self.uid, {})
cr.release()
env = self.env

env["ir.module.module"].search(
[("name", "=", "pos_partner_deselection")], limit=1
).state = "installed"

env["pos.config"].search([]).write({"customer_deselection_interval": 1})

Expand Down
28 changes: 24 additions & 4 deletions pos_partner_deselection/views/pos_config_view.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73>
License MIT (https://opensource.org/licenses/MIT). -->
<odoo>
<record id="view_pos_config_form" model="ir.ui.view">
<field name="name">pos.config.form</field>
<field name="model">pos.config</field>
<field name="inherit_id" ref="point_of_sale.view_pos_config_form" />
<field name="inherit_id" ref="point_of_sale.pos_config_view_form" />
<field name="arch" type="xml">
<field name="iface_display_categ_images" position="after">
<field name="customer_deselection_interval" />
</field>
<xpath
expr="//h2[text()='Order Interface']/following::div[hasclass('o_settings_container')]"
position="after"
>
<h2>Deselection interval</h2>
<div class="row mt16 o_settings_container">
<div id="category_reference" class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="customer_deselection_interval" />
</div>
<div class="o_setting_right_pane">
<label
for="customer_deselection_interval"
string="Customer deselection interval"
/>
<div class="text-muted">
Set interval for customer deselection
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

0 comments on commit 3f79358

Please sign in to comment.