1 | # -*- encoding: utf-8 -*-
|
---|
2 | ##############################################################################
|
---|
3 | #
|
---|
4 | # OpenERP, Open Source Management Solution
|
---|
5 | # Copyright (C) 2009 (<http://www.filsystem.ro>). All Rights Reserved
|
---|
6 | # $Id$
|
---|
7 | #
|
---|
8 | # This program is free software: you can redistribute it and/or modify
|
---|
9 | # it under the terms of the GNU General Public License as published by
|
---|
10 | # the Free Software Foundation, either version 3 of the License, or
|
---|
11 | # (at your option) any later version.
|
---|
12 | #
|
---|
13 | # This program is distributed in the hope that it will be useful,
|
---|
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
16 | # GNU General Public License for more details.
|
---|
17 | #
|
---|
18 | # You should have received a copy of the GNU General Public License
|
---|
19 | # along with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
20 | #
|
---|
21 | ##############################################################################
|
---|
22 |
|
---|
23 | from osv import fields, osv
|
---|
24 |
|
---|
25 | class isp_web_news_category(osv.osv):
|
---|
26 | _name = "isp.web.news.category"
|
---|
27 | _columns = {
|
---|
28 | 'name': fields.char('Title', size=255, required=True),
|
---|
29 | }
|
---|
30 | isp_web_news_category()
|
---|
31 |
|
---|
32 | class isp_web_user(osv.osv):
|
---|
33 | _name = "isp.web.user"
|
---|
34 | _columns = {
|
---|
35 | 'name': fields.char('Login', size=255, required=True),
|
---|
36 | 'password': fields.char('Password', size=255, required=True),
|
---|
37 | 'contact': fields.many2one('res.partner.address', 'Contact'),
|
---|
38 | 'last_login': fields.datetime('Last login time', readonly=True),
|
---|
39 | }
|
---|
40 | isp_web_user()
|
---|
41 |
|
---|
42 | class isp_web_news(osv.osv):
|
---|
43 | _name = "isp.web.news"
|
---|
44 | _columns = {
|
---|
45 | 'name': fields.char('Title', size=255, required=True),
|
---|
46 | 'content': fields.text('Content', required=True),
|
---|
47 | 'date': fields.datetime('Date', required=True),
|
---|
48 | 'author': fields.char('Author', size=32),
|
---|
49 | 'ipv4': fields.char('IPv4', size=32),
|
---|
50 | 'category_id': fields.many2one('isp.web.news.category', 'Category'),
|
---|
51 | 'user_id': fields.many2one('isp.web.user', 'User'),
|
---|
52 | 'link': fields.char('Link', size=255),
|
---|
53 | 'enclosure_ids': fields.one2many('isp.web.news.enclosure', 'news_id', 'Enclosures'),
|
---|
54 | }
|
---|
55 | isp_web_news()
|
---|
56 |
|
---|
57 | class isp_web_news_enclosure(osv.osv):
|
---|
58 | _name = "isp.web.news.enclosure"
|
---|
59 | _columns = {
|
---|
60 | 'name': fields.char('Name', size=255, required=True),
|
---|
61 | 'news_id': fields.many2one('isp.web.news', 'News'),
|
---|
62 | }
|
---|
63 | isp_web_news_enclosure()
|
---|
64 |
|
---|
65 | class isp_web_phonebook(osv.osv):
|
---|
66 | _name = "isp.web.phonebook"
|
---|
67 | _columns = {
|
---|
68 | 'name': fields.char('Name', size=255, required=True),
|
---|
69 | 'phone': fields.char('Phone number', size=255, required=True),
|
---|
70 | 'address': fields.char('Address', size=255),
|
---|
71 | 'operator': fields.char('Operator', size=255),
|
---|
72 | }
|
---|
73 | isp_web_phonebook()
|
---|
74 |
|
---|
75 | class isp_web_history(osv.osv):
|
---|
76 | _name = "isp.web.history"
|
---|
77 | _columns = {
|
---|
78 | 'name': fields.char('Name', size=255, required=True),
|
---|
79 | 'date': fields.date('Date', required=True),
|
---|
80 | 'text': fields.text('Text', required=True),
|
---|
81 | }
|
---|
82 | isp_web_history()
|
---|
83 |
|
---|
84 | class isp_web_tv_category(osv.osv):
|
---|
85 | _name = "isp.web.tv.category"
|
---|
86 | _columns = {
|
---|
87 | 'name': fields.char('Name', size=255, required=True),
|
---|
88 | }
|
---|
89 | isp_web_tv_category()
|
---|
90 |
|
---|
91 | class isp_web_tv_sourcetype(osv.osv):
|
---|
92 | _name = "isp.web.tv.sourcetype"
|
---|
93 | _columns = {
|
---|
94 | 'name': fields.char('Name', size=255, required=True),
|
---|
95 | }
|
---|
96 | isp_web_tv_sourcetype()
|
---|
97 |
|
---|
98 | class isp_web_tv_normtype(osv.osv):
|
---|
99 | _name = "isp.web.tv.normtype"
|
---|
100 | _columns = {
|
---|
101 | 'name': fields.char('Name', size=255, required=True),
|
---|
102 | }
|
---|
103 | isp_web_tv_normtype()
|
---|
104 |
|
---|
105 | class isp_web_tv(osv.osv):
|
---|
106 | _name = "isp.web.tv"
|
---|
107 | _columns = {
|
---|
108 | 'name': fields.char('Name', size=255, required=True),
|
---|
109 | 'short_name': fields.char('Short name', size=16, required=True),
|
---|
110 | 'frequency': fields.integer('Frequency'),
|
---|
111 | 'norm': fields.many2one('isp.web.tv.normtype', 'Norm'),
|
---|
112 | 'homepage': fields.char('Homepage', size=255),
|
---|
113 | 'language_id': fields.many2one('res.lang', 'Language'),
|
---|
114 | 'stream': fields.char('Stream URL', size=255),
|
---|
115 | 'stream_web': fields.char('Stream web', size=255),
|
---|
116 | 'source_type_id': fields.many2one('isp.web.tv.sourcetype', 'Source type'),
|
---|
117 | 'category_id': fields.many2one('isp.web.tv.category', 'Category'),
|
---|
118 | }
|
---|
119 | isp_web_tv()
|
---|