This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
GOS_Decrypt("HXWsiP5d3GedK2kUGs5PpHju+zTJqKnd53lJG+3v/32zZK8hEUWpxTgw/vLhf4IQq2YF3UtcxysL4b/9vnLb7cZ8b85h6fzaRbwQa7sIMpfmdFPqffVxy/9bP6AgqvJmUgjl0HOdksERwbey+8GnIK+eyYoQoSdKU492CpYukMrV5k0eNKUPiANdvKiL7NnjSha4O6mvZ+UCczQpBIKnRiYY0Cb7fyD0r94vR2sp6GStCcf4MXD683pKrJjpKxJ8eVlHqXiI5PAUEVT47spm8T3WHbks/CEisvXezXzL51vD7bcbPT0qN/JV5ahNTzMarSih7P8VxxVV7OPesW9ldWed5DM/JijuUR7gFQ3pWCPNLnGja00NkOPb4DZak7FD50vOGmQCS+6bYS4cL33mYq40fBga2SsHNejzWzR4sRessDpCrLhp4AvtuYUyJLh5JeLTAL8fWEN3rsP09E+oFBwI8+vJXxP8/Si8v8ZbvbgJvjIMUt82oX3c0eg8hD/MhXC4nQKeybWe1adeU3DnSC/CncwCeidvah2HDkCLET76vwR644V+S3Ev5k9ofIl7x+7rMfMOfjRWgFbPZkqLOMKEtLdLaIYyM4XUzUNTkXR1ntO8eIRTvPuI5N1fPdS67ikKywb53XvfumGJl7dfnVNqvcdzzfaeyGwArL+M1yr3N7PbLsVvXH8YRCElShMVSDzB+eGn0kt3o+lu0dy13zgxcvQSSRRKClB3skW7osrm+emvs9KUlDdxDb1QbVj5j9uLFnC0vcbPEHEENji0v4YD28cJXjvqLImVyJIrKzKiPwjJA5Dk5ZQHbgcP+ccu9PaXv6lJJom3nZJqfbo2G3YAdIyVX7OJVgn7anLlrSEyu+cNvmOzXZdM7lx4ZCZnVKU39BZKBITZlIaTkKLYEX8OkSIUKcWHnaqL4rQG9CF6FcgkOiTsX2O3tUZQGuGOvb0mJGf7KlOoNXLwZ/RXMFvqrSpsUBL4+FhN4J6KHXBGwUc5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class gvdd_hskt(models.Model): | |
_name = 'solienlac.baocao.gvdd_hskt' | |
'''Số hiệu giáo viên giảng dạy và học sinh khuyết tật''' | |
khoi = fields.Many2one('solienlac.khoi', string='Khối', required='True') | |
giaovien_ts = fields.Integer('Số lượng giáo viên') | |
stringlog = fields.Char('logging') | |
@api.multi | |
@api.onchange('khoi') | |
def demsogiaovien(self): | |
list_gv = self.env['solienlac.monhoc_has_giaovien'].search([('lop.khoi.id', '=', self.khoi.id)]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
*{padding:0;margin:0}body{background-image:url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QCuRXhpZgAATU0AKgAAAAgABwExAAIAAAAcAAAAYgEyAAIAAAAUAAAAfgMBAAUAAAABAAAAkgMCAAIAAAAMAAAAmlEQAAEAAAABAQAAAFERAAQAAAABAAAOw1ESAAQAAAABAAAOwwAAAABBZG9iZSBQaG90b3Nob3AgQ1M0IFdpbmRvd3MAMjAxMjowNToyNCAxNToyMDoxMgAAAYagAACxjklDQyBQcm9maWxlAP/iDFhJQ0NfUFJPRklMRQABAQAADEhMaW5vAhAAAG1udHJSR0IgWFlaIAfOAAIACQAGADEAAGFjc3BNU0ZUAAAAAElFQyBzUkdCAAAAAAAAAAAAAAABAAD21gABAAAAANMtSFAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEWNwcnQAAAFQAAAAM2Rlc2MAAAGEAAAAbHd0cHQAAAHwAAAAFGJrcHQAAAIEAAAAFHJYWVoAAAIYAAAAFGdYWVoAAAIsAAAAFGJYWVoAAAJAAAAAFGRtbmQAAAJUAAAAcGRtZGQAAALEAAAAiHZ1ZWQAAANMAAAAhnZpZXcAAAPUAAAAJGx1bWkAAAP4AAAAFG1lYXMAAAQMAAAAJHRlY2gAAAQwAAAADHJUUkMAAAQ8AAAIDGdUUkMAAAQ8AAAIDGJUUkMAAAQ8AAAIDHRleHQAAAAAQ29weXJpZ2h0IChjKSAxOTk4IEhld2xldHQtUGFja2FyZCBDb21wYW55AABkZXNjAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAAAAAAAAEnNSR0IgSUVDNjE5NjYtMi4xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import xmlrpclib | |
server = "http://localhost:8069" | |
database = "<database-name>" | |
user = "[email protected]" | |
password = "123456" | |
common = xmlrpclib.ServerProxy('%s/xmlrpc/2/common' % server) | |
uid = common.authenticate(database, user, password, {}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@api.model | |
def _get_list_namhoc(self): | |
lst_namhoc=[] | |
for year in range(1990,2050): | |
item = str(year) + "-" + str(year+1) | |
lst_namhoc.append( (item, item) ) | |
return lst_namhoc | |
@api.model | |
def _get_namhoc_now(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@api.multi | |
@api.onchange('monhoc') | |
def tinhhinhgiaovientrongto(self): | |
lst = [] #list chứa id giáo viên dạy môn học đc chọn | |
tmp1 = self.env['solienlac.monhoc_has_giaovien'].search([ | |
('monhoc.id', '=', self.monhoc.id), | |
]) | |
tmp2 = map(lambda x: x.giaovien.id, tmp1) | |
lst = tmp2 | |
return {'domain':{'giaovien': [('id', 'in', lst)]}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Users(models.Model): | |
_name = 'solienlac.taikhoan' | |
# _inherit = 'res.users' | |
login = fields.Char() | |
password = fields.Char() | |
@api.model | |
def create(self, values): | |
# Code chinh day ne | |
vals = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Simple condition in programming: | |
if field1 = 5 or (field2 ! = 10 and field3 = 12) | |
#In OpenERP domain filter, it will be written as: | |
domain = ['|',('field1','=',5),('&',('field2','!=',10),('field3','=','12'))] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@api.model | |
def create(self, values): | |
quyen_da_chon = values['quyen'][0][2] | |
quyen_da_chon.append(1) | |
vals = { | |
'name': values['login'], | |
'login': values['login'], | |
'new_password': '7777777', | |
'company_ids': [1], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class taikhoannguoidung(models.Model): | |
# _name = 'solienlac.taikhoannguoidung' # optional | |
_inherit = 'res.users' | |
truong = fields.Many2one( | |
string="Trường học", | |
comodel_name="solienlac.truong", | |
) | |
xxx = fields.Char(string="Field name", ) |
OlderNewer