Skip to content

Commit

Permalink
[11.0][PORT] pos_order_cancel_restaurant, pos_order_cancel (#483)
Browse files Browse the repository at this point in the history
[CI] update travis for Odoo 11.0
  • Loading branch information
Dinar authored and Ivan Yelizariev committed Nov 10, 2017
1 parent 96b9919 commit 7dfbf9f
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 37 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: python

python:
- "2.7"
- "3.5"

sudo: false
cache: pip
Expand All @@ -14,7 +14,7 @@ addons:

env:
global:
- VERSION="10.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" UNIT_TEST="0"
- VERSION="11.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" UNIT_TEST="0"
- EXCLUDE="hw_printer_network,hw_twitter_printing"
- PYLINT_ODOO_JSLINTRC="/home/travis/maintainer-quality-tools/travis/cfg/.jslintrc"
- TRANSIFEX_USER='i18n-bot@it-projects.info'
Expand All @@ -27,8 +27,6 @@ env:
- TESTS="1" ODOO_REPO="odoo/odoo"
- TESTS="1" ODOO_REPO="OCA/OCB""

virtualenv:
system_site_packages: true

install:
- pip install anybox.testing.openerp
Expand Down
2 changes: 1 addition & 1 deletion pos_order_cancel/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
"post_init_hook": None,

"auto_install": False,
"installable": False,
"installable": True,
}
2 changes: 1 addition & 1 deletion pos_order_cancel/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _process_order(self, pos_order):
order = super(PosOrder, self)._process_order(pos_order)
if 'is_cancelled' in pos_order and pos_order['is_cancelled'] is True:
if pos_order['reason']:
order.cancellation_reason = pos_order['reason'].encode('utf-8').strip(" \t\n")
order.cancellation_reason = pos_order['reason'].encode('utf-8')
order.is_cancelled = True
return order

