From 36fabd70a06bf53611211acdb932bf4554c15755 Mon Sep 17 00:00:00 2001
From: "Rajesh Prajapati (OpenERP)"
Date: Tue, 23 Oct 2012 11:57:41 +0530
Subject: [PATCH 01/55] [IMP] purchase : string changed
bzr revid: rpr@tinyerp.com-20121023062741-piioezk25796h9jf
---
addons/purchase/res_config.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/purchase/res_config.py b/addons/purchase/res_config.py
index 19b059d4d5b..75e42d14905 100644
--- a/addons/purchase/res_config.py
+++ b/addons/purchase/res_config.py
@@ -43,7 +43,7 @@ class purchase_config_settings(osv.osv_memory):
'group_costing_method':fields.boolean("Compute product cost price based on average cost",
implied_group='product.group_costing_method',
help="""Allows you to compute product cost price based on average cost."""),
- 'group_purchase_delivery_address': fields.boolean("Allow a different address for incoming products and invoicings",
+ 'group_purchase_delivery_address': fields.boolean("Allow a different address for incoming products and invoicing",
implied_group='purchase.group_delivery_invoice_address',
help="Allows you to specify different delivery and invoice addresses on a purchase order."),
'module_warning': fields.boolean("Alerts by products or supplier",
From a519d96aa9713574144340c6548032bfbf03178f Mon Sep 17 00:00:00 2001
From: "Rajesh Prajapati (OpenERP)"
Date: Tue, 23 Oct 2012 12:26:10 +0530
Subject: [PATCH 02/55] [IMP] sale : string changed from plugin to plug-in
bzr revid: rpr@tinyerp.com-20121023065610-41a67irfmb0t4tpn
---
addons/base_setup/res_config.py | 4 ++--
addons/plugin_outlook/plugin_outlook.xml | 2 +-
addons/plugin_thunderbird/plugin_thunderbird.xml | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/base_setup/res_config.py b/addons/base_setup/res_config.py
index 0dc4a0f0794..e7898395d62 100644
--- a/addons/base_setup/res_config.py
+++ b/addons/base_setup/res_config.py
@@ -60,14 +60,14 @@ class sale_config_settings(osv.osv_memory):
'module_web_linkedin': fields.boolean('Get contacts automatically from linkedIn',
help="""When you create a new contact (person or company), you will be able to load all the data from LinkedIn (photos, address, etc)."""),
'module_crm': fields.boolean('CRM'),
- 'module_plugin_thunderbird': fields.boolean('Enable Thunderbird plugin',
+ 'module_plugin_thunderbird': fields.boolean('Enable Thunderbird plug-in',
help="""The plugin allows you archive email and its attachments to the selected
OpenERP objects. You can select a partner, or a lead and
attach the selected mail as a .eml file in
the attachment of a selected record. You can create documents for CRM Lead,
Partner from the selected emails.
This installs the module plugin_thunderbird."""),
- 'module_plugin_outlook': fields.boolean('Enable Outlook plugin',
+ 'module_plugin_outlook': fields.boolean('Enable Outlook plug-in',
help="""The Outlook plugin allows you to select an object that you would like to add
to your email and its attachments from MS Outlook. You can select a partner,
or a lead object and archive a selected
diff --git a/addons/plugin_outlook/plugin_outlook.xml b/addons/plugin_outlook/plugin_outlook.xml
index e99fbf72b6d..6ecbd14b31a 100644
--- a/addons/plugin_outlook/plugin_outlook.xml
+++ b/addons/plugin_outlook/plugin_outlook.xml
@@ -51,7 +51,7 @@
From 0696aa196d473ba2049f6f90b1b825f164bc8d5a Mon Sep 17 00:00:00 2001
From: "Ajay Chauhan (OpenERP)"
Date: Tue, 23 Oct 2012 14:19:49 +0530
Subject: [PATCH 03/55] [IMP] portal_sale: change help text for menus
bzr revid: cha@tinyerp.com-20121023084949-vn1fz0axxqbj1oyt
---
addons/portal_sale/portal_sale_view.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/portal_sale/portal_sale_view.xml b/addons/portal_sale/portal_sale_view.xml
index 6b25d87b791..b46175f7feb 100644
--- a/addons/portal_sale/portal_sale_view.xml
+++ b/addons/portal_sale/portal_sale_view.xml
@@ -45,7 +45,7 @@
kanban,tree,form
- No public products.
+ There are no public products.
@@ -65,7 +65,7 @@
{'type':'receipt'}current
- You don't have any payment.
+ You don't have any refunds or payments.
diff --git a/addons/purchase/res_config.py b/addons/purchase/res_config.py
index 19b059d4d5b..de86cc7a2ed 100644
--- a/addons/purchase/res_config.py
+++ b/addons/purchase/res_config.py
@@ -36,7 +36,7 @@ class purchase_config_settings(osv.osv_memory):
'group_purchase_pricelist':fields.boolean("Manage pricelist per supplier",
implied_group='product.group_purchase_pricelist',
help="""Allows to manage different prices based on rules per category of Supplier.
- Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
+ Example: 10% for retailers, promotion of 5 USD on this product, etc."""),
'group_uom':fields.boolean("Manage different units of measure for products",
implied_group='product.group_uom',
help="""Allows you to select and maintain different units of measure for products."""),
diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml
index 594843eff8d..17ede2594df 100644
--- a/addons/stock/product_view.xml
+++ b/addons/stock/product_view.xml
@@ -41,7 +41,7 @@
-
+
From 8f341d355552d2632d507518f563a8b04159358c Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Mon, 5 Nov 2012 12:16:35 +0100
Subject: [PATCH 27/55] [IMP] put back commit_value
bzr revid: nicolas.vanhoren@openerp.com-20121105111635-5aygxpvlfuxqozu5
---
addons/web/static/src/js/view_form.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index bee3224407a..01eb8237ba2 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -2010,6 +2010,11 @@ instance.web.form.FieldInterface = {
* Called when the translate button is clicked.
*/
on_translate: function() {},
+ /**
+ This method is called by the form view before reading on_change values and before saving. It tells
+ the field to save its value before reading it using get_value(). Must return a deferred.
+ */
+ commit_value: function() {},
};
/**
@@ -2153,7 +2158,10 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
}
this.$el.attr('style', style);
this.$el.css('minHeight', height);
- }
+ },
+ commit_value: function() {
+ return $.when();
+ },
});
/**
From a4dd3172712ff099cb028681d9843895dad6ef18 Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Mon, 5 Nov 2012 12:18:19 +0100
Subject: [PATCH 28/55] Now uses commit_value
bzr revid: nicolas.vanhoren@openerp.com-20121105111819-g4dovxlob9ivashl
---
addons/web/static/src/js/view_form.js | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 01eb8237ba2..af38352e7f5 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -604,13 +604,23 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
return iterate();
});
}
- var save_obj = self.save_list.pop();
- if (save_obj) {
- return self._process_save(save_obj).pipe(function() {
- return iterate.apply(null, arguments);
- });
- }
- return $.when.apply($, arguments);
+ var defs = [];
+ _.each(self.fields, function(field) {
+ defs.push(field.commit_value());
+ });
+ var args = _.toArray(arguments);
+ return $.when.apply($, defs).pipe(function() {
+ if (self.on_change_list.length !== 0) {
+ return iterate();
+ }
+ var save_obj = self.save_list.pop();
+ if (save_obj) {
+ return self._process_save(save_obj).pipe(function() {
+ return iterate.apply(null, arguments);
+ });
+ }
+ return $.when.apply($, args);
+ });
};
return iterate();
});
From d2d2c49910f957bce9ee7c1cb0df26bce48eb973 Mon Sep 17 00:00:00 2001
From: Hardik
Date: Mon, 5 Nov 2012 17:33:59 +0530
Subject: [PATCH 29/55] [IMP]Group string name is updated
bzr revid: hsa@tinyerp.com-20121105120359-m7r5d2xn3cau83v6
---
addons/stock/product_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml
index 17ede2594df..594843eff8d 100644
--- a/addons/stock/product_view.xml
+++ b/addons/stock/product_view.xml
@@ -41,7 +41,7 @@
-
+
From 29f6543f37f6ba5b3283d7bc4e49ae7330ce62a2 Mon Sep 17 00:00:00 2001
From: Hardik
Date: Mon, 5 Nov 2012 18:45:17 +0530
Subject: [PATCH 30/55] [IMP]Warn is replaced by Notify in openerp
bzr revid: hsa@tinyerp.com-20121105131517-ri0ocvl3o26hmuib
---
addons/analytic/analytic_view.xml | 2 +-
addons/purchase/res_config.py | 2 +-
addons/sale/res_config.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/analytic/analytic_view.xml b/addons/analytic/analytic_view.xml
index 17371f8609f..4d41831f499 100644
--- a/addons/analytic/analytic_view.xml
+++ b/addons/analytic/analytic_view.xml
@@ -40,7 +40,7 @@
Once the end date of the contract is
passed or the maximum number of service
units (e.g. support contract) is
- reached, the account manager is warned
+ reached, the account manager is notifying
by email to renew the contract with the
customer.
diff --git a/addons/purchase/res_config.py b/addons/purchase/res_config.py
index 19b059d4d5b..38f4002b5a7 100644
--- a/addons/purchase/res_config.py
+++ b/addons/purchase/res_config.py
@@ -47,7 +47,7 @@ class purchase_config_settings(osv.osv_memory):
implied_group='purchase.group_delivery_invoice_address',
help="Allows you to specify different delivery and invoice addresses on a purchase order."),
'module_warning': fields.boolean("Alerts by products or supplier",
- help="""Allow to configure warnings on products and trigger them when a user wants to purchase a given product or a given supplier.
+ help="""Allow to configure notification on products and trigger them when a user wants to purchase a given product or a given supplier.
Example: Product: this product is deprecated, do not purchase more than 5.
Supplier: don't forget to ask for an express delivery."""),
diff --git a/addons/sale/res_config.py b/addons/sale/res_config.py
index 9ff3863bb7b..e9ac7934352 100644
--- a/addons/sale/res_config.py
+++ b/addons/sale/res_config.py
@@ -52,7 +52,7 @@ class sale_configuration(osv.osv_memory):
implied_group='sale.group_discount_per_so_line',
help="Allows you to apply some discount per sale order line."),
'module_warning': fields.boolean("Allow configuring alerts by customer or products",
- help="""Allow to configure warnings on products and trigger them when a user wants to sale a given product or a given customer.
+ help="""Allow to configure notification on products and trigger them when a user wants to sale a given product or a given customer.
Example: Product: this product is deprecated, do not purchase more than 5.
Supplier: don't forget to ask for an express delivery."""),
'module_sale_margin': fields.boolean("Display margins on sales orders",
From cd88f9ec02bd59a7ec1d58ca8e1642a27c429a63 Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Mon, 5 Nov 2012 16:05:40 +0100
Subject: [PATCH 31/55] modified doc
bzr revid: nicolas.vanhoren@openerp.com-20121105150540-yhcfpoiwffv6kjs3
---
addons/web/static/src/js/view_form.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index af38352e7f5..956f0468ded 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -2022,7 +2022,7 @@ instance.web.form.FieldInterface = {
on_translate: function() {},
/**
This method is called by the form view before reading on_change values and before saving. It tells
- the field to save its value before reading it using get_value(). Must return a deferred.
+ the field to save its value before reading it using get_value(). Must return a promise.
*/
commit_value: function() {},
};
@@ -2265,7 +2265,7 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
},
focus: function() {
this.$('input:first').focus();
- }
+ },
});
instance.web.form.FieldID = instance.web.form.FieldChar.extend({
From 90484f785867fa3f3b1030a221d8e20d1d5f6549 Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Mon, 5 Nov 2012 18:14:12 +0100
Subject: [PATCH 32/55] Implemented commit_value in o2m (must still fix problem
in list editable, it does not seem to tolerate multiple calls to save)
bzr revid: nicolas.vanhoren@openerp.com-20121105171412-g8okue97wjbkeu3t
---
addons/web/static/src/js/view_form.js | 55 +++++++++++----------------
1 file changed, 23 insertions(+), 32 deletions(-)
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 956f0468ded..f6aea0eb387 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -616,10 +616,11 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
var save_obj = self.save_list.pop();
if (save_obj) {
return self._process_save(save_obj).pipe(function() {
- return iterate.apply(null, arguments);
+ save_obj.ret = _.toArray(arguments);
+ return iterate();
});
}
- return $.when.apply($, args);
+ return $.when();
});
};
return iterate();
@@ -802,8 +803,11 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
*/
save: function(prepend_on_create) {
var self = this;
- this.save_list.push({prepend_on_create: prepend_on_create});
- return this._process_operations();
+ var save_obj = {prepend_on_create: prepend_on_create, ret: null};
+ this.save_list.push(save_obj);
+ return this._process_operations().pipe(function() {
+ return $.when.apply($, save_obj.ret);
+ });
},
_process_save: function(save_obj) {
var self = this;
@@ -3284,10 +3288,7 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
this.reload_current_view();
},
trigger_on_change: function() {
- var tmp = this.doing_on_change;
- this.doing_on_change = true;
this.trigger('changed_value');
- this.doing_on_change = tmp;
},
load_views: function() {
var self = this;
@@ -3482,7 +3483,6 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
var self = this;
if (!this.dataset)
return [];
- this.save_any_view();
var val = this.dataset.delete_all ? [commands.delete_all()] : [];
val = val.concat(_.map(this.dataset.ids, function(id) {
var alter_order = _.detect(self.dataset.to_create, function(x) {return x.id === id;});
@@ -3499,33 +3499,24 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
this.dataset.to_delete, function(x) {
return commands['delete'](x.id);}));
},
+ commit_value: function() {
+ return this.save_any_view();
+ },
save_any_view: function() {
- if (this.doing_on_change)
- return false;
- return this.session.synchronized_mode(_.bind(function() {
- if (this.viewmanager && this.viewmanager.views && this.viewmanager.active_view &&
- this.viewmanager.views[this.viewmanager.active_view] &&
- this.viewmanager.views[this.viewmanager.active_view].controller) {
- var view = this.viewmanager.views[this.viewmanager.active_view].controller;
- if (this.viewmanager.active_view === "form") {
- if (!view.is_initialized.isResolved()) {
- return false;
- }
- var res = $.when(view.save());
- if (!res.isResolved() && !res.isRejected()) {
- console.warn("Asynchronous get_value() is not supported in form view.");
- }
- return res;
- } else if (this.viewmanager.active_view === "list") {
- var res = $.when(view.ensure_saved());
- if (!res.isResolved() && !res.isRejected()) {
- console.warn("Asynchronous get_value() is not supported in list view.");
- }
- return res;
+ if (this.viewmanager && this.viewmanager.views && this.viewmanager.active_view &&
+ this.viewmanager.views[this.viewmanager.active_view] &&
+ this.viewmanager.views[this.viewmanager.active_view].controller) {
+ var view = this.viewmanager.views[this.viewmanager.active_view].controller;
+ if (this.viewmanager.active_view === "form") {
+ if (!view.is_initialized.isResolved()) {
+ return $.when(false);
}
+ return $.when(view.save());
+ } else if (this.viewmanager.active_view === "list") {
+ return $.when(view.ensure_saved());
}
- return false;
- }, this));
+ }
+ return $.when(false);
},
is_syntax_valid: function() {
if (! this.viewmanager || ! this.viewmanager.views[this.viewmanager.active_view])
From 92cc2f694b5e7a5f338a0ef1030e02193b7c4d9e Mon Sep 17 00:00:00 2001
From: Hardik
Date: Tue, 6 Nov 2012 10:48:51 +0530
Subject: [PATCH 33/55] [IMP]Update string warned to notified
bzr revid: hsa@tinyerp.com-20121106051851-t3m552k1es3dk7pb
---
addons/analytic/analytic_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/analytic/analytic_view.xml b/addons/analytic/analytic_view.xml
index 4d41831f499..1277d25de71 100644
--- a/addons/analytic/analytic_view.xml
+++ b/addons/analytic/analytic_view.xml
@@ -40,7 +40,7 @@
Once the end date of the contract is
passed or the maximum number of service
units (e.g. support contract) is
- reached, the account manager is notifying
+ reached, the account manager is notified
by email to renew the contract with the
customer.
From d3605367dcc124a91ea3f18d0cd533ca47fc701a Mon Sep 17 00:00:00 2001
From: Hardik
Date: Tue, 6 Nov 2012 11:38:29 +0530
Subject: [PATCH 34/55] [IMP]Update tooltip
bzr revid: hsa@tinyerp.com-20121106060829-zwt3s9rb84kf8hvl
---
addons/purchase/res_config.py | 5 ++---
addons/sale/res_config.py | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/addons/purchase/res_config.py b/addons/purchase/res_config.py
index 38f4002b5a7..8720ee796dc 100644
--- a/addons/purchase/res_config.py
+++ b/addons/purchase/res_config.py
@@ -48,9 +48,8 @@ class purchase_config_settings(osv.osv_memory):
help="Allows you to specify different delivery and invoice addresses on a purchase order."),
'module_warning': fields.boolean("Alerts by products or supplier",
help="""Allow to configure notification on products and trigger them when a user wants to purchase a given product or a given supplier.
- Example: Product: this product is deprecated, do not purchase more than 5.
- Supplier: don't forget to ask for an express delivery."""),
-
+Example: Product: this product is deprecated, do not purchase more than 5.
+ Supplier: don't forget to ask for an express delivery."""),
'module_purchase_double_validation': fields.boolean("Force two levels of approvals",
help="""Provide a double validation mechanism for purchases exceeding minimum amount.
This installs the module purchase_double_validation."""),
diff --git a/addons/sale/res_config.py b/addons/sale/res_config.py
index e9ac7934352..fa2b2f56302 100644
--- a/addons/sale/res_config.py
+++ b/addons/sale/res_config.py
@@ -53,8 +53,8 @@ class sale_configuration(osv.osv_memory):
help="Allows you to apply some discount per sale order line."),
'module_warning': fields.boolean("Allow configuring alerts by customer or products",
help="""Allow to configure notification on products and trigger them when a user wants to sale a given product or a given customer.
- Example: Product: this product is deprecated, do not purchase more than 5.
- Supplier: don't forget to ask for an express delivery."""),
+Example: Product: this product is deprecated, do not purchase more than 5.
+ Supplier: don't forget to ask for an express delivery."""),
'module_sale_margin': fields.boolean("Display margins on sales orders",
help="""This adds the 'Margin' on sales order.
This gives the profitability by calculating the difference between the Unit Price and Cost Price.
From 86e5cb39e955da538e456c7a674fe3979e3d4e2e Mon Sep 17 00:00:00 2001
From: "pankita shah (Open ERP)"
Date: Tue, 6 Nov 2012 11:39:06 +0530
Subject: [PATCH 35/55] [FIX] traceback when send mail in interview request
bzr revid: shp@tinyerp.com-20121106060906-a5s23miwxc5i0zg5
---
addons/hr_evaluation/hr_evaluation.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py
index b13e90cd627..eece0c7497e 100644
--- a/addons/hr_evaluation/hr_evaluation.py
+++ b/addons/hr_evaluation/hr_evaluation.py
@@ -291,6 +291,7 @@ survey_request()
class hr_evaluation_interview(osv.osv):
_name = 'hr.evaluation.interview'
_inherits = {'survey.request': 'request_id'}
+ _inherit = 'mail.thread'
_rec_name = 'request_id'
_description = 'Appraisal Interview'
_columns = {
From f4f45c476c2a734d45170f12400413bcfaa0a7ac Mon Sep 17 00:00:00 2001
From: "Rajesh Prajapati (OpenERP)"
Date: Tue, 6 Nov 2012 11:57:36 +0530
Subject: [PATCH 36/55] [IMP] account : added constraints to check parent
account
bzr revid: rpr@tinyerp.com-20121106062736-28vgz6515h4rt3s2
---
addons/account/account.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/addons/account/account.py b/addons/account/account.py
index c9dd1950347..90ae22a08bd 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -541,10 +541,18 @@ class account_account(osv.osv):
return False
return True
+ def _check_parent_id(self, cr, uid, ids, context=None):
+ parent = self.browse(cr, uid, ids, context=context)[0]
+ if parent.parent_id:
+ if parent.company_id != parent.parent_id.company_id:
+ return False
+ return True
+
_constraints = [
(_check_recursion, 'Error!\nYou cannot create recursive accounts.', ['parent_id']),
(_check_type, 'Configuration Error!\nYou cannot define children to an account with internal type different of "View".', ['type']),
(_check_account_type, 'Configuration Error!\nYou cannot select an account type with a deferral method different of "Unreconciled" for accounts with internal type "Payable/Receivable".', ['user_type','type']),
+ (_check_parent_id, 'You cannot create an account which has parent account of different company.', ['parent_id']),
]
_sql_constraints = [
('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !')
From 0710ad8a674dfa60e564535d694ffedd42d212d2 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Tue, 6 Nov 2012 12:16:13 +0530
Subject: [PATCH 37/55] [IMP] remove context
bzr revid: fka@tinyerp.com-20121106064613-ky6ujndnxpzlygwy
---
addons/project/project.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/addons/project/project.py b/addons/project/project.py
index 1f4931d5e59..63aa457def5 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -1320,7 +1320,6 @@ class task(base_stage, osv.osv):
'res_model': 'project.task.reevaluate',
'type': 'ir.actions.act_window',
'target': 'new',
- 'context' : context
}
return self.do_reopen(cr, uid, ids, context=context)
From 43aefa10f67918698c16469d3b3984c40fe128c2 Mon Sep 17 00:00:00 2001
From: "Rajesh Prajapati (OpenERP)"
Date: Tue, 6 Nov 2012 12:58:25 +0530
Subject: [PATCH 38/55] [IMP] account : method name changed
bzr revid: rpr@tinyerp.com-20121106072825-6vza2ecmycimi4eo
---
addons/account/account.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/addons/account/account.py b/addons/account/account.py
index 90ae22a08bd..233b8a0454a 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -541,10 +541,10 @@ class account_account(osv.osv):
return False
return True
- def _check_parent_id(self, cr, uid, ids, context=None):
- parent = self.browse(cr, uid, ids, context=context)[0]
- if parent.parent_id:
- if parent.company_id != parent.parent_id.company_id:
+ def _check_company_account(self, cr, uid, ids, context=None):
+ account = self.browse(cr, uid, ids, context=context)[0]
+ if account.parent_id:
+ if account.company_id != account.parent_id.company_id:
return False
return True
@@ -552,7 +552,7 @@ class account_account(osv.osv):
(_check_recursion, 'Error!\nYou cannot create recursive accounts.', ['parent_id']),
(_check_type, 'Configuration Error!\nYou cannot define children to an account with internal type different of "View".', ['type']),
(_check_account_type, 'Configuration Error!\nYou cannot select an account type with a deferral method different of "Unreconciled" for accounts with internal type "Payable/Receivable".', ['user_type','type']),
- (_check_parent_id, 'You cannot create an account which has parent account of different company.', ['parent_id']),
+ (_check_company_account, 'You cannot create an account which has parent account of different company.', ['parent_id']),
]
_sql_constraints = [
('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !')
From 76a5ceef15a2c5bff05cd9b216e0113e45f154b1 Mon Sep 17 00:00:00 2001
From: "Rajesh Prajapati (OpenERP)"
Date: Tue, 6 Nov 2012 14:51:52 +0530
Subject: [PATCH 39/55] [IMP] account : method code changed
bzr revid: rpr@tinyerp.com-20121106092152-sjyespyes2bxjrp2
---
addons/account/account.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/account/account.py b/addons/account/account.py
index 233b8a0454a..28cfe36e3d0 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -542,10 +542,10 @@ class account_account(osv.osv):
return True
def _check_company_account(self, cr, uid, ids, context=None):
- account = self.browse(cr, uid, ids, context=context)[0]
- if account.parent_id:
- if account.company_id != account.parent_id.company_id:
- return False
+ for account in self.browse(cr, uid, ids, context=context):
+ if account.parent_id:
+ if account.company_id != account.parent_id.company_id:
+ return False
return True
_constraints = [
From 5ead513bf26d1b92122d3732841e9177d68794d1 Mon Sep 17 00:00:00 2001
From: "Rajesh Prajapati (OpenERP)"
Date: Tue, 6 Nov 2012 14:54:01 +0530
Subject: [PATCH 40/55] [IMP] account : string changed
bzr revid: rpr@tinyerp.com-20121106092401-slfgkto8kvrv2o4v
---
addons/account/account.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account/account.py b/addons/account/account.py
index 28cfe36e3d0..cfba30856a9 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -552,7 +552,7 @@ class account_account(osv.osv):
(_check_recursion, 'Error!\nYou cannot create recursive accounts.', ['parent_id']),
(_check_type, 'Configuration Error!\nYou cannot define children to an account with internal type different of "View".', ['type']),
(_check_account_type, 'Configuration Error!\nYou cannot select an account type with a deferral method different of "Unreconciled" for accounts with internal type "Payable/Receivable".', ['user_type','type']),
- (_check_company_account, 'You cannot create an account which has parent account of different company.', ['parent_id']),
+ (_check_company_account, 'Error!\nYou cannot create an account which has parent account of different company.', ['parent_id']),
]
_sql_constraints = [
('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !')
From 13ccbc9f6ee28d1888eff671847f5636b5a76c88 Mon Sep 17 00:00:00 2001
From: "Jalpesh Patel (OpenERP)"
Date: Tue, 6 Nov 2012 15:07:24 +0530
Subject: [PATCH 41/55] [IMP]fix proble of click favorite
bzr revid: pja@tinyerp.com-20121106093724-m597jx8m1z73qaxq
---
addons/mail/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/mail/__init__.py b/addons/mail/__init__.py
index aea7ee62cbc..003369be38f 100644
--- a/addons/mail/__init__.py
+++ b/addons/mail/__init__.py
@@ -22,12 +22,12 @@
import mail_message_subtype
import mail_alias
import mail_followers
+import mail_favorite
import mail_message
import mail_mail
import mail_thread
import mail_group
import mail_vote
-import mail_favorite
import res_partner
import res_users
import report
From fd2bb078fb297c59b0359816e5cff5a33dbfc1a7 Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Tue, 6 Nov 2012 11:38:28 +0100
Subject: [PATCH 42/55] Fixed problem with editable list
bzr revid: nicolas.vanhoren@openerp.com-20121106103828-uw6xv1ed7wueii71
---
addons/web/static/src/js/view_form.js | 2 +-
addons/web/static/src/js/view_list_editable.js | 13 +++++++++----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index f6aea0eb387..dd9d8fe7c09 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -3739,7 +3739,7 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
}
// FIXME: why isn't there an API for this?
if (this.editor.form.$el.hasClass('oe_form_dirty')) {
- this.save_edition();
+ this.ensure_saved();
return;
}
this.cancel_edition();
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js
index 021e5549c18..85465e1c54e 100644
--- a/addons/web/static/src/js/view_list_editable.js
+++ b/addons/web/static/src/js/view_list_editable.js
@@ -12,6 +12,8 @@ openerp.web.list_editable = function (instance) {
var self = this;
this._super.apply(this, arguments);
+ this.saving_mutex = new $.Mutex();
+
this._force_editability = null;
this._context_editable = false;
this.editor = this.make_editor();
@@ -162,10 +164,13 @@ openerp.web.list_editable = function (instance) {
* @returns {$.Deferred}
*/
ensure_saved: function () {
- if (!this.editor.is_editing()) {
- return $.when();
- }
- return this.save_edition();
+ var self = this;
+ return this.saving_mutex.exec(function() {
+ if (!self.editor.is_editing()) {
+ return $.when();
+ }
+ return self.save_edition();
+ });
},
/**
* Set up the edition of a record of the list view "inline"
From a1fa0d61d69fd8ade6da41fb42c44d4b6d172962 Mon Sep 17 00:00:00 2001
From: "Jalpesh Patel (OpenERP)"
Date: Tue, 6 Nov 2012 18:50:25 +0530
Subject: [PATCH 43/55] [IMP]don't modify leave request in validate state
bzr revid: pja@tinyerp.com-20121106132025-9wrimitdry3bi7kk
---
addons/hr_holidays/hr_holidays.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 0977f3729b4..6fee61f2696 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -211,6 +211,13 @@ class hr_holidays(osv.osv):
'number_of_days_temp': 0,
}
return result
+
+ def write(self,cr, uid, ids,vals, context=None):
+ res = super(hr_holidays, self).write(cr, uid, ids,vals, context=context)
+ for val in self.browse(cr, uid, ids, context=context):
+ if val.state == 'validate' and val.employee_id.user_id.id == uid :
+ raise osv.except_osv(_('Warning!'),_('"You cannot modify leave request in approved state"'))
+ return res
def set_to_draft(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {
From 54fb04a3682281dc1c43459887b7612ac2808d87 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Tue, 6 Nov 2012 19:25:15 +0530
Subject: [PATCH 44/55] [FIX]: Add constraints to fix same day overlaps problem
bzr revid: atp@tinyerp.com-20121106135515-3pp7rsrtnspvb28g
---
addons/hr_holidays/hr_holidays.py | 13 +++++++++++++
addons/hr_holidays/hr_holidays_demo.xml | 8 ++++----
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 0977f3729b4..8d4f874b464 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -112,6 +112,14 @@ class hr_holidays(osv.osv):
result[hol.id] = hol.number_of_days_temp
return result
+ def _check_date(self, cr, uid, ids):
+ for holiday in self.browse(cr, uid, ids):
+ holiday_ids = self.search(cr, uid, [('date_from', '<=', holiday.date_to), ('date_to', '>=', holiday.date_from), ('employee_id', '=', holiday.employee_id.id), ('id', '<>', holiday.id)])
+ if holiday_ids:
+ return False
+ return True
+
+
_columns = {
'name': fields.char('Description', size=64),
'state': fields.selection([('draft', 'To Submit'), ('cancel', 'Cancelled'),('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')],
@@ -145,6 +153,11 @@ class hr_holidays(osv.osv):
'user_id': lambda obj, cr, uid, context: uid,
'holiday_type': 'employee'
}
+
+ _constraints = [
+ (_check_date, 'You can not have 2 Leaves that overlaps on same day!', ['date_from','date_to']),
+ ]
+
_sql_constraints = [
('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "The employee or employee category of this request is missing."),
('date_check2', "CHECK ( (type='add') OR (date_from <= date_to))", "The start date must be before the end date !"),
diff --git a/addons/hr_holidays/hr_holidays_demo.xml b/addons/hr_holidays/hr_holidays_demo.xml
index 4c9d18683c7..accf8c26935 100644
--- a/addons/hr_holidays/hr_holidays_demo.xml
+++ b/addons/hr_holidays/hr_holidays_demo.xml
@@ -34,8 +34,8 @@
Summer Vacation
-
-
+
+ adddraft7
@@ -45,8 +45,8 @@
International Tour
-
-
+
+ add7
From efd48ffbefd0a2a2303e0acdbed8f29520d1b537 Mon Sep 17 00:00:00 2001
From: Antonin Bourguignon
Date: Tue, 6 Nov 2012 18:51:42 +0100
Subject: [PATCH 45/55] [WIP] fix the duplicate partner creation when
converting a lead to opportunity
lp bug: https://launchpad.net/bugs/1065751 fixed
bzr revid: abo@openerp.com-20121106175142-eoozcwd8xz5412mk
---
addons/crm/crm_lead.py | 2 +-
addons/crm/wizard/crm_lead_to_opportunity.py | 14 +++++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 5ab68860874..2751405f454 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -610,9 +610,9 @@ class crm_lead(base_stage, format_address, osv.osv):
}
def convert_opportunity(self, cr, uid, ids, partner_id, user_ids=False, section_id=False, context=None):
- partner = self.pool.get('res.partner')
customer = False
if partner_id:
+ partner = self.pool.get('res.partner')
customer = partner.browse(cr, uid, partner_id, context=context)
for lead in self.browse(cr, uid, ids, context=context):
if lead.state in ('done', 'cancel'):
diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
index 2473a83206c..4a0467ccb2a 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity.py
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -105,6 +105,7 @@ class crm_lead2opportunity_partner(osv.osv_memory):
context = {}
lead = self.pool.get('crm.lead')
res = False
+ # FIXME: automatically creating a partner ?
partner_ids_map = self._create_partner(cr, uid, ids, context=context)
lead_ids = vals.get('lead_ids', [])
team_id = vals.get('section_id', False)
@@ -175,12 +176,19 @@ class crm_lead2opportunity_mass_convert(osv.osv_memory):
return res
def _convert_opportunity(self, cr, uid, ids, vals, context=None):
+ """
+ When "massively" (more than one at a time) converting leads to
+ opportunities, check the salesteam_id and salesmen_ids and update
+ the values before calling super.
+ """
+ if context is None:
+ context = {}
data = self.browse(cr, uid, ids, context=context)[0]
salesteam_id = data.section_id and data.section_id.id or False
- salesman = []
+ salesmen_ids = []
if data.user_ids:
- salesman = [x.id for x in data.user_ids]
- vals.update({'user_ids': salesman, 'section_id': salesteam_id})
+ salesmen_ids = [x.id for x in data.user_ids]
+ vals.update({'user_ids': salesmen_ids, 'section_id': salesteam_id})
return super(crm_lead2opportunity_mass_convert, self)._convert_opportunity(cr, uid, ids, vals, context=context)
def mass_convert(self, cr, uid, ids, context=None):
From cda1256ae89f92ef18aa4e113d2135f34ff1a71d Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Wed, 7 Nov 2012 11:23:10 +0530
Subject: [PATCH 46/55] [FIX]: Fix condition for validate holidays
bzr revid: atp@tinyerp.com-20121107055310-2t4j7ftz7ax4ci92
---
addons/hr_holidays/hr_holidays.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 600e205b0d8..cbaaa42a8fa 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -269,7 +269,7 @@ class hr_holidays(osv.osv):
def write(self, cr, uid, ids, vals, context=None):
res = super(hr_holidays, self).write(cr, uid, ids, vals, context=context)
for holiday in self.browse(cr, uid, ids, context=context):
- if holiday.state == 'validate' and holiday.employee_id.user_id.id == uid:
+ if holiday.state == 'validate' and holiday.employee_id.user_id.id != 1:
raise osv.except_osv(_('Warning!'),_('You cannot modify leave request, Once the leave Request has been approved'))
return res
From 58f5269f11c96a1b59db2410ccf6cd50324681fb Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Wed, 7 Nov 2012 11:41:52 +0530
Subject: [PATCH 47/55] [FIX]: fix validation problem
bzr revid: atp@tinyerp.com-20121107061152-ch2ti57eezbw2xo8
---
addons/hr_holidays/hr_holidays.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index cbaaa42a8fa..88622f8b6ed 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -269,7 +269,8 @@ class hr_holidays(osv.osv):
def write(self, cr, uid, ids, vals, context=None):
res = super(hr_holidays, self).write(cr, uid, ids, vals, context=context)
for holiday in self.browse(cr, uid, ids, context=context):
- if holiday.state == 'validate' and holiday.employee_id.user_id.id != 1:
+
+ if holiday.state == 'validate' and holiday.employee_id.user_id.id == uid and uid != 1:
raise osv.except_osv(_('Warning!'),_('You cannot modify leave request, Once the leave Request has been approved'))
return res
From 5a4a17268a2e39e7903c1c1382de8da0e05725f9 Mon Sep 17 00:00:00 2001
From: "Bharat Devnani (OpenERP)"
Date: Wed, 7 Nov 2012 12:35:15 +0530
Subject: [PATCH 48/55] [IMP] changed instances of USD to EUR in tooltips
bzr revid: bde@tinyerp.com-20121107070515-3d1t4u5fwe1n1vf1
---
addons/account/res_config.py | 2 +-
addons/purchase/res_config.py | 2 +-
addons/sale/res_config.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/account/res_config.py b/addons/account/res_config.py
index 371e530c9e4..8f525795d1c 100644
--- a/addons/account/res_config.py
+++ b/addons/account/res_config.py
@@ -113,7 +113,7 @@ class account_config_settings(osv.osv_memory):
'default_purchase_tax': fields.many2one('account.tax', 'Default purchase tax',
help="This purchase tax will be assigned by default on new products."),
'decimal_precision': fields.integer('Decimal precision on journal entries',
- help="""As an example, a decimal precision of 2 will allow journal entries like: 9.99 USD, whereas a decimal precision of 4 will allow journal entries like: 0.0231 USD."""),
+ help="""As an example, a decimal precision of 2 will allow journal entries like: 9.99 EUR, whereas a decimal precision of 4 will allow journal entries like: 0.0231 EUR."""),
'group_multi_currency': fields.boolean('Allow multi currencies',
implied_group='base.group_multi_currency',
help="Allows you multi currency environment"),
diff --git a/addons/purchase/res_config.py b/addons/purchase/res_config.py
index 09a3d082c8a..8720ee796dc 100644
--- a/addons/purchase/res_config.py
+++ b/addons/purchase/res_config.py
@@ -36,7 +36,7 @@ class purchase_config_settings(osv.osv_memory):
'group_purchase_pricelist':fields.boolean("Manage pricelist per supplier",
implied_group='product.group_purchase_pricelist',
help="""Allows to manage different prices based on rules per category of Supplier.
- Example: 10% for retailers, promotion of 5 USD on this product, etc."""),
+ Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
'group_uom':fields.boolean("Manage different units of measure for products",
implied_group='product.group_uom',
help="""Allows you to select and maintain different units of measure for products."""),
diff --git a/addons/sale/res_config.py b/addons/sale/res_config.py
index 25aff8119d5..d8e9d0fef6f 100644
--- a/addons/sale/res_config.py
+++ b/addons/sale/res_config.py
@@ -44,7 +44,7 @@ class sale_configuration(osv.osv_memory):
'group_sale_pricelist':fields.boolean("Use pricelists to adapt your price per customers",
implied_group='product.group_sale_pricelist',
help="""Allows to manage different prices based on rules per category of customers.
-Example: 10% for retailers, promotion of 5 USD on this product, etc."""),
+Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
'group_uom':fields.boolean("Allow using different units of measures",
implied_group='product.group_uom',
help="""Allows you to select and maintain different units of measure for products."""),
From 48bf8e72da86c960a2099b505c3944999d311efd Mon Sep 17 00:00:00 2001
From: Antonin Bourguignon
Date: Wed, 7 Nov 2012 17:11:42 +0100
Subject: [PATCH 49/55] [IMP] minor imp of code style
bzr revid: abo@openerp.com-20121107161142-c5iqr501mxbghy82
---
addons/crm/crm_lead.py | 3 ++-
addons/crm/wizard/crm_lead_to_opportunity.py | 1 -
addons/crm/wizard/crm_lead_to_partner.py | 19 ++++++++-----------
3 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 2751405f454..89598cb1909 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -676,7 +676,7 @@ class crm_lead(base_stage, format_address, osv.osv):
def convert_partner(self, cr, uid, ids, action='create', partner_id=False, context=None):
"""
- This function convert partner based on action.
+ Convert partner based on action.
if action is 'create', create new partner with contact and assign lead to new partner_id.
otherwise assign lead to specified partner_id
"""
@@ -684,6 +684,7 @@ class crm_lead(base_stage, format_address, osv.osv):
context = {}
partner_ids = {}
force_partner_id = partner_id
+ import pudb; pudb.set_trace();
for lead in self.browse(cr, uid, ids, context=context):
if action == 'create':
if not partner_id:
diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
index 4a0467ccb2a..ea96e1d16f1 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity.py
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -105,7 +105,6 @@ class crm_lead2opportunity_partner(osv.osv_memory):
context = {}
lead = self.pool.get('crm.lead')
res = False
- # FIXME: automatically creating a partner ?
partner_ids_map = self._create_partner(cr, uid, ids, context=context)
lead_ids = vals.get('lead_ids', [])
team_id = vals.get('section_id', False)
diff --git a/addons/crm/wizard/crm_lead_to_partner.py b/addons/crm/wizard/crm_lead_to_partner.py
index c201f484989..c48990f5866 100644
--- a/addons/crm/wizard/crm_lead_to_partner.py
+++ b/addons/crm/wizard/crm_lead_to_partner.py
@@ -35,7 +35,7 @@ class crm_lead2partner(osv.osv_memory):
}
def view_init(self, cr, uid, fields, context=None):
"""
- This function checks for precondition before wizard executes
+ Check for precondition before wizard executes.
"""
if context is None:
context = {}
@@ -69,22 +69,19 @@ class crm_lead2partner(osv.osv_memory):
return partner_id
def default_get(self, cr, uid, fields, context=None):
- """
- This function gets default values
- """
- res = super(crm_lead2partner, self).default_get(cr, uid, fields, context=context)
+ res = super(crm_lead2partner, self).default_get(cr, uid, fields, context=context)
partner_id = self._select_partner(cr, uid, context=context)
if 'partner_id' in fields:
res.update({'partner_id': partner_id})
if 'action' in fields:
res.update({'action': partner_id and 'exist' or 'create'})
-
+
return res
def open_create_partner(self, cr, uid, ids, context=None):
"""
- This function Opens form of create partner.
+ Open form of create partner.
"""
view_obj = self.pool.get('ir.ui.view')
view_id = view_obj.search(cr, uid, [('model', '=', self._name), \
@@ -101,21 +98,21 @@ class crm_lead2partner(osv.osv_memory):
def _create_partner(self, cr, uid, ids, context=None):
"""
- This function Creates partner based on action.
+ Create partner based on action.
"""
if context is None:
context = {}
lead = self.pool.get('crm.lead')
- lead_ids = context and context.get('active_ids') or []
+ lead_ids = context.get('active_ids', [])
data = self.browse(cr, uid, ids, context=context)[0]
partner_id = data.partner_id and data.partner_id.id or False
return lead.convert_partner(cr, uid, lead_ids, data.action, partner_id, context=context)
def make_partner(self, cr, uid, ids, context=None):
"""
- This function Makes partner based on action.
+ Make a partner based on action.
+ Only called from form view, so only meant to convert one lead at a time.
"""
- # Only called from Form view, so only meant to convert one Lead.
lead_id = context and context.get('active_id') or False
partner_ids_map = self._create_partner(cr, uid, ids, context=context)
return self.pool.get('res.partner').redirect_partner_form(cr, uid, partner_ids_map.get(lead_id, False), context=context)
From ab8b6fae11ad614daa769d9448942811c1c35b82 Mon Sep 17 00:00:00 2001
From: Antonin Bourguignon
Date: Wed, 7 Nov 2012 17:30:37 +0100
Subject: [PATCH 50/55] [FIX] the double partner creation in lead2opportunity
(introduced in revno 7251.1.122
revid:odo@openerp.com-20120823200629-1m1eym62l7aabzgl)
lp bug: https://launchpad.net/bugs/1065751 fixed
bzr revid: abo@openerp.com-20121107163037-bmywme6nnhlxaaic
---
addons/crm/crm_lead.py | 3 ---
1 file changed, 3 deletions(-)
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 89598cb1909..64ba9476701 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -683,13 +683,10 @@ class crm_lead(base_stage, format_address, osv.osv):
if context is None:
context = {}
partner_ids = {}
- force_partner_id = partner_id
- import pudb; pudb.set_trace();
for lead in self.browse(cr, uid, ids, context=context):
if action == 'create':
if not partner_id:
partner_id = self._create_lead_partner(cr, uid, lead, context)
- partner_id = force_partner_id or self._create_lead_partner(cr, uid, lead, context=context)
self._lead_set_partner(cr, uid, lead, partner_id, context=context)
partner_ids[lead.id] = partner_id
return partner_ids
From b5b3cbf4e4fd966d6793076a1ac6cc2e795dde9c Mon Sep 17 00:00:00 2001
From: Fabien Pinckaers
Date: Wed, 7 Nov 2012 18:33:49 +0100
Subject: [PATCH 51/55] [FIX] typo
bzr revid: fp@tinyerp.com-20121107173349-02vp0acqgdcnmi83
---
openerp/addons/base/res/res_users_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openerp/addons/base/res/res_users_view.xml b/openerp/addons/base/res/res_users_view.xml
index 78579fc66df..cfab4b7d341 100644
--- a/openerp/addons/base/res/res_users_view.xml
+++ b/openerp/addons/base/res/res_users_view.xml
@@ -202,6 +202,7 @@
()
+
@@ -213,7 +214,6 @@