[MERGE] forward port branch 10.0 up to 9150d4c552
This commit is contained in:
@@ -615,7 +615,7 @@ class Import(models.TransientModel):
|
||||
for num, line in enumerate(data):
|
||||
if line[index]:
|
||||
try:
|
||||
line[index] = dt.strftime(dt.strptime(ustr(line[index]).encode('utf-8'), user_format), server_format)
|
||||
line[index] = dt.strftime(dt.strptime(ustr(line[index].strip()).encode('utf-8'), user_format), server_format)
|
||||
except ValueError, e:
|
||||
raise ValueError(_("Column %s contains incorrect values. Error in line %d: %s") % (name, num + 1, ustr(e.message)))
|
||||
except Exception, e:
|
||||
|
||||
@@ -10,7 +10,7 @@ ERR_MSG = _("According to the french law, you cannot modify a %s in order for it
|
||||
|
||||
#forbidden fields
|
||||
MOVE_FIELDS = ['date', 'journal_id', 'company_id']
|
||||
LINE_FIELDS = ['debit', 'credit', 'account_id', 'move_id', 'partner_id']
|
||||
LINE_FIELDS = ['debit', 'credit', 'account_id', 'partner_id']
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
@@ -55,7 +55,8 @@ class AccountMove(models.Model):
|
||||
|
||||
for line in move.line_ids:
|
||||
for field in LINE_FIELDS:
|
||||
values[field] = _getattrstring(line, field)
|
||||
k = 'line_%d_%s' % (line.id, field)
|
||||
values[k] = _getattrstring(line, field)
|
||||
#make the json serialization canonical
|
||||
# (https://tools.ietf.org/html/draft-staykov-hu-json-canonical-form-00)
|
||||
move.l10n_fr_string_to_hash = dumps(values, sort_keys=True, encoding="utf-8",
|
||||
|
||||
@@ -562,7 +562,7 @@ class MassMailing(models.Model):
|
||||
def retry_failed_mail(self):
|
||||
failed_mails = self.env['mail.mail'].search([('mailing_id', 'in', self.ids), ('state', '=', 'exception')])
|
||||
failed_mails.mapped('statistics_ids').unlink()
|
||||
failed_mails.unlink()
|
||||
failed_mails.sudo().unlink()
|
||||
self.write({'state': 'in_queue'})
|
||||
|
||||
#------------------------------------------------------
|
||||
|
||||
@@ -106,7 +106,7 @@ class Pricelist(models.Model):
|
||||
"""
|
||||
self.ensure_one()
|
||||
if not date:
|
||||
date = self._context.get('date', fields.Date.today())
|
||||
date = self._context.get('date') or fields.Date.today()
|
||||
if not uom_id and self._context.get('uom'):
|
||||
uom_id = self._context['uom']
|
||||
if uom_id:
|
||||
|
||||
@@ -314,6 +314,12 @@ msgstr ""
|
||||
msgid "Sunday"
|
||||
msgstr ""
|
||||
|
||||
#. module: resource
|
||||
#: code:addons/resource/models/resource.py:714
|
||||
#, python-format
|
||||
msgid "The efficiency factor cannot be equal to 0."
|
||||
msgstr ""
|
||||
|
||||
#. module: resource
|
||||
#: model:ir.model.fields,help:resource.field_resource_resource_time_efficiency
|
||||
msgid "This field is used to calculate the the expected duration of a work order at this work center. For example, if a work order takes one hour and the efficiency factor is 100%, then the expected duration will be one hour. If the efficiency factor is 200%, however the expected duration will be 30 minutes."
|
||||
|
||||
+17
-13
@@ -885,6 +885,21 @@ class SaleOrderLine(models.Model):
|
||||
uom=self.product_uom.id
|
||||
)
|
||||
|
||||
result = {'domain': domain}
|
||||
|
||||
title = False
|
||||
message = False
|
||||
warning = {}
|
||||
if product.sale_line_warn != 'no-message':
|
||||
title = _("Warning for %s") % product.name
|
||||
message = product.sale_line_warn_msg
|
||||
warning['title'] = title
|
||||
warning['message'] = message
|
||||
result = {'warning': warning}
|
||||
if product.sale_line_warn == 'block':
|
||||
self.product_id = False
|
||||
return result
|
||||
|
||||
name = product.name_get()[0][1]
|
||||
if product.description_sale:
|
||||
name += '\n' + product.description_sale
|
||||
@@ -896,22 +911,11 @@ class SaleOrderLine(models.Model):
|
||||
vals['price_unit'] = self.env['account.tax']._fix_tax_included_price(self._get_display_price(product), product.taxes_id, self.tax_id)
|
||||
self.update(vals)
|
||||
|
||||
title = False
|
||||
message = False
|
||||
warning = {}
|
||||
if product.sale_line_warn != 'no-message':
|
||||
title = _("Warning for %s") % product.name
|
||||
message = product.sale_line_warn_msg
|
||||
warning['title'] = title
|
||||
warning['message'] = message
|
||||
if product.sale_line_warn == 'block':
|
||||
self.product_id = False
|
||||
return {'warning': warning}
|
||||
return {'domain': domain}
|
||||
return result
|
||||
|
||||
@api.onchange('product_uom', 'product_uom_qty')
|
||||
def product_uom_change(self):
|
||||
if not self.product_uom:
|
||||
if not self.product_uom or not self.product_id:
|
||||
self.price_unit = 0.0
|
||||
return
|
||||
if self.order_id.pricelist_id and self.order_id.partner_id:
|
||||
|
||||
@@ -315,8 +315,8 @@ class StockMove(models.Model):
|
||||
'product_uom_id': self.product_id.uom_id.id,
|
||||
'ref': self.picking_id.name,
|
||||
'partner_id': partner_id,
|
||||
'debit': debit_value,
|
||||
'credit': 0,
|
||||
'debit': debit_value if debit_value > 0 else 0,
|
||||
'credit': -debit_value if debit_value < 0 else 0,
|
||||
'account_id': debit_account_id,
|
||||
}
|
||||
credit_line_vals = {
|
||||
@@ -326,8 +326,8 @@ class StockMove(models.Model):
|
||||
'product_uom_id': self.product_id.uom_id.id,
|
||||
'ref': self.picking_id.name,
|
||||
'partner_id': partner_id,
|
||||
'credit': credit_value,
|
||||
'debit': 0,
|
||||
'credit': credit_value if credit_value > 0 else 0,
|
||||
'debit': -credit_value if credit_value < 0 else 0,
|
||||
'account_id': credit_account_id,
|
||||
}
|
||||
res = [(0, 0, debit_line_vals), (0, 0, credit_line_vals)]
|
||||
|
||||
@@ -67,7 +67,7 @@ class CrmLeadReportAssign(models.Model):
|
||||
p.grade_id,
|
||||
p.date as partner_date,
|
||||
c.planned_revenue*(c.probability/100) as probable_revenue,
|
||||
1 as nbr,
|
||||
1 as nbr_cases,
|
||||
c.create_date as create_date,
|
||||
extract('epoch' from (c.write_date-c.create_date))/(3600*24) as delay_close,
|
||||
extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24) as delay_expected,
|
||||
|
||||
@@ -9,8 +9,8 @@ Index: addons/openacademy/__manifest__.py
|
||||
'version': '0.1',
|
||||
|
||||
# any module necessary for this one to work correctly
|
||||
- 'depends': ['base'],
|
||||
+ 'depends': ['base', 'board'],
|
||||
- 'depends': ['base', 'report'],
|
||||
+ 'depends': ['base', 'report', 'board'],
|
||||
|
||||
# always loaded
|
||||
'data': [
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
# HG changeset patch
|
||||
# Parent c140f0a861a08881d8737bca0ffb83904a2059a3
|
||||
|
||||
Index: addons/openacademy/__manifest__.py
|
||||
===================================================================
|
||||
--- addons.orig/openacademy/__manifest__.py 2014-08-26 17:26:21.535783052 +0200
|
||||
+++ addons/openacademy/__manifest__.py 2014-08-26 17:26:21.531783052 +0200
|
||||
@@ -21,7 +21,7 @@
|
||||
'version': '0.1',
|
||||
|
||||
# any module necessary for this one to work correctly
|
||||
- 'depends': ['base'],
|
||||
+ 'depends': ['base', 'report'],
|
||||
|
||||
# always loaded
|
||||
'data': [
|
||||
Index: addons/openacademy/__manifest__.py
|
||||
===================================================================
|
||||
--- addons.orig/openacademy/__manifest__.py 2014-08-29 08:39:43.975536806 +0200
|
||||
|
||||
@@ -17,7 +17,6 @@ Index
|
||||
api_integration
|
||||
setup
|
||||
reference
|
||||
business
|
||||
|
||||
.. ifconfig:: todo_include_todos
|
||||
|
||||
|
||||
@@ -546,7 +546,7 @@ default db to serve on localhost:8069
|
||||
http://www.enterprisedb.com/products-services-training/pgdownload
|
||||
.. _Quilt: http://en.wikipedia.org/wiki/Quilt_(software)
|
||||
.. _saas: https://www.odoo.com/page/start
|
||||
.. _the wkhtmltopdf download page: http://wkhtmltopdf.org/downloads.html
|
||||
.. _the wkhtmltopdf download page: https://github.com/wkhtmltopdf/wkhtmltopdf/releases/tag/0.12.1
|
||||
.. _UAC: http://en.wikipedia.org/wiki/User_Account_Control
|
||||
.. _wkhtmltopdf: http://wkhtmltopdf.org
|
||||
.. _pip: https://pip.pypa.io
|
||||
|
||||
Reference in New Issue
Block a user