Expand Down
1 change: 0 additions & 1 deletion pos_order_cancel/static/src/js/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ odoo.define('pos_order_cancel.models', function (require) {
"use strict";

var models = require('point_of_sale.models');
var Model = require('web.DataModel');
var core = require('web.core');
var QWeb = core.qweb;
var _t = core._t;
Expand Down
24 changes: 12 additions & 12 deletions pos_order_cancel/static/src/js/tour.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,53 @@ odoo.define('pos_order_cancel.tour', function(require) {
var core = require('web.core');
var tour = require('web_tour.tour');

var _t = core._t;

tour.register('pos_order_cancel_tour', {
test: true,
url: "/web",
}, [{
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"], .oe_menu_toggler[data-menu-xmlid="point_of_sale.menu_point_root"]',
content: _t("Ready to launch your <b>point of sale</b>? <i>Click here</i>."),
content: "Ready to launch your <b>point of sale</b>? <i>Click here</i>.",
position: 'bottom',
}, {
trigger: ".o_pos_kanban button.oe_kanban_action_button",
content: _t("<p>Click to start the point of sale interface. It <b>runs on tablets</b>, laptops, or industrial hardware.</p><p>Once the session launched, the system continues to run without an internet connection.</p>"),
content: "<p>Click to start the point of sale interface. It <b>runs on tablets</b>, laptops, or industrial hardware.</p><p>Once the session launched, the system continues to run without an internet connection.</p>",
position: "bottom"
}, {
trigger: ".product-list .product",
content: _t("<p>Click product 1</p>"),
content: "<p>Click product 1</p>",
position: "bottom"
}, {
trigger: ".product-list .product:not(:first)",
content: _t("<p>Click product 2</p>"),
content: "<p>Click product 2</p>",
position: "bottom"
}, {
trigger: ".pads .numpad-backspace",
content: _t("<p>Remove orderline</p>"),
content: "<p>Remove orderline</p>",
position: "bottom"
}, {
trigger: ".reason-button[data-id='1']",
content: _t("<p>Click predefined reason</p>"),
content: "<p>Click predefined reason</p>",
position: "bottom"
}, {
trigger: ".reason-button[data-id='3']",
content: _t("<p>Click predefined reason</p>"),
content: "<p>Click predefined reason</p>",
position: "bottom"
}, {
trigger: ".popup-confirm-cancellation .confirm",
content: _t("<p>Click confirm button"),
content: "<p>Click confirm button</p>",
position: "bottom"
},{
trigger: ".deleteorder-button",
content: _t("<p>Click remove order button"),
content: "<p>Click remove order button</p>",
position: "bottom"
}, {
trigger: ".reason-button[data-id='1']",
content: _t("<p>Click predefined reason</p>"),
content: "<p>Click predefined reason</p>",
position: "bottom"
}, {
trigger: ".popup-confirm-cancellation .confirm",
content: _t("<p>Click confirm button"),
content: "<p>Click confirm button</p>",
position: "bottom"
}
]);
Expand Down
1 change: 0 additions & 1 deletion pos_order_cancel/static/src/js/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ odoo.define('pos_order_cancel.widgets', function (require) {
var core = require('web.core');
var PopupWidget = require('point_of_sale.popups');
var PosBaseWidget = require('point_of_sale.BaseWidget');
var Model = require('web.DataModel');
var QWeb = core.qweb;
var _t = core._t;

Expand Down
22 changes: 15 additions & 7 deletions pos_order_cancel/views/pos_config_view.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.ui.view" id="view_pos_config_form">
<record model="ir.ui.view" id="pos_config_view_form">
<field name="name">pos.config.form.view.inherit</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">
<xpath expr="//group[@name='features']" position="after">
<group name="refunds" string="Refunds / Cancellations" >
<field name="allow_custom_reason"/>
</group>
</xpath>
<xpath expr="//h2[@name='order']" position="before">
<h2 name="refunds">Refunds / Cancellations</h2>
<div class="row mt16 o_settings_container" id="refunds">
<div id="allow_custom_reason" class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="allow_custom_reason"/>
</div>
<div class="o_setting_right_pane">
<label for="allow_custom_reason"/>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>
2 changes: 1 addition & 1 deletion pos_order_cancel_restaurant/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
"post_init_hook": None,

"auto_install": False,
"installable": False,
"installable": True,
}
1 change: 0 additions & 1 deletion pos_order_cancel_restaurant/static/src/js/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ odoo.define('pos_order_cancel_restaurant.models', function (require) {

var models = require('pos_order_cancel.models');
var multiprint = require('pos_restaurant_base.models');
var Model = require('web.DataModel');
var core = require('web.core');
var QWeb = core.qweb;
var _t = core._t;
Expand Down
4 changes: 1 addition & 3 deletions pos_order_cancel_restaurant/static/src/js/tour.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ odoo.define('pos_order_cancel_restaurant.tour', function(require) {
var tour = require('web_tour.tour');
var steps = tour.tours.pos_order_cancel_tour.steps;

var _t = core._t;

for (var position = 0; position < steps.length; position++) {
console.log("666",steps[position].trigger);
if (steps[position].trigger === ".product-list .product") {
steps.splice(
position,
0,
{
trigger: ".tables .table",
content: _t("<p>Click <b>table</b></p>"),
content: "<p>Click <b>table</b></p>",
position: "bottom"
}
);
Expand Down
1 change: 0 additions & 1 deletion pos_order_cancel_restaurant/static/src/js/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ odoo.define('pos_order_cancel_restaurant.widgets', function (require) {
var PosBaseWidget = require('point_of_sale.BaseWidget');
var PosOrderCancelWidget = require('pos_order_cancel.widgets');

var Model = require('web.DataModel');
var QWeb = core.qweb;
var _t = core._t;

Expand Down
15 changes: 11 additions & 4 deletions pos_order_cancel_restaurant/views/views.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
<?xml version="1.0"?>
<odoo>
<record model="ir.ui.view" id="view_pos_config_form">
<record model="ir.ui.view" id="pos_config_view_form">
<field name="name">pos.config.form.view.inherit</field>
<field name="model">pos.config</field>
<field name="inherit_id" ref="pos_order_cancel.view_pos_config_form"/>
<field name="inherit_id" ref="pos_order_cancel.pos_config_view_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='refunds']" position="inside">
<xpath expr="//div[@id='allow_custom_reason']" position="after">
<div id="kitchen_canceled_only" class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="kitchen_canceled_only"/>
</xpath>
</div>
<div class="o_setting_right_pane">
<label for="kitchen_canceled_only"/>
</div>
</div>
</xpath>
</field>
</record>

Expand Down

0 comments on commit 7dfbf9f

Please sign in to comment.