Permalink
Browse files

Merge branch '12.0' into 12.0-af29d67045486936f1ad5fe49b66e1c297f4560e

  • Loading branch information...
KolushovAlexandr committed Dec 12, 2018
2 parents d99d3cd + 65ab335 commit 5765e515c121694327f70d3596b2fa05dba6edb4
Showing with 418 additions and 370 deletions.
  1. +1 −1 .travis.yml
  2. +53 −0 barcode_widget/static/description/index.html
  3. +8 −4 base_attendance/README.rst
  4. +3 −3 base_attendance/__manifest__.py
  5. +1 −5 base_attendance/models/res_attendance.py
  6. +2 −2 base_attendance/static/description/index.html
  7. +3 −2 base_attendance/static/src/js/greeting_message.js
  8. +2 −2 base_attendance/static/src/js/kiosk_confirm.js
  9. +3 −2 base_attendance/static/src/js/kiosk_mode.js
  10. +2 −2 base_attendance/static/src/js/presence_widgets.js
  11. +1 −1 base_attendance/static/src/js/res_partner_kanban_view_handler.js
  12. +22 −23 base_attendance/static/src/{less/hr_attendance.less → scss/hr_attendance.scss}
  13. +1 −1 base_attendance/tests/test_hr_attendance_constraints.py
  14. +1 −1 base_attendance/tests/test_hr_attendance_process.py
  15. +1 −4 base_attendance/tests/test_kiosk_tour.py
  16. +37 −37 base_attendance/views/res_attendance_view.xml
  17. +1 −1 base_attendance/views/web_asset_backend_template.xml
  18. +28 −0 ir_attachment_s3/doc/index.rst
  19. +2 −2 ir_attachment_url/README.rst
  20. +2 −2 ir_attachment_url/__manifest__.py
  21. +2 −2 ir_attachment_url/doc/index.rst
  22. +2 −2 ir_attachment_url/models/binary_fields.py
  23. +16 −8 ir_attachment_url/models/image.py
  24. +26 −40 ir_attachment_url/models/ir_http.py
  25. +2 −3 ir_attachment_url/tests/test_data_get.py
  26. +3 −3 ir_config_parameter_multi_company/README.rst
  27. +1 −1 ir_config_parameter_multi_company/__init__.py
  28. +2 −2 ir_config_parameter_multi_company/__manifest__.py
  29. +2 −2 ir_config_parameter_multi_company/doc/index.rst
  30. +2 −2 ir_config_parameter_multi_company/migrations/11.0.2.0.0/post-prepare-value-column.py
  31. +1 −1 ir_config_parameter_multi_company/models/ir_config_parameter.py
  32. +1 −1 ir_config_parameter_multi_company/models/ir_property.py
  33. +1 −1 ir_config_parameter_multi_company/static/description/index.html
  34. +1 −0 requirements.txt
  35. +2 −2 res_users_signature/res_users_signature_models.py
  36. +1 −1 theme_kit/models/theme.py
  37. +8 −8 web_debranding/README.rst
  38. +1 −1 web_debranding/__manifest__.py
  39. +4 −0 web_debranding/data.xml
  40. +16 −0 web_debranding/models/mail_channel.py
  41. +3 −1 web_debranding/models/res_users.py
  42. +2 −4 web_debranding/static/src/js/bot.js
  43. +29 −26 web_debranding/static/src/js/native_notifications.js
  44. +9 −17 web_debranding/tests/test_developer_mode_menu_elements.py
  45. +0 −8 web_debranding/views.xml
  46. +0 −17 web_debranding_support/README.rst
  47. +0 −1 web_debranding_support/__init__.py
  48. +0 −14 web_debranding_support/__openerp__.py
  49. +0 −28 web_debranding_support/i18n/en.po
  50. +0 −27 web_debranding_support/i18n/web_debranding_support.pot
  51. 0 web_debranding_support/models.py
  52. BIN web_debranding_support/static/description/icon.png
  53. +0 −13 web_debranding_support/views.xml
  54. +1 −1 web_sessions_management/res_users.py
  55. +53 −0 web_sessions_management/static/description/index.html
  56. +3 −1 web_website/README.rst
  57. +1 −1 web_website/__manifest__.py
  58. +1 −1 web_website/demo/res_users_demo.xml
  59. +1 −0 web_website/models/test_website_dependent.py
  60. +1 −2 web_website/models/website_dependent_mixin.py
  61. +37 −20 web_website/static/src/js/switch_website_menu.js
  62. +1 −1 web_website/static/src/js/tour.js
  63. +3 −3 web_website/static/src/xml/qweb.xml
  64. +3 −5 web_website/tests/test_ui.py
  65. +2 −4 web_website/tests/test_website_dependent.py
@@ -16,7 +16,7 @@ addons:

env:
global:
- VERSION="11.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" UNIT_TEST="0"
- VERSION="12.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" UNIT_TEST="0"
# * about ir_config_parameter_multi_company:
#
# ir_config_parameter_multi_company makes field *value* at ir.config_parameter company_dependent,
@@ -39,3 +39,56 @@ <h3 class="oe_slogan">How to use it ?</h3>
</div>
</section>

<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span8">
<h2>Need our service?</h2>
<p class="oe_mt32">Contact us by <a href="mailto:apps@it-projects.info">email</a> or fill out <a href="https://www.it-projects.info/page/website.contactus " target="_blank">request form</a></p>
<ul>
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
<li><a href="https://m.me/itprojectsllc" target="_blank">https://m.me/itprojectsllc <i class="fa fa-facebook-square"></i></a></li>
<li>skype@it-projects.info <i class="fa fa-skype"></i></li>
</ul>
</div>
<div class="oe_span4">
<div class="stamp" style="width:200px;">
<div style="margin-top: 15px;
position: relative;
font-family:'Vollkorn', serif;
font-size: 16px;
line-height: 25px;
text-transform: uppercase;
font-weight: bold;
color: #75526b;
border: 3px dashed #75526b;
float: left;
padding: 4px 12px;
-webkit-transform: rotate(6deg);
-o-transform: rotate(6deg);
-moz-transform: rotate(6deg);
-ms-transform: rotate(6deg);">
Tested on Odoo<br/>12.0 community
</div>
<!--<div style="margin-top: 15px;
position: relative;
font-family:'Vollkorn', serif;
font-size: 16px;
line-height: 25px;
text-transform: uppercase;
font-weight: bold;
color: #75526b;
border: 3px dashed #75526b;
float: left;
padding: 4px 12px;
-webkit-transform: rotate(3deg);
-o-transform: rotate(3deg);
-moz-transform: rotate(3deg);
-ms-transform: rotate(3deg);">
Tested on Odoo<br/>12.0 enterprise
</div>-->
</div>
</div>
</div>
</section>

@@ -25,7 +25,9 @@ Maintainers
-----------
* `IT-Projects LLC <https://it-projects.info>`__

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/base_attendance/>`__.
To get a guaranteed support
you are kindly requested to purchase the module
at `odoo apps store <https://apps.odoo.com/apps/modules/12.0/base_attendance/>`__.

Thank you for understanding!

@@ -34,12 +36,14 @@ Maintainers
Further information
===================

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

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

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

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

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

Tested on Odoo 12.0 b0844a4882e7ed089a861da357fed96dfc4abe55
@@ -7,12 +7,12 @@
"category": "Extra Tools",
# "live_test_url": "",
"images": [],
"version": "11.0.1.0.0",
"version": "12.0.1.0.0",
"application": False,

"author": "IT-Projects LLC, Kolushov Alexandr",
"support": "apps@it-projects.info",
"website": "https://it-projects.info/team/KolushovAlexandr",
"website": "https://www.odoo.com/apps/modules/12.0/base_attendance/",
"license": "LGPL-3",
"price": 60.00,
"currency": "EUR",
@@ -34,6 +34,6 @@
'qweb': [
"static/src/xml/attendance.xml",
],
'installable': False,
'installable': True,
'auto_install': False,
}
@@ -2,10 +2,7 @@
# Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from datetime import datetime

from odoo import models, fields, api, exceptions, _
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT


class HrAttendance(models.Model):
@@ -45,8 +42,7 @@ def name_get(self):
def _compute_worked_hours(self):
for attendance in self:
if attendance.check_out:
delta = datetime.strptime(attendance.check_out, DEFAULT_SERVER_DATETIME_FORMAT) - datetime.strptime(
attendance.check_in, DEFAULT_SERVER_DATETIME_FORMAT)
delta = attendance.check_out - attendance.check_in
attendance.worked_hours = delta.total_seconds() / 3600.0

@api.constrains('check_in', 'check_out')
@@ -67,7 +67,7 @@ <h2>Need our service?</h2>
-o-transform: rotate(-10deg);
-moz-transform: rotate(-10deg);
-ms-transform: rotate(-10deg);">
Tested on Odoo<br/>10.0 community
Tested on Odoo<br/>12.0 community
</div>
<!--<div style="margin-top: 15px;
position: relative;
@@ -84,7 +84,7 @@ <h2>Need our service?</h2>
-o-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);">
Tested on Odoo<br/>10.0 enterprise
Tested on Odoo<br/>12.0 enterprise
</div>-->
</div>
</div>
@@ -4,12 +4,13 @@
odoo.define('base_attendance.greeting_message', function (require) {
"use strict";

var AbstractAction = require('web.AbstractAction');
var core = require('web.core');
var Widget = require('web.Widget');

var _t = core._t;


var GreetingMessage = Widget.extend({
var GreetingMessage = AbstractAction.extend({
template: 'BaseAttendanceGreetingMessage',

events: {
@@ -4,12 +4,12 @@
odoo.define('base_attendance.kiosk_confirm', function (require) {
"use strict";

var AbstractAction = require('web.AbstractAction');
var core = require('web.core');
var Widget = require('web.Widget');
var QWeb = core.qweb;


var KioskConfirm = Widget.extend({
var KioskConfirm = AbstractAction.extend({
events: {
"click .o_hr_attendance_back_button": function () {
this.do_action(this.next_action, {clear_breadcrumbs: true});
@@ -4,13 +4,14 @@
odoo.define('base_attendance.kiosk_mode', function (require) {
"use strict";

var AbstractAction = require('web.AbstractAction');
var ajax = require('web.ajax');
var core = require('web.core');
var Widget = require('web.Widget');
var Session = require('web.session');

var QWeb = core.qweb;

var KioskMode = Widget.extend({
var KioskMode = AbstractAction.extend({
events: {
"click .o_hr_attendance_button_partners": function(){
this.do_action('base_attendance.res_partner_action_kanban_view');
@@ -4,14 +4,14 @@
odoo.define('base_attendance.presence_widgets', function (require) {
"use strict";

var AbstractAction = require('web.AbstractAction');
var core = require('web.core');
var Widget = require('web.Widget');

var QWeb = core.qweb;
var _t = core._t;


var MyAttendances = Widget.extend({
var MyAttendances = AbstractAction.extend({
events: {
"click .o_hr_attendance_sign_in_out_icon": function() {
this.$('.o_hr_attendance_sign_in_out_icon').attr("disabled", "disabled");
@@ -10,7 +10,7 @@ KanbanRecord.include({

_openRecord: function () {
if (this.modelName === 'res.partner' && this.$el.parents('.o_res_partner_attendance_kanban').length) {
// needed to diffentiate : check in/out kanban view of employees <-> standard employee kanban view
// needed to diffentiate : check in/out kanban view of employees <-> standard employee kanban view
var action = {
type: 'ir.actions.client',
name: 'Confirm',
@@ -11,22 +11,21 @@
font-size: 1.2em;
margin-right: .3em;
display: inline-block;
color: @odoo-brand-secondary;

color: #f0eeee;
&.oe_hr_attendance_status_green {
color: @brand-success;
color: theme-color('success');
}
&.oe_hr_attendance_status_red {
color: @brand-danger;
color: theme-color('danger');
}
}

.o_form_view .oe_button_box .oe_stat_button .o_button_icon {
&.oe_hr_attendance_status_green {
color: @brand-success !important;
color: theme-color('success') !important;
}
&.oe_hr_attendance_status_red {
color: @brand-danger !important;
color: theme-color('danger') !important;
}
}

@@ -41,8 +40,8 @@
right: 0px;
top: 0px;
bottom: auto;
@media (min-width: @screen-xs-max) {

@include media-breakpoint-up(xs) {
transform: translate(50%, -50%);
}
}
@@ -71,16 +70,16 @@
background: white;
border: 1px solid #d5d5d5;
text-align: center;
margin: 5px 0px 5px 0px;
margin: 5px 0px 5px 0px;
}

.o_hr_attendance_kiosk_mode_container {
.o-flex-display();
.o-flex-flow(column, nowrap);
.o-justify-content(center);
.o-align-items(center);
display: flex;
flex-flow: column nowrap;
justify-content: flex-start;
align-items: center;

@media (min-width: @screen-xs-max) {
@include media-breakpoint-up(xs) {
background: url("../../../../web_enterprise/static/src/img/application-switcher-bg.jpg") no-repeat center center fixed;
background-size: cover;
position: absolute;
@@ -92,7 +91,7 @@
}

.o_hr_attendance_warning_message {
color: @brand-warning;
color: theme-color('warning');
}
.o_hr_attendance_random_message {
font-style: italic;
@@ -134,7 +133,7 @@
margin-bottom: 0;
}

@media (min-width: @screen-xs-max) {
@include media-breakpoint-up(xs) {
flex: 0 0 auto;
width: 550px;
border-radius: 10px;
@@ -152,7 +151,7 @@
top: 20px;
right: 20px;

@media (min-width: @screen-xs-max) {
@include media-breakpoint-up(xs) {
flex: 0 0 auto;
border-radius: 3px;
background-color: rgba(255,255,255,0.5);
@@ -161,12 +160,12 @@
}

.o_hr_attendance_message_container {
.o-flex-display();
.o-flex-flow(column, nowrap);
.o-justify-content(center);
.o-align-items(center);
display: flex;
flex-flow: column nowrap;
justify-content: flex-start;
align-items: center;

@media (min-width: @screen-xs-max) {
@include media-breakpoint-up(xs) {
background: url("../../../../web_enterprise/static/src/img/application-switcher-bg.jpg") no-repeat center center fixed;
background-size: cover;
position: absolute;
@@ -213,7 +212,7 @@
margin-bottom: 0;
}

@media (min-width: @screen-xs-max) {
@include media-breakpoint-up(xs) {
flex: 0 0 auto;
width: 550px;
border-radius: 10px;
@@ -12,7 +12,7 @@ class TestHrAttendance(TransactionCase):
def setUp(self):
super(TestHrAttendance, self).setUp()
self.attendance = self.env['res.partner.attendance']
self.test_partner = self.env['res.partner'].search([('name', '=', 'David Simpson')])
self.test_partner = self.env.ref('base.partner_demo')

def test_attendance_in_before_out(self):
# Make sure check_out is before check_in
@@ -10,7 +10,7 @@ class TestHrAttendance(TransactionCase):

def setUp(self):
super(TestHrAttendance, self).setUp()
self.test_partner_attendance = self.env['res.partner'].search([('name', '=', 'Thomas Passot')])
self.test_partner_attendance = self.env.ref('base.partner_demo')

def test_partner_attendance_state(self):
# Make sure the attendance of the partner will display correctly
@@ -2,7 +2,6 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

import odoo.tests
from odoo.api import Environment


@odoo.tests.common.at_install(True)
@@ -14,10 +13,8 @@ def test_kiosk(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, {})
env = self.env
env['ir.module.module'].search([('name', '=', 'base_attendance')], limit=1).state = 'installed'
cr.release()
# without a delay there might be problems on the steps whilst opening a POS
# caused by a not yet loaded button's action
self.phantom_js("/web",
Oops, something went wrong.

0 comments on commit 5765e51

Please sign in to comment.