Coder Social home page Coder Social logo

frontware / weladee-odoo Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 8.0 1.97 MB

Odoo addon for Weladee by Frontware International Co.,Ltd.

Home Page: https://weladee.com

License: GNU Lesser General Public License v3.0

Python 99.49% CSS 0.37% Shell 0.14%
odoo grpc python attendance hr weladee leave skills timesheet

weladee-odoo's Introduction

Weladee - Odoo

Gitter chat

Weladee logoodoo

What is Weladee?

Weladee is a service "In The Cloud" to manage employee attendance. It's developed to be simple, fast and cheap to use for any small company (or even big ones). The primary market of this service is Thailand for now (2018), we started to deploy customers in Cambodia too.

Take a look at https://www.weladee.com

Why using Weladee?

Because employee lateness and absenteeism cost a lot of money to your company. Weladee provides a very easy way to reduce it.

See how much lateness costs you with our simulation page: https://www.weladee.com/simulation

Description

Odoo module for Weladee

This Odoo module create the link between Weladee and your Odoo 14.0 instance.

You will be able to synchronize departments, employees and attendance. Import expenses, timesheet, leave, holidays, ... from Weladee to your Odoo instance.

What is synschronized

Bi-Directional between Odoo-Weladee / Weladee-Odoo

The idea is to use Weladee a HRMS addon to Odoo. So mostof the data is collected in Weladee and then imported to Odoo.

There are 3 exceptions:

  • Department
  • Employee
  • Position

These 3 data can be sent to Weladee from Odoo and vice versa.

In case of conflict, the most recent data will be used. It shouldn't be a problem because the data is not often updated. The HR operator should decice which app to use to update the data. Create employee on Weladee is probably the best move.

Uni-Directional from Weladee to Odoo

This data is sent from Weladee to Odoo. Weladee feeds Odoo with HRMS data.

  • Attendance
  • Leave (business, vacation, sick)
  • Timesheet (project, task)
  • Job classifieds (https://job.weladee.com)
  • Expenses
  • Skills

Technical

Install modules

gRPC

gRPC is used to communicate with weladee server. The http2 protocol and stream push between client and server offer excellent performances. The communication between Odoo & Weladee is encrypted with SSL3 and TLS 1.3 certificate.

Sample calls:

uml

API Key

To connect your Odoo instance to weladee server you need an api key. The api key is available when you create an account at https://www.weladee.com/register

Weladee is free to subscribe with 3 months trial period or even 100% free for company with less than 5 employees.

Sample Code for gRPC API

It's ready for Odoo 14. gRPC code is compatible python 3.

Connect to server

    import grpc
    import . from weladee_pb2
    import . from weladee_pb2_grpc
  

    # Weladee grpc server address is grpc.weladee.com:22443
    address = "grpc.weladee.com:22443"

    # Define a secure channel with embedded public certificate

    creds = grpc.ssl_channel_credentials(certificate)
    channel = grpc.secure_channel(address, creds)

Provide api-key and get some data

This code retrieve the list of departments and add a holiday to Weladee.

    # Connect from Odoo
    # Place here the token specific to each company. It's called api_key in table company

    authorization = [("authorization", "bc7f3c00-bfa4-4ac2-810b-a11dca5ec48e")]

    stub = weladee_pb2_grpc.OdooStub(channel)

    # List all departments
    print("Departments")
    for dept in stub.GetDepartments(myrequest, metadata=authorization):
        print(dept)

    # Add new holiday
    newHoliday = weladee_pb2.HolidayOdoo()
    newHoliday.Holiday.date = 20170918
    newHoliday.Holiday.name_english = "Company holiday"
    newHoliday.odoo.odoo_id = 9
    try:
        result = stub.AddHoliday(newHoliday, metadata=authorization)

        print (result.id)
    except Exception as e:
        print("Add holiday failed",e)

Get all logs from Weladee not yet sync with Odoo

Simple code parsing a stream of log events that need to be synchronized with Odoo.

    # List of attendance to sync
    print("Attendance to sync")
    i=0
    for att in stub.GetNewAttendance(weladee_pb2.Empty(), metadata=authorization):
        i+=1
        logging.log(i,att)

Deleted records

If records have been deleted on Weladee, you will call gRPC function GetDeleted. It will return all IDs of deleted record for a specific table.

GetDeleted is called on the following tables:

  • Approval
  • Holiday
  • Job
  • Skill

(c) 2022 Frontware International Co,Ltd.

weladee-odoo's People

Contributors

afairon avatar chuchartcka avatar efairon avatar fwkpo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

weladee-odoo's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.