From 61639fd4913c9554664c39172fbf60e7e3c9d7c0 Mon Sep 17 00:00:00 2001 From: "ajay javiya (OpenERP)" Date: Mon, 3 Dec 2012 18:57:13 +0530 Subject: [PATCH 001/264] [FIX]:Issue of add custome field on object bzr revid: aja@tinyerp.com-20121203132713-298spxst191htlh7 --- 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 3b9b8f30d23..095e6b6f6c0 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -1068,7 +1068,7 @@ class BaseModel(object): # Validate rec_name if self._rec_name is not None: - assert self._rec_name in self._columns.keys() + ['id'], "Invalid rec_name %s for model %s" % (self._rec_name, self._name) + assert self._rec_name in self._all_columns.keys() + ['id'], "Invalid rec_name %s for model %s" % (self._rec_name, self._name) else: self._rec_name = 'name' From 96d50a9a40d77680ffbd1719385e33757c89f725 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Mon, 10 Dec 2012 15:16:02 +0100 Subject: [PATCH 002/264] [FIX] added period_id field to account_voucher dialog lp bug: https://launchpad.net/bugs/1062621 fixed bzr revid: jco@openerp.com-20121210141602-z7sa9lou4vkuczw3 --- addons/account_voucher/voucher_payment_receipt_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index b6f367601ff..0f923bcd1f4 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -305,6 +305,7 @@ widget="selection" on_change="onchange_journal(journal_id, line_cr_ids, False, partner_id, date, amount, type, company_id, context)" string="Payment Method"/> + From 30d7711cfebefd93a857d089413bbd828790fa93 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Tue, 18 Dec 2012 18:06:49 +0100 Subject: [PATCH 003/264] [FIX] lp:1091759 lp bug: https://launchpad.net/bugs/1091759 fixed bzr revid: hbrunn@therp.nl-20121218170649-cbe91ycxmkv05jcm --- addons/web/static/src/js/chrome.js | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 4ad159e3ac5..5bd760486a3 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -461,7 +461,6 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ params: { 'db': form_obj['db_name'], 'login': 'admin', - 'password': form_obj['create_admin_pwd'], 'login_successful': function() { self.do_action("reload"); }, From dc47ad6c737e386d9ad163cb0cb39c6fe0c02724 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Wed, 19 Dec 2012 10:22:35 +0100 Subject: [PATCH 004/264] [FIX] Added onchange_company for gain and loss accounts in config settings lp bug: https://launchpad.net/bugs/1076509 fixed bzr revid: jco@openerp.com-20121219092235-wci6jo81q2ihgpgd --- addons/account_voucher/account_voucher.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 41d3476442e..59399a766d5 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -56,6 +56,13 @@ class account_config_settings(osv.osv_memory): relation='account.account', string="Loss Exchange Rate Account"), } + def onchange_company_id(self, cr, uid, ids, company_id): + res = super(account_config_settings, self).onchange_company_id(cr, uid, ids, company_id) + if company_id: + company = self.pool.get('res.company').browse(cr, uid, company_id) + res['value'].update({'income_currency_exchange_account_id': company.income_currency_exchange_account_id and company.income_currency_exchange_account_id.id, + 'expense_currency_exchange_account_id': company.expense_currency_exchange_account_id and company.expense_currency_exchange_account_id.id}) + return res class account_voucher(osv.osv): def _check_paid(self, cr, uid, ids, name, args, context=None): From a02e894bfcad34945bceaf2a2ef97251555f2d78 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Wed, 19 Dec 2012 12:55:17 +0100 Subject: [PATCH 005/264] [FIX] Correction when no account or no company bzr revid: jco@openerp.com-20121219115517-uj3t8embox155kty --- addons/account_voucher/account_voucher.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 59399a766d5..609a19661c0 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -49,19 +49,24 @@ class account_config_settings(osv.osv_memory): 'company_id', 'income_currency_exchange_account_id', type='many2one', relation='account.account', - string="Gain Exchange Rate Account"), + string="Gain Exchange Rate Account", + domain="[('type', '=', 'other')]"), 'expense_currency_exchange_account_id': fields.related( 'company_id', 'expense_currency_exchange_account_id', type="many2one", relation='account.account', - string="Loss Exchange Rate Account"), + string="Loss Exchange Rate Account", + domain="[('type', '=', 'other')]"), } def onchange_company_id(self, cr, uid, ids, company_id): res = super(account_config_settings, self).onchange_company_id(cr, uid, ids, company_id) if company_id: company = self.pool.get('res.company').browse(cr, uid, company_id) - res['value'].update({'income_currency_exchange_account_id': company.income_currency_exchange_account_id and company.income_currency_exchange_account_id.id, - 'expense_currency_exchange_account_id': company.expense_currency_exchange_account_id and company.expense_currency_exchange_account_id.id}) + res['value'].update({'income_currency_exchange_account_id': company.income_currency_exchange_account_id and company.income_currency_exchange_account_id.id or False, + 'expense_currency_exchange_account_id': company.expense_currency_exchange_account_id and company.expense_currency_exchange_account_id.id or False}) + else: + res['value'].update({'income_currency_exchange_account_id': False, + 'expense_currency_exchange_account_id': False}) return res class account_voucher(osv.osv): From dba6e07ecdf8ed61316bdc1f4c4af36e489a95be Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Fri, 21 Dec 2012 10:41:47 +0100 Subject: [PATCH 006/264] [FIX] Will take into account the type of the invoice for the default account in the invoice line lp bug: https://launchpad.net/bugs/1084819 fixed bzr revid: jco@openerp.com-20121221094147-mp7dhttfob7y2xis --- addons/account/account_invoice.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 02903ea8f33..e836e28d6c6 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1393,8 +1393,13 @@ class account_invoice_line(osv.osv): def _default_account_id(self, cr, uid, context=None): # XXX this gets the default account for the user's company, # it should get the default account for the invoice's company - # however, the invoice's company does not reach this point - prop = self.pool.get('ir.property').get(cr, uid, 'property_account_income_categ', 'product.category', context=context) + # however, the invoice's company does not reach this point (but will throw error on validation) + if context is None: + context = {} + if context.get('type') in ('out_invoice','out_refund'): + prop = self.pool.get('ir.property').get(cr, uid, 'property_account_income_categ', 'product.category', context=context) + else: + prop = self.pool.get('ir.property').get(cr, uid, 'property_account_expense_categ', 'product.category', context=context) return prop and prop.id or False _defaults = { From 0a6f2417e797e7ade9699d4638f2786f581c6e9f Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Fri, 21 Dec 2012 14:49:56 +0100 Subject: [PATCH 007/264] [FIX] Changes the period used into the period chosen and not the period of today lp bug: https://launchpad.net/bugs/1078004 fixed bzr revid: jco@openerp.com-20121221134956-fgg1ltu1qy1j2ion --- addons/account_asset/account_asset.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py index b7330352b12..b335063b758 100644 --- a/addons/account_asset/account_asset.py +++ b/addons/account_asset/account_asset.py @@ -331,6 +331,9 @@ class account_asset_asset(osv.osv): depreciation_obj = self.pool.get('account.asset.depreciation.line') period = period_obj.browse(cr, uid, period_id, context=context) depreciation_ids = depreciation_obj.search(cr, uid, [('asset_id', 'in', ids), ('depreciation_date', '<=', period.date_stop), ('depreciation_date', '>=', period.date_start), ('move_check', '=', False)], context=context) + if context is None: + context = {} + context.update({'depreciation_date':period.date_stop}) return depreciation_obj.create_move(cr, uid, depreciation_ids, context=context) def create(self, cr, uid, vals, context=None): @@ -388,7 +391,7 @@ class account_asset_depreciation_line(osv.osv): created_move_ids = [] asset_ids = [] for line in self.browse(cr, uid, ids, context=context): - depreciation_date = time.strftime('%Y-%m-%d') + depreciation_date = context.get('depreciation_date') or time.strftime('%Y-%m-%d') period_ids = period_obj.find(cr, uid, depreciation_date, context=context) company_currency = line.asset_id.company_id.currency_id.id current_currency = line.asset_id.currency_id.id From 6d69fe663960991fc86faa7dc0bf31005733b6a1 Mon Sep 17 00:00:00 2001 From: "Ravi Gohil (OpenERP)" Date: Tue, 1 Jan 2013 15:28:10 +0530 Subject: [PATCH 008/264] [FIX] report_webkit: Wrong Report template file path throws 'Coercing to Unicode' error : (Maintenance Case : 583490) bzr revid: rgo@tinyerp.com-20130101095810-7cbw337ul443q66g --- addons/report_webkit/webkit_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/report_webkit/webkit_report.py b/addons/report_webkit/webkit_report.py index b6c273f8852..99e1aa31058 100644 --- a/addons/report_webkit/webkit_report.py +++ b/addons/report_webkit/webkit_report.py @@ -220,7 +220,7 @@ class WebKitParser(report_sxw): if report_xml.report_file : path = addons.get_module_resource(*report_xml.report_file.split(os.path.sep)) - if os.path.exists(path) : + if path and os.path.exists(path) : template = file(path).read() if not template and report_xml.report_webkit_data : template = report_xml.report_webkit_data From a475013fd83d8319d7b292a5412d943e9b22dac3 Mon Sep 17 00:00:00 2001 From: "Ravi Gohil (OpenERP)" Date: Mon, 7 Jan 2013 15:58:57 +0530 Subject: [PATCH 009/264] [FIX] account: force account.financial.report balance of *zero* to be displayed positively: (Maintenance Case: 583915) bzr revid: rgo@tinyerp.com-20130107102857-hor2hzsmimjttcus --- addons/account/report/account_financial_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/report/account_financial_report.py b/addons/account/report/account_financial_report.py index 3898158c457..d94955a764a 100644 --- a/addons/account/report/account_financial_report.py +++ b/addons/account/report/account_financial_report.py @@ -56,7 +56,7 @@ class report_account_common(report_sxw.rml_parse, common_report_header): for report in self.pool.get('account.financial.report').browse(self.cr, self.uid, ids2, context=data['form']['used_context']): vals = { 'name': report.name, - 'balance': report.balance * report.sign, + 'balance': report.balance * report.sign or 0.0, 'type': 'report', 'level': bool(report.style_overwrite) and report.style_overwrite or report.level, 'account_type': report.type =='sum' and 'view' or False, #used to underline the financial report balances From a724a10691cfe37bde5809145fcd32b78fbd59d2 Mon Sep 17 00:00:00 2001 From: "Nimesh Contractor (OpenERP)" Date: Tue, 8 Jan 2013 14:50:28 +0530 Subject: [PATCH 010/264] [FIX] traceback of Refund customer invoice having type = modify bzr revid: nco@tinyerp.com-20130108092028-k9vh7600hpfmdqbk --- addons/account/wizard/account_invoice_refund.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py index 54d6c38a353..2d95687ff2d 100644 --- a/addons/account/wizard/account_invoice_refund.py +++ b/addons/account/wizard/account_invoice_refund.py @@ -183,9 +183,9 @@ class account_invoice_refund(osv.osv_memory): 'journal_id', 'period_id'], context=context) invoice = invoice[0] del invoice['id'] - invoice_lines = inv_line_obj.read(cr, uid, invoice['invoice_line'], context=context) + invoice_lines = inv_line_obj.browse(cr, uid, invoice['invoice_line'], context=context) invoice_lines = inv_obj._refund_cleanup_lines(cr, uid, invoice_lines) - tax_lines = inv_tax_obj.read(cr, uid, invoice['tax_line'], context=context) + tax_lines = inv_tax_obj.browse(cr, uid, invoice['tax_line'], context=context) tax_lines = inv_obj._refund_cleanup_lines(cr, uid, tax_lines) invoice.update({ 'type': inv.type, From 984b904f2c2332f5354cc4fef5d7c802c68f2b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Mon, 14 Jan 2013 17:42:16 +0100 Subject: [PATCH 011/264] [FIX] point_of_sale: the pos synchronisation indicator was changing the cursor indicating that an action was possible, but there's nothing to do when it's already synchronized. lp bug: https://launchpad.net/bugs/1099402 fixed bzr revid: fva@openerp.com-20130114164216-53yix6tmlix316zl --- addons/point_of_sale/static/src/css/pos.css | 4 +++- addons/point_of_sale/static/src/xml/pos.xml | 16 +++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index 2c086032ec3..f79a1594178 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -233,7 +233,9 @@ font-style: italic; cursor:pointer; } - +.point-of-sale .oe_pos_synch-notification.oe_inactive{ + cursor: default; +} .point-of-sale .oe_pos_synch-notification .oe_status_red{ display:inline-block; cursor:pointer; diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index 41a061e78b4..f88b4bb6c27 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -48,11 +48,17 @@ -
- -
-
-
+ +
+ +
+
+
+ +
+
+
+
From 515e6f5cf01714086e8f1996baa704a438d256ac Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Tue, 15 Jan 2013 15:51:41 +0530 Subject: [PATCH 012/264] [FIX] hit box of menu items is large and can sometimes overflow the page content on its right.--fixes:lp1098574 bzr revid: bth@tinyerp.com-20130115102141-wnu6rd323laxwhco --- addons/web/static/src/css/base.css | 2 -- addons/web/static/src/css/base.sass | 2 -- 2 files changed, 4 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 638f446c5ba..6cfee50d6a4 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1242,8 +1242,6 @@ .openerp .oe_secondary_submenu { padding: 2px 0 8px 0; margin: 0; - width: 220px; - display: inline-block; } .openerp .oe_secondary_submenu li { position: relative; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 42ade77ccbb..b4665808caf 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1009,8 +1009,6 @@ $sheet-padding: 16px .oe_secondary_submenu padding: 2px 0 8px 0 margin: 0 - width: 220px - display: inline-block li position: relative margin: 0 From 1fc1174f23c1462f7dedd65fd700c8ab42126857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 15 Jan 2013 17:51:37 +0100 Subject: [PATCH 013/264] [IMP] point_of_sale: products and categories are no longer stored on disk, increasing performance bzr revid: fva@openerp.com-20130115165137-h07m9hrkhvs46e06 --- addons/point_of_sale/static/src/js/db.js | 42 +++++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js index 666c61919da..710468935a3 100644 --- a/addons/point_of_sale/static/src/js/db.js +++ b/addons/point_of_sale/static/src/js/db.js @@ -40,6 +40,10 @@ function openerp_pos_db(instance, module){ //cache the data in memory to avoid roundtrips to the localstorage this.cache = {}; + this.product_by_id = {}; + this.product_by_ean13 = {}; + this.product_by_category_id = {}; + this.category_by_id = {}; this.root_category_id = 0; this.category_products = {}; @@ -49,6 +53,8 @@ function openerp_pos_db(instance, module){ this.category_search_string = {}; this.packagings_by_id = {}; this.packagings_by_product_id = {}; + this.packagings_by_ean13 = {}; + console.log('coucou!'); }, /* returns the category object from its id. If you pass a list of id as parameters, you get * a list of category objects. @@ -153,8 +159,7 @@ function openerp_pos_db(instance, module){ return str + '\n'; }, add_products: function(products){ - var stored_products = this.load('products',{}); - var stored_categories = this.load('categories',{}); + var stored_categories = this.product_by_category_id; if(!products instanceof Array){ products = [products]; @@ -187,10 +192,11 @@ function openerp_pos_db(instance, module){ } this.category_search_string[ancestor] += search_string; } - stored_products[product.id] = product; + this.product_by_id[product.id] = product; + if(product.ean13){ + this.product_by_ean13[product.ean13] = product; + } } - this.save('products',stored_products); - this.save('categories',stored_categories); }, add_packagings: function(packagings){ for(var i = 0, len = packagings.length; i < len; i++){ @@ -200,6 +206,9 @@ function openerp_pos_db(instance, module){ this.packagings_by_product_id[pack.product_id[0]] = []; } this.packagings_by_product_id[pack.product_id[0]].push(pack); + if(pack.ean13){ + this.packagings_by_ean13[pack.ean13] = pack; + } } }, /* removes all the data from the database. TODO : being able to selectively remove data */ @@ -219,31 +228,24 @@ function openerp_pos_db(instance, module){ return count; }, get_product_by_id: function(id){ - return this.load('products',{})[id]; + return this.product_by_id[id]; }, get_product_by_ean13: function(ean13){ - var products = this.load('products',{}); - for(var i in products){ - if( products[i] && products[i].ean13 === ean13){ - return products[i]; - } + if(this.product_by_ean13[ean13]){ + return product_by_ean13[ean13]; } - for(var p in this.packagings_by_id){ - var pack = this.packagings_by_id[p]; - if( pack.ean === ean13){ - return products[pack.product_id[0]]; - } + var pack = this.packagings_by_ean13[ean13]; + if(pack){ + return this.product_by_id[pack.product_id[0]]; } return undefined; }, get_product_by_category: function(category_id){ - var stored_categories = this.load('categories',{}); - var stored_products = this.load('products',{}); - var product_ids = stored_categories[category_id]; + var product_ids = this.product_by_category_id[category_id]; var list = []; if (product_ids) { for (var i = 0, len = Math.min(product_ids.length, this.limit); i < len; i++) { - list.push(stored_products[product_ids[i]]); + list.push(this.product_by_id[product_ids[i]]); } } return list; From 483d57e8781be07d507780bb0d564d32e03012da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 15 Jan 2013 18:14:53 +0100 Subject: [PATCH 014/264] [IMP] point_of_sale: faster product list redraw bzr revid: fva@openerp.com-20130115171453-ycech3edreltdq1u --- addons/point_of_sale/static/src/js/widgets.js | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index 39ac2529a76..324201a2f70 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -606,20 +606,15 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa if(this.scrollbar){ this.scrollbar.destroy(); } - - this.pos.get('products') - .chain() - .map(function(product) { - var product = new module.ProductWidget(self, { - model: product, - weight: self.weight, - click_product_action: self.click_product_action, - }) - self.productwidgets.push(product); - return product; - }) - .invoke('appendTo', this.$('.product-list')); - + var products = this.pos.get('products').models || []; + for(var i = 0, len = products.length; i < len; i++){ + var product = new module.ProductWidget(self, { + model: products[i], + click_product_action: this.click_product_action, + }); + this.productwidgets.push(product); + product.appendTo(this.$('.product-list')); + } this.scrollbar = new module.ScrollbarWidget(this,{ target_widget: this, target_selector: '.product-list-scroller', From 70cdcc70cfbbf6f24c13580fc20cb5304676e390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 15 Jan 2013 18:25:25 +0100 Subject: [PATCH 015/264] [FIX] point_of_sale: missing 'this.' bzr revid: fva@openerp.com-20130115172525-jr5ruv0l2eiylkmh --- addons/point_of_sale/static/src/js/db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js index 710468935a3..933dbda4385 100644 --- a/addons/point_of_sale/static/src/js/db.js +++ b/addons/point_of_sale/static/src/js/db.js @@ -232,7 +232,7 @@ function openerp_pos_db(instance, module){ }, get_product_by_ean13: function(ean13){ if(this.product_by_ean13[ean13]){ - return product_by_ean13[ean13]; + return this.product_by_ean13[ean13]; } var pack = this.packagings_by_ean13[ean13]; if(pack){ From db4f0a54ded3766dfdcc65d393f3603746283fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 15 Jan 2013 18:26:53 +0100 Subject: [PATCH 016/264] [FIX] point_of_sale: removed console.log bzr revid: fva@openerp.com-20130115172653-hxq1ce1w9owvor9i --- addons/point_of_sale/static/src/js/db.js | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js index 933dbda4385..93dc86ebd9f 100644 --- a/addons/point_of_sale/static/src/js/db.js +++ b/addons/point_of_sale/static/src/js/db.js @@ -54,7 +54,6 @@ function openerp_pos_db(instance, module){ this.packagings_by_id = {}; this.packagings_by_product_id = {}; this.packagings_by_ean13 = {}; - console.log('coucou!'); }, /* returns the category object from its id. If you pass a list of id as parameters, you get * a list of category objects. From 8370a777a228170f716efb98535695d0ce3b7072 Mon Sep 17 00:00:00 2001 From: Niels Huylebroeck Date: Wed, 16 Jan 2013 14:18:56 +0100 Subject: [PATCH 017/264] [FIX] membership: use correct invoice form view after generating the invoices. lp bug: https://launchpad.net/bugs/1100271 fixed bzr revid: nh@agaplan.eu-20130116131856-ry3orovgztkoi00i --- addons/membership/wizard/membership_invoice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/membership/wizard/membership_invoice.py b/addons/membership/wizard/membership_invoice.py index 85a9cc0c85b..2198f15d4bf 100644 --- a/addons/membership/wizard/membership_invoice.py +++ b/addons/membership/wizard/membership_invoice.py @@ -54,7 +54,8 @@ class membership_invoice(osv.osv_memory): invoice_list = partner_obj.create_membership_invoice(cr, uid, context.get('active_ids', []), datas=datas, context=context) res = mod_obj.get_object_reference(cr, uid, 'account', 'view_account_invoice_filter') - + form_view_id = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_form') + return { 'domain': [('id', 'in', invoice_list)], 'name': 'Membership Invoices', @@ -62,6 +63,7 @@ class membership_invoice(osv.osv_memory): 'view_mode': 'tree,form', 'res_model': 'account.invoice', 'type': 'ir.actions.act_window', + 'views': [(False, 'tree'), (form_view_id and form_view_id[1] or False, 'form')], 'search_view_id': res and res[1] or False } From 0e3308ef927496546141a259d9aa1835599a36c3 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Thu, 17 Jan 2013 17:31:59 +0100 Subject: [PATCH 018/264] [IMP] Add field for not sending emails bzr revid: jco@openerp.com-20130117163159-ceqq1ewf55go05ua --- addons/account_followup/account_followup.py | 37 +++++++++++++------ .../account_followup_customers.xml | 22 +++++++++-- .../wizard/account_followup_print.py | 2 +- 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/addons/account_followup/account_followup.py b/addons/account_followup/account_followup.py index 285a3529ee7..6ea90f5c204 100644 --- a/addons/account_followup/account_followup.py +++ b/addons/account_followup/account_followup.py @@ -208,12 +208,13 @@ class res_partner(osv.osv): for partner in self.browse(cr, uid, partner_ids, context=ctx): if partner.email and partner.email.strip(): level = partner.latest_followup_level_id_without_lit - if level and level.send_email and level.email_template_id and level.email_template_id.id: - mtp.send_mail(cr, uid, level.email_template_id.id, partner.id, context=ctx) - else: - mail_template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, - 'account_followup', 'email_template_account_followup_default') - mtp.send_mail(cr, uid, mail_template_id[1], partner.id, context=ctx) + if not partner.payment_no_email: + if level and level.send_email and level.email_template_id and level.email_template_id.id: + mtp.send_mail(cr, uid, level.email_template_id.id, partner.id, context=ctx) + else: + mail_template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, + 'account_followup', 'email_template_account_followup_default') + mtp.send_mail(cr, uid, mail_template_id[1], partner.id, context=ctx) else: unknown_mails = unknown_mails + 1 action_text = _("Email not sent because of email address of partner not filled in") @@ -275,8 +276,17 @@ class res_partner(osv.osv):
Amount due: %s
''' % (total) return followup_table + def write(self, cr, uid, ids, vals, context=None): + if vals.get("payment_responsible_id", False): + for part in self.browse(cr, uid, ids, context=context): + if part.payment_responsible_id <> vals["payment_responsible_id"]: + pass + #message_post() + res = super(res_partner, self).write(cr, uid, ids, vals, context=context) + return res + def action_done(self, cr, uid, ids, context=None): - return self.write(cr, uid, ids, {'payment_next_action_date': False, 'payment_next_action':'', 'payment_responsible_id': False}, context=context) + return self.write(cr, uid, ids, {'payment_next_action_date': False, 'payment_next_action':'', 'payment_responsible_id': False, 'payment_no_email': False}, context=context) def do_button_print(self, cr, uid, ids, context=None): assert(len(ids) == 1) @@ -408,13 +418,18 @@ class res_partner(osv.osv): _inherit = "res.partner" _columns = { 'payment_responsible_id':fields.many2one('res.users', ondelete='set null', string='Follow-up Responsible', - help="Optionally you can assign a user to this field, which will make him responsible for the action."), - 'payment_note':fields.text('Customer Payment Promise', help="Payment Note"), + help="Optionally you can assign a user to this field, which will make him responsible for the action.", + track_visibility="onchange"), + 'payment_note':fields.text('Customer Payment Promise', help="Payment Note", track_visibility="onchange"), 'payment_next_action':fields.text('Next Action', - help="This is the next action to be taken. It will automatically be set when the partner gets a follow-up level that requires a manual action. "), + help="This is the next action to be taken. It will automatically be set when the partner gets a follow-up level that requires a manual action. ", + track_visibility="onchange"), 'payment_next_action_date':fields.date('Next Action Date', help="This is when the manual follow-up is needed. " \ - "The date will be set to the current date when the partner gets a follow-up level that requires a manual action. Can be practical to set manually e.g. to see if he keeps his promises."), + "The date will be set to the current date when the partner gets a follow-up level that requires a manual action. "\ + "Can be practical to set manually e.g. to see if he keeps his promises."), + 'payment_no_email':fields.boolean('Don\'t send follow-up emails meanwhile', help='When checked, the follow-up wizard will go to the next level,'\ + ' print letters and set manual actions, but mails will not be sent. Follow-up will happen by doing manual actions. '), 'unreconciled_aml_ids':fields.one2many('account.move.line', 'partner_id', domain=['&', ('reconcile_id', '=', False), '&', ('account_id.active','=', True), '&', ('account_id.type', '=', 'receivable'), ('state', '!=', 'draft')]), 'latest_followup_date':fields.function(_get_latest, method=True, type='date', string="Latest Follow-up Date", diff --git a/addons/account_followup/account_followup_customers.xml b/addons/account_followup/account_followup_customers.xml index 8a27730b003..ca1c509be39 100644 --- a/addons/account_followup/account_followup_customers.xml +++ b/addons/account_followup/account_followup_customers.xml @@ -35,10 +35,10 @@ - +
- +
@@ -81,10 +81,12 @@