From fd4cb45dfd83c9ab32e13dd0d8d98ba34be21ea9 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar (OpenERP)" Date: Mon, 11 Jun 2012 12:38:45 +0530 Subject: [PATCH 01/39] [FIX]stock:improved code by reverting all unwanted changes bzr revid: ssu@tinyerp.com-20120611070845-k28njbigvd8pq5l6 --- addons/stock/report/picking.rml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml index 898c078157d..5f395c9f005 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -299,21 +299,6 @@ - - - - - - - - - Total - - - [[ formatLang(get_qtytotal(picking.move_lines)['quantity']) ]] [[ get_qtytotal(picking.move_lines)['uom'] ]] - - - From bc23c8b7275c950641100ac2b276adece4a64620 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar (OpenERP)" Date: Mon, 11 Jun 2012 14:16:28 +0530 Subject: [PATCH 02/39] [FIX]stock:remove unnecessary function bzr revid: ssu@tinyerp.com-20120611084628-musbyk3jhlg1ulaj --- addons/stock/report/picking.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/addons/stock/report/picking.py b/addons/stock/report/picking.py index 27141c917a9..29a53fba7a2 100644 --- a/addons/stock/report/picking.py +++ b/addons/stock/report/picking.py @@ -29,14 +29,7 @@ class picking(report_sxw.rml_parse): super(picking, self).__init__(cr, uid, name, context=context) self.localcontext.update({ 'time': time, - 'get_qtytotal':self._get_qtytotal }) - def _get_qtytotal(self,move_lines): - total = 0.0 - uom = move_lines[0].product_uom.name - for move in move_lines: - total+=move.product_qty - return {'quantity':total,'uom':uom} report_sxw.report_sxw('report.stock.picking.list','stock.picking','addons/stock/report/picking.rml',parser=picking) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 5d5ab9c9f99a3dd80401bd850de82ad3aaa6ebca Mon Sep 17 00:00:00 2001 From: "Ajay Chauhan (OpenERP)" Date: Mon, 11 Jun 2012 17:49:40 +0530 Subject: [PATCH 03/39] [FIX]stock : add value to the field year & month bzr revid: cha@tinyerp.com-20120611121940-ynw03liych1gj2df --- addons/stock/report/report_stock_move.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py index afd6bd4d1f4..894d82534a2 100644 --- a/addons/stock/report/report_stock_move.py +++ b/addons/stock/report/report_stock_move.py @@ -153,7 +153,7 @@ class report_stock_inventory(osv.osv): 'date': fields.datetime('Date', readonly=True), 'year': fields.char('Year', size=4, readonly=True), 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), - ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September')]), + ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September')],'Month'), 'partner_id':fields.many2one('res.partner', 'Partner', readonly=True), 'product_id':fields.many2one('product.product', 'Product', readonly=True), 'product_categ_id':fields.many2one('product.category', 'Product Category', readonly=True), @@ -173,6 +173,8 @@ class report_stock_inventory(osv.osv): CREATE OR REPLACE view report_stock_inventory AS ( (SELECT min(m.id) as id, m.date as date, + to_char(m.date, 'YYYY') as year, + to_char(m.date, 'MM') as month, m.partner_id as partner_id, m.location_id as location_id, m.product_id as product_id, pt.categ_id as product_categ_id, l.usage as location_type, m.company_id, @@ -195,6 +197,8 @@ CREATE OR REPLACE view report_stock_inventory AS ( ) UNION ALL ( SELECT -m.id as id, m.date as date, + to_char(m.date, 'YYYY') as year, + to_char(m.date, 'MM') as month, m.partner_id as partner_id, m.location_dest_id as location_id, m.product_id as product_id, pt.categ_id as product_categ_id, l.usage as location_type, m.company_id, From 449e9ee6fa629a66baeb2473c92bfdde3d3ad826 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Thu, 21 Jun 2012 12:08:00 +0530 Subject: [PATCH 04/39] [FIX]Journal entry for rule which is not in payslip lines is created. bzr revid: kbh@tinyerp.com-20120621063800-0nhf399uaf1nbdmw --- addons/hr_payroll_account/hr_payroll_account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_payroll_account/hr_payroll_account.py b/addons/hr_payroll_account/hr_payroll_account.py index a022cac05b1..cfd35c7ea2b 100644 --- a/addons/hr_payroll_account/hr_payroll_account.py +++ b/addons/hr_payroll_account/hr_payroll_account.py @@ -107,7 +107,7 @@ class hr_payslip(osv.osv): 'journal_id': slip.journal_id.id, 'period_id': period_id, } - for line in slip.line_ids: + for line in slip.details_by_salary_rule_category: amt = slip.credit_note and -line.total or line.total partner_id = False debit_account_id = line.salary_rule_id.account_debit.id From 56150b1aef230cd7a7fb4cd8f44dd8884934d716 Mon Sep 17 00:00:00 2001 From: "Ajay Chauhan (OpenERP)" Date: Fri, 22 Jun 2012 17:02:37 +0530 Subject: [PATCH 05/39] [FIX] Purchase: set value for field expected_date in purchase.order lp bug: https://launchpad.net/bugs/1016372 fixed bzr revid: cha@tinyerp.com-20120622113237-88laaa8603jr0k73 --- addons/purchase/report/purchase_report.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/purchase/report/purchase_report.py b/addons/purchase/report/purchase_report.py index f7d73bfb739..ec8f7d5cba5 100644 --- a/addons/purchase/report/purchase_report.py +++ b/addons/purchase/report/purchase_report.py @@ -79,7 +79,7 @@ class purchase_report(osv.osv): to_char(s.date_order, 'YYYY-MM-DD') as day, s.state, s.date_approve, - date_trunc('day',s.minimum_planned_date) as expected_date, + s.minimum_planned_date as expected_date, s.dest_address_id, s.pricelist_id, s.validator, @@ -118,7 +118,7 @@ class purchase_report(osv.osv): s.date_approve, l.date_planned, l.product_uom, - date_trunc('day',s.minimum_planned_date), + s.minimum_planned_date, s.pricelist_id, s.validator, s.dest_address_id, From 9c54520f3669262490223f5c1ce68b136ff65e36 Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Wed, 4 Jul 2012 14:46:13 +0530 Subject: [PATCH 06/39] [IMP]server-log-warning bzr revid: pna@tinyerp.com-20120704091613-i7vxzgq8hgmv20s5 --- addons/l10n_uk/demo/demo.xml | 4 ++-- addons/mail/mail_thread.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/l10n_uk/demo/demo.xml b/addons/l10n_uk/demo/demo.xml index 1184828df50..f1d5088c825 100644 --- a/addons/l10n_uk/demo/demo.xml +++ b/addons/l10n_uk/demo/demo.xml @@ -1,6 +1,6 @@ - + UK OpenERP Partner smartmode http://www.smartmode.co.uk @@ -12,7 +12,7 @@ Vadim Chobanu HA4 7JW Ruislip - + vadim@smartmode.co.uk +44 (0) 8456434548 diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 5668709af17..3d65f1313a6 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -202,7 +202,6 @@ class mail_thread(osv.Model): def message_create_get_notification_user_ids(self, cr, uid, thread_ids, new_msg_vals, context=None): if context is None: context = {} - notif_user_ids = [] body = new_msg_vals.get('body_html', '') if new_msg_vals.get('subtype', 'plain') == 'html' else new_msg_vals.get('body_text', '') for thread_id in thread_ids: @@ -880,7 +879,7 @@ class mail_thread(osv.Model): """ When creating a new message, set as unread if uid is not the object responsible. """ for obj in self.browse(cr, uid, ids, context=context): - if obj.message_state and hasattr(obj, 'user_id') and (not obj.user_id or obj.user_id.id != uid): + if obj.message_state and ('user_id' in obj._columns.keys()) and (not obj.user_id or obj.user_id.id != uid) : self.message_mark_as_unread(cr, uid, [obj.id], context=context) def message_check_and_set_unread(self, cr, uid, ids, context=None): From afa84101cf25b9439cae3688bb5a9ceee7ae9a48 Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Tue, 14 Aug 2012 14:16:40 +0530 Subject: [PATCH 07/39] [REM] removed done button from Order Lines to Invoice bzr revid: bde@tinyerp.com-20120814084640-6b25ehh0s29giwsn --- addons/sale/sale.py | 7 ------- addons/sale/sale_view.xml | 3 +-- addons/sale/wizard/sale_line_invoice.py | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 722b22ba602..68b17149917 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -1260,13 +1260,6 @@ class sale_order_line(osv.osv): def button_confirm(self, cr, uid, ids, context=None): return self.write(cr, uid, ids, {'state': 'confirmed'}) - def button_done(self, cr, uid, ids, context=None): - wf_service = netsvc.LocalService("workflow") - res = self.write(cr, uid, ids, {'state': 'done'}) - for line in self.browse(cr, uid, ids, context=context): - wf_service.trg_write(uid, 'sale.order', line.order_id.id, cr) - return res - def uos_change(self, cr, uid, ids, product_uos, product_uos_qty=0, product_id=None): product_obj = self.pool.get('product.product') if not product_id: diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 2257240dd10..cf49c154827 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -508,8 +508,7 @@
diff --git a/addons/sale/wizard/sale_line_invoice.py b/addons/sale/wizard/sale_line_invoice.py index 613b07039d5..e5b81fb5bc4 100644 --- a/addons/sale/wizard/sale_line_invoice.py +++ b/addons/sale/wizard/sale_line_invoice.py @@ -89,7 +89,7 @@ class sale_order_line_make_invoice(osv.osv_memory): for lid in line_id: invoices[line.order_id.id].append((line, lid)) sales_order_line_obj.write(cr, uid, [line.id], - {'invoiced': True}) + {'invoiced': True, 'state': 'done'}) for result in invoices.values(): order = result[0][0].order_id il = map(lambda x: x[1], result) From dd0376920ad9a453ebfd59ce08537ec60a863dc0 Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Fri, 17 Aug 2012 13:01:41 +0530 Subject: [PATCH 08/39] [IMP] improved the ordering of buttons on Interview Requests form of hr_evaluation module bzr revid: bde@tinyerp.com-20120817073141-0j19yflcdeej84ln --- addons/hr_evaluation/hr_evaluation_view.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml index 47b0c323622..12c5dc0af6d 100644 --- a/addons/hr_evaluation/hr_evaluation_view.xml +++ b/addons/hr_evaluation/hr_evaluation_view.xml @@ -267,16 +267,16 @@
-
-
From 6e001f935672e8714e860eb25cfce4647c938ba2 Mon Sep 17 00:00:00 2001 From: Hardik Date: Fri, 17 Aug 2012 17:02:50 +0530 Subject: [PATCH 09/39] [IMP]Base : __openerp__.py updated bzr revid: hsa@tinyerp.com-20120817113250-berxzlqkejhoef1x --- openerp/addons/base/__openerp__.py | 6 +++--- openerp/addons/base/base_menu.xml | 2 +- openerp/addons/base/res/res_config.xml | 2 +- openerp/addons/base/res/res_security.xml | 2 +- openerp/addons/base/security/base_security.xml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openerp/addons/base/__openerp__.py b/openerp/addons/base/__openerp__.py index 5b65bff4bd7..363d255d293 100644 --- a/openerp/addons/base/__openerp__.py +++ b/openerp/addons/base/__openerp__.py @@ -30,7 +30,7 @@ 'maintainer': 'OpenERP SA', 'website': 'http://www.openerp.com', 'depends': [], - 'init_xml': [ + 'data': [ 'base_data.xml', 'security/base_security.xml', 'base_menu.xml', @@ -38,7 +38,7 @@ 'res/res_config.xml', 'data/res.country.state.csv' ], - 'update_xml': [ + 'data': [ 'ir/wizard/wizard_menu_view.xml', 'ir/ir.xml', 'ir/ir_filters.xml', @@ -77,7 +77,7 @@ 'res/res_widget_data.xml', 'publisher_warranty/publisher_warranty_data.xml', ], - 'demo_xml': [ + 'demo': [ 'base_demo.xml', 'res/res_partner_demo.xml', 'res/res_partner_demo.yml', diff --git a/openerp/addons/base/base_menu.xml b/openerp/addons/base/base_menu.xml index 770e0e2d329..f3e0cda7e12 100644 --- a/openerp/addons/base/base_menu.xml +++ b/openerp/addons/base/base_menu.xml @@ -1,6 +1,6 @@ - + - + res.config.view.base res.config diff --git a/openerp/addons/base/res/res_security.xml b/openerp/addons/base/res/res_security.xml index f02abd90985..8aa18bd8df4 100644 --- a/openerp/addons/base/res/res_security.xml +++ b/openerp/addons/base/res/res_security.xml @@ -1,6 +1,6 @@ - + Partner Manager diff --git a/openerp/addons/base/security/base_security.xml b/openerp/addons/base/security/base_security.xml index cd0b7e999b3..11be6e35bd1 100644 --- a/openerp/addons/base/security/base_security.xml +++ b/openerp/addons/base/security/base_security.xml @@ -1,6 +1,6 @@ - + + + + linkedin_settings + web_linkedin.settings + + +
+
+
+

+ To use the LinkedIn module with this database, an API Key is required. Please follow this procedure: +

+
    +
  • Go to this URL: + https://www.linkedin.com/secure/developer. +
  • +
  • Log into LinkedIn.
  • +
  • Add a new application and fill the form: +
      +
    • JavaScript API Domain: the domain of the url used to log into this database (example: http://localhost:8069)
    • +
    • The programming tool is Javascript
    • +
    +
  • +
  • Copy the API key down here:
  • +
+
+ + + + +
+
+ + + Configure Linkedin + ir.actions.act_window + web_linkedin.settings + form + inline + + + + +
From ebb3df4f8cd4711809763530545e1236eae16a16 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 23 Aug 2012 12:02:52 +0200 Subject: [PATCH 32/39] [FIX] convert: fix previous partial fix for removing redundant @type for bzr revid: odo@openerp.com-20120823100252-zmhpaocb2bb11c99 --- openerp/tools/convert.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/openerp/tools/convert.py b/openerp/tools/convert.py index 8269fa5d7ff..cee414c2825 100644 --- a/openerp/tools/convert.py +++ b/openerp/tools/convert.py @@ -593,18 +593,8 @@ form: module.record_id""" % (xml_id,) a_action = rec.get('action','').encode('utf8') # determine the type of action - if '.' in a_action: - # action referring to another module - a_action_module, a_action_name = a_action.split('.') - else: - # local action: use current module - a_action_module = self.module - a_action_name = a_action - - # fetch the model and the res id - ir_action_ref = self.pool.get('ir.model.data').get_object_reference(cr, self.uid, a_action_module, a_action_name) - # get the part of the model we need - a_type = ir_action_ref[0].split('.')[-1] + a_type, a_id = self.model_id_get(a_action) + a_type = a_type.split('.')[-1] # keep only type part icons = { "act_window": 'STOCK_NEW', @@ -617,7 +607,6 @@ form: module.record_id""" % (xml_id,) values['icon'] = icons.get(a_type,'STOCK_NEW') if a_type=='act_window': - a_id = self.id_get(cr, a_action) cr.execute('select view_type,view_mode,name,view_id,target from ir_act_window where id=%s', (int(a_id),)) rrres = cr.fetchone() assert rrres, "No window action defined for this id %s !\n" \ @@ -644,7 +633,6 @@ form: module.record_id""" % (xml_id,) values['name'] = action_name elif a_type in ['wizard', 'url', 'client', 'server'] and not values.get('name'): - a_id = self.id_get(cr, a_action) a_table = 'ir_act_%s' % a_type cr.execute('select name from %s where id=%%s' % a_table, (int(a_id),)) resw = cr.fetchone() @@ -682,9 +670,6 @@ form: module.record_id""" % (xml_id,) self.idref[rec_id] = int(pid) if rec.get('action') and pid: - a_action = rec.get('action').encode('utf8') - a_type = rec.get('type','').encode('utf8') or 'act_window' - a_id = self.id_get(cr, a_action) action = "ir.actions.%s,%d" % (a_type, a_id) self.pool.get('ir.model.data').ir_set(cr, self.uid, 'action', 'tree_but_open', 'Menuitem', [('ir.ui.menu', int(pid))], action, True, True, xml_id=rec_id) return ('ir.ui.menu', pid) From 7ddc6a2cd9b6d614fe007d73b95804dfd7d9fdc8 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 23 Aug 2012 12:05:04 +0200 Subject: [PATCH 33/39] [FIX] convert: fix previous partial patch for removing redundant @type for bzr revid: odo@openerp.com-20120823100504-q8w91ga5wbot20o5 --- openerp/tools/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/tools/convert.py b/openerp/tools/convert.py index cee414c2825..be8465055ee 100644 --- a/openerp/tools/convert.py +++ b/openerp/tools/convert.py @@ -593,7 +593,7 @@ form: module.record_id""" % (xml_id,) a_action = rec.get('action','').encode('utf8') # determine the type of action - a_type, a_id = self.model_id_get(a_action) + a_type, a_id = self.model_id_get(cr, a_action) a_type = a_type.split('.')[-1] # keep only type part icons = { From a732d1cdc5f8e5dc59e44f50ea73d57c8d4869e7 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 23 Aug 2012 12:16:01 +0200 Subject: [PATCH 34/39] [FIX] problem with set defaults bzr revid: nicolas.vanhoren@openerp.com-20120823101601-mnknsr54dhv1lv83 --- addons/web/static/src/js/view_form.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index bad2f843fc6..fe53705510b 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -960,15 +960,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM return false; } var displayed = value; - switch (field.field.type) { - case 'selection': + if (field instanceof instance.web.form.FieldSelection) { displayed = _(field.values).find(function (option) { return option[0] === value; })[1]; - break; - case 'many2one': + } else if (field instanceof instance.web.form.FieldMany2One) { displayed = field.get_displayed(); - break; } return { @@ -4738,14 +4735,12 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({ // statusbar_visible attribute of the field. For example: // statusbar_visible="draft,open". var selection = this.field.selection; - console.log(selection); for(var i=0; i< selection.length; i++) { var key = selection[i][0]; if(key == this.selected_value || !this.options.visible || this.options.visible.indexOf(key) != -1) { this.selection.push(selection[i]); } } - console.log(this.selection); this.render_elements(); } }, From d48ff4be8fe7144258961efc5fd51a5578627e62 Mon Sep 17 00:00:00 2001 From: "Bharat Devnani(OpenERP)" <> Date: Thu, 23 Aug 2012 15:49:17 +0530 Subject: [PATCH 35/39] [IMP] Added label for sale order line selection on create invoice wizard bzr revid: pso@tinyerp.com-20120823101917-8r8mvog04xsjq0cg --- addons/sale/wizard/sale_make_invoice_advance.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/sale/wizard/sale_make_invoice_advance.xml b/addons/sale/wizard/sale_make_invoice_advance.xml index eceaadc89d0..97e9c843683 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.xml +++ b/addons/sale/wizard/sale_make_invoice_advance.xml @@ -22,8 +22,10 @@ attrs="{'invisible': [('advance_payment_method', '!=', 'percentage')]}"/>
+
+ +
-
-
+
Base Report sxw @@ -44,7 +44,8 @@ + + Base Report File sxw base.report.rml.save From afa60ebc74e8ae89136b45e607144d5804b5ce4a Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 23 Aug 2012 16:26:56 +0200 Subject: [PATCH 39/39] [FIX] lp: 1039013, where an id is given to name_get instead of a list of ids lp bug: https://launchpad.net/bugs/1039013 fixed bzr revid: qdp-launchpad@openerp.com-20120823142656-nsqml3jnyylpgzxu --- addons/account/account.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/account.py b/addons/account/account.py index fa30b20f2ca..907e6207380 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -582,6 +582,8 @@ class account_account(osv.osv): def name_get(self, cr, uid, ids, context=None): if not ids: return [] + if isinstance(ids, (int, long)): + ids = [ids] reads = self.read(cr, uid, ids, ['name', 'code'], context=context) res = [] for record in reads: