From 5032dad17d3bf4d74fd9ac07804881df6e70dafa Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 18 Feb 2013 18:55:59 +0100 Subject: [PATCH 001/423] [FIX] module: install_from_urls: restrict to administrators. Urls must come from apps server. lp bug: https://launchpad.net/bugs/1129299 fixed bzr revid: chs@openerp.com-20130218175559-ygo0goytspg119bl --- openerp/addons/base/module/module.py | 16 ++++++++++++++-- openerp/addons/base/static/src/js/apps.js | 4 ++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/openerp/addons/base/module/module.py b/openerp/addons/base/module/module.py index a0d1eedef2b..73c61812ee0 100644 --- a/openerp/addons/base/module/module.py +++ b/openerp/addons/base/module/module.py @@ -30,6 +30,7 @@ import shutil import tempfile import urllib import urllib2 +import urlparse import zipfile import zipimport @@ -39,6 +40,7 @@ except ImportError: from StringIO import StringIO # NOQA import openerp +import openerp.exceptions from openerp import modules, pooler, tools, addons from openerp.modules.db import create_categories from openerp.tools.parse_version import parse_version @@ -655,6 +657,11 @@ class module(osv.osv): return res def install_from_urls(self, cr, uid, urls, context=None): + if not self.pool['res.users'].has_group(cr, uid, 'base.group_system'): + raise openerp.exceptions.AccessDenied() + + apps_server = urlparse.urlparse(self.get_apps_server(cr, uid, context=context)) + OPENERP = 'openerp' tmp = tempfile.mkdtemp() _logger.debug('Install from url: %r', urls) @@ -663,6 +670,11 @@ class module(osv.osv): for module_name, url in urls.items(): if not url: continue # nothing to download, local version is already the last one + + up = urlparse.urlparse(url) + if up.scheme != apps_server.scheme or up.netloc != apps_server.netloc: + raise openerp.exceptions.AccessDenied() + try: _logger.info('Downloading module `%s` from OpenERP Apps', module_name) content = urllib2.urlopen(url).read() @@ -727,8 +739,8 @@ class module(osv.osv): finally: shutil.rmtree(tmp) - def install_by_names(self, cr, uid, names, context=None): - raise NotImplementedError('# TODO') + def get_apps_server(self, cr, uid, context=None): + return tools.config.get('apps_server', 'https://apps.openerp.com/apps') def _update_dependencies(self, cr, uid, mod_browse, depends=None): if depends is None: diff --git a/openerp/addons/base/static/src/js/apps.js b/openerp/addons/base/static/src/js/apps.js index a55c89a0483..7a77e827a94 100644 --- a/openerp/addons/base/static/src/js/apps.js +++ b/openerp/addons/base/static/src/js/apps.js @@ -62,8 +62,8 @@ openerp.base = function(instance) { if (instance.base.apps_client) { return check_client_available(instance.base.apps_client); } else { - var ICP = new instance.web.Model('ir.config_parameter'); - return ICP.call('get_param', ['apps.server', 'https://apps.openerp.com/apps']).then(function(u) { + var Mod = new instance.web.Model('ir.module.module'); + return Mod.call('get_apps_server').then(function(u) { var link = $(_.str.sprintf('', u))[0]; var host = _.str.sprintf('%s//%s', link.protocol, link.host); var dbname = link.pathname; From 76a3c48d0bb69e80939cdff1c399915e1ff8d8d3 Mon Sep 17 00:00:00 2001 From: "kirti savalia (OpenERP)" Date: Fri, 8 Mar 2013 14:01:16 +0530 Subject: [PATCH 002/423] [FIX]:pass the correct context value for the account move bzr revid: ksa@tinyerp.com-20130308083116-bpu9nlh8x4kv3gd9 --- addons/account/account_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index f6b74edeccd..a686733e211 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1439,7 +1439,7 @@ From a1f11cf0cd19a9599bfe6a7e9a5e05bd0380d423 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 11 Mar 2013 14:24:33 +0100 Subject: [PATCH 003/423] [FIX] pto in invoice template should not cover the whole document lp bug: https://launchpad.net/bugs/971713 fixed bzr revid: stefan@therp.nl-20130311132433-rfz85yz831u1o1s9 --- .../account/report/account_print_invoice.rml | 28 +++++----- addons/sale/report/sale_order.rml | 52 +++++++++---------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/addons/account/report/account_print_invoice.rml b/addons/account/report/account_print_invoice.rml index 4ffa7a33f9d..579b6f0c10a 100644 --- a/addons/account/report/account_print_invoice.rml +++ b/addons/account/report/account_print_invoice.rml @@ -138,21 +138,8 @@ - [[ repeatIn(objects,'o') ]] [[ setLang(o.partner_id.lang) ]] - - - - Description - Taxes - Quantity - Unit Price - Disc.(%) - Price - - - @@ -217,6 +204,19 @@ + + + + + Description + Taxes + Quantity + Unit Price + Disc.(%) + Price + + + @@ -264,6 +264,7 @@ + @@ -371,6 +372,5 @@ - diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml index a00d2d4e3ef..43e517394e5 100644 --- a/addons/sale/report/sale_order.rml +++ b/addons/sale/report/sale_order.rml @@ -126,33 +126,8 @@ - [[repeatIn(objects,'o')]] [[ setLang(o.partner_id.lang) ]] - - - - - Description - - - Tax - - - Quantity - - - Unit Price - - - Disc.(%) - - - Price - - - - @@ -236,6 +211,31 @@ + + + + + + Description + + + VAT + + + Quantity + + + Unit Price + + + Disc.(%) + + + Price + + + + @@ -283,6 +283,7 @@ + @@ -338,6 +339,5 @@ - From b8690e58e9267520313eaf764c00ac34be46409c Mon Sep 17 00:00:00 2001 From: Mohammed Shekha Date: Tue, 19 Mar 2013 12:32:48 +0530 Subject: [PATCH 004/423] [FIX]Fixed the issue of database list retuns blank when there is name with unicode character in postgres, due to this web-client redirects user to create database screen as there is no database comes in response of db_list. bzr revid: msh@openerp.com-20130319070248-57cp7drh0ry0vjz7 --- openerp/service/web_services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/service/web_services.py b/openerp/service/web_services.py index ea905d91a4b..9cef2fa762d 100644 --- a/openerp/service/web_services.py +++ b/openerp/service/web_services.py @@ -371,7 +371,7 @@ class db(netsvc.ExportService): cr.execute("select datname from pg_database where datdba=(select usesysid from pg_user where usename=%s) and datname not in %s order by datname", (db_user, templates_list)) else: cr.execute("select datname from pg_database where datname not in %s order by datname", (templates_list,)) - res = [str(name) for (name,) in cr.fetchall()] + res = [tools.ustr(name) for (name,) in cr.fetchall()] except Exception: res = [] finally: From b5793bc85b97e99b89875417f1212a9be471fca7 Mon Sep 17 00:00:00 2001 From: Mohammed Shekha Date: Mon, 1 Apr 2013 11:05:00 +0530 Subject: [PATCH 005/423] [FIX]Fixed the issue of file input widget which is not working in firefox and IE. bzr revid: msh@openerp.com-20130401053500-q8tsnnr59u2aqawt --- addons/web/static/src/css/base.css | 9 +++++---- addons/web/static/src/css/base.sass | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 385405e39ca..cbfa554c735 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1,4 +1,4 @@ -@charset "utf-8"; +@charset "UTF-8"; @font-face { font-family: "mnmliconsRegular"; src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot"); @@ -1269,7 +1269,7 @@ color: white; padding: 2px 4px; margin: 1px 6px 0 0; - border: 1px solid lightGray; + border: 1px solid lightgrey; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -1301,7 +1301,7 @@ transform: scale(1.1); } .openerp .oe_secondary_submenu .oe_active { - border-top: 1px solid lightGray; + border-top: 1px solid lightgrey; border-bottom: 1px solid #dedede; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 -1px 3px rgba(40, 40, 40, 0.2); @@ -2284,7 +2284,7 @@ } .openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span { font-size: 80%; - color: darkGreen; + color: darkgreen; vertical-align: top; position: relative; top: -4px; @@ -2475,6 +2475,7 @@ } .openerp .oe_hidden_input_file { position: relative; + overflow-x: hidden; } .openerp .oe_hidden_input_file input.oe_form_binary_file { z-index: 0; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 5fe5b1ceaf4..fcace37ec03 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1967,6 +1967,7 @@ $sheet-padding: 16px // Position: relative is used for the hidden input[type=file] // Do not remove it anymore ! position: relative + overflow-x: hidden input.oe_form_binary_file z-index: 0 line-height: 0 From f537a58f4892bd003c44b16165063c171b602fa9 Mon Sep 17 00:00:00 2001 From: "Ravi Gohil (OpenERP)" Date: Wed, 10 Apr 2013 22:31:03 +0530 Subject: [PATCH 006/423] [FIX] l10n_multilang: Translated terms for 'Account Tax' names were created with wrong 'Record ID' value. (Maintenance Case: 589913) bzr revid: rgo@tinyerp.com-20130410170103-bptugu705353akyf --- addons/l10n_multilang/l10n_multilang.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_multilang/l10n_multilang.py b/addons/l10n_multilang/l10n_multilang.py index 9596b292ff3..615bad8cb68 100644 --- a/addons/l10n_multilang/l10n_multilang.py +++ b/addons/l10n_multilang/l10n_multilang.py @@ -139,7 +139,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): def _process_taxes_translations(self, cr, uid, obj_multi, company_id, langs, field, context=None): obj_tax_template = self.pool.get('account.tax.template') obj_tax = self.pool.get('account.tax') - in_ids = sorted([x.id for x in obj_multi.chart_template_id.tax_template_ids]) + in_ids = [x.id for x in obj_multi.chart_template_id.tax_template_ids] out_ids = obj_tax.search(cr, uid, [('company_id', '=', company_id)], order='id') return self.process_translations(cr, uid, langs, obj_tax_template, field, in_ids, obj_tax, out_ids, force_write=False, context=context) From b8946be24e067d45eda14320fb1a3d0b640cecca Mon Sep 17 00:00:00 2001 From: "Ravish (Open ERP)" Date: Mon, 29 Apr 2013 16:28:59 +0530 Subject: [PATCH 007/423] division by Zero error on product_margin bzr revid: rmu@tinyerp.com-20130429105859-ud19ak4j6df8hdct --- addons/product_margin/product_margin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/product_margin/product_margin.py b/addons/product_margin/product_margin.py index f9187647f35..fe6f133b3e2 100644 --- a/addons/product_margin/product_margin.py +++ b/addons/product_margin/product_margin.py @@ -53,9 +53,9 @@ class product_product(osv.osv): states = ('draft', 'open', 'paid') sqlstr="""select - sum(l.price_unit * l.quantity)/sum(l.quantity) as avg_unit_price, + sum(l.price_unit * l.quantity)/sum(nullif(l.quantity,0)) as avg_unit_price, sum(l.quantity) as num_qty, - sum(l.quantity * (l.price_subtotal/l.quantity)) as total, + sum(l.quantity * (l.price_subtotal/(nullif(l.quantity,0)))) as total, sum(l.quantity * pt.list_price) as sale_expected, sum(l.quantity * pt.standard_price) as normal_cost from account_invoice_line l From 27686df49d8f438c41b90866cedd921989252461 Mon Sep 17 00:00:00 2001 From: chirag patel Date: Mon, 29 Apr 2013 17:34:09 +0530 Subject: [PATCH 008/423] [FIX] Fixed raise warning when email_from value false. bzr revid: cpa@tinyerp.com-20130429120409-sm0c01022qm25agv --- addons/email_template/email_template.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index 356d903b03d..e8f9dbba5a4 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -376,7 +376,8 @@ class email_template(osv.osv): # create a mail_mail based on values, without attachments values = self.generate_email(cr, uid, template_id, res_id, context=context) - assert values.get('email_from'), 'email_from is missing or empty after template rendering, send_mail() cannot proceed' + if not values.get('email_from'): + raise osv.except_osv(_('Warning!'),_('email_from is missing or empty after template rendering, send_mail() cannot proceed')) del values['email_recipients'] # TODO Properly use them. attachment_ids = values.pop('attachment_ids', []) attachments = values.pop('attachments', []) From 5db1c8333de2daa1f57cf0ea08ba067a9e45ec7a Mon Sep 17 00:00:00 2001 From: "Dhruti Shastri (OpenERP)" Date: Thu, 2 May 2013 17:32:07 +0530 Subject: [PATCH 009/423] [sale]:Invoice/Deliever Address are not fileterd based on selected Customer(partner) (Case:592166) bzr revid: dhs@tinyerp.com-20130502120207-a7he9qqty54h1xaz --- addons/sale/sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 2518a801eb2..cf75591be9a 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -207,8 +207,8 @@ class sale_order(osv.osv): 'date_confirm': fields.date('Confirmation Date', readonly=True, select=True, help="Date on which sales order is confirmed."), 'user_id': fields.many2one('res.users', 'Salesperson', states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, select=True, track_visibility='onchange'), 'partner_id': fields.many2one('res.partner', 'Customer', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, required=True, change_default=True, select=True, track_visibility='always'), - 'partner_invoice_id': fields.many2one('res.partner', 'Invoice Address', readonly=True, required=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Invoice address for current sales order."), - 'partner_shipping_id': fields.many2one('res.partner', 'Delivery Address', readonly=True, required=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Delivery address for current sales order."), + 'partner_invoice_id': fields.many2one('res.partner', 'Invoice Address', domain="[('parent_id','=',partner_id)]", readonly=True, required=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Invoice address for current sales order."), + 'partner_shipping_id': fields.many2one('res.partner', 'Delivery Address', domain="[('parent_id','=',partner_id)]", readonly=True, required=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Delivery address for current sales order."), 'order_policy': fields.selection([ ('manual', 'On Demand'), ], 'Create Invoice', required=True, readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, From 21047bc3f68dd0ad7638e785170971dae24745bb Mon Sep 17 00:00:00 2001 From: "Somesh Khare (OpenERP)" Date: Wed, 8 May 2013 11:48:41 +0530 Subject: [PATCH 010/423] [FIX] account_voucher : Wrong payment date when invoice is paid from bank statement (Ref : Case 592393) bzr revid: skh@openerp.com-20130508061841-mmpytzw9rk7v90ly --- addons/account_voucher/account_voucher.py | 6 +++++- .../wizard/account_statement_from_invoice.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 4b4639daeb6..fabd18bdbbe 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -1582,7 +1582,11 @@ class account_bank_statement(osv.osv): bank_st_line_obj = self.pool.get('account.bank.statement.line') st_line = bank_st_line_obj.browse(cr, uid, st_line_id, context=context) if st_line.voucher_id: - voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context) + voucher_obj.write(cr, uid, [st_line.voucher_id.id], + {'number': next_number, + 'date': st_line.date, + 'period_id': st_line.statement_id.period_id.id}, + context=context) if st_line.voucher_id.state == 'cancel': voucher_obj.action_cancel_draft(cr, uid, [st_line.voucher_id.id], context=context) wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr) diff --git a/addons/account_voucher/wizard/account_statement_from_invoice.py b/addons/account_voucher/wizard/account_statement_from_invoice.py index fce251df175..92d2ebf9173 100644 --- a/addons/account_voucher/wizard/account_statement_from_invoice.py +++ b/addons/account_voucher/wizard/account_statement_from_invoice.py @@ -119,7 +119,7 @@ class account_statement_from_invoice_lines(osv.osv_memory): 'statement_id': statement_id, 'ref': line.ref, 'voucher_id': voucher_id, - 'date': time.strftime('%Y-%m-%d'), + 'date': statement.date, }, context=context) return {'type': 'ir.actions.act_window_close'} From da6e1fcc6b6bea2a7e6c58d55a31c12e8135c575 Mon Sep 17 00:00:00 2001 From: Niels Huylebroeck Date: Wed, 8 May 2013 18:09:10 +0200 Subject: [PATCH 011/423] [FIX] account_voucher: when importing invoices the payment date should be set to the statement date instead of being set to the original invoice date lp bug: https://launchpad.net/bugs/1127198 fixed bzr revid: nh@agaplan.eu-20130508160910-xk1pljvn1aco8417 --- .../account_voucher/wizard/account_statement_from_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_voucher/wizard/account_statement_from_invoice.py b/addons/account_voucher/wizard/account_statement_from_invoice.py index fce251df175..289a110fdbd 100644 --- a/addons/account_voucher/wizard/account_statement_from_invoice.py +++ b/addons/account_voucher/wizard/account_statement_from_invoice.py @@ -94,7 +94,7 @@ class account_statement_from_invoice_lines(osv.osv_memory): 'account_id': result['value'].get('account_id', statement.journal_id.default_credit_account_id.id), 'company_id': statement.company_id.id, 'currency_id': statement.currency.id, - 'date': line.date, + 'date': statement.date, 'amount': sign*amount, 'payment_rate': result['value']['payment_rate'], 'payment_rate_currency_id': result['value']['payment_rate_currency_id'], @@ -119,7 +119,7 @@ class account_statement_from_invoice_lines(osv.osv_memory): 'statement_id': statement_id, 'ref': line.ref, 'voucher_id': voucher_id, - 'date': time.strftime('%Y-%m-%d'), + 'date': statement.date, }, context=context) return {'type': 'ir.actions.act_window_close'} From c642f391f3873816507c497a64312495f7e779da Mon Sep 17 00:00:00 2001 From: chirag patel Date: Thu, 9 May 2013 16:28:50 +0530 Subject: [PATCH 012/423] [FIX] Fixed project compute phases gives error, expected an indented block bzr revid: cpa@tinyerp.com-20130509105850-srm674sss61nc9y1 --- addons/project_long_term/wizard/project_compute_phases.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/project_long_term/wizard/project_compute_phases.py b/addons/project_long_term/wizard/project_compute_phases.py index c9aa7eb3573..7e7c83a603e 100644 --- a/addons/project_long_term/wizard/project_compute_phases.py +++ b/addons/project_long_term/wizard/project_compute_phases.py @@ -52,7 +52,8 @@ class project_compute_phases(osv.osv_memory): else: project_ids = project_pool.search(cr, uid, [('user_id','=',uid)], context=context) - project_pool.schedule_phases(cr, uid, project_ids, context=context) + if project_ids: + project_pool.schedule_phases(cr, uid, project_ids, context=context) return self._open_phases_list(cr, uid, data, context=context) def _open_phases_list(self, cr, uid, data, context=None): From 66cadcdb18c9ce0f48a05cf7d13cb98ed2f171e5 Mon Sep 17 00:00:00 2001 From: Anael Closson Date: Fri, 10 May 2013 17:19:34 +0200 Subject: [PATCH 013/423] [FIX] OPW 591344 : internal reports don't show images Cleaner method, and shows images. bzr revid: acl@openerp.com-20130510151934-e2kvwiexdzp3zc12 --- openerp/report/render/rml2pdf/trml2pdf.py | 54 +++++++---------------- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/openerp/report/render/rml2pdf/trml2pdf.py b/openerp/report/render/rml2pdf/trml2pdf.py index e8d6375c98e..153eff14b65 100644 --- a/openerp/report/render/rml2pdf/trml2pdf.py +++ b/openerp/report/render/rml2pdf/trml2pdf.py @@ -82,53 +82,33 @@ def _open_image(filename, path=None): pass raise IOError("File %s cannot be found in image path" % filename) + class NumberedCanvas(canvas.Canvas): def __init__(self, *args, **kwargs): canvas.Canvas.__init__(self, *args, **kwargs) - self._codes = [] - self._flag=False - self._pageCount=0 - self._currentPage =0 - self._pageCounter=0 - self.pages={} + self._saved_page_states = [] def showPage(self): - self._currentPage +=1 - if not self._flag: - self._pageCount += 1 - else: - self.pages.update({self._currentPage:self._pageCount}) - self._codes.append({'code': self._code, 'stack': self._codeStack}) + self._saved_page_states.append(dict(self.__dict__)) self._startPage() - self._flag=False - - def pageCount(self): - if self.pages.get(self._pageCounter,False): - self._pageNumber=0 - self._pageCounter +=1 - key=self._pageCounter - if not self.pages.get(key,False): - while not self.pages.get(key,False): - key += 1 - self.setFont("Helvetica", 8) - self.drawRightString((self._pagesize[0]-30), (self._pagesize[1]-40), - " %(this)i / %(total)i" % { - 'this': self._pageNumber+1, - 'total': self.pages.get(key,False), - } - ) def save(self): """add page info to each page (page x of y)""" - # reset page counter - self._pageNumber = 0 - for code in self._codes: - self._code = code['code'] - self._codeStack = code['stack'] - self.pageCount() + num_pages = len(self._saved_page_states) + for state in self._saved_page_states: + self.__dict__.update(state) + self.draw_page_number(num_pages) canvas.Canvas.showPage(self) -# self.restoreState() - self._doc.SaveToFile(self._filename, self) + canvas.Canvas.save(self) + + def draw_page_number(self, page_count): + self.drawRightString((self._pagesize[0]-30), (self._pagesize[1]-40), + " %(this)i / %(total)i" % { + 'this': self._pageNumber, + 'total': page_count, + } + ) + class PageCount(platypus.Flowable): def __init__(self, story_count=0): From c01e2fe122ed1d3d4447b046b8c75a8f30d3567d Mon Sep 17 00:00:00 2001 From: Date: Mon, 20 May 2013 14:31:11 +0530 Subject: [PATCH 014/423] [FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value bzr revid: ado@tinyerp.com-20130520090111-h20jboltev763mj6 --- openerp/osv/fields.py | 78 ++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 41 deletions(-) diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 34968a662fb..64275fafca8 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -1380,50 +1380,46 @@ class property(function): return res def _get_by_id(self, obj, cr, uid, prop_name, ids, context=None): - prop = obj.pool.get('ir.property') - vids = [obj._name + ',' + str(oid) for oid in ids] - - domain = [('fields_id.model', '=', obj._name), ('fields_id.name', 'in', prop_name)] - #domain = prop._get_domain(cr, uid, prop_name, obj._name, context) - if vids: - domain = [('res_id', 'in', vids)] + domain - return prop.search(cr, uid, domain, context=context) + property_pool = obj.pool.get('ir.property') + company_pool = obj.pool.get('res.company') + reference = [obj._name + ',' + str(oid) for oid in ids] + def_id = self._field_get(cr, uid, obj._name, prop_name) + company_id = company_pool._company_default_get(cr, uid, obj._name, def_id, context=context) + #match the prop value on current user company to match + #property get and write based on current user company, + domain = [('fields_id.model', '=', obj._name), + ('fields_id.name', '=', prop_name), + ('company_id', '=', company_id)] + #add reference for more accurate property result, if any. + if reference: + domain.extend([('res_id', 'in', reference)]) + return property_pool.search(cr, uid, domain, context=context) + + def _create_property(self, obj, cr, uid, id, prop_name, id_val, old_ids, context): + company_pool = obj.pool.get('res.company') + property_pool = obj.pool.get('ir.property') + if old_ids: + property_pool.unlink(cr, uid, old_ids, context) + def_id = self._field_get(cr, uid, obj._name, prop_name) + company_id = company_pool._company_default_get(cr, uid, obj._name, def_id, context=context) + property_field = obj.pool.get('ir.model.fields').browse(cr, uid, def_id, context=context) + return property_pool.create(cr, uid, { + 'name': property_field.name, + 'value': id_val, + 'res_id': obj._name+','+str(id), + 'company_id': company_id, + 'fields_id': def_id, + 'type': self._type, + }, context=context) # TODO: to rewrite more clean def _fnct_write(self, obj, cr, uid, id, prop_name, id_val, obj_dest, context=None): - if context is None: - context = {} - - nids = self._get_by_id(obj, cr, uid, [prop_name], [id], context) - if nids: - cr.execute('DELETE FROM ir_property WHERE id IN %s', (tuple(nids),)) - - default_val = self._get_default(obj, cr, uid, prop_name, context) - - property_create = False - if isinstance(default_val, openerp.osv.orm.browse_record): - if default_val.id != id_val: - property_create = True - elif default_val != id_val: - property_create = True - - if property_create: - def_id = self._field_get(cr, uid, obj._name, prop_name) - company = obj.pool.get('res.company') - cid = company._company_default_get(cr, uid, obj._name, def_id, - context=context) - propdef = obj.pool.get('ir.model.fields').browse(cr, uid, def_id, - context=context) - prop = obj.pool.get('ir.property') - return prop.create(cr, uid, { - 'name': propdef.name, - 'value': id_val, - 'res_id': obj._name+','+str(id), - 'company_id': cid, - 'fields_id': def_id, - 'type': self._type, - }, context=context) - return False + #check the result of ir.property.get() for existing prop field value + default_val = self._get_defaults(obj, cr, uid, [prop_name], context=None)[prop_name] + #if values found same skip the unlinking the creation and creation of new records + if (isinstance(default_val, openerp.osv.orm.browse_record) and default_val.id != id_val) or (default_val != id_val): + old_ids = self._get_by_id(obj, cr, uid, prop_name, [id], context) + return self._create_property(obj, cr, uid, id, prop_name, id_val, old_ids, context) def _fnct_read(self, obj, cr, uid, ids, prop_names, obj_dest, context=None): prop = obj.pool.get('ir.property') From 266cdb3c7ec30d68b797729ecff7854297b58a28 Mon Sep 17 00:00:00 2001 From: Amit Dodiya Date: Fri, 31 May 2013 15:16:43 +0530 Subject: [PATCH 015/423] [IMP]: trml2pdf: change the fontface of pagecount text same as companies header footer text fontface bzr revid: ado@tinyerp.com-20130531094643-oyn5nx9dv0bv0ohx --- openerp/report/render/rml2pdf/trml2pdf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openerp/report/render/rml2pdf/trml2pdf.py b/openerp/report/render/rml2pdf/trml2pdf.py index 243cc02a0b3..66ba28a07c9 100644 --- a/openerp/report/render/rml2pdf/trml2pdf.py +++ b/openerp/report/render/rml2pdf/trml2pdf.py @@ -110,7 +110,7 @@ class NumberedCanvas(canvas.Canvas): if not self.pages.get(key,False): while not self.pages.get(key,False): key += 1 - self.setFont("Helvetica", 8) + self.setFont("DejaVu Sans", 8) self.drawRightString((self._pagesize[0]-30), (self._pagesize[1]-40), " %(this)i / %(total)i" % { 'this': self._pageNumber+1, @@ -137,7 +137,7 @@ class PageCount(platypus.Flowable): def draw(self): self.canv.beginForm("pageCount%d" % self.story_count) - self.canv.setFont("Helvetica", utils.unit_get(str(8))) + self.canv.setFont("DejaVu Sans", utils.unit_get(str(8))) self.canv.drawString(0, 0, str(self.canv.getPageNumber())) self.canv.endForm() From f0151cd6e4c918dab3edfe5856371bae36d79b4e Mon Sep 17 00:00:00 2001 From: Mohammed Shekha Date: Wed, 5 Jun 2013 15:23:42 +0530 Subject: [PATCH 016/423] [FIX]Fixed the issue of search on tranlsated field, search on tranlsated field fails due to expression parsing which fetches ids from ir_translation as well as working table and UNION of this makes search fruitless, also search fails for in language other then english when you enter part of a string for the field to search. bzr revid: msh@openerp.com-20130605095342-314zfmttymx1k86a --- openerp/osv/expression.py | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/openerp/osv/expression.py b/openerp/osv/expression.py index 58f35149ddd..b2184f73753 100644 --- a/openerp/osv/expression.py +++ b/openerp/osv/expression.py @@ -1020,37 +1020,32 @@ class expression(object): elif field.translate: need_wildcard = operator in ('like', 'ilike', 'not like', 'not ilike') sql_operator = {'=like': 'like', '=ilike': 'ilike'}.get(operator, operator) + instr = ' %s' if need_wildcard: right = '%%%s%%' % right - subselect = '( SELECT res_id' \ - ' FROM ir_translation' \ - ' WHERE name = %s' \ - ' AND lang = %s' \ - ' AND type = %s' - instr = ' %s' + select = 'WITH temp_'+working_model._table+' (id, name) as (' \ + 'SELECT wt.id, coalesce(it.value,wt.name) ' \ + 'FROM '+working_model._table+' wt ' \ + 'LEFT JOIN ir_translation it ON (it.name = %s and ' \ + 'it.lang = %s and ' \ + 'it.type = %s and ' \ + 'it.res_id = wt.id and ' \ + "it.value != '')" \ + ') ' #Covering in,not in operators with operands (%s,%s) ,etc. if sql_operator in ['in', 'not in']: instr = ','.join(['%s'] * len(right)) - subselect += ' AND value ' + sql_operator + ' ' + " (" + instr + ")" \ - ') UNION (' \ - ' SELECT id' \ - ' FROM "' + working_model._table + '"' \ - ' WHERE "' + left + '" ' + sql_operator + ' ' + " (" + instr + "))" + select += 'SELECT id FROM temp_'+working_model._table+' WHERE "name" '+sql_operator+' ('+instr+') order by name' else: - subselect += ' AND value ' + sql_operator + instr + \ - ') UNION (' \ - ' SELECT id' \ - ' FROM "' + working_model._table + '"' \ - ' WHERE "' + left + '" ' + sql_operator + instr + ")" + select += 'SELECT id FROM temp_'+working_model._table+' WHERE "name" '+sql_operator+' '+instr+' order by name' params = [working_model._name + ',' + left, context.get('lang', False) or 'en_US', 'model', right, - right, ] - push(create_substitution_leaf(leaf, ('id', 'inselect', (subselect, params)), working_model)) + push(create_substitution_leaf(leaf, ('id', 'inselect', (select, params)), working_model)) else: push_result(leaf) From 799590426f5edec59717562539150c3e2b2ab305 Mon Sep 17 00:00:00 2001 From: Lionel Sausin Date: Tue, 11 Jun 2013 14:43:38 +0200 Subject: [PATCH 017/423] [FIX] propagate context through stock.move.action_cancel() bzr revid: ls@numerigraphe.fr-20130611124338-644rre13nhmnesvv --- addons/stock/stock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index b632101208f..92b378fe315 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1962,15 +1962,15 @@ class stock_move(osv.osv): if move.picking_id: pickings[move.picking_id.id] = True if move.move_dest_id and move.move_dest_id.state == 'waiting': - self.write(cr, uid, [move.move_dest_id.id], {'state': 'assigned'}) + self.write(cr, uid, [move.move_dest_id.id], {'state': 'assigned'}, context=context) if context.get('call_unlink',False) and move.move_dest_id.picking_id: wf_service = netsvc.LocalService("workflow") wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr) - self.write(cr, uid, ids, {'state': 'cancel', 'move_dest_id': False}) + self.write(cr, uid, ids, {'state': 'cancel', 'move_dest_id': False}, context=context) if not context.get('call_unlink',False): for pick in self.pool.get('stock.picking').browse(cr, uid, pickings.keys()): if all(move.state == 'cancel' for move in pick.move_lines): - self.pool.get('stock.picking').write(cr, uid, [pick.id], {'state': 'cancel'}) + self.pool.get('stock.picking').write(cr, uid, [pick.id], {'state': 'cancel'}, context=context) wf_service = netsvc.LocalService("workflow") for id in ids: From 7a9ca47e214d662360e8e5f3a00bb21a10e375d2 Mon Sep 17 00:00:00 2001 From: Mohammed Shekha Date: Tue, 18 Jun 2013 17:31:54 +0530 Subject: [PATCH 018/423] [FIX]Fixed the issue of save selected fields list in export. bzr revid: msh@openerp.com-20130618120154-o0cj17snpn00mh38 --- addons/web/static/src/js/data_export.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/web/static/src/js/data_export.js b/addons/web/static/src/js/data_export.js index fb5e391effd..31a750e787e 100644 --- a/addons/web/static/src/js/data_export.js +++ b/addons/web/static/src/js/data_export.js @@ -101,6 +101,7 @@ instance.web.DataExport = instance.web.Dialog.extend({ if (select_exp.val()) { self.exports.unlink([parseInt(select_exp.val(), 10)]); select_exp.remove(); + self.$el.find("#fields_list option").remove(); if (self.$el.find('#saved_export_list option').length <= 1) { self.$el.find('#ExistsExportList').hide(); } @@ -148,18 +149,17 @@ instance.web.DataExport = instance.web.Dialog.extend({ export_fields: _(fields).map(function (field) { return [0, 0, {name: field}]; }) - }, function (export_list_id) { - if (!export_list_id.result) { + }).then(function (export_list_id) { + if (!export_list_id) { return; } - self.$el.find("#saved_export_list").append( - new Option(value, export_list_id.result)); - if (self.$el.find("#saved_export_list").is(":hidden")) { + if (!self.$el.find("#saved_export_list").length || self.$el.find("#saved_export_list").is(":hidden")) { self.show_exports_list(); } + self.$el.find("#saved_export_list").append( + new Option(value, export_list_id)); }); this.on_show_save_list(); - this.$el.find("#fields_list option").remove(); }, on_click: function(id, record) { var self = this; From 46e89d6dd1427ac5c7fa144f3b36e6ea1779771d Mon Sep 17 00:00:00 2001 From: Mohammed Shekha Date: Thu, 20 Jun 2013 16:16:06 +0530 Subject: [PATCH 019/423] [FIX]Fixed the issue of recurrent rule, there is no need of passing 'Z' after end_date as end_date converted to UNTIL parameter in rrule, and date given in UNTIL is not converted to any other timezone until you specifically passed timezone difference or timezone name like 20130620T121012+3:30 or 20130620T121012TZOFFSET, currently Z creates issue when recurrent rule is created with end_date, TypeError: can't compare offset-naive and offset-aware datetimes. bzr revid: msh@openerp.com-20130620104606-g3dyr1mafzo8fpgg --- addons/base_calendar/base_calendar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 25bfcac448c..41a142cde68 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1269,7 +1269,7 @@ rule or repeating pattern of time to exclude from the recurring rule."), def get_end_date(data): if data.get('end_date'): - data['end_date_new'] = ''.join((re.compile('\d')).findall(data.get('end_date'))) + 'T235959Z' + data['end_date_new'] = ''.join((re.compile('\d')).findall(data.get('end_date'))) + 'T235959' return (data.get('end_type') == 'count' and (';COUNT=' + str(data.get('count'))) or '') +\ ((data.get('end_date_new') and data.get('end_type') == 'end_date' and (';UNTIL=' + data.get('end_date_new'))) or '') From 126b49075d595e954e7ce18400aaaa243cc7a343 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Wed, 26 Jun 2013 15:58:42 +0200 Subject: [PATCH 020/423] [FIX] Export creates xml id based on wrong table name lp bug: https://launchpad.net/bugs/1194893 fixed bzr revid: stefan@therp.nl-20130626135842-sdbvopuen0s7liv9 --- openerp/osv/orm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 499a21f8555..6aafd05e0bf 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -1106,7 +1106,7 @@ class BaseModel(object): def _get_xml_id(self, cr, uid, r): model_data = self.pool.get('ir.model.data') - data_ids = model_data.search(cr, uid, [('model', '=', r._table_name), ('res_id', '=', r['id'])]) + data_ids = model_data.search(cr, uid, [('model', '=', r._model._table), ('res_id', '=', r['id'])]) if len(data_ids): d = model_data.read(cr, uid, data_ids, ['name', 'module'])[0] if d['module']: @@ -1116,13 +1116,13 @@ class BaseModel(object): else: postfix = 0 while True: - n = self._table+'_'+str(r['id']) + (postfix and ('_'+str(postfix)) or '' ) + n = r._model._table+'_'+str(r['id']) + (postfix and ('_'+str(postfix)) or '' ) if not model_data.search(cr, uid, [('name', '=', n)]): break postfix += 1 model_data.create(cr, SUPERUSER_ID, { 'name': n, - 'model': self._name, + 'model': r._model._name, 'res_id': r['id'], 'module': '__export__', }) From 216f4d5e66452168b542f88adb703561c510f399 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Wed, 26 Jun 2013 16:04:39 +0200 Subject: [PATCH 021/423] [FIX] Do not search for model = table name in previous commit bzr revid: stefan@therp.nl-20130626140439-3emprb4ewc2xlcsy --- openerp/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 6aafd05e0bf..cfd811a80dc 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -1106,7 +1106,7 @@ class BaseModel(object): def _get_xml_id(self, cr, uid, r): model_data = self.pool.get('ir.model.data') - data_ids = model_data.search(cr, uid, [('model', '=', r._model._table), ('res_id', '=', r['id'])]) + data_ids = model_data.search(cr, uid, [('model', '=', r._model._name), ('res_id', '=', r['id'])]) if len(data_ids): d = model_data.read(cr, uid, data_ids, ['name', 'module'])[0] if d['module']: From 62035e967e613c944a6dcff851225811b3ed7b57 Mon Sep 17 00:00:00 2001 From: "Ravi Gohil (OpenERP)" Date: Wed, 3 Jul 2013 16:40:59 +0530 Subject: [PATCH 022/423] [FIX] plugin: Email pushed using Outlook plugin does not have body content. (Maintenance Case: 593592) bzr revid: rgo@tinyerp.com-20130703111059-rphs9m0twt5w1me2 --- addons/plugin/plugin_handler.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index aa389611a57..b1cd4970cf7 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -4,6 +4,7 @@ Created on 18 oct. 2011 @author: openerp ''' +from openerp import tools from openerp.osv import osv from openerp.tools.translate import _ @@ -94,7 +95,7 @@ class plugin_handler(osv.osv_memory): mail_message = self.pool.get('mail.message') model_obj = self.pool.get(model) msg = self.pool.get('mail.thread').message_parse(cr, uid, email) - message_id = msg.get('message-id') + message_id = msg.get('message_id') mail_ids = mail_message.search(cr, uid, [('message_id', '=', message_id), ('res_id', '=', res_id), ('model', '=', model)]) if message_id and mail_ids: mail_record = mail_message.browse(cr, uid, mail_ids)[0] @@ -112,7 +113,8 @@ class plugin_handler(osv.osv_memory): subject=msg.get('subject'), type='comment' if model == 'res.partner' else 'email', parent_id=msg.get('parent_id'), - attachments=msg.get('attachments')) + attachments=msg.get('attachments'), + message_id=message_id) notify = _("Mail successfully pushed") url = self._make_url(cr, uid, res_id, model) return (model, res_id, url, notify) @@ -151,7 +153,7 @@ class plugin_handler(osv.osv_memory): ir_attachment_obj = self.pool.get('ir.attachment') attach_ids = [] msg = self.pool.get('mail.thread').message_parse(cr, uid, headers) - message_id = msg.get('message-id') + message_id = msg.get('message_id') push_mail = self.push_message(cr, uid, model, headers, res_id) res_id = push_mail[1] model = push_mail[0] @@ -165,6 +167,6 @@ class plugin_handler(osv.osv_memory): attach_ids.append(ir_attachment_obj.create(cr, uid, vals)) mail_ids = mail_message.search(cr, uid, [('message_id', '=', message_id), ('res_id', '=', res_id), ('model', '=', model)]) if mail_ids: - mail_message.write(cr, uid, mail_ids[0], {'attachment_ids': [(6, 0, attach_ids)], 'body': body, 'body_html': body_html}) + mail_message.write(cr, uid, mail_ids[0], {'attachment_ids': [(6, 0, attach_ids)], 'body': tools.plaintext2html(body), 'body_html': body_html}) url = self._make_url(cr, uid, res_id, model) return (model, res_id, url, notify) From 014f1ddc2a202a3249ae501ce96d02e3a1603f9d Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 18 Jul 2013 14:35:26 +0200 Subject: [PATCH 023/423] [FIX] account: Chart Installer: new way to get apps server bzr revid: chs@openerp.com-20130718123526-4xqacoe63c9qqufp --- addons/account/installer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/installer.py b/addons/account/installer.py index 9ad20129587..357ec11dec3 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -47,7 +47,7 @@ class account_installer(osv.osv_memory): # try get the list on apps server try: - apps_server = self.pool.get('ir.config_parameter').get_param(cr, uid, 'apps.server', 'https://apps.openerp.com') + apps_server = self.pool.get('ir.module.module').get_apps_server(cr, uid, context=context) up = urlparse.urlparse(apps_server) url = '{0.scheme}://{0.netloc}/apps/charts?serie={1}'.format(up, serie) From 28426f6409a73d1fe234669f38513f9fd31f8665 Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Tue, 6 Aug 2013 15:00:21 +0530 Subject: [PATCH 024/423] [FIX]mrp : in work orders duration is displayed in decimal numbers instead of time bzr revid: pna@tinyerp.com-20130806093021-vcpren454u03qy91 --- addons/mrp/mrp_view.xml | 4 ++-- addons/mrp_operations/mrp_operations_view.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index c73a25d029a..b3ee47cd5bd 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -753,7 +753,7 @@ - + @@ -761,7 +761,7 @@ - + diff --git a/addons/mrp_operations/mrp_operations_view.xml b/addons/mrp_operations/mrp_operations_view.xml index 207c5d975d7..a3379cb1a16 100644 --- a/addons/mrp_operations/mrp_operations_view.xml +++ b/addons/mrp_operations/mrp_operations_view.xml @@ -51,7 +51,7 @@ - + From d5d8558f640b5d0d4313631efefd40f377061097 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Tue, 1 Oct 2013 15:20:55 +0530 Subject: [PATCH 025/423] [IMP] Display account field in purchase reciept when no supplier define bzr revid: fka@tinyerp.com-20131001095055-n9vfq76k9tzzgpwd --- addons/account_voucher/voucher_sales_purchase_view.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml index dc732129803..37a92b5a1fb 100644 --- a/addons/account_voucher/voucher_sales_purchase_view.xml +++ b/addons/account_voucher/voucher_sales_purchase_view.xml @@ -224,7 +224,6 @@

