diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 57f16473b82..0508a7cadfe 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -185,6 +185,7 @@ class account_invoice(osv.osv):
_columns = {
'name': fields.char('Description', size=64, select=True, readonly=True, states={'draft':[('readonly',False)]}),
'origin': fields.char('Source Document', size=64, help="Reference of the document that produced this invoice.", readonly=True, states={'draft':[('readonly',False)]}),
+ 'supplier_invoice_number': fields.char('Supplier Invoice Number', size=64, help="The reference of this invoice as provided by the supplier.", readonly=True, states={'draft':[('readonly',False)]}),
'type': fields.selection([
('out_invoice','Customer Invoice'),
('in_invoice','Supplier Invoice'),
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 8516fcd96ae..ee5a911d933 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -170,12 +170,15 @@
context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}"
domain="[('supplier', '=', True)]"/>
-
-
-
+
+
+
+
+
+
-
+
@@ -449,7 +452,7 @@
account.invoice
-
+
diff --git a/addons/base_crypt/crypt.py b/addons/base_crypt/crypt.py
index 81a60a5dd5f..3accc2740e9 100644
--- a/addons/base_crypt/crypt.py
+++ b/addons/base_crypt/crypt.py
@@ -140,15 +140,18 @@ class users(osv.osv):
# Add handlers for 'input_pw' field.
def set_pw(self, cr, uid, id, name, value, args, context):
- if not value:
- raise osv.except_osv(_('Error!'), _("You have to specify a password."))
+ if value:
+ obj = pooler.get_pool(cr.dbname).get('res.users')
+ if not hasattr(obj, "_salt_cache"):
+ obj._salt_cache = {}
- obj = pooler.get_pool(cr.dbname).get('res.users')
- if not hasattr(obj, "_salt_cache"):
- obj._salt_cache = {}
+ salt = obj._salt_cache[id] = gen_salt()
+ encrypted = encrypt_md5(value, salt)
- salt = obj._salt_cache[id] = gen_salt()
- encrypted = encrypt_md5(value, salt)
+ else:
+ #setting a password to '' is allowed. It can be used to inactivate the classic log-in of the user
+ #while the access can still be granted by another login method (openid...)
+ encrypted = ''
cr.execute('update res_users set password=%s where id=%s',
(encrypted.encode('utf-8'), int(id)))
cr.commit()
diff --git a/addons/event_sale/event_sale.py b/addons/event_sale/event_sale.py
index f37dea3f075..2dd40a7c285 100644
--- a/addons/event_sale/event_sale.py
+++ b/addons/event_sale/event_sale.py
@@ -40,7 +40,7 @@ class sale_order_line(osv.osv):
'event_id': fields.many2one('event.event', 'Event', help="Choose an event and it will automatically create a registration for this event."),
#those 2 fields are used for dynamic domains and filled by onchange
'event_type_id': fields.related('event_type_id', type='many2one', relation="event.type", string="Event Type"),
- 'event_ok': fields.related('event_ok', string='event_ok', type='boolean'),
+ 'event_ok': fields.related('product_id', 'event_ok', string='event_ok', type='boolean'),
}
def product_id_change(self, cr, uid, ids,