Changeset 60
- Timestamp:
- Mar 22, 2012, 1:03:14 PM (13 years ago)
- Location:
- addons/isp_web
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
addons/isp_web/isp_web.py
r32 r60 81 81 } 82 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(osv.osv): 99 _name = "isp.web.tv" 100 _columns = { 101 'name': fields.char('Name', size=255, required=True), 102 'short_name': fields.char('Short name', size=16, required=True), 103 'frequency': fields.integer('Frequency'), 104 'norm': fields.char('Norm', size=255), 105 'homepage': fields.char('Homepage', size=255), 106 'language_id': fields.many2one('res_lang', 'Language'), 107 'stream': fields.char('Stream URL', size=255), 108 'stream_web': fields.char('Stream web', size=255), 109 'source_type_id': fields.many2one('isp.web.tv.sourcetype', 'Source type'), 110 'category_id': fields.many2one('isp.web.tv.category', 'Category'), 111 } 112 isp_web_tv() -
addons/isp_web/isp_web_demo.xml
r30 r60 2 2 <openerp> 3 3 <data noupdate="1"> 4 <record model="isp.web.tv.category" id="isp_web_category_sport"> 5 <field name="name">Sport</field> 6 </record> 7 <record model="isp.web.tv.category" id="isp_web_category_news"> 8 <field name="name">News</field> 9 </record> 10 <record model="isp.web.tv.category" id="isp_web_category_fun"> 11 <field name="name">Fun</field> 12 </record> 13 <record model="isp.web.tv.category" id="isp_web_category_local"> 14 <field name="name">Local</field> 15 </record> 16 <record model="isp.web.tv.category" id="isp_web_category_music"> 17 <field name="name">Music</field> 18 </record> 19 <record model="isp.web.tv.category" id="isp_web_category_movie"> 20 <field name="name">Movie</field> 21 </record> 4 22 23 <record model="isp.web.tv.sourcetype" id="isp_web_sourcetype_local"> 24 <field name="name">Local</field> 25 </record> 26 <record model="isp.web.tv.sourcetype" id="isp_web_sourcetype_internet"> 27 <field name="name">Internet</field> 28 </record> 5 29 </data> 6 30 </openerp> -
addons/isp_web/isp_web_view.xml
r31 r60 4 4 <menuitem name="Web" parent="isp.menu_isp" 5 5 id="menu_isp_web" sequence="1"/> 6 <menuitem name="Web" parent="base.menu_isp_config" 7 id="base.menu_isp_config_web" sequence="1"/> 6 8 7 9 … … 12 14 13 15 <menuitem name="News categories" 14 parent="menu_isp_ web" id="base.menu_isp_web_news_category" sequence="1"16 parent="menu_isp_config_web" id="base.menu_isp_web_news_category" sequence="1" 15 17 action="action_isp_web_news_category_form"/> 16 18 … … 196 198 </field> 197 199 </record> 200 201 202 <menuitem name="TV channels" 203 parent="menu_isp_web" id="base.menu_isp_web_tv" sequence="1" 204 action="action_isp_web_tv_form"/> 205 206 <record model="ir.ui.view" id="view_isp_web_tv_tree"> 207 <field name="name">isp.web.tv</field> 208 <field name="model">isp.web.tv</field> 209 <field name="type">tree</field> 210 <field name="priority" eval="2"/> 211 <field name="arch" type="xml"> 212 <tree string="TV channel"> 213 <field name="name" select="1"/> 214 <field name="short_name" select="1"/> 215 <field name="frequency" select="1"/> 216 <field name="norm" select="1"/> 217 <field name="source_type_id" select="1"/> 218 <field name="category_id" select="1"/> 219 </tree> 220 </field> 221 </record> 222 <record model="ir.ui.view" id="view_isp_web_tv_category_form"> 223 <field name="name">isp.web.tv.category</field> 224 <field name="model">isp.web.tv.category</field> 225 <field name="priority" eval="2"/> 226 <field name="type">form</field> 227 <field name="arch" type="xml"> 228 <form string="TV channel"> 229 <field name="name" select="1"/> 230 <field name="short_name" select="1"/> 231 <field name="frequency" select="1"/> 232 <field name="norm" select="1"/> 233 <field name="homepage" select="1"/> 234 <field name="language_id" select="1"/> 235 <field name="stream" select="1"/> 236 <field name="stream_web" select="1"/> 237 <field name="source_type_id" select="1"/> 238 <field name="category_id" select="1"/> 239 </form> 240 </field> 241 </record> 242 243 244 <menuitem name="TV channel category" 245 parent="menu_isp_config_web" id="base.menu_isp_web_tv_category" sequence="1" 246 action="action_isp_web_tv_category_form"/> 247 248 <record model="ir.ui.view" id="view_isp_web_tv_category_tree"> 249 <field name="name">isp.web.tv.category</field> 250 <field name="model">isp.web.tv.category</field> 251 <field name="type">tree</field> 252 <field name="priority" eval="2"/> 253 <field name="arch" type="xml"> 254 <tree string="Channel category"> 255 <field name="name" select="1"/> 256 </tree> 257 </field> 258 </record> 259 <record model="ir.ui.view" id="view_isp_web_tv_category_form"> 260 <field name="name">isp.web.tv.category</field> 261 <field name="model">isp.web.tv.category</field> 262 <field name="priority" eval="2"/> 263 <field name="type">form</field> 264 <field name="arch" type="xml"> 265 <form string="Channel category"> 266 <field name="name" select="1"/> 267 </form> 268 </field> 269 </record> 270 198 271 </data> 199 272 </openerp>
Note:
See TracChangeset
for help on using the changeset viewer.