- @@ -285,6 +284,9 @@ + + + From 872b4de22c0087e0df719ad612f073b293545cef Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Thu, 3 Oct 2013 17:24:51 +0530 Subject: [PATCH 026/423] [FIX] issue when we add product which is service with another stockable in SO with invoice on delivery and when after delivery we create invoice service type produc is not there in invoice line bzr revid: tpa@tinyerp.com-20131003115451-bdjaw60s6bat98ra --- addons/sale_stock/stock.py | 14 +++++++++++++- addons/sale_stock/test/picking_order_policy.yml | 12 +++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/addons/sale_stock/stock.py b/addons/sale_stock/stock.py index b69a8a27ef6..bd08ce7d707 100644 --- a/addons/sale_stock/stock.py +++ b/addons/sale_stock/stock.py @@ -114,10 +114,22 @@ class stock_picking(osv.osv): def _invoice_hook(self, cursor, user, picking, invoice_id): sale_obj = self.pool.get('sale.order') + order_line_obj = self.pool.get('sale.order.line') + invoice_obj = self.pool.get('account.invoice') + invoice_line_obj = self.pool.get('account.invoice.line') if picking.sale_id: sale_obj.write(cursor, user, [picking.sale_id.id], { 'invoice_ids': [(4, invoice_id)], - }) + }) + for sale_line in picking.sale_id.order_line: + if sale_line.product_id.type == 'service' and not sale_line.invoiced: + vals = order_line_obj._prepare_order_line_invoice_line(cursor, user, sale_line, False) + vals['invoice_id'] = invoice_id + invoice_line_id = invoice_line_obj.create(cursor, user, vals) + order_line_obj.write(cursor, user, [sale_line.id], { + 'invoice_lines': [(6, 0, [invoice_line_id])], + }) + invoice_obj.button_compute(cursor, user, [invoice_id]) return super(stock_picking, self)._invoice_hook(cursor, user, picking, invoice_id) # Redefinition of the new field in order to update the model stock.picking.out in the orm diff --git a/addons/sale_stock/test/picking_order_policy.yml b/addons/sale_stock/test/picking_order_policy.yml index 09a8b73ffee..18f66d11e29 100644 --- a/addons/sale_stock/test/picking_order_policy.yml +++ b/addons/sale_stock/test/picking_order_policy.yml @@ -1,5 +1,15 @@ - In order to test process of the Sale Order, +- + Add SO line with service type product in SO to check flow which contain service type product in SO(BUG#1167330). +- + !record {model: sale.order.line, id: sale_order_1}: + name: 'On Site Assistance' + product_id: product.product_product_2 + product_uom_qty: 1.0 + product_uom: 1 + price_unit: 150.0 + order_id: sale.sale_order_6 - First I check the total amount of the Quotation before Approved. - @@ -62,7 +72,7 @@ assert picking.partner_id.id == sale_order.partner_shipping_id.id,"Shipping Address is not correspond with sale order." assert picking.note == sale_order.note,"Note is not correspond with sale order." assert picking.invoice_state == (sale_order.order_policy=='picking' and '2binvoiced') or 'none',"Invoice policy is not correspond with sale order." - assert len(picking.move_lines) == len(sale_order.order_line), "Total move of delivery order are not corresposning with total sale order lines." + assert len(picking.move_lines) == len(sale_order.order_line) - 1, "Total move of delivery order are not corresposning with total sale order lines." location_id = sale_order.shop_id.warehouse_id.lot_stock_id.id output_id = sale_order.shop_id.warehouse_id.lot_output_id.id for move in picking.move_lines: From 1db5d4ccd66e1909d1ba79accf5fcd6d01d8a5e4 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Fri, 4 Oct 2013 18:37:19 +0530 Subject: [PATCH 027/423] [IMP] remove call of button_compute method. bzr revid: tpa@tinyerp.com-20131004130719-qnnhhv0j3j6gj5yz --- addons/sale_stock/stock.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/sale_stock/stock.py b/addons/sale_stock/stock.py index bd08ce7d707..2ec0a7c60fb 100644 --- a/addons/sale_stock/stock.py +++ b/addons/sale_stock/stock.py @@ -115,7 +115,6 @@ class stock_picking(osv.osv): def _invoice_hook(self, cursor, user, picking, invoice_id): sale_obj = self.pool.get('sale.order') order_line_obj = self.pool.get('sale.order.line') - invoice_obj = self.pool.get('account.invoice') invoice_line_obj = self.pool.get('account.invoice.line') if picking.sale_id: sale_obj.write(cursor, user, [picking.sale_id.id], { @@ -129,7 +128,6 @@ class stock_picking(osv.osv): order_line_obj.write(cursor, user, [sale_line.id], { 'invoice_lines': [(6, 0, [invoice_line_id])], }) - invoice_obj.button_compute(cursor, user, [invoice_id]) return super(stock_picking, self)._invoice_hook(cursor, user, picking, invoice_id) # Redefinition of the new field in order to update the model stock.picking.out in the orm From f21a86f584f263875ee30d2dfe6969992ec74052 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Wed, 9 Oct 2013 11:39:49 +0530 Subject: [PATCH 028/423] [IMP] revert the code of revision no 9440. bzr revid: tpa@tinyerp.com-20131009060949-odzzqredsdyhlo2y --- addons/sale_stock/stock.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/sale_stock/stock.py b/addons/sale_stock/stock.py index 2ec0a7c60fb..bd08ce7d707 100644 --- a/addons/sale_stock/stock.py +++ b/addons/sale_stock/stock.py @@ -115,6 +115,7 @@ class stock_picking(osv.osv): def _invoice_hook(self, cursor, user, picking, invoice_id): sale_obj = self.pool.get('sale.order') order_line_obj = self.pool.get('sale.order.line') + invoice_obj = self.pool.get('account.invoice') invoice_line_obj = self.pool.get('account.invoice.line') if picking.sale_id: sale_obj.write(cursor, user, [picking.sale_id.id], { @@ -128,6 +129,7 @@ class stock_picking(osv.osv): order_line_obj.write(cursor, user, [sale_line.id], { 'invoice_lines': [(6, 0, [invoice_line_id])], }) + invoice_obj.button_compute(cursor, user, [invoice_id]) return super(stock_picking, self)._invoice_hook(cursor, user, picking, invoice_id) # Redefinition of the new field in order to update the model stock.picking.out in the orm From 20a57cc0734e2c56e56b5168624f294e1d912076 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Wed, 9 Oct 2013 16:31:08 +0530 Subject: [PATCH 029/423] [FIX] the tracebck when create recurrent event from Sales > Configuration > Calendar > Events menu. bzr revid: fka@tinyerp.com-20131009110108-7htob9yoj5hlao75 --- addons/base_calendar/base_calendar_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index 92ffad4be9a..74c60194aba 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -162,7 +162,7 @@ + attrs="{'required': [('recurrency','==',True)]}"/> From 88cff57e9576bff0c064611f713168e3a1d6f4a1 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Thu, 10 Oct 2013 12:07:40 +0530 Subject: [PATCH 030/423] [IMP] assign 'rel_date' variable in _set_recurrency_end_date() bzr revid: fka@tinyerp.com-20131010063740-vngt52ivsu3fc3sh --- addons/base_calendar/base_calendar.py | 5 ++++- addons/base_calendar/base_calendar_view.xml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 5db1662b70c..4433495f791 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1588,6 +1588,7 @@ rule or repeating pattern of time to exclude from the recurring rule."), def _set_recurrency_end_date(self, data, context=None): end_date = data.get('end_date') + rel_date = False if data.get('recurrency') and data.get('end_type') in ('count', unicode('count')): data_date_deadline = datetime.strptime(data.get('date_deadline'), '%Y-%m-%d %H:%M:%S') if data.get('rrule_type') in ('daily', unicode('count')): @@ -1598,7 +1599,9 @@ rule or repeating pattern of time to exclude from the recurring rule."), rel_date = relativedelta(months=data.get('count')+1) elif data.get('rrule_type') in ('yearly', unicode('yearly')): rel_date = relativedelta(years=data.get('count')+1) - end_date = data_date_deadline + rel_date + end_date = data_date_deadline + if rel_date: + end_date += rel_date return end_date def create(self, cr, uid, vals, context=None): diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index 74c60194aba..98bf9edb09c 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -162,7 +162,7 @@ + attrs="{'readonly': [('recurrency','=',True)]}"/> From e578e2af784cb3af11ceae7d07cc07c7036a85e9 Mon Sep 17 00:00:00 2001 From: "Mohammed Shekha (OpenERP)" Date: Thu, 17 Oct 2013 18:32:17 +0530 Subject: [PATCH 031/423] [FIX]Fix the issue of page navigation when all records of current page are deleted, currently it does not go to previous page instead displays blank list, expected behavior: it should navigated to previous page when all records of the current page deleted. bzr revid: msh@openerp.com-20131017130217-dtpukpq27fdmsvd9 --- addons/web/static/src/js/view_list.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 74c2fc47aee..dd8b62ae619 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -593,7 +593,13 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi _(ids).each(function (id) { self.records.remove(self.records.get(id)); }); - self.configure_pager(self.dataset); + if (self.records.length == 0 && self.page > 0) { + //Trigger previous manually to navigate to previous page, + //If all records are deleted on current page. + self.$pager.find('ul li:first a').trigger('click'); + } else { + self.configure_pager(self.dataset); + } self.compute_aggregates(); }); }, From 62ea0bb3831cd5b5c60b69d4ee8d93e3bd679415 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Thu, 24 Oct 2013 23:47:35 +0200 Subject: [PATCH 032/423] [FIX] Update test for external id bzr revid: stefan@therp.nl-20131024214735-emciqtcm6vrs9xda --- openerp/tests/addons/test_impex/tests/test_export.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openerp/tests/addons/test_impex/tests/test_export.py b/openerp/tests/addons/test_impex/tests/test_export.py index 26219b36d3b..995d69471d6 100644 --- a/openerp/tests/addons/test_impex/tests/test_export.py +++ b/openerp/tests/addons/test_impex/tests/test_export.py @@ -309,8 +309,9 @@ class test_m2o(CreatorCase): def test_external_id(self): integer_id = self.registry('export.integer').create( self.cr, openerp.SUPERUSER_ID, {'value': 42}) - # __export__.$class.$id - external_id = u'__export__.export_many2one_%d' % integer_id + # Expecting the m2o target model name in the external id, + # not this model's name + external_id = u'__export__.export_integer_%d' % integer_id self.assertEqual( self.export(integer_id, fields=['value/id']), [[external_id]]) From 65caa33162d85c154ade2bcde29a3756221d5ae5 Mon Sep 17 00:00:00 2001 From: "Amit Dodiya (OpenERP)" Date: Mon, 28 Oct 2013 18:18:22 +0530 Subject: [PATCH 033/423] [FIX] account: while refuding the invoice with payment term journal items are created wrongly with write-off account bzr revid: ado@tinyerp.com-20131028124822-we80argd26aozxg7 --- addons/account/wizard/account_invoice_refund.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py index 37ab5f18af8..eec37490963 100644 --- a/addons/account/wizard/account_invoice_refund.py +++ b/addons/account/wizard/account_invoice_refund.py @@ -156,9 +156,11 @@ class account_invoice_refund(osv.osv_memory): if mode in ('cancel', 'modify'): movelines = inv.move_id.line_id to_reconcile_ids = {} + move_line_ids = [] for line in movelines: if line.account_id.id == inv.account_id.id: - to_reconcile_ids[line.account_id.id] = [line.id] + move_line_ids.append(line.id) + to_reconcile_ids[line.account_id.id] = move_line_ids if line.reconcile_id: line.reconcile_id.unlink() wf_service.trg_validate(uid, 'account.invoice', \ From 226ed9abeaf71ebf9647f8365d08ad1ff63ab231 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Fri, 1 Nov 2013 17:18:20 +0100 Subject: [PATCH 034/423] [FIX] propage the context to not lose special keys/values on write() and explicit the source language to write to (en_US) lp bug: https://launchpad.net/bugs/1247158 fixed bzr revid: guewen.baconnier@camptocamp.com-20131101161820-rwzh8zx2nqpb7r2q --- openerp/osv/orm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 3ec2f69ec3e..5332d1847ca 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -4168,7 +4168,9 @@ class BaseModel(object): if not src_trans: src_trans = vals[f] # Inserting value to DB - self.write(cr, user, ids, {f: vals[f]}) + ctx = context.copy() + ctx['lang'] = 'en_US' + self.write(cr, user, ids, {f: vals[f]}, context=ctx) self.pool.get('ir.translation')._set_ids(cr, user, self._name+','+f, 'model', context['lang'], ids, vals[f], src_trans) From 0dcc62426c3689191798fbe33717eea5d4659a96 Mon Sep 17 00:00:00 2001 From: Yanina Aular Date: Fri, 15 Nov 2013 17:57:17 -0430 Subject: [PATCH 035/423] [FIX] function field with wrong type int instead of integer bzr revid: yanina.aular@vauxoo.com-20131115222717-12bplq7rnv3rorbm --- addons/project/project.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/project/project.py b/addons/project/project.py index 5bd2e604368..c7b394ad376 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -288,7 +288,8 @@ class project(osv.osv): help="The kind of document created when an email is received on this project's email alias"), 'privacy_visibility': fields.selection(_visibility_selection, 'Privacy / Visibility', required=True), 'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'), ('cancelled', 'Cancelled'),('pending','Pending'),('close','Closed')], 'Status', required=True,), - 'doc_count':fields.function(_get_attached_docs, string="Number of documents attached", type='int') + 'doc_count':fields.function(_get_attached_docs, string="Number of documents attached", + type='integer') } def _get_type_common(self, cr, uid, context): From 6fb32cc4d5c3e68d927c275da723ede4d3c10a2a Mon Sep 17 00:00:00 2001 From: Matthieu Dietrich Date: Tue, 3 Dec 2013 15:48:43 +0100 Subject: [PATCH 036/423] [FIX] lp:1257288 - fixed amount in foreign currency for opening entries bzr revid: matthieu.dietrich@camptocamp.com-20131203144843-kbtd3atkryq8ryec --- addons/account/wizard/account_fiscalyear_close.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/addons/account/wizard/account_fiscalyear_close.py b/addons/account/wizard/account_fiscalyear_close.py index c2acfb75f22..28ddf39cd7f 100644 --- a/addons/account/wizard/account_fiscalyear_close.py +++ b/addons/account/wizard/account_fiscalyear_close.py @@ -224,14 +224,6 @@ class account_fiscalyear_close(osv.osv_memory): query_2nd_part = "" query_2nd_part_args = [] for account in obj_acc_account.browse(cr, uid, account_ids, context={'fiscalyear': fy_id}): - balance_in_currency = 0.0 - if account.currency_id: - cr.execute('SELECT sum(COALESCE(amount_currency,0.0)) as balance_in_currency FROM account_move_line ' \ - 'WHERE account_id = %s ' \ - 'AND ' + query_line + ' ' \ - 'AND currency_id = %s', (account.id, account.currency_id.id)) - balance_in_currency = cr.dictfetchone()['balance_in_currency'] - company_currency_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.currency_id if not currency_obj.is_zero(cr, uid, company_currency_id, abs(account.balance)): if query_2nd_part: @@ -246,7 +238,7 @@ class account_fiscalyear_close(osv.osv_memory): period.id, account.id, account.currency_id and account.currency_id.id or None, - balance_in_currency, + account.foreign_balance if account.currency_id else 0.0, account.company_id.id, 'draft') if query_2nd_part: From 02224a3f112426c9e15a8af7cde2e7a5406d1885 Mon Sep 17 00:00:00 2001 From: "Dharti Ratani (Open ERP)" Date: Thu, 12 Dec 2013 10:55:44 +0530 Subject: [PATCH 037/423] [FIX]Added the refernce of the supplier in price_get method while creating purchase order from purchase requisition, as without supplier the price unit in PO was 0 when the pricelist item was based on Supplier Price in the product form bzr revid: dhr@tinyerp.com-20131212052544-skljxsrxea4o8efm --- addons/purchase_requisition/purchase_requisition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py index c1d80c7bf46..c31f8a69a37 100644 --- a/addons/purchase_requisition/purchase_requisition.py +++ b/addons/purchase_requisition/purchase_requisition.py @@ -109,7 +109,7 @@ class purchase_requisition(osv.osv): seller_delay = product_supplier.delay seller_qty = product_supplier.qty supplier_pricelist = supplier.property_product_pricelist_purchase or False - seller_price = pricelist.price_get(cr, uid, [supplier_pricelist.id], product.id, qty, False, {'uom': default_uom_po_id})[supplier_pricelist.id] + seller_price = pricelist.price_get(cr, uid, [supplier_pricelist.id], product.id, qty, supplier.id, {'uom': default_uom_po_id})[supplier_pricelist.id] if seller_qty: qty = max(qty,seller_qty) date_planned = self._planned_date(requisition_line.requisition_id, seller_delay) From c95b53c6bdad719cedffd8aa19cdbc9c99e35235 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Fri, 13 Dec 2013 18:45:50 +0530 Subject: [PATCH 038/423] [IMP] improve domain bzr revid: fka@tinyerp.com-20131213131550-9jqg5zj4hpjgxhrw --- addons/account_voucher/voucher_sales_purchase_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml index ff6774e7d5b..f56cc1296a5 100644 --- a/addons/account_voucher/voucher_sales_purchase_view.xml +++ b/addons/account_voucher/voucher_sales_purchase_view.xml @@ -285,7 +285,7 @@ - + From 9a456ac078ea59ae10fa68ecb65ed1eb2736758f Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 13 Dec 2013 16:52:12 +0100 Subject: [PATCH 039/423] [FIX] ir.module.module: install_from_urls is restricted to administrators and only accept urls from apps server [FIX] ir.module.module: download() method is now a no-op. This method was in fact already a no-op as the "url" field is never set explicitly in the code. lp bug: https://launchpad.net/bugs/1260747 fixed bzr revid: chs@openerp.com-20131213155212-9m1pnbpz97upyz3i --- openerp/addons/base/module/module.py | 49 +++++++---------------- openerp/addons/base/static/src/js/apps.js | 4 +- 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/openerp/addons/base/module/module.py b/openerp/addons/base/module/module.py index 5dcb1693c67..6b2ef46f68d 100644 --- a/openerp/addons/base/module/module.py +++ b/openerp/addons/base/module/module.py @@ -30,6 +30,7 @@ import shutil import tempfile import urllib import urllib2 +import urlparse import zipfile import zipimport @@ -39,6 +40,7 @@ except ImportError: from StringIO import StringIO # NOQA import openerp +import openerp.exceptions from openerp import modules, pooler, tools, addons from openerp.modules.db import create_categories from openerp.tools.parse_version import parse_version @@ -619,40 +621,14 @@ class module(osv.osv): return res def download(self, cr, uid, ids, download=True, context=None): - res = [] - default_version = modules.adapt_version('1.0') - for mod in self.browse(cr, uid, ids, context=context): - if not mod.url: - continue - match = re.search('-([a-zA-Z0-9\._-]+)(\.zip)', mod.url, re.I) - version = default_version - if match: - version = match.group(1) - if parse_version(mod.installed_version) >= parse_version(version): - continue - res.append(mod.url) - if not download: - continue - zip_content = urllib.urlopen(mod.url).read() - fname = modules.get_module_path(str(mod.name) + '.zip', downloaded=True) - try: - with open(fname, 'wb') as fp: - fp.write(zip_content) - except Exception: - _logger.exception('Error when trying to create module ' - 'file %s', fname) - raise orm.except_orm(_('Error'), _('Can not create the module file:\n %s') % (fname,)) - terp = self.get_module_info(mod.name) - self.write(cr, uid, mod.id, self.get_values_from_terp(terp)) - cr.execute('DELETE FROM ir_module_module_dependency WHERE module_id = %s', (mod.id,)) - self._update_dependencies(cr, uid, mod, terp.get('depends', [])) - self._update_category(cr, uid, mod, terp.get('category', 'Uncategorized')) - # Import module - zimp = zipimport.zipimporter(fname) - zimp.load_module(mod.name) - return res + return [] def install_from_urls(self, cr, uid, urls, context=None): + if not self.pool['res.users'].has_group(cr, uid, 'base.group_system'): + raise openerp.exceptions.AccessDenied() + + apps_server = urlparse.urlparse(self.get_apps_server(cr, uid, context=context)) + OPENERP = 'openerp' tmp = tempfile.mkdtemp() _logger.debug('Install from url: %r', urls) @@ -661,6 +637,11 @@ class module(osv.osv): for module_name, url in urls.items(): if not url: continue # nothing to download, local version is already the last one + + up = urlparse.urlparse(url) + if up.scheme != apps_server.scheme or up.netloc != apps_server.netloc: + raise openerp.exceptions.AccessDenied() + try: _logger.info('Downloading module `%s` from OpenERP Apps', module_name) content = urllib2.urlopen(url).read() @@ -725,8 +706,8 @@ class module(osv.osv): finally: shutil.rmtree(tmp) - def install_by_names(self, cr, uid, names, context=None): - raise NotImplementedError('# TODO') + def get_apps_server(self, cr, uid, context=None): + return tools.config.get('apps_server', 'https://apps.openerp.com/apps') def _update_dependencies(self, cr, uid, mod_browse, depends=None): if depends is None: diff --git a/openerp/addons/base/static/src/js/apps.js b/openerp/addons/base/static/src/js/apps.js index eaaca6b13c3..13a9c2637b3 100644 --- a/openerp/addons/base/static/src/js/apps.js +++ b/openerp/addons/base/static/src/js/apps.js @@ -63,8 +63,8 @@ openerp.base = function(instance) { if (instance.base.apps_client) { return check_client_available(instance.base.apps_client); } else { - var ICP = new instance.web.Model('ir.config_parameter'); - return ICP.call('get_param', ['apps.server', 'https://apps.openerp.com/apps']).then(function(u) { + var Mod = new instance.web.Model('ir.module.module'); + return Mod.call('get_apps_server').then(function(u) { var link = $(_.str.sprintf('', u))[0]; var host = _.str.sprintf('%s//%s', link.protocol, link.host); var dbname = link.pathname; From 19a334c1d7db9b9fb6c96d76be8af8236eb3f9aa Mon Sep 17 00:00:00 2001 From: "Chandni Machchhar (OpenERP)" Date: Mon, 16 Dec 2013 12:53:28 +0530 Subject: [PATCH 040/423] [IMP] [membership] : Membership End Date in demo data. bzr revid: cac@openerp.com-20131216072328-q6fobmqf9xqpj5ps --- addons/membership/membership_demo.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/membership/membership_demo.xml b/addons/membership/membership_demo.xml index 49863bb1f4c..063c9c47dc6 100644 --- a/addons/membership/membership_demo.xml +++ b/addons/membership/membership_demo.xml @@ -6,7 +6,7 @@ True - + Golden Membership 180 @@ -16,7 +16,7 @@ True - + Silver Membership 80 @@ -26,7 +26,7 @@ True - + Basic Membership 40 From bc33f2f609a3c530486f4a451a0d90db5add3c1e Mon Sep 17 00:00:00 2001 From: "Chandni Machchhar (OpenERP)" Date: Mon, 16 Dec 2013 13:09:41 +0530 Subject: [PATCH 041/423] [IMP] [membership] : Membership End Date in demo data. bzr revid: cac@openerp.com-20131216073941-klkxlxm5adtk2uo9 --- addons/membership/membership_demo.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/membership/membership_demo.xml b/addons/membership/membership_demo.xml index 063c9c47dc6..8d82f12ffd6 100644 --- a/addons/membership/membership_demo.xml +++ b/addons/membership/membership_demo.xml @@ -26,7 +26,7 @@ True - + Basic Membership 40 From f6349ffb7fd9c075573953be2ac0f0dc20520743 Mon Sep 17 00:00:00 2001 From: Leonardo Pistone Date: Wed, 18 Dec 2013 17:45:26 +0100 Subject: [PATCH 042/423] [merge] [fix] action should return True lp bug: https://launchpad.net/bugs/1262265 fixed bzr revid: leonardo.pistone@camptocamp.com-20131218164526-rgyo6p9hlpk28sxg --- addons/mrp_repair/mrp_repair.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index 9c0ab0e2c18..9335d395714 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -350,7 +350,8 @@ class mrp_repair(osv.osv): return self.write(cr,uid,ids,{'state':'cancel'}) def wkf_invoice_create(self, cr, uid, ids, *args): - return self.action_invoice_create(cr, uid, ids) + self.action_invoice_create(cr, uid, ids) + return True def action_invoice_create(self, cr, uid, ids, group=False, context=None): """ Creates invoice(s) for repair order. From 61962e42b0f471424746561b60f3244537c6f6be Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Thu, 26 Dec 2013 06:25:01 +0000 Subject: [PATCH 043/423] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20131225063515-dusvptjej0lwd8g5 bzr revid: launchpad_translations_on_behalf_of_openerp-20131226062501-h5l10yzkfldlxfra --- addons/account/i18n/ja.po | 36 ++++++++++++++++++++++++++++++++++-- addons/account/i18n/zh_CN.po | 14 +++++++------- 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/addons/account/i18n/ja.po b/addons/account/i18n/ja.po index af0e1b1bc6d..0c6c3d70792 100644 --- a/addons/account/i18n/ja.po +++ b/addons/account/i18n/ja.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2013-06-14 22:29+0000\n" -"PO-Revision-Date: 2013-12-23 17:35+0000\n" +"PO-Revision-Date: 2013-12-25 15:32+0000\n" "Last-Translator: hiro TAKADA \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-12-24 05:52+0000\n" +"X-Launchpad-Export-Date: 2013-12-26 06:24+0000\n" "X-Generator: Launchpad (build 16877)\n" #. module: account @@ -309,6 +309,14 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" クリックして顧客返金を登録してください。\n" +"

\n" +" 返金は請求書を完全または部分的にクレジットする文書です。\n" +"

\n" +" 顧客返金をマニュアルで登録する代わりに、関連する顧客請求書から直接生成することもできます。\n" +"

\n" +" " #. module: account #: help:account.installer,charts:0 @@ -3877,6 +3885,15 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" クリックして顧客請求書を登録してください。\n" +"

\n" +" OpenERPの電子請求は顧客入金の回収を容易にします。\n" +" 顧客は電子メールで請求書を受け取り、顧客のシステムがオンラインで支払うかインポートすることができます。\n" +"

\n" +" 顧客との議論は各請求書の下部に自動で表示されます。\n" +"

\n" +" " #. module: account #: field:account.tax.code,name:0 @@ -5922,6 +5939,15 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" クリックして仕訳記入を登録してください。\n" +"

\n" +" 仕訳記入はそれぞれが貸方か借方の取引からなる、いくつかの仕訳項目で構成されます。\n" +"

\n" +" OpenERPは請求書や返金、仕入先支払い、銀行取引明細書などの会計文書ごとにひとつの仕訳記入を自動で登録します。\n" +" したがって、その他の操作についてはマニュアルで仕訳記入しなければなりません。\n" +"

\n" +" " #. module: account #: selection:account.financial.report,style_overwrite:0 @@ -6475,6 +6501,12 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" クリックして仕入先からの返金を登録してください。\n" +"

\n" +" 仕入先返金をマニュアルで登録する代わりに、関連する仕入先請求書から返金と消し込みを直接生成することもできます。\n" +"

\n" +" " #. module: account #: field:account.tax,type:0 diff --git a/addons/account/i18n/zh_CN.po b/addons/account/i18n/zh_CN.po index 93716052ff7..a883d720d58 100644 --- a/addons/account/i18n/zh_CN.po +++ b/addons/account/i18n/zh_CN.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2013-06-14 22:29+0000\n" -"PO-Revision-Date: 2013-11-13 09:04+0000\n" -"Last-Translator: Young Hua \n" +"PO-Revision-Date: 2013-12-25 15:20+0000\n" +"Last-Translator: Yuchuan99 \n" "Language-Team: Chinese (Simplified) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-11-21 05:55+0000\n" -"X-Generator: Launchpad (build 16831)\n" +"X-Launchpad-Export-Date: 2013-12-26 06:24+0000\n" +"X-Generator: Launchpad (build 16877)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -5046,7 +5046,7 @@ msgstr "已取消的传票" #. module: account #: view:account.invoice:0 msgid "My Invoices" -msgstr "" +msgstr "我的发票" #. module: account #: selection:account.bank.statement,state:0 @@ -5056,12 +5056,12 @@ msgstr "新建" #. module: account #: view:wizard.multi.charts.accounts:0 msgid "Sale Tax" -msgstr "" +msgstr "营业税" #. module: account #: view:account.move:0 msgid "Cancel Entry" -msgstr "" +msgstr "取消" #. module: account #: field:account.tax,ref_tax_code_id:0 From 780e1548c026e4e9a8cabe10ecdde73cca331e38 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Sat, 28 Dec 2013 21:38:01 +0100 Subject: [PATCH 044/423] [CHG] set lang to False instead of en_US (already being the default language), reducing the places where this default value is set bzr revid: guewen.baconnier@camptocamp.com-20131228203801-3z6g1bb0ggfio5x0 --- openerp/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 5332d1847ca..e96db457c4d 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -4169,7 +4169,7 @@ class BaseModel(object): src_trans = vals[f] # Inserting value to DB ctx = context.copy() - ctx['lang'] = 'en_US' + ctx['lang'] = False self.write(cr, user, ids, {f: vals[f]}, context=ctx) self.pool.get('ir.translation')._set_ids(cr, user, self._name+','+f, 'model', context['lang'], ids, vals[f], src_trans) From 99400fe122a84cd348d7f0dc3ea11579ebbba16d Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Tue, 31 Dec 2013 15:17:40 +0530 Subject: [PATCH 045/423] [IMP] remove % sign showing when creating a payment term based on percent bzr revid: fka@tinyerp.com-20131231094740-eoiszcwmtfw45sab --- addons/account/account_view.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 16ba8f4a8dd..4fb219df67b 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1588,7 +1588,6 @@