Skip to content

Instantly share code, notes, and snippets.

View tienhieuD's full-sized avatar
🦶
hmmm

DUONG TIEN HIEU tienhieuD

🦶
hmmm
View GitHub Profile
@tienhieuD
tienhieuD / bootstrap-masonry-plugin.js
Created September 29, 2018 04:37 — forked from alessandroraffa/bootstrap-masonry-plugin.js
Responsive Bootstrap 3 Masonry
$(document).ready(function () {
var masonryOptions = {
columnWidth: '.masonry-sizer',
itemSelector: '.masonry-item',
percentPosition: true
};
var $masonryContainer = $('.masonry-container');
var masonryBreakpoint = 767; // change this as you wish
var masonryActive = false;
var activateMasonry = function () {
<link href="css/header_style.css" rel="stylesheet"/>
<link href="css/visa_style.css" rel="stylesheet"/>
<link href="css/paygate.css" rel="stylesheet"/>
<link href="css/slider.css" rel="stylesheet" type="text/css"/>
<link href="css/service_style.css" rel="stylesheet" type="text/css"/>
<button type="button" class="btn btn-primary em_btn_single" data-toggle="modal" data-target="#exampleModal">
Thanh toán
</button>
/*****************
* Author: Boris Dongarov (ideafixxxer)
*
* http://www.codeproject.com/Members/ideafixxxer
*
******************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
1. Hiểu rõ các bước cài đặt và cấu hình các tham số cho odoo-bin
2. Biết cách cài module từ bên ngoài, và tự xây dựng một module của mình
3. Biết cách sử dụng các loại model trong odoo.
	a. Mixin model (res.config …. )
	b. Biết cách dùng các field cơ bản, hiểu rõ các field quan hệ, (compute)
	c. Hiểu rõ decorator api và cách dùng, dùng khi nào
4. extenal id, Menu và action
5. Các loại view cơ bản: form, tree, kanban, search, grapth, pivot, qweb
	a. Tạo dữ demo xml

b. Tạo dữ liệu với python

# -*- coding: utf-8 -*-
import functools
import json
import werkzeug
from odoo import http
from odoo.http import _logger, serialize_exception as _serialize_exception
from odoo.addons.web.controllers import main

Add to Cart

<script>
$('.product-action-cart, .product__add-to-cart').on('click', function() {
	var product_id = $(this).data('product-id');
    fbq('track', 'AddToCart', {
		content_ids: [product_id.toString()],
        content_type: 'product',
      	// product_catalog_id: '1',
from odoo import http
class SearchController(http.Controller):
@http.route('/fresh_crm/search_json/', type='json', auth='public')
def search_json(self, keyword, **kwargs):
"""
Search all data from list config model
:param keyword: the keyword to search
:param kwargs: optional (domain, order, limit, offset, model)
// js - model
// xml - view
// điịnh nghiĩa 1 caái model js
// taạo js
// gõ
odoo.define('omi_core.chat_client_action', function (require) {
"use strict";
"""Part of odoo. See LICENSE file for full copyright and licensing details."""
import simplejson as json
from simplejson.errors import JSONDecodeError
import werkzeug.wrappers
import functools
import logging
from odoo import http
from odoo.http import request
_logger = logging.getLogger(__name__)
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, tools, api
class ActivityReport(models.Model):
""" CRM Lead Analysis """
_name = "crm.activity.report"