From c4476c4ad3d5953c5677127aa542f1ce61816f53 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Mon, 2 Jul 2012 17:46:46 +0530 Subject: [PATCH 001/245] [FIX] plugin:when create the partner from the thunderbird at that time create partner two times. bzr revid: tpa@tinyerp.com-20120702121646-bzom7r2buerwj5n7 --- addons/plugin/plugin_handler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index 700b9648237..2de179f6744 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -126,9 +126,10 @@ class plugin_handler(osv.osv_memory): partner_obj = self.pool.get('res.partner') dictcreate = dict(data) if partner_id == 0: - partner_id = partner_obj.create(cr, uid, {'name':dictcreate.get('name')}) - dictcreate['partner_id'] = partner_id - self.pool.get('res.partner').create(cr, uid, dictcreate) + partner_id = partner_obj.create(cr, uid, dictcreate) + else: + dictcreate['parent_id'] = partner_id + partner_obj.create(cr, uid, dictcreate) url = self._make_url(cr, uid, partner_id, 'res.partner') return ('res.partner', partner_id, url) From edfac27fac7696f61d616919ab74fd59dd9488d2 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Mon, 2 Jul 2012 18:29:26 +0530 Subject: [PATCH 002/245] [IMP] improved code bzr revid: tpa@tinyerp.com-20120702125926-r9mtwclvb9mrm5f7 --- addons/plugin/plugin_handler.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index 2de179f6744..a026eb61d4b 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -125,11 +125,9 @@ class plugin_handler(osv.osv_memory): """ partner_obj = self.pool.get('res.partner') dictcreate = dict(data) - if partner_id == 0: - partner_id = partner_obj.create(cr, uid, dictcreate) - else: + if partner_id: dictcreate['parent_id'] = partner_id - partner_obj.create(cr, uid, dictcreate) + partner_id = partner_obj.create(cr, uid, dictcreate) url = self._make_url(cr, uid, partner_id, 'res.partner') return ('res.partner', partner_id, url) From ee941671d2c391d085f153f6496bc755a900813d Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Thu, 19 Jul 2012 14:15:42 +0530 Subject: [PATCH 003/245] [FIX] account : Improve the code. lp bug: https://launchpad.net/bugs/1026434 fixed bzr revid: amb@tinyerp.com-20120719084542-la8jx5qxiefwoojr --- addons/account/wizard/account_move_journal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index 66f634bd59f..a84c7f8eabb 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -99,7 +99,7 @@ class account_move_journal(osv.osv_memory): period = False if period_id: - period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name'] + period = period_pool.browse(cr, uid, [period_id], context=None)[0]['name'] period_string = _("Period: %s") % tools.ustr(period) open_string = _("Open") From 5c31f52c47c8205703a4da666a01916f9971b522 Mon Sep 17 00:00:00 2001 From: "Cristian Salamea (Gnuthink)" <> Date: Thu, 19 Jul 2012 17:49:45 +0530 Subject: [PATCH 004/245] [FIX]l10n_ec: Change The name of Author lp bug: https://launchpad.net/bugs/1026085 fixed bzr revid: dsi@tinyerp.com-20120719121945-nmad9m98t3q77tet --- addons/l10n_ec/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_ec/__openerp__.py b/addons/l10n_ec/__openerp__.py index 9dd81606036..13d11f03b9d 100644 --- a/addons/l10n_ec/__openerp__.py +++ b/addons/l10n_ec/__openerp__.py @@ -27,7 +27,7 @@ This is the base module to manage the accounting chart for Ecuador in OpenERP. Accounting chart and localization for Ecuador. """, - 'author': 'OpenERP SA', + 'author': 'Gnuthink Co.Ltd.', 'depends': [ 'account', 'base_vat', From dd55d30961d370546267deafefc0ba614e728a0e Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Fri, 20 Jul 2012 11:35:06 +0530 Subject: [PATCH 005/245] [FIX] account : Improve the code lp bug: https://launchpad.net/bugs/1026434 fixed bzr revid: amb@tinyerp.com-20120720060506-clb6z56xa5tqzyy3 --- addons/account/wizard/account_move_journal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index a84c7f8eabb..ea2244edb15 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -99,7 +99,7 @@ class account_move_journal(osv.osv_memory): period = False if period_id: - period = period_pool.browse(cr, uid, [period_id], context=None)[0]['name'] + period = period_pool.browse(cr, uid, [period_id], context=context)[0]['name'] period_string = _("Period: %s") % tools.ustr(period) open_string = _("Open") From 7488a675b4d9a8e99cf2b9b25c194e114babcafb Mon Sep 17 00:00:00 2001 From: "Ravish Murari (OpenERP)" Date: Mon, 23 Jul 2012 16:56:17 +0530 Subject: [PATCH 006/245] [FIX] removed rest of the base_group_extended group from addons lp bug: https://launchpad.net/bugs/1027875 fixed bzr revid: rmu@tinyerp.com-20120723112617-h7um6wkj22martms --- addons/account/account_view.xml | 2 +- addons/crm_fundraising/crm_fundraising_view.xml | 2 +- addons/point_of_sale/point_of_sale_view.xml | 2 +- addons/purchase/report/purchase_report_view.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 1e1f7b91851..e117d31212a 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -2593,7 +2593,7 @@ action = pool.get('res.config').next(cr, uid, [], context)
diff --git a/addons/crm_fundraising/crm_fundraising_view.xml b/addons/crm_fundraising/crm_fundraising_view.xml index 9e67a4001a7..961ba2d6d3e 100644 --- a/addons/crm_fundraising/crm_fundraising_view.xml +++ b/addons/crm_fundraising/crm_fundraising_view.xml @@ -66,7 +66,7 @@ + + + + + + +
  • @@ -155,6 +174,7 @@
  • +
  • Reply
  • + - diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index d1fb3f8a395..ab8f2dabd5a 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/stock/stock_view.xml b/addons/stock/stock_view.xml index 6927bf68c25..7584f239f34 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -106,6 +106,7 @@
    +
    @@ -880,12 +881,12 @@ - + - + @@ -970,7 +971,7 @@ stock.picking.out.tree - stock.picking + stock.picking.out @@ -1000,7 +1001,7 @@ - + From 7dd65a0f9ba6ca0c59addc22f2b3fed6e9f56504 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Fri, 7 Sep 2012 14:25:06 +0200 Subject: [PATCH 090/245] note : constraint for note min len bzr revid: chm@openerp.com-20120907122506-fs6d3vvqowr2m6yk --- addons/note/note.py | 19 +++++++++++++++++-- addons/note/note_view.xml | 6 ++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/addons/note/note.py b/addons/note/note.py index 985cacd3404..1b5704eb601 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -55,10 +55,10 @@ class note_note(osv.osv): _inherit = ['mail.thread'] _description = "Note" - def _set_note_first_line(self, cr, uid, id, name, value, args, context=None): + def _set_note_first_line(self, cr, uid, id, name, value, args={}, context=None): return self.write(cr, uid, [id], {'note': value}, context=context) - def _get_note_first_line(self, cr, uid, ids, name, args, context=None): + def _get_note_first_line(self, cr, uid, ids, name="", args={}, context=None): res = {} for note in self.browse(cr, uid, ids, context=context): text_note = (note.note or '').strip().split('\n')[0] @@ -99,6 +99,16 @@ class note_note(osv.osv): return False + def _constraints_min_len(self, cr, uid, ids, context=None): + + res = self._get_note_first_line(cr, uid, ids, context=context) + + for note in self.browse(cr, uid, ids, context=context): + if len(res[note.id])<1 : + return False + + return True + _columns = { 'name': fields.function(_get_note_first_line, fnct_inv=_set_note_first_line, string='Note Summary', type='text'), @@ -120,9 +130,14 @@ class note_note(osv.osv): 'tag_ids' : fields.many2many('note.tag','note_tags_rel','note_id','tag_id','Tags'), } + _constraints = [ + (_constraints_min_len,'The title (first line on the note) must have at least one character.',['note']), + ] + _defaults = { 'active' : 1, 'stage_id' : _get_default_stage_id, + 'note': " " } _order = 'sequence asc' _group_by_full = { diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index b7e76c5fe5e..63dd8afcd1b 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -104,8 +104,10 @@
    - - + + + +
    From 56f7b22cc02f2eb6dbf34ade58aab5472e9ad5fb Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 7 Sep 2012 17:59:36 +0530 Subject: [PATCH 091/245] [REM]: Remove unused length bzr revid: atp@tinyerp.com-20120907122936-tyk4kdapozh8ed0n --- addons/mail/static/src/js/mail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 026808f8905..750df7aed41 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -291,7 +291,7 @@ openerp.mail = function(session) { var self = this; this.ds_message.call('message_read', [[parseInt(message_id)]]).then(function(result){ vote_count = 0; - if (result[0].vote_user_ids){length + if (result[0].vote_user_ids){ vote_count = result[0].vote_user_ids.length; } parent_element = self.find_parent_element(".oe_mail_msg_vote", message_id); From cd0be77ffac765ed3160a2a812bef9ca5b91d8a4 Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Fri, 7 Sep 2012 18:24:53 +0530 Subject: [PATCH 092/245] [IMP]implement CSs bzr revid: vme@tinyerp.com-20120907125453-rowm6tydm09rxpfm --- addons/board/static/src/css/dashboard.css | 33 ++++++++++++++++++++++ addons/board/static/src/css/dashboard.sass | 26 +++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/addons/board/static/src/css/dashboard.css b/addons/board/static/src/css/dashboard.css index 6907b4271a0..095893b2c97 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_links { text-align: right; margin: 0 4px 6px 0; diff --git a/addons/board/static/src/css/dashboard.sass b/addons/board/static/src/css/dashboard.sass index 4bacc7bd892..b97f7831cd6 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_links text-align: right margin: 0 4px 6px 0 @@ -86,3 +111,4 @@ > tbody tr:nth-child(odd) background: transparent + From 5e76c6efe17b40eac491d40ddc7c0e163e66436c Mon Sep 17 00:00:00 2001 From: "Twinkle Christian (OpenERP)" Date: Fri, 7 Sep 2012 18:37:25 +0530 Subject: [PATCH 093/245] [IMP]Remove user_id , and note_pad from note_demo.xml file bzr revid: tch@tinyerp.com-20120907130725-9a9dbvsd0m4qo6tl --- addons/note/note_demo.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/note/note_demo.xml b/addons/note/note_demo.xml index 3535f19739f..5e776664fe5 100644 --- a/addons/note/note_demo.xml +++ b/addons/note/note_demo.xml @@ -47,9 +47,7 @@ ]]>
    - -
    From 4fc67d7a5d7d8bbd6180cc717c0f267c5ec0e1c1 Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Fri, 7 Sep 2012 18:41:49 +0530 Subject: [PATCH 094/245] [IMP]show reset button on debug mode. bzr revid: vme@tinyerp.com-20120907131149-4z5vjfha0bfi8rb7 --- addons/board/static/src/js/dashboard.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js index cdb5193c712..8da4f6cf7b5 100644 --- a/addons/board/static/src/js/dashboard.js +++ b/addons/board/static/src/js/dashboard.js @@ -17,7 +17,10 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({ start: function() { var self = this; this._super.apply(this, arguments); - + + if(!this.session.debug) + this.$el.find(".oe_dashboard_links button:first").css("display", "none"); + this.$el.find('.oe_dashboard_column').sortable({ connectWith: '.oe_dashboard_column', handle: '.oe_header', From 6125b3bd91f092b412fea5260d89ba7a9416e62b Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Fri, 7 Sep 2012 19:07:06 +0530 Subject: [PATCH 095/245] [IMP]thunderbird partner push mail bzr revid: pna@tinyerp.com-20120907133706-dhjr12dox3u0g1n0 --- addons/plugin/plugin_handler.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index 96d93afc025..ec4217381af 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -106,8 +106,6 @@ class plugin_handler(osv.osv_memory): res_id = model_obj.message_new(cr, uid, msg) notify = "Mail succesfully pushed, a new %s has been created " % model else: - if model == 'res.partner': - model_obj = self.pool.get('mail.thread') model_obj.message_post(cr, uid, [res_id], body=msg) notify = "Mail succesfully pushed" From 8b1a062c99187316fbbe5dcdcc61bf813eafd77f Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Fri, 7 Sep 2012 17:33:30 +0200 Subject: [PATCH 096/245] [IMP] kanban : Improve the opening on global bock. Add a class 'oe_kanban_global_click_edit' has same methods of 'oe_kanban_global_click' but open in form/edit view ; Improve display of menu dropdown bzr revid: chm@openerp.com-20120907153330-2dmzfiy9vwtb36uv --- addons/web/static/src/css/base.css | 1 + addons/web/static/src/css/base.sass | 1 + addons/web_kanban/static/src/css/kanban.css | 1 + addons/web_kanban/static/src/css/kanban.sass | 1 + addons/web_kanban/static/src/js/kanban.js | 11 +++++++++-- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 226ccbd3513..1256ffef6f9 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -689,6 +689,7 @@ .openerp .oe_dropdown_toggle { color: #404040; font-weight: normal; + display:inline-block; } .openerp .oe_dropdown_hover:hover .oe_dropdown_menu, .openerp .oe_dropdown_menu.oe_opened { display: block; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 13f740f218c..ac73f3de045 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -559,6 +559,7 @@ $sheet-max-width: 860px .oe_dropdown_toggle color: #404040 font-weight: normal + display:inline-block .oe_dropdown_hover:hover .oe_dropdown_menu, .oe_dropdown_menu.oe_opened display: block .oe_dropdown_menu diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index 345becc7cdd..7f209e9f60a 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -134,6 +134,7 @@ margin-left: 4px; cursor: pointer; position: relative; + display: inline-block; top: -8px; } .openerp .oe_kanban_view .oe_kanban_add { diff --git a/addons/web_kanban/static/src/css/kanban.sass b/addons/web_kanban/static/src/css/kanban.sass index b85d3ebea03..1878b86925b 100644 --- a/addons/web_kanban/static/src/css/kanban.sass +++ b/addons/web_kanban/static/src/css/kanban.sass @@ -148,6 +148,7 @@ margin-left: 4px cursor: pointer position: relative + display: inline-block top: -8px .oe_kanban_add float: right diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 0cef134d95b..c2a0244fd21 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -757,7 +757,7 @@ instance.web_kanban.KanbanRecord = instance.web.Widget.extend({ } }); - if (this.$el.find('.oe_kanban_global_click').length) { + if (this.$el.find('.oe_kanban_global_click,.oe_kanban_global_click_edit').length) { this.$el.on('click', function(ev) { if (!ev.isTrigger && !$(ev.target).data('events')) { var trigger = true; @@ -798,8 +798,15 @@ instance.web_kanban.KanbanRecord = instance.web.Widget.extend({ }); } }, + /* actions when user click on the block with a specific class + * open on normal view : oe_kanban_global_click + * open on form/edit view : oe_kanban_global_click_edit + */ on_card_clicked: function(ev) { - this.view.open_record(this.id); + if(this.$el.find('.oe_kanban_global_click_edit').size()>0) + this.do_action_edit(); + else + this.do_action_open(); }, setup_color_picker: function() { var self = this; From 6971bbd2d45b79d8c664bc83812bcf7c77213969 Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Mon, 10 Sep 2012 10:49:03 +0530 Subject: [PATCH 097/245] Merged lp:~openerp-dev/openobject-addons/trunk-remove-warnings-server-installation-accounting-journal_items_menu-psa bzr revid: jam@tinyerp.com-20120910051903-w5neelpw5o5zkdub --- addons/account/account_move_line.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 18ab1a779a3..e2e0aeb3d6a 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -160,6 +160,7 @@ class account_move_line(osv.osv): return res def default_get(self, cr, uid, fields, context=None): + context['journal_id'] = context.get('search_default_journal_id') data = self._default_get(cr, uid, fields, context=context) for f in data.keys(): if f not in fields: @@ -926,6 +927,8 @@ class account_move_line(osv.osv): return res if (not context.get('journal_id', False)) or (not context.get('period_id', False)): return False + if context.get('journal_id', False): + context['journal_id'] = context.get('search_default_journal_id') cr.execute('SELECT code FROM account_journal WHERE id = %s', (context['journal_id'], )) j = cr.fetchone()[0] or '' cr.execute('SELECT code FROM account_period WHERE id = %s', (context['period_id'], )) From 22d1ff0c82585beb6ac999cc7b10d98d6107a8cd Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 10 Sep 2012 09:24:59 +0200 Subject: [PATCH 098/245] note : add comments and change name in 'Memo' bzr revid: chm@openerp.com-20120910072459-tlue035os3ci1pbz --- addons/note/__openerp__.py | 16 ++++++++-------- addons/note/note.py | 29 +++++++++++++++++++++-------- addons/note/note_view.xml | 10 +++++----- 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/addons/note/__openerp__.py b/addons/note/__openerp__.py index 111f511e9fc..2e02ac567c7 100644 --- a/addons/note/__openerp__.py +++ b/addons/note/__openerp__.py @@ -20,24 +20,24 @@ ############################################################################## { - 'name': 'Notes', + 'name': 'Memos', 'version': '0.1', 'category': 'Tools', 'description': """ -This module allows users to create their own notes inside OpenERP +This module allows users to create their own memos inside OpenERP ================================================================= -Use notes to write meeting minutes, organize ideas, organize personnal todo -lists, etc. Each user manages his own personnal notes. Notes are available to -their authors only, but they can share notes to others users so that several -people can work on the same note in real time. It's very efficient to share +Use memos to write meeting minutes, organize ideas, organize personnal todo +lists, etc. Each user manages his own personnal memos. Memos are available to +their authors only, but they can share memos to others users so that several +people can work on the same memo in real time. It's very efficient to share meeting minutes. -Notes can be found in the 'Home' menu. +Memos can be found in the 'Home' menu. """, 'author': 'OpenERP SA', 'website': 'http://openerp.com', - 'summary': 'Sticky Notes, Collaborative', + 'summary': 'Sticky Memos, Collaborative', 'depends': [ 'base_tools', 'mail', diff --git a/addons/note/note.py b/addons/note/note.py index 1b5704eb601..7387d1c3d54 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -23,10 +23,11 @@ from openerp.osv import osv, fields from tools.translate import _ import re +#every user can create his name of stage for his notes class note_stage(osv.osv): """ Category of Note """ _name = "note.stage" - _description = "Note Stage" + _description = "Memo Stage" _columns = { 'name': fields.char('Category Name', size=64, required=True), 'sequence': fields.integer('Sequence', help="Used to order the note stages"), @@ -40,24 +41,30 @@ class note_stage(osv.osv): 'sequence' : 1, } +#Object for tagging the diferent note. The tagging is shared with all follower class note_tag(osv.osv): _name = "note.tag" - _description = "User can make tags on his note." + _description = "User can make tags on his memo." _columns = { 'name' : fields.char('Tag name', size=64, required=True), } +#object note is kanban view orriented. The first line of the notes are put on the +#kanban view like a title. An upgrade note_pad, can make a pad object in the form view. +#The user can unactivate a note, this note disapear after one days. class note_note(osv.osv): """ Note """ _name = 'note.note' _inherit = ['mail.thread'] - _description = "Note" + _description = "Memo" + #writing method (no modification of values) def _set_note_first_line(self, cr, uid, id, name, value, args={}, context=None): return self.write(cr, uid, [id], {'note': value}, context=context) + #read the first line (convert hml into text) def _get_note_first_line(self, cr, uid, ids, name="", args={}, context=None): res = {} for note in self.browse(cr, uid, ids, context=context): @@ -68,10 +75,13 @@ class note_note(osv.osv): return res + #return the default stage for the uid user def _get_default_stage_id(self,cr,uid,context=None): ids = self.pool.get('note.stage').search(cr,uid,[('user_id','=',uid)]) return ids and ids[0] or False + #nead IMP : return the list of stage for the uid user + #because one note can have more of one stage (one stage per note and per user) def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None): access_rights_uid = access_rights_uid or uid stage_obj = self.pool.get('note.stage') @@ -83,22 +93,25 @@ class note_note(osv.osv): result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context) return result + #unactivate a 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.message_post(cr, uid, ids[0], body='This note is active', subject=False, + self.message_post(cr, uid, ids[0], body='This memo is active', 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.message_post(cr, uid, ids[0], body='This note is done', subject=False, + self.message_post(cr, uid, ids[0], body='This memo is done', subject=False, type='notification', parent_id=False, attachments=None, context=context) return False + #look that the title (first line of the note) have more of one caracter def _constraints_min_len(self, cr, uid, ids, context=None): res = self._get_note_first_line(cr, uid, ids, context=context) @@ -109,9 +122,9 @@ class note_note(osv.osv): return True - + _columns = { - 'name': fields.function(_get_note_first_line, fnct_inv=_set_note_first_line, string='Note Summary', type='text'), + 'name': fields.function(_get_note_first_line, fnct_inv=_set_note_first_line, string='Memo Summary', type='text'), 'note': fields.html('Pad Content'), 'sequence': fields.integer('Sequence'), # the stage_id depending on the uid @@ -131,7 +144,7 @@ class note_note(osv.osv): } _constraints = [ - (_constraints_min_len,'The title (first line on the note) must have at least one character.',['note']), + (_constraints_min_len,'The title (first line on the memo) must have at least one character.',['note']), ] _defaults = { diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index 63dd8afcd1b..2a2d7d8af8a 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -9,7 +9,7 @@ note.stage.form note.stage - + @@ -23,7 +23,7 @@ note.stage - + @@ -100,7 +100,7 @@ note.note.form note.note - +
    @@ -120,8 +120,8 @@ note.note.search note.note - - + + From 3795da521191c64c42b3f33f48cb59adf0979af7 Mon Sep 17 00:00:00 2001 From: "Twinkle Christian (OpenERP)" Date: Mon, 10 Sep 2012 16:45:01 +0530 Subject: [PATCH 099/245] [IMP]Remove type field from the l10n_in_hr_payroll bzr revid: tch@tinyerp.com-20120910111501-aj9g177cvhnw2whp --- addons/l10n_in_hr_payroll/report/payment_advice_report_view.xml | 2 -- addons/l10n_in_hr_payroll/report/payslip_report_view.xml | 2 -- .../wizard/hr_salary_employee_bymonth_view.xml | 1 - .../l10n_in_hr_payroll/wizard/hr_yearly_salary_detail_view.xml | 1 - 4 files changed, 6 deletions(-) diff --git a/addons/l10n_in_hr_payroll/report/payment_advice_report_view.xml b/addons/l10n_in_hr_payroll/report/payment_advice_report_view.xml index 7a023f09608..4d7dbe91ee1 100644 --- a/addons/l10n_in_hr_payroll/report/payment_advice_report_view.xml +++ b/addons/l10n_in_hr_payroll/report/payment_advice_report_view.xml @@ -5,7 +5,6 @@ payment.advice.report.tree payment.advice.report - tree @@ -31,7 +30,6 @@ payment.advice.report.search payment.advice.report - search diff --git a/addons/l10n_in_hr_payroll/report/payslip_report_view.xml b/addons/l10n_in_hr_payroll/report/payslip_report_view.xml index 5588fc6edca..92eaf3ec4a9 100644 --- a/addons/l10n_in_hr_payroll/report/payslip_report_view.xml +++ b/addons/l10n_in_hr_payroll/report/payslip_report_view.xml @@ -5,7 +5,6 @@ payslip.report.tree payslip.report - tree @@ -30,7 +29,6 @@ payslip.report.search payslip.report - search diff --git a/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth_view.xml b/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth_view.xml index e05519b08db..a3be8266e2e 100644 --- a/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth_view.xml +++ b/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth_view.xml @@ -4,7 +4,6 @@ Hr monthly Employee Salary hr.salary.employee.month - form