summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2015-02-06 14:02:43 +0100
committerDenis Ledoux <dle@odoo.com>2015-02-06 14:02:43 +0100
commitf92b2f8d4d246ec65fe4a15e871a6d7d8da6921f (patch)
treed1545b0b9ca577396634a4f8d7b131ee1149d14a /addons
parent0c9b8cd7af478e9f105534627fdb2be38d8c92f0 (diff)
parent0b7db5583f9b3b40c94ff7ed81cfb6bc2f3bd37e (diff)
[MERGE] forward port of branch 7.0 up to 0b7db55
Diffstat (limited to 'addons')
-rw-r--r--addons/product/security/ir.model.access.csv1
-rw-r--r--addons/share/wizard/share_wizard.py8
-rw-r--r--addons/stock/security/ir.model.access.csv1
-rw-r--r--addons/stock/stock.py8
-rw-r--r--addons/web/static/src/js/formats.js2
5 files changed, 13 insertions, 7 deletions
diff --git a/addons/product/security/ir.model.access.csv b/addons/product/security/ir.model.access.csv
index f1cf1964c93..86e39d7650c 100644
--- a/addons/product/security/ir.model.access.csv
+++ b/addons/product/security/ir.model.access.csv
@@ -12,6 +12,7 @@ access_product_pricelist_type_user,product.pricelist.type.user,model_product_pri
access_product_pricelist_user,product.pricelist.user,model_product_pricelist,base.group_user,1,0,0,0
access_product_pricelist_version_user,product.pricelist.version.user,model_product_pricelist_version,base.group_user,1,0,0,0
access_product_pricelist_item_user,product.pricelist.item.user,model_product_pricelist_item,base.group_user,1,0,0,0
+access_product_pricelist_item_sale_manager,product.pricelist.item salemanager,product.model_product_pricelist_item,base.group_sale_manager,1,1,1,1
access_product_pricelist_type_partner_manager,product.pricelist.type partner manager,model_product_pricelist_type,base.group_partner_manager,1,0,0,0
access_product_pricelist_partner_manager,product.pricelist partner manager,model_product_pricelist,base.group_partner_manager,1,0,0,0
access_product_product_employee,product.product employee,model_product_product,base.group_user,1,0,0,0
diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py
index 10937015dd6..7e43c3d2d42 100644
--- a/addons/share/wizard/share_wizard.py
+++ b/addons/share/wizard/share_wizard.py
@@ -490,7 +490,7 @@ class share_wizard(osv.TransientModel):
# already granted
for dummy, model in fields_relations:
# mail.message is transversal: it should not received directly the access rights
- if model.model in ['mail.message']: continue
+ if model.model in ['mail.message', 'mail.notification']: continue
values = {
'name': _('Copied access for sharing'),
'group_id': group_id,
@@ -622,7 +622,7 @@ class share_wizard(osv.TransientModel):
if domain:
for rel_field, model in fields_relations:
# mail.message is transversal: it should not received directly the access rights
- if model.model in ['mail.message']: continue
+ if model.model in ['mail.message', 'mail.notification']: continue
related_domain = []
if not rel_field: continue
for element in domain:
@@ -896,8 +896,8 @@ class share_result_line(osv.osv_memory):
for this in self.browse(cr, uid, ids, context=context):
data = dict(dbname=cr.dbname, login=this.login, password=this.password)
if this.share_wizard_id and this.share_wizard_id.action_id:
- data['action_id'] = this.share_wizard_id.action_id.id
- ctx = dict(context, share_url_template_hash_arguments=['action_id'])
+ data['action'] = this.share_wizard_id.action_id.id
+ ctx = dict(context, share_url_template_hash_arguments=['action'])
result[this.id] = this.share_wizard_id.share_url_template(context=ctx) % data
return result
diff --git a/addons/stock/security/ir.model.access.csv b/addons/stock/security/ir.model.access.csv
index a3bd5eb33cb..20e1f0f2570 100644
--- a/addons/stock/security/ir.model.access.csv
+++ b/addons/stock/security/ir.model.access.csv
@@ -42,7 +42,6 @@ access_account_invoice_line_user,account.invoice.line stock user,account.model_a
access_account_invoice_tax_user,account.invoice.tax stock user,account.model_account_invoice_tax,stock.group_stock_user,1,1,1,0
access_account_journal_user,account.journal stock user,account.model_account_journal,stock.group_stock_user,1,0,0,0
access_account_fiscalyear,account.fiscalyear stock user,account.model_account_fiscalyear,stock.group_stock_user,1,0,0,0
-access_product_pricelist_item_sale_manager,product.pricelist.item salemanager,product.model_product_pricelist_item,base.group_sale_manager,1,1,1,1
access_product_uom_categ_stock_manager,product.uom.categ stock_manager,product.model_product_uom_categ,stock.group_stock_manager,1,1,1,1
access_product_uom_stock_manager,product.uom stock_manager,product.model_product_uom,stock.group_stock_manager,1,1,1,1
access_product_ul_stock_manager,product.ul stock_manager,product.model_product_ul,stock.group_stock_manager,1,1,1,1
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index b68c009a05c..02b93eedaee 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -878,7 +878,13 @@ class stock_picking(osv.osv):
This method is called at the end of the workflow by the activity "done".
@return: True
"""
- self.write(cr, uid, ids, {'state': 'done', 'date_done': time.strftime('%Y-%m-%d %H:%M:%S')})
+ for picking in self.browse(cr, uid, ids, context=context):
+ values = {
+ 'state': 'done'
+ }
+ if not picking.date_done:
+ values['date_done'] = time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)
+ picking.write(values)
return True
def action_move(self, cr, uid, ids, context=None):
diff --git a/addons/web/static/src/js/formats.js b/addons/web/static/src/js/formats.js
index 3cff2a4b4f4..7831d2ba868 100644
--- a/addons/web/static/src/js/formats.js
+++ b/addons/web/static/src/js/formats.js
@@ -196,7 +196,7 @@ instance.web.format_value = function (value, descriptor, value_if_empty) {
+ ' ' + normalize_format(l10n.time_format));
case 'date':
if (typeof(value) == "string")
- value = instance.web.str_to_date(value.substring(0,10));
+ value = instance.web.auto_str_to_date(value);
return value.toString(normalize_format(l10n.date_format));
case 'time':
if (typeof(value) == "string")