From a3a4cd79fe3a85b50f58c272055e23abebe433aa Mon Sep 17 00:00:00 2001 From: "Purnendu Singh (OpenERP)" Date: Tue, 3 Apr 2012 12:03:12 +0530 Subject: [PATCH 01/50] [IMP] account_voucher: Get the changes from QDP branch to fix this bug bzr revid: psi@tinyerp.com-20120403063312-i0lws3ibxsxtfleb --- addons/account_voucher/account_voucher.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 54226166508..913968010a0 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -227,17 +227,18 @@ class account_voucher(osv.osv): def _paid_amount_in_company_currency(self, cr, uid, ids, name, args, context=None): if not ids: return {} res = {} - voucher_rate = company_currency_rate = 1.0 + rate = 1.0 for voucher in self.browse(cr, uid, ids, context=context): if voucher.currency_id: - ctx = context.copy() - ctx.update({'date': voucher.date}) - voucher_rate = self.browse(cr, uid, voucher.id, context=ctx).currency_id.rate if voucher.company_id.currency_id.id == voucher.payment_rate_currency_id.id: - company_currency_rate = voucher.payment_rate + rate = 1 / voucher.payment_rate else: + ctx = context.copy() + ctx.update({'date': voucher.date}) + voucher_rate = self.browse(cr, uid, voucher.id, context=ctx).currency_id.rate company_currency_rate = voucher.company_id.currency_id.rate - res[voucher.id] = voucher.amount / voucher_rate * company_currency_rate + rate = voucher_rate * company_currency_rate + res[voucher.id] = voucher.amount / rate return res _name = 'account.voucher' @@ -993,9 +994,7 @@ class account_voucher(osv.osv): res = amount if voucher.payment_rate_currency_id.id == voucher.company_id.currency_id.id: # the rate specified on the voucher is for the company currency - rate_between_voucher_and_base = voucher.currency_id.rate or 1.0 - rate_between_base_and_company = voucher.payment_rate or 1.0 - res = currency_obj.round(cr, uid, voucher.company_id.currency_id, (amount / rate_between_voucher_and_base * rate_between_base_and_company)) + res = currency_obj.round(cr, uid, voucher.company_id.currency_id, (amount * voucher.payment_rate)) else: # the rate specified on the voucher is not relevant, we use all the rates in the system res = currency_obj.compute(cr, uid, voucher.currency_id.id, voucher.company_id.currency_id.id, amount, context=context) From 9346a7e8ecc4b3a042af0dcd597945c987bbc92f Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Wed, 4 Apr 2012 16:52:15 +0530 Subject: [PATCH 02/50] [IMP]stock: added a yml case for the multi-currency (lp-954155) bzr revid: mma@tinyerp.com-20120404112215-i2oh9zme32u7vv4z --- addons/account_voucher/__openerp__.py | 1 + addons/account_voucher/test/case_eur_usd.yml | 143 +++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 addons/account_voucher/test/case_eur_usd.yml diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py index 8808c451878..1c4005b7be0 100644 --- a/addons/account_voucher/__openerp__.py +++ b/addons/account_voucher/__openerp__.py @@ -66,6 +66,7 @@ Account Voucher module includes all the basic requirements of Voucher Entries fo "test/case2_usd_eur_debtor_in_usd.yml", "test/case3_eur_eur.yml", "test/case4_cad_chf.yml", + "test/case_eur_usd.yml", ], 'certificate': '0037580727101', "auto_install": False, diff --git a/addons/account_voucher/test/case_eur_usd.yml b/addons/account_voucher/test/case_eur_usd.yml new file mode 100644 index 00000000000..ba0ce03872e --- /dev/null +++ b/addons/account_voucher/test/case_eur_usd.yml @@ -0,0 +1,143 @@ +- + In order to check the payment with multi-currency in OpenERP, + I create Invoices in EUR and make Payment in USD based on the currency rating. +- + I create currency rate for USD +- + !record {model: res.currency.rate, id: usd_rate}: + currency_id: base.USD + name: !eval "'%s-05-01' %(datetime.now().year)" + rate: 1.400000 +- + I create a asset account with currency USD +- + !record {model: account.account, id: account_eur_usd_id}: + currency_id: base.USD + name: "Bank usd" + code: "BUSD" + type: 'liquidity' + user_type: account.data_account_type_asset +- + I create a bank journal with USD as currency +- + !record {model: account.journal, id: bank_journal_USD1}: + name: Bank Journal Test(USD) + code: BEUSD + type: bank + analytic_journal_id: account.sit + sequence_id: account.sequence_bank_journal + default_debit_account_id: account_eur_usd_id + default_credit_account_id: account_eur_usd_id + currency: base.USD + company_id: base.main_company + view_id: account.account_journal_bank_view +- + I create a invoice +- + !record {model: account.invoice, id: account_invoice_eur_usd}: + account_id: account.a_recv + company_id: base.main_company + currency_id: base.EUR + date_invoice: !eval "'%s-01-01' %(datetime.now().year)" + period_id: account.period_1 + invoice_line: + - account_id: account.a_sale + name: '[PC1] Basic PC' + price_unit: 1000.0 + quantity: 1.0 + product_id: product.product_product_pc1 + uos_id: product.product_uom_unit + journal_id: account.sales_journal + partner_id: base.res_partner_seagate +- + I perform action to validate this invoice +- + !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_eur_usd} +- + I check invoice move is correct +- + !python {model: account.invoice}: | + invoice = self.browse(cr, uid, ref("account_invoice_eur_usd")) + assert invoice.state == 'open', "invoice state is not open" + assert invoice.period_id, "Period is not created for open invoice" + assert invoice.move_id, "Move not created for open invoice" + assert invoice.move_id.state == 'posted', "Move state is not posted" + for move_line in invoice.move_id.line_id: + assert move_line.state == 'valid', "Move line state is not valid" +- + I set the context that will be used for the encoding of all the vouchers of this file +- + !context + 'type': 'receipt' +- + I create voucher for payment +- + !record {model: account.voucher, id: account_voucher_eur_usd_case, view: view_vendor_receipt_form}: + account_id: account.cash + amount: 1350.0 + company_id: base.main_company + journal_id: bank_journal_USD1 + name: 'payment: Case EUR/USD' + partner_id: base.res_partner_seagate + period_id: account.period_5 + date: !eval time.strftime("%Y-05-01") + payment_option: 'with_writeoff' + writeoff_acc_id: account.a_expense + comment: 'Write Off' +- + I fill the full amount to the voucher +- + !python {model: account.voucher}: | + data = [] + voucher = self.browse(cr, uid, ref('account_voucher_eur_usd_case')) + for item in voucher.line_cr_ids: + if item.amount_unreconciled == item.amount_original: + data += [(item.id, item.amount_original)] + for line_id, amount in data: + self.pool.get('account.voucher.line').write(cr, uid, [line_id], {'amount': amount}) + assert (voucher.state=='draft'), "Voucher is not in draft state" +- + I check that writeoff amount computed is 50.0 +- + !python {model: account.voucher}: | + voucher = self.browse(cr, uid, ref('account_voucher_eur_usd_case')) + assert (voucher.writeoff_amount == 50.0), "Writeoff amount is not 50.0" +- + I confirm the voucher +- + !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_eur_usd_case} +- + I check that the voucher state is "Posted" +- + !assert {model: account.voucher, id: account_voucher_eur_usd_case}: + - state == 'posted' +- + I check a payment is created with proper data in voucher +- + !python {model: account.voucher}: | + inv_obj = self.pool.get('account.invoice') + invoice = inv_obj.browse(cr, uid, ref('account_invoice_eur_usd')) + voucher = self.browse(cr, uid, ref('account_voucher_eur_usd_case')) + prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') + assert voucher.move_ids, "Move line is not created for this voucher" + assert (voucher.number == voucher.move_ids[0].move_id.name), "referance number is not created" + assert voucher.period_id, "period is not created" + for move_line in voucher.move_ids: + assert move_line.state == 'valid', "Voucher move is not valid" + + rate = voucher.journal_id.currency.rate_ids[0].rate + assert (round(voucher.amount/rate, prec) == voucher.move_ids[2].debit),"debtor account is not correct" + assert (round(voucher.writeoff_amount/rate, prec) == voucher.move_ids[0].debit),"write off bank account is not correct" + assert (invoice.amount_total == voucher.move_ids[1].credit), " total reconcile is not correct of invoice" +- + I check that the payment amount is created with proper data in customer invoice +- + !python {model: account.invoice}: | + invoice = self.browse(cr, uid, ref("account_invoice_eur_usd")) + assert invoice.state == 'paid', "invoice is not paid" + payment_line = invoice.payment_ids[0] + assert payment_line, "payment line not created for paid invoice" + assert payment_line.state == 'valid', "payment move line state is not valid" + assert payment_line.debit == 0.0 and payment_line.credit == invoice.amount_total, "proper amount is not debit to payment account " + assert payment_line.reconcile_id, "reconcile is not created for paid invoice" + From 5d04ea99528328d3d5cfaabc59c02078f52f35c9 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Wed, 11 Apr 2012 12:09:15 +0530 Subject: [PATCH 03/50] [IMP]account_voucher: Improve comments of yml bzr revid: mma@tinyerp.com-20120411063915-3dl2tq60pfd3vwvo --- addons/account_voucher/test/case_eur_usd.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/account_voucher/test/case_eur_usd.yml b/addons/account_voucher/test/case_eur_usd.yml index 9cef9366e9a..3c4f2dfc1f5 100644 --- a/addons/account_voucher/test/case_eur_usd.yml +++ b/addons/account_voucher/test/case_eur_usd.yml @@ -2,7 +2,7 @@ - In order to check the payment with multi-currency in OpenERP, - I create a Invoice in EUR and make Payment in USD based on the currency rating. + I create an invoice in EUR and make payment in USD based on the currency rating. - I create currency USD in OpenERP for May of 1.400000 Rate - @@ -11,7 +11,7 @@ name: !eval "'%s-05-01' %(datetime.now().year)" rate: 1.400000 - - I create a asset account with currency USD + I create a bank account with USD as currency - !record {model: account.account, id: account_eur_usd_id}: currency_id: base.USD @@ -34,7 +34,7 @@ company_id: base.main_company view_id: account.account_journal_bank_view - - I create a invoice + I create an invoice - !record {model: account.invoice, id: account_invoice_eur_usd}: account_id: account.a_recv @@ -52,11 +52,11 @@ journal_id: account.sales_journal partner_id: base.res_partner_seagate - - I perform action to validate this invoice + I Validate invoice by clicking on Validate button - !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_eur_usd} - - I check invoice move is correct + I check that invoice move is correct - !python {model: account.invoice}: | invoice = self.browse(cr, uid, ref("account_invoice_eur_usd")) @@ -67,7 +67,7 @@ for move_line in invoice.move_id.line_id: assert move_line.state == 'valid', "Move line state is not valid" - - I set the context that will be used for the encoding of all the vouchers of this file + I set the type receipt for this voucher - !context 'type': 'receipt' From e5d63af289b89f1d7e7b02d0a94323266eb34df4 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Wed, 11 Apr 2012 18:56:54 +0530 Subject: [PATCH 04/50] [IMP]account_voucher: Improve test case and added comments bzr revid: mma@tinyerp.com-20120411132654-ehsjy9fdh3fxpemw --- addons/account_voucher/test/case_eur_usd.yml | 48 ++++++++++++++------ 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/addons/account_voucher/test/case_eur_usd.yml b/addons/account_voucher/test/case_eur_usd.yml index 3c4f2dfc1f5..4b1572fe48b 100644 --- a/addons/account_voucher/test/case_eur_usd.yml +++ b/addons/account_voucher/test/case_eur_usd.yml @@ -114,32 +114,50 @@ !assert {model: account.voucher, id: account_voucher_eur_usd_case}: - state == 'posted' - - I check a payment is created with proper data in voucher + I check that the move of voucher is valid - !python {model: account.voucher}: | - inv_obj = self.pool.get('account.invoice') - invoice = inv_obj.browse(cr, uid, ref('account_invoice_eur_usd')) voucher = self.browse(cr, uid, ref('account_voucher_eur_usd_case')) - prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') assert voucher.move_ids, "Move line is not created for this voucher" assert (voucher.number == voucher.move_ids[0].move_id.name), "referance number is not created" assert voucher.period_id, "period is not created" for move_line in voucher.move_ids: assert move_line.state == 'valid', "Voucher move is not valid" - rate = voucher.journal_id.currency.rate_ids[0].rate - assert (round(voucher.amount/rate, prec) == voucher.move_ids[2].debit),"debtor account is not correct" - assert (round(voucher.writeoff_amount/rate, prec) == voucher.move_ids[0].debit),"write off bank account is not correct" - assert (invoice.amount_total == voucher.move_ids[1].credit), " total reconcile is not correct of invoice" - - I check that the payment amount is created with proper data in customer invoice + I check that my debtor account is correct +- + I check that my currency rate difference is correct. 1000 in credit with no amount_currency +- + I check that the total reconcilation created entries as expected +- + I check that my writeoff is correct. 35.71 debit and 50 amount_currency +- + I check that my bank account is correct. 964.29 debit and 1350 amount_currency +- + !python {model: account.voucher}: | + voucher = self.browse(cr, uid, ref('account_voucher_eur_usd_case')) + for move_line in voucher.move_ids: + if move_line.amount_currency == 1350: + assert move_line.debit == 964.29,"debtor account is not correct" + if move_line.amount_currency == 50: + assert move_line.debit == 35.71,"write off bank account is not correct" + if move_line.amount_currency == 0.0: + assert move_line.credit == 1000,"total reconcile is not correct of invoice" +- + I check that the move of payment in invoice is valid - !python {model: account.invoice}: | invoice = self.browse(cr, uid, ref("account_invoice_eur_usd")) - assert invoice.state == 'paid', "invoice is not paid" - payment_line = invoice.payment_ids[0] - assert payment_line, "payment line not created for paid invoice" - assert payment_line.state == 'valid', "payment move line state is not valid" - assert payment_line.debit == 0.0 and payment_line.credit == invoice.amount_total, "proper amount is not debit to payment account " - assert payment_line.reconcile_id, "reconcile is not created for paid invoice" + for payment_line in invoice.payment_ids: + assert payment_line.state == 'valid', "payment move line state is not valid" +- + I check the residual amount of Invoice, should be 0 in residual currency and 0 in amount_residual and paid +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_invoice_eur_usd")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for Invoice" From 8037ab4c93dcfbadc9b5dfc8a6f381a3019df410 Mon Sep 17 00:00:00 2001 From: "Purnendu Singh (OpenERP)" Date: Mon, 16 Apr 2012 12:48:46 +0530 Subject: [PATCH 05/50] [IMP] improve the sentence bzr revid: psi@tinyerp.com-20120416071846-aney78g3ucw390nw --- addons/account_voucher/test/case_eur_usd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/test/case_eur_usd.yml b/addons/account_voucher/test/case_eur_usd.yml index 6acced54b29..108cbaeb61e 100644 --- a/addons/account_voucher/test/case_eur_usd.yml +++ b/addons/account_voucher/test/case_eur_usd.yml @@ -60,7 +60,7 @@ journal_id: account.sales_journal partner_id: base.res_partner_seagate - - I validate invoice by clicking on "Validate" button + I validate the invoice. - !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_eur_usd} - From 74b003f101ee9c36e02fd905fd4e1d9e4803888a Mon Sep 17 00:00:00 2001 From: "Purnendu Singh (OpenERP)" Date: Mon, 16 Apr 2012 15:41:28 +0530 Subject: [PATCH 06/50] [IMP] improve the sentance bzr revid: psi@tinyerp.com-20120416101128-0xg907q5yq3i1wlj --- addons/account_voucher/test/case_eur_usd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_voucher/test/case_eur_usd.yml b/addons/account_voucher/test/case_eur_usd.yml index 108cbaeb61e..72f0d22aead 100644 --- a/addons/account_voucher/test/case_eur_usd.yml +++ b/addons/account_voucher/test/case_eur_usd.yml @@ -3,7 +3,7 @@ In order to check the payment with multi-currency in OpenERP, I create an invoice in EUR and make payment in USD based on the currency rating. - - I create currency USD in OpenERP for January of 1.200000 rate + I update the Currency USD in OpenERP for January with rate 1.200000 - !python {model: res.currency.rate}: | from datetime import datetime @@ -12,7 +12,7 @@ ids = self.search(cr, uid, [('currency_id','=',curr_id), ('name', '=', date)]) self.write(cr, uid, ids, {'rate': 1.200000}) - - I create currency USD in OpenERP for February of 1.400000 rate + I update the Currency USD in OpenERP for February with rate 1.400000 - !record {model: res.currency.rate, id: feb_usd}: currency_id: base.USD From d5af81aa0c8398d2959837f1f7570dcb3f0003ce Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 23 Apr 2012 11:02:32 +0200 Subject: [PATCH 07/50] [FIX] dataset internal context, domain state on search event, broken by model-based datasets bzr revid: xmo@openerp.com-20120423090232-fm3f8q6vm37emz4d --- addons/web/static/src/js/views.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 9625e074e83..7579de3dc36 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -391,8 +391,8 @@ instance.web.ViewManager = instance.web.Widget.extend({ contexts: [action_context].concat(contexts || []), group_by_seq: groupbys || [] }, function (results) { - self.dataset.context = results.context; - self.dataset.domain = results.domain; + self.dataset._model = new instance.web.Model( + self.dataset.model, results.context, results.domain); var groupby = results.group_by.length ? results.group_by : action_context.group_by; From 947aba0b6e1b6c7e847c1f25b3ca64334a09c9ae Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 23 Apr 2012 13:09:07 +0200 Subject: [PATCH 08/50] [FIX] Fixed form tooltips bzr revid: fme@openerp.com-20120423110907-6ge2jkd33kic5b0h --- addons/web/static/src/js/view_form.js | 4 ++-- addons/web/static/src/xml/base.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index fbbd5149470..c8c7eab5e44 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -1416,7 +1416,7 @@ instance.web.form.Widget = instance.web.Widget.extend(_.extend({}, instance.web. opacity: 0.85, trigger: 'hover' }, options || {}); - trigger.tipsy(options); + $(trigger).tipsy(options); }, _build_view_fields_values: function(blacklist) { var a_dataset = this.view.dataset; @@ -1704,7 +1704,7 @@ instance.web.form.AbstractField = instance.web.form.Widget.extend(/** @lends ins }, this)); } if (instance.connection.debug) { - this.do_attach_tooltip(this, this.$element); + this.do_attach_tooltip(this, this.view.$element.find('label[for=' + this.id_for_label + ']')[0] || this.$element); } if (!this.disable_utility_classes) { var set_required = function() { diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 57970c1486e..a3744842bb0 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -847,7 +847,7 @@
(nolabel)
-

+

  • Field: From 0f23affe61b4faa13fc7be1e3d585a493c47b849 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 23 Apr 2012 14:01:34 +0200 Subject: [PATCH 09/50] [FIX] Fixed date widgets width bzr revid: fme@openerp.com-20120423120134-ko9xl3p50atw3yhy --- addons/web/static/src/css/base.css | 4 ++-- addons/web/static/src/css/base.sass | 4 ++-- addons/web/static/src/xml/base.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 2b90d47c002..b5c224e2fd3 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1365,10 +1365,10 @@ .openerp .oe_form_autolayout .oe_form_group_cell > .oe_form_field_email input, .openerp .oe_form_autolayout .oe_form_group_cell > .oe_form_field_url, .openerp .oe_form_autolayout .oe_form_group_cell > .oe_form_field_url input, -.openerp .oe_form_autolayout .oe_form_group_cell > .oe_form_field_date input, .openerp .oe_form_autolayout .oe_form_group_cell > .oe_form_field_float input, .openerp .oe_form_autolayout .oe_form_group_cell > .oe_form_field_selection select, -.openerp .oe_form_autolayout .oe_form_group_cell > .oe_datepicker_root { +.openerp .oe_form_autolayout .oe_form_group_cell > div > .oe_datepicker_root, +.openerp .oe_form_autolayout .oe_form_group_cell > div > .oe_datepicker_root > input.oe_datepicker_master { width: 100%; } .openerp .oe_form_autolayout .oe_form_button.oe_button { diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index fc645a92e44..65c5b0b283a 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1124,10 +1124,10 @@ $colour4: #8a89ba .oe_form_group_cell > .oe_form_field_email input, .oe_form_group_cell > .oe_form_field_url, .oe_form_group_cell > .oe_form_field_url input, - .oe_form_group_cell > .oe_form_field_date input, .oe_form_group_cell > .oe_form_field_float input, .oe_form_group_cell > .oe_form_field_selection select, - .oe_form_group_cell > .oe_datepicker_root + .oe_form_group_cell > div > .oe_datepicker_root, + .oe_form_group_cell > div > .oe_datepicker_root > input.oe_datepicker_master width: 100% .oe_form_button.oe_button color: #4c4c4c diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index a3744842bb0..ee34d2dd261 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -988,7 +988,7 @@ From 9650a3e482104dd5506fc82ea372d4f0b623ba58 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 23 Apr 2012 14:50:16 +0200 Subject: [PATCH 10/50] [IMP] Do not show colon for fieldless labels bzr revid: fme@openerp.com-20120423125016-2pg4j9i4b0solrzb --- addons/web/static/src/xml/base.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index ee34d2dd261..7a749fe70f8 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -835,7 +835,7 @@ t-attf-class="#{classnames} oe_form_label#{help ? '_help' : ''} oe_align_#{align}"> ? - : + : From b8327b73acdb5f2131df076b8de3ef69ce299c82 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 23 Apr 2012 16:13:47 +0200 Subject: [PATCH 11/50] [FIX] Fix textarea auto resize bzr revid: fme@openerp.com-20120423141347-xk71xfr85oce95k6 --- addons/web/static/src/js/view_form.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index c8c7eab5e44..2e48ec75649 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2072,7 +2072,6 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(_.extend({} template: 'FieldText', initialize_content: function() { this.$textarea = this.$element.find('textarea'); - this.resized = false; if (!this.get("effective_readonly")) { this.$textarea.change(_.bind(function() { this.set({'value': instance.web.parse_value(this.$textarea.val(), this)}); @@ -2088,9 +2087,8 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(_.extend({} render_value: function() { var show_value = instance.web.format_value(this.get('value'), this, ''); this.$textarea.val(show_value); - if (!this.resized && this.view.options.resize_textareas) { + if (show_value && this.view.options.resize_textareas) { this.do_resize(this.view.options.resize_textareas); - this.resized = true; } }, is_syntax_valid: function() { From 5bd99add3eba516e3125a4c8f9f3e346941e160c Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 23 Apr 2012 17:01:31 +0200 Subject: [PATCH 12/50] [FIX] Fix buttons tooltip bzr revid: fme@openerp.com-20120423150131-5w473z0vvks04wjg --- addons/web/static/src/xml/base.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 7a749fe70f8..f8277c30ac3 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -847,7 +847,7 @@
    (nolabel)
    -

    +

    • Field: From ce725caeae8827d67688ca16a0cf603172c68954 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 23 Apr 2012 17:29:24 +0200 Subject: [PATCH 13/50] [IMP] portal: added the home_action feature for portal users bzr revid: qdp-launchpad@openerp.com-20120423152924-ml1n9jzk1yc2e8en --- addons/portal/portal.py | 3 +++ addons/portal/portal_view.xml | 1 + addons/portal/wizard/portal_wizard.py | 1 + 3 files changed, 5 insertions(+) diff --git a/addons/portal/portal.py b/addons/portal/portal.py index 6ca833fecd1..8f4ff66aef2 100644 --- a/addons/portal/portal.py +++ b/addons/portal/portal.py @@ -39,6 +39,9 @@ class portal(osv.osv): help='The group corresponding to this portal'), 'url': fields.char('URL', size=64, help="The url where portal users can connect to the server"), + 'home_action_id': fields.many2one('ir.actions.actions', + string='Home Action', + help="if set, replaces the standard home action (first screen after loggin) for the portal's users"), 'menu_action_id': fields.many2one('ir.actions.act_window', readonly=True, # ISSUE: 'ondelete' constraints do not seem effective on this field... string='Menu Action', diff --git a/addons/portal/portal_view.xml b/addons/portal/portal_view.xml index a6a780fdf16..e427bbd5b1f 100644 --- a/addons/portal/portal_view.xml +++ b/addons/portal/portal_view.xml @@ -64,6 +64,7 @@ the portal's users.