[REM] ir_ui_menu: remove icon attribute

This commit is contained in:
fka-odoo
2015-08-02 02:56:43 +02:00
committed by Antony Lesuisse
parent bf579ae460
commit efb04bdaba
13 changed files with 9 additions and 90 deletions
@@ -98,7 +98,6 @@
parent="menu_finance_entries"
action="analytic.action_account_analytic_chart"
id="menu_action_analytic_account_tree2"
icon="STOCK_INDENT"
sequence="30"
groups="analytic.group_analytic_accounting"/>
<menuitem action="analytic.action_account_analytic_account_form" id="account_analytic_def_account"
@@ -39,7 +39,7 @@
<menuitem action="action_hr_timesheet_analytic_profit"
id="menu_hr_timesheet_analytic_profit"
parent="hr_timesheet.menu_timesheets_reports" sequence="3" icon="STOCK_PRINT"/>
parent="hr_timesheet.menu_timesheets_reports" sequence="3"/>
</data>
</openerp>
@@ -28,7 +28,7 @@
<field name="help">My Timesheet opens your timesheet so that you can book your activities into the system. From the same form, you can register your attendances (Sign In/Out) and describe the working hours made on the different projects. At the end of the period defined in the company, the timesheet is confirmed by the user and can be validated by his manager. If required, as defined on the project, you can generate the invoices based on the timesheet.</field>
</record>
<menuitem action="action_hr_timesheet_current_open" icon="STOCK_NEW" id="menu_act_hr_timesheet_sheet_form_my_current" name="My Timesheet" parent="hr_attendance.menu_hr_time_tracking" sequence="1"/>
<menuitem action="action_hr_timesheet_current_open" id="menu_act_hr_timesheet_sheet_form_my_current" name="My Timesheet" parent="hr_attendance.menu_hr_time_tracking" sequence="1"/>
</data>
</openerp>
@@ -263,12 +263,7 @@
<menuitem name="Work Orders By Resource" parent="mrp.menu_mrp_planning"
id="menu_mrp_production_wc_action_planning"
action="mrp_production_wc_action_planning"
sequence="2"
icon="STOCK_INDENT"/>
<!-- <menuitem parent="mrp.menu_mrp_planning"
id="menu_mrp_production_wc_resource_planning"
action="mrp_production_wc_resource_planning"
icon="STOCK_INDENT"/>-->
sequence="2"/>
<!-- Operation codes -->
+1 -1
View File
@@ -613,7 +613,7 @@
<field name="domain">[('origin','like','POS')]</field>
</record>
<menuitem icon="STOCK_PRINT" action="action_report_pos_details"
<menuitem action="action_report_pos_details"
id="menu_pos_details" parent="menu_point_rep" sequence="6" />
<record model="ir.actions.act_url" id="action_pos_pos">
+1 -2
View File
@@ -1254,7 +1254,6 @@ class wizard_model_menu(osv.osv_memory):
self.pool.get('ir.ui.menu').create(cr, uid, {
'name': menu.name,
'parent_id': menu.menu_id.id,
'action': 'ir.actions.act_window,%d' % (action_id,),
'icon': 'STOCK_INDENT'
'action': 'ir.actions.act_window,%d' % (action_id,)
}, context)
return {'type':'ir.actions.act_window_close'}
-13
View File
@@ -213,17 +213,6 @@ class ir_ui_menu(osv.osv):
# value is False, remove existing binding
ir_values_obj.unlink(cursor, user, values_ids, context=ctx)
def _get_icon_pict(self, cr, uid, ids, name, args, context):
res = {}
for m in self.browse(cr, uid, ids, context=context):
res[m.id] = ('stock', (m.icon,'ICON_SIZE_MENU'))
return res
def onchange_icon(self, cr, uid, ids, icon):
if not icon:
return {}
return {'type': {'icon_pict': 'picture'}, 'value': {'icon_pict': ('stock', (icon,'ICON_SIZE_MENU'))}}
def read_image(self, path):
if not path:
return False
@@ -399,7 +388,6 @@ class ir_ui_menu(osv.osv):
'complete_name': fields.function(_get_full_name,
string='Full Path', type='char', size=128),
'icon': fields.char('Icon', size=64),
'icon_pict': fields.function(_get_icon_pict, type='char', size=32),
'web_icon': fields.char('Web Icon File'),
'web_icon_hover': fields.char('Web Icon File (hover)'),
'web_icon_data': fields.function(_get_image_icon, string='Web Icon Image', type='binary', readonly=True, store=True, multi='icon'),
@@ -428,7 +416,6 @@ class ir_ui_menu(osv.osv):
(osv.osv._check_recursion, _rec_message, ['parent_id'])
]
_defaults = {
'icon_pict': ('stock', ('STOCK_OPEN', 'ICON_SIZE_MENU')),
'sequence': 10,
}
_order = "sequence,id"
+1 -1
View File
@@ -118,7 +118,7 @@
<field name="target">new</field>
</record>
<menuitem icon="STOCK_PREFERENCES" id="base.menu_tests" name="Tests" sequence="1000000" web_icon="test_exceptions,static/description/icon.png"/>
<menuitem id="base.menu_tests" name="Tests" sequence="1000000" web_icon="test_exceptions,static/description/icon.png"/>
<menuitem id="menu_test_exceptions" parent="base.menu_tests" name="Test exceptions"/>
+1 -1
View File
@@ -1,6 +1,6 @@
<openerp>
<data>
<menuitem icon="STOCK_PREFERENCES" id="base.menu_tests" name="Tests" sequence="1000000" web_icon="test_exceptions,static/description/icon.png"/>
<menuitem id="base.menu_tests" name="Tests" sequence="1000000" web_icon="test_exceptions,static/description/icon.png"/>
<menuitem id="menu_main" name="Discussions" sequence="20" parent="base.menu_tests"/>
+1 -1
View File
@@ -25,7 +25,7 @@
<field name="view_mode">tree,form</field>
</record>
<menuitem icon="STOCK_PREFERENCES" id="base.menu_tests" name="Tests" sequence="1000000" web_icon="test_exceptions,static/description/icon.png"/>
<menuitem id="base.menu_tests" name="Tests" sequence="1000000" web_icon="test_exceptions,static/description/icon.png"/>
<menuitem id="menu_test_workflow" parent="base.menu_tests" name="Test workflow"/>
@@ -11,7 +11,7 @@
<field name="target">current</field>
</record>
<menuitem icon="STOCK_PREFERENCES" id="base.menu_tests" name="Tests" web_icon="test_exceptions,static/description/icon.png"/>
<menuitem id="base.menu_tests" name="Tests" web_icon="test_exceptions,static/description/icon.png"/>
<menuitem id="menu_test_translation" parent="base.menu_tests" name="Test translation"/>
-42
View File
@@ -608,48 +608,6 @@ class profile(object):
return wrapper
__icons_list = ['STOCK_ABOUT', 'STOCK_ADD', 'STOCK_APPLY', 'STOCK_BOLD',
'STOCK_CANCEL', 'STOCK_CDROM', 'STOCK_CLEAR', 'STOCK_CLOSE', 'STOCK_COLOR_PICKER',
'STOCK_CONNECT', 'STOCK_CONVERT', 'STOCK_COPY', 'STOCK_CUT', 'STOCK_DELETE',
'STOCK_DIALOG_AUTHENTICATION', 'STOCK_DIALOG_ERROR', 'STOCK_DIALOG_INFO',
'STOCK_DIALOG_QUESTION', 'STOCK_DIALOG_WARNING', 'STOCK_DIRECTORY', 'STOCK_DISCONNECT',
'STOCK_DND', 'STOCK_DND_MULTIPLE', 'STOCK_EDIT', 'STOCK_EXECUTE', 'STOCK_FILE',
'STOCK_FIND', 'STOCK_FIND_AND_REPLACE', 'STOCK_FLOPPY', 'STOCK_GOTO_BOTTOM',
'STOCK_GOTO_FIRST', 'STOCK_GOTO_LAST', 'STOCK_GOTO_TOP', 'STOCK_GO_BACK',
'STOCK_GO_DOWN', 'STOCK_GO_FORWARD', 'STOCK_GO_UP', 'STOCK_HARDDISK',
'STOCK_HELP', 'STOCK_HOME', 'STOCK_INDENT', 'STOCK_INDEX', 'STOCK_ITALIC',
'STOCK_JUMP_TO', 'STOCK_JUSTIFY_CENTER', 'STOCK_JUSTIFY_FILL',
'STOCK_JUSTIFY_LEFT', 'STOCK_JUSTIFY_RIGHT', 'STOCK_MEDIA_FORWARD',
'STOCK_MEDIA_NEXT', 'STOCK_MEDIA_PAUSE', 'STOCK_MEDIA_PLAY',
'STOCK_MEDIA_PREVIOUS', 'STOCK_MEDIA_RECORD', 'STOCK_MEDIA_REWIND',
'STOCK_MEDIA_STOP', 'STOCK_MISSING_IMAGE', 'STOCK_NETWORK', 'STOCK_NEW',
'STOCK_NO', 'STOCK_OK', 'STOCK_OPEN', 'STOCK_PASTE', 'STOCK_PREFERENCES',
'STOCK_PRINT', 'STOCK_PRINT_PREVIEW', 'STOCK_PROPERTIES', 'STOCK_QUIT',
'STOCK_REDO', 'STOCK_REFRESH', 'STOCK_REMOVE', 'STOCK_REVERT_TO_SAVED',
'STOCK_SAVE', 'STOCK_SAVE_AS', 'STOCK_SELECT_COLOR', 'STOCK_SELECT_FONT',
'STOCK_SORT_ASCENDING', 'STOCK_SORT_DESCENDING', 'STOCK_SPELL_CHECK',
'STOCK_STOP', 'STOCK_STRIKETHROUGH', 'STOCK_UNDELETE', 'STOCK_UNDERLINE',
'STOCK_UNDO', 'STOCK_UNINDENT', 'STOCK_YES', 'STOCK_ZOOM_100',
'STOCK_ZOOM_FIT', 'STOCK_ZOOM_IN', 'STOCK_ZOOM_OUT',
'terp-account', 'terp-crm', 'terp-mrp', 'terp-product', 'terp-purchase',
'terp-sale', 'terp-tools', 'terp-administration', 'terp-hr', 'terp-partner',
'terp-project', 'terp-report', 'terp-stock', 'terp-calendar', 'terp-graph',
'terp-check','terp-go-month','terp-go-year','terp-go-today','terp-document-new','terp-camera_test',
'terp-emblem-important','terp-gtk-media-pause','terp-gtk-stop','terp-gnome-cpu-frequency-applet+',
'terp-dialog-close','terp-gtk-jump-to-rtl','terp-gtk-jump-to-ltr','terp-accessories-archiver',
'terp-stock_align_left_24','terp-stock_effects-object-colorize','terp-go-home','terp-gtk-go-back-rtl',
'terp-gtk-go-back-ltr','terp-personal','terp-personal-','terp-personal+','terp-accessories-archiver-minus',
'terp-accessories-archiver+','terp-stock_symbol-selection','terp-call-start','terp-dolar',
'terp-face-plain','terp-folder-blue','terp-folder-green','terp-folder-orange','terp-folder-yellow',
'terp-gdu-smart-failing','terp-go-week','terp-gtk-select-all','terp-locked','terp-mail-forward',
'terp-mail-message-new','terp-mail-replied','terp-rating-rated','terp-stage','terp-stock_format-scientific',
'terp-dolar_ok!','terp-idea','terp-stock_format-default','terp-mail-','terp-mail_delete'
]
def icons(*a, **kw):
global __icons_list
return [(x, x) for x in __icons_list ]
def detect_ip_addr():
"""Try a very crude method to figure out a valid external
IP or hostname for the current machine. Don't rely on this
-19
View File
@@ -715,13 +715,6 @@ class YamlInterpreter(object):
if node.action:
action_type = node.type or 'act_window'
icons = {
"act_window": 'STOCK_NEW',
"report.xml": 'STOCK_PASTE',
"wizard": 'STOCK_EXECUTE',
"url": 'STOCK_JUMP_TO',
}
values['icon'] = icons.get(action_type, 'STOCK_NEW')
if action_type == 'act_window':
action_id = self.get_id(node.action)
self.cr.execute('select view_type,view_mode,name,view_id,target from ir_act_window where id=%s', (action_id,))
@@ -736,16 +729,6 @@ class YamlInterpreter(object):
self.cr.execute('SELECT view_mode FROM ir_act_window_view WHERE act_window_id=%s ORDER BY sequence LIMIT 1', (action_id,))
if self.cr.rowcount:
action_mode = self.cr.fetchone()
if action_type == 'tree':
values['icon'] = 'STOCK_INDENT'
elif action_mode and action_mode.startswith('tree'):
values['icon'] = 'STOCK_JUSTIFY_FILL'
elif action_mode and action_mode.startswith('graph'):
values['icon'] = 'terp-graph'
elif action_mode and action_mode.startswith('calendar'):
values['icon'] = 'terp-calendar'
if target == 'new':
values['icon'] = 'STOCK_EXECUTE'
if not values.get('name', False):
values['name'] = action_name
elif action_type == 'wizard':
@@ -758,8 +741,6 @@ class YamlInterpreter(object):
raise YamlImportException("Unsupported type '%s' in menuitem tag." % action_type)
if node.sequence:
values['sequence'] = node.sequence
if node.icon:
values['icon'] = node.icon
self._set_group_values(node, values)