diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index 89066ce74bb..0ea2be4f37f 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -418,7 +418,7 @@ ir.actions.act_window calendar.event form - tree,form,calendar + calendar,tree,form diff --git a/addons/base_setup/res_partner_view.xml b/addons/base_setup/res_partner_view.xml index 5e54c0b8629..15b80151831 100644 --- a/addons/base_setup/res_partner_view.xml +++ b/addons/base_setup/res_partner_view.xml @@ -9,14 +9,11 @@ - - - - + + - diff --git a/addons/board/static/src/css/dashboard.css b/addons/board/static/src/css/dashboard.css index ed66e338c81..f2bbcd07071 100644 --- a/addons/board/static/src/css/dashboard.css +++ b/addons/board/static/src/css/dashboard.css @@ -1,3 +1,36 @@ +.openerp .oe_dashboard_layout_1 .oe_dashboard_column.index_0 { + width: 100%; +} +.openerp .oe_dashboard_layout_1 .oe_dashboard_column.index_1, .openerp .oe_dashboard_layout_1 .oe_dashboard_column.index_2 { + display: none; +} +.openerp .oe_dashboard_layout_1-1 .oe_dashboard_column { + width: 50%; +} +.openerp .oe_dashboard_layout_1-1 .oe_dashboard_column.index_2 { + display: none; +} +.openerp .oe_dashboard_layout_1-1-1 .oe_dashboard_column { + width: 33%; +} +.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_0 { + width: 70%; +} +.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_1 { + width: 30%; +} +.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_2 { + display: none; +} +.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_0 { + width: 30%; +} +.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_1 { + width: 70%; +} +.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_2 { + display: none; +} .openerp .oe_dashboard_layout_selector ul { white-space: nowrap; } diff --git a/addons/board/static/src/css/dashboard.sass b/addons/board/static/src/css/dashboard.sass index 32f0e3b4f3a..122b6dc232c 100644 --- a/addons/board/static/src/css/dashboard.sass +++ b/addons/board/static/src/css/dashboard.sass @@ -9,6 +9,31 @@ box-shadow: $bsval .openerp + .oe_dashboard_layout_1 .oe_dashboard_column + &.index_0 + width: 100% + &.index_1, &.index_2 + display: none + .oe_dashboard_layout_1-1 .oe_dashboard_column + width: 50% + &.index_2 + display: none + .oe_dashboard_layout_1-1-1 .oe_dashboard_column + width: 33% + .oe_dashboard_layout_2-1 .oe_dashboard_column + &.index_0 + width: 70% + &.index_1 + width: 30% + &.index_2 + display: none + .oe_dashboard_layout_1-2 .oe_dashboard_column + &.index_0 + width: 30% + &.index_1 + width: 70% + &.index_2 + display: none .oe_dashboard_layout_selector ul white-space: nowrap @@ -98,3 +123,4 @@ > tbody tr:nth-child(odd) background: transparent + diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js index 9c37924144d..43d7ca76d39 100644 --- a/addons/board/static/src/js/dashboard.js +++ b/addons/board/static/src/js/dashboard.js @@ -24,6 +24,10 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({ scroll: false }).bind('sortstop', self.do_save_dashboard); + var old_title = this.__parentedParent.get('title'); + this.__parentedParent.on_record_loaded.add_last(function(){ + self.__parentedParent.set({ 'title' : old_title}); + }); // Events this.$el.find('.oe_dashboard_link_reset').click(this.on_reset); this.$el.find('.oe_dashboard_link_change_layout').click(this.on_change_layout); @@ -165,8 +169,6 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({ this.rpc('/web/view/add_custom', { view_id: this.view.fields_view.view_id, arch: arch - }, function() { - self.$el.find('.oe_dashboard_link_reset').show(); }); }, on_load_action: function(result, index, action_attrs) { diff --git a/addons/board/static/src/xml/board.xml b/addons/board/static/src/xml/board.xml index e13fa707776..03ede793036 100644 --- a/addons/board/static/src/xml/board.xml +++ b/addons/board/static/src/xml/board.xml @@ -1,7 +1,7 @@ diff --git a/addons/mail/tests/test_mail.py b/addons/mail/tests/test_mail.py index 1fab5dd1732..57a59e2595f 100644 --- a/addons/mail/tests/test_mail.py +++ b/addons/mail/tests/test_mail.py @@ -647,3 +647,33 @@ class test_mail(TestMailMockups): msg1.refresh() self.assertEqual(5, len(group_pigs.message_ids), 'group should contain 5 messages') self.assertEqual(2, len(msg1.child_ids), 'msg1 should have 2 children now') + + def test_60_vote(self): + """ Test designed for the vote/unvote feature. """ + cr, uid = self.cr, self.uid + group_pigs = self.mail_group.browse(cr, uid, self.group_pigs_id) + user_admin = self.res_users.browse(cr, uid, uid) + msg1 = group_pigs.message_post(body='My Body', subject='1') + msg1 = self.mail_message.browse(cr, uid, msg1) + + # Create user Bert Tartopoils + user_bert_id = self.res_users.create(cr, uid, {'name': 'Bert', 'login': 'bert'}) + user_bert = self.res_users.browse(cr, uid, user_bert_id) + + # Test: msg1 and msg2 have void vote_user_ids + self.assertFalse(msg1.vote_user_ids, 'newly created message msg1 has not void vote_user_ids') + # Do: Admin vote for msg1 + self.mail_message.vote_toggle(cr, uid, [msg1.id]) + msg1.refresh() + # Test: msg1 has Admin as voter + self.assertEqual(set(msg1.vote_user_ids), set([user_admin]), 'after voting, Admin is not the voter') + # Do: Bert vote for msg1 + self.mail_message.vote_toggle(cr, uid, [msg1.id], [user_bert_id]) + msg1.refresh() + # Test: msg1 has Admin and Bert as voters + self.assertEqual(set(msg1.vote_user_ids), set([user_admin, user_bert]), 'after voting, Admin and Bert are not the voters') + # Do: Admin unvote for msg1 + self.mail_message.vote_toggle(cr, uid, [msg1.id]) + msg1.refresh() + # Test: msg1 has Bert as voter + self.assertEqual(set(msg1.vote_user_ids), set([user_bert]), 'after unvoting for Admin, Bert is not the voter') diff --git a/addons/mrp/board_manufacturing_view.xml b/addons/mrp/board_manufacturing_view.xml index cae1fea07dc..6bd07c2648b 100644 --- a/addons/mrp/board_manufacturing_view.xml +++ b/addons/mrp/board_manufacturing_view.xml @@ -30,7 +30,8 @@ icon="terp-graph" id="menu_board_manufacturing" parent="base.menu_reporting_dashboard" - sequence="30"/> + sequence="30" + groups="group_mrp_manager"/> diff --git a/addons/note/note.py b/addons/note/note.py index 65848ed7828..a7bad7f6a55 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -22,6 +22,7 @@ from openerp.osv import osv, fields from tools.translate import _ import re +from openerp.tools.misc import html2plaintext class note_stage(osv.osv): """ Category of Note """ @@ -65,23 +66,24 @@ class note_note(osv.osv): text_note = (note.memo or '').strip().split('\n')[0] text_note = re.sub(r'(\S?)(|<[/]?p>|<[/]?div>|)[\s\S]*',r'\1',text_note) text_note = re.sub(r'<[^>]+>','',text_note) + text_note = html2plaintext(text_note) res[note.id] = text_note return res #unactivate a sticky note and record the date def onclick_note_is_done(self, cr, uid, ids, context=None): - self.write(cr, uid, ids, { 'active' : False, 'date_done' : fields.date.today() }) + self.write(cr, uid, ids, { 'open' : False, 'date_done' : fields.date.today() }) self.message_post(cr, uid, ids[0], body='Note is done.', subject=False, type='notification', parent_id=False, attachments=None, context=context) return False #activate a note def onclick_note_not_done(self, cr, uid, ids, context=None): - self.write(cr, uid, ids, {'active' : True}) + self.write(cr, uid, ids, {'open' : True}) self.message_post(cr, uid, ids[0], body='Note has been activated.', subject=False, type='notification', parent_id=False, attachments=None, context=context) return False - + #used for undisplay the follower if it's the current user def _get_my_current_partner(self, cr, uid, ids, name, args, context=None): user = self.pool.get('res.users').browse(cr, uid, uid, context=context) @@ -119,14 +121,14 @@ class note_note(osv.osv): type='many2one', relation='note.stage'), 'stage_ids': fields.many2many('note.stage','note_stage_rel','note_id','stage_id','Stages of Users'), - 'active': fields.boolean('Active'), + 'open': fields.boolean('Active'), 'date_done': fields.date('Date done'), 'color': fields.integer('Color Index'), 'tag_ids' : fields.many2many('note.tag','note_tags_rel','note_id','tag_id','Tags'), 'current_partner_id' : fields.function(_get_my_current_partner), } _defaults = { - 'active' : 1, + 'open' : 1, 'stage_id' : _get_default_stage_id, } _order = 'sequence' diff --git a/addons/note/note_demo.xml b/addons/note/note_demo.xml index 82601f903c0..1cc1b2fc790 100644 --- a/addons/note/note_demo.xml +++ b/addons/note/note_demo.xml @@ -138,14 +138,5 @@ 7 - -
* Open ERP: a modern approach to integrated business management -
* Open ERP for Retail and Industrial Management - ]]> -
- -
- diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index 1166e687750..ccb07544c09 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -1,7 +1,6 @@ - @@ -51,7 +50,7 @@ - + @@ -65,8 +64,8 @@
- W - è + W + è @@ -78,13 +77,12 @@
- -
+
-
+
@@ -105,7 +103,7 @@ - + @@ -139,9 +137,8 @@ - - - + + @@ -185,7 +182,7 @@ form kanban,tree,form - {'search_default_active_true':True} + {'search_default_open_true':True} diff --git a/addons/note/security/ir.rule.xml b/addons/note/security/ir.rule.xml index 3d2f0d242f6..1195314cc9e 100644 --- a/addons/note/security/ir.rule.xml +++ b/addons/note/security/ir.rule.xml @@ -1,12 +1,19 @@ - - Only followers can access a sticky notes - - ['|',('message_follower_ids','=',False),('message_follower_ids','=',user.partner_id.id)] - - + + Only followers can access a sticky notes + + [('message_follower_ids','=',user.partner_id.id)] + + + + + Each user have his stage name + + ['|',('user_id','=',False),('user_id','=',user.id)] + + diff --git a/addons/portal_project_issue/portal_project_issue_view.xml b/addons/portal_project_issue/portal_project_issue_view.xml index 5d0b4ce081e..1030dedbdf8 100644 --- a/addons/portal_project_issue/portal_project_issue_view.xml +++ b/addons/portal_project_issue/portal_project_issue_view.xml @@ -27,6 +27,7 @@ +
Creation: diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index ec1dc4b26fb..842f9ec27fa 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -554,7 +554,7 @@ class stock_warehouse_orderpoint(osv.osv): 'logic': fields.selection([('max','Order to Max'),('price','Best price (not yet active!)')], 'Reordering Mode', required=True), 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', required=True, ondelete="cascade"), 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade"), - 'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type','=','product')]), + 'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type','!=','service')]), 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True), 'product_min_qty': fields.float('Minimum Quantity', required=True, help="When the virtual stock goes below the Min Quantity specified for this field, OpenERP generates "\ diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index fea22c519a8..be7427fe8f4 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -269,9 +269,7 @@
-
+