@@ -98,8 +100,6 @@
-
@@ -107,7 +107,7 @@
Create menu items that we'll leave empty for now - they'll be
filled up by other portal modules.
-->
-
+
diff --git a/addons/portal_sale/portal_sale.py b/addons/portal_sale/portal_sale.py
index a6ca616ad2f..cd3b702d3c5 100644
--- a/addons/portal_sale/portal_sale.py
+++ b/addons/portal_sale/portal_sale.py
@@ -59,19 +59,8 @@ class sale_order(osv.Model):
assert len(ids) == 1
document = self.browse(cr, uid, ids[0], context=context)
partner = document.partner_id
- # TDE note: this code should be improved: used a real invite wizard instead of an ugly email
if partner.id not in document.message_follower_ids:
self.message_subscribe(cr, uid, ids, [partner.id], context=context)
- mail_values = {
- 'recipient_ids': [(4, partner.id)],
- 'subject': 'Invitation to follow %s' % document.name_get()[0][1],
- 'body_html': 'You have been invited to follow %s' % document.name_get()[0][1],
- 'auto_delete': True,
- 'type': 'email',
- }
- mail_obj = self.pool.get('mail.mail')
- mail_id = mail_obj.create(cr, uid, mail_values, context=context)
- mail_obj.send(cr, uid, [mail_id], context=context)
return super(sale_order, self).action_button_confirm(cr, uid, ids, context=context)
def get_signup_url(self, cr, uid, ids, context=None):
diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py
index 73707e39807..757cce2ae95 100644
--- a/addons/product/pricelist.py
+++ b/addons/product/pricelist.py
@@ -374,7 +374,7 @@ class product_pricelist_item(osv.osv):
result.append((line.id, line.name))
result.append((-1, _('Other Pricelist')))
- result.append((-2, _('Partner section of the product form')))
+ result.append((-2, _('Supplier Prices on the product form')))
return result
_name = "product.pricelist.item"
diff --git a/addons/product/product.py b/addons/product/product.py
index 33225c92c6f..82b37f7b9e8 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -588,10 +588,13 @@ class product_product(osv.osv):
# Check if the product is last product of this template
other_product_ids = self.search(cr, uid, [('product_tmpl_id', '=', tmpl_id), ('id', '!=', product.id)], context=context)
if not other_product_ids:
- unlink_product_tmpl_ids.append(tmpl_id)
+ unlink_product_tmpl_ids.append(tmpl_id)
unlink_ids.append(product.id)
+ res = super(product_product, self).unlink(cr, uid, unlink_ids, context=context)
+ # delete templates after calling super, as deleting template could lead to deleting
+ # products due to ondelete='cascade'
self.pool.get('product.template').unlink(cr, uid, unlink_product_tmpl_ids, context=context)
- return super(product_product, self).unlink(cr, uid, unlink_ids, context=context)
+ return res
def onchange_uom(self, cursor, user, ids, uom_id, uom_po_id):
if uom_id and uom_po_id:
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index ddb1ab3809f..00e925fd6a0 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -581,6 +581,7 @@
The prices below will only be taken into account when your pricelist is set as based on supplier prices.