Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:tada:New module pos_chat #679

Conversation

@Enigma228322
Copy link

commented Jul 5, 2019

First empty module

#
# @api.depends('value')
# def _value_pc(self):
# self.value2 = float(self.value) / 100

This comment has been minimized.

Copy link
@hound

hound bot Jul 5, 2019

blank line at end of file
no newline at end of file

# def object(self, obj, **kw):
# return http.request.render('empty_module.object', {
# 'object': obj
# })

This comment has been minimized.

Copy link
@hound

hound bot Jul 5, 2019

blank line at end of file
no newline at end of file

# Copyright 2017, XOE Corp.
# XOE Enterprise Edition License v1.0.

from odoo import http

This comment has been minimized.

Copy link
@hound

hound bot Jul 5, 2019

'odoo.http' imported but unused

Enigma228322 added 3 commits Jul 8, 2019
Fixed controolers.py and model.py files
Commented some strokes
"description": """Mudule allows users to chat with each other"""
}


This comment has been minimized.

Copy link
@hound

hound bot Jul 8, 2019

blank line at end of file

@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
.{

This comment has been minimized.

Copy link
@hound

hound bot Jul 8, 2019

SyntaxError: invalid syntax

Enigma228322 added 4 commits Jul 9, 2019
var tempMassage = {
name : newMassage.value,
time : Math.floor(Date.now()/1000)
}

This comment has been minimized.

Copy link
@hound

hound bot Jul 29, 2019

Missing semicolon.

from odoo import models, fields, api, _
import wdb

class Chat(models.Model):

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

expected 2 blank lines, found 1

@@ -0,0 +1,20 @@
from odoo import models, fields, api, _
import wdb

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

'wdb' imported but unused

@@ -0,0 +1,20 @@
from odoo import models, fields, api, _

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

'odoo._' imported but unused

from odoo import http
from odoo.http import request

class MyController(odoo.http.Controller):

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

expected 2 blank lines, found 1
undefined name 'odoo'

import logging

from odoo import http
from odoo.http import request

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

'odoo.http.request' imported but unused

@@ -0,0 +1,11 @@
from lxml import etree
import logging

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

'logging' imported but unused

@@ -0,0 +1,11 @@
from lxml import etree

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

'lxml.etree' imported but unused

model: "pos.chat",
method: "send_field_updates",
args: [tempMessage.text, tempMessage.time]
})

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

Missing semicolon.

}
AddNewMessage(tempMessage);
},
})

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

Missing semicolon.

var tempMessage = {
text : data.message,
time : data.date
}

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

Missing semicolon.


// Time converter function
function timeConverter(UNIX_timestamp)
{

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

Opening curly brace does not appear on the same line as controlling statement brace-style

}

function loadComments()
{

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

Opening curly brace does not appear on the same line as controlling statement brace-style

});

function AddNewMessage(message)
{

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

Opening curly brace does not appear on the same line as controlling statement brace-style

model: "pos.chat",
method: "send_field_updates",
args: [tempMessage.text, tempMessage.time]
})

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

Missing semicolon semi

text : newMessage.value,
time : Math.floor(Date.now()/1000)
}
AddNewMessage(tempMessage);

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

'AddNewMessage' was used before it was defined no-use-before-define

var tempMessage = {
text : newMessage.value,
time : Math.floor(Date.now()/1000)
}

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

Missing semicolon semi

}
AddNewMessage(tempMessage);
},
})

This comment has been minimized.

Copy link
@hound

hound bot Aug 7, 2019

Missing semicolon semi


name = fields.Char(string='Name')
maxUsers = fields.Integer()
current_user = fields.Many2one('res.users','Current User', default=lambda self: self.env.user.id)

This comment has been minimized.

Copy link
@hound

hound bot Aug 8, 2019

missing whitespace after ','

var out = '';
messages.forEach(function (item)
{
out += '<li class="text-right small"><em>' + timeConverter(item.time) + ' (' + item.name +'):</em></li>';

This comment has been minimized.

Copy link
@hound

hound bot Aug 8, 2019

'timeConverter' was used before it was defined no-use-before-define

name : data.name
}

AddNewMessage(tempMessage);

This comment has been minimized.

Copy link
@hound

hound bot Aug 8, 2019

'AddNewMessage' was used before it was defined no-use-before-define

text : data.message,
time : data.date,
name : data.name
}

This comment has been minimized.

Copy link
@hound

hound bot Aug 8, 2019

Missing semicolon semi

messageList.innerHTML = '<li class="text-right small"><em>Welcome to chat!</em></li>';
loadComments();
}
else showMessages();

This comment has been minimized.

Copy link
@hound

hound bot Aug 8, 2019

'showMessages' was used before it was defined no-use-before-define
Expected { after 'else' curly

var messageList = document.getElementById('message-list');
messageList.innerHTML = '<li class="text-right small"><em>Welcome to chat!</em></li>';
loadComments();
}

This comment has been minimized.

Copy link
@hound

hound bot Aug 8, 2019

Closing curly brace does not appear on the same line as the subsequent block brace-style

{
var messageList = document.getElementById('message-list');
messageList.innerHTML = '<li class="text-right small"><em>Welcome to chat!</em></li>';
loadComments();

This comment has been minimized.

Copy link
@hound

hound bot Aug 8, 2019

'loadComments' was used before it was defined no-use-before-define

'value': false,
});
if(messages.length == 0)
{

This comment has been minimized.

Copy link
@hound

hound bot Aug 8, 2019

Opening curly brace does not appear on the same line as controlling statement brace-style

'title': 'Chat',
'value': false,
});
if(messages.length == 0)

This comment has been minimized.

Copy link
@hound

hound bot Aug 8, 2019

'messages' was used before it was defined no-use-before-define
Expected '===' and instead saw '==' eqeqeq


name = fields.Char(string='Name')
maxUsers = fields.Integer()
current_user = fields.Many2one('res.users','Current User', default=lambda self: self.env.user.id)

This comment has been minimized.

Copy link
@hound

hound bot Aug 8, 2019

missing whitespace after ','

@yelizariev yelizariev merged commit a73b19f into it-projects-llc:pos-addons-12.0-pos_chat Aug 8, 2019

1 of 3 checks passed

Travis CI - Pull Request Build Errored
Details
ci/runbot runbot build 03028-679-3a9dd6
Details
Hound 29 violations found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.