diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py
index a514d2bb58a..4da3b2f624d 100644
--- a/addons/account/models/account_invoice.py
+++ b/addons/account/models/account_invoice.py
@@ -1174,7 +1174,9 @@ class AccountInvoice(models.Model):
res.setdefault(line.tax_id.tax_group_id, 0.0)
res[line.tax_id.tax_group_id] += line.amount
res = sorted(res.items(), key=lambda l: l[0].sequence)
- res = map(lambda l: (l[0].name, l[1]), res)
+ res = [(
+ r[0].name, r[1], formatLang(self.with_context(lang=self.partner_id.lang).env, r[1], currency_obj=currency)
+ ) for r in res]
return res
diff --git a/addons/account/views/report_invoice.xml b/addons/account/views/report_invoice.xml
index d73d9ca9f7a..b4f3f13b1d7 100644
--- a/addons/account/views/report_invoice.xml
+++ b/addons/account/views/report_invoice.xml
@@ -112,7 +112,7 @@
-
+
diff --git a/addons/im_livechat/report/im_livechat_report_operator_views.xml b/addons/im_livechat/report/im_livechat_report_operator_views.xml
index 677191cf4b5..a7b4d271cd9 100644
--- a/addons/im_livechat/report/im_livechat_report_operator_views.xml
+++ b/addons/im_livechat/report/im_livechat_report_operator_views.xml
@@ -36,7 +36,6 @@
-
diff --git a/addons/l10n_fr_fec/wizard/account_fr_fec.py b/addons/l10n_fr_fec/wizard/account_fr_fec.py
index 5b5bcc0fc88..237f8f06162 100644
--- a/addons/l10n_fr_fec/wizard/account_fr_fec.py
+++ b/addons/l10n_fr_fec/wizard/account_fr_fec.py
@@ -170,8 +170,9 @@ class AccountFrFec(models.TransientModel):
'''
sql_query += '''
- GROUP BY aml.account_id
+ GROUP BY aml.account_id, aat.type
HAVING sum(aml.balance) != 0
+ AND aat.type not in ('receivable', 'payable')
'''
formatted_date_from = self.date_from.replace('-', '')
date_from = datetime.strptime(self.date_from, DEFAULT_SERVER_DATE_FORMAT)
@@ -209,6 +210,64 @@ class AccountFrFec(models.TransientModel):
unaffected_earnings_results[5] = unaffected_earnings_account.name
w.writerow([s.encode("utf-8") for s in unaffected_earnings_results])
+ # INITIAL BALANCE - receivable/payable
+ sql_query = '''
+ SELECT
+ 'OUV' AS JournalCode,
+ 'Balance initiale' AS JournalLib,
+ 'OUVERTURE/' || %s AS EcritureNum,
+ %s AS EcritureDate,
+ MIN(aa.code) AS CompteNum,
+ replace(MIN(aa.name), '|', '/') AS CompteLib,
+ CASE WHEN rp.ref IS null OR rp.ref = ''
+ THEN COALESCE('ID ' || rp.id, '')
+ ELSE rp.ref
+ END
+ AS CompAuxNum,
+ COALESCE(replace(rp.name, '|', '/'), '') AS CompAuxLib,
+ '-' AS PieceRef,
+ %s AS PieceDate,
+ '/' AS EcritureLib,
+ replace(CASE WHEN sum(aml.balance) <= 0 THEN '0,00' ELSE to_char(SUM(aml.balance), '999999999999999D99') END, '.', ',') AS Debit,
+ replace(CASE WHEN sum(aml.balance) >= 0 THEN '0,00' ELSE to_char(-SUM(aml.balance), '999999999999999D99') END, '.', ',') AS Credit,
+ '' AS EcritureLet,
+ '' AS DateLet,
+ %s AS ValidDate,
+ '' AS Montantdevise,
+ '' AS Idevise,
+ MIN(aa.id) AS CompteID
+ FROM
+ account_move_line aml
+ LEFT JOIN account_move am ON am.id=aml.move_id
+ LEFT JOIN res_partner rp ON rp.id=aml.partner_id
+ JOIN account_account aa ON aa.id = aml.account_id
+ LEFT JOIN account_account_type aat ON aa.user_type_id = aat.id
+ WHERE
+ am.date < %s
+ AND am.company_id = %s
+ AND aat.include_initial_balance = 't'
+ AND (aml.debit != 0 OR aml.credit != 0)
+ '''
+
+ # For official report: only use posted entries
+ if self.export_type == "official":
+ sql_query += '''
+ AND am.state = 'posted'
+ '''
+
+ sql_query += '''
+ GROUP BY aml.account_id, aat.type, rp.ref, rp.id
+ HAVING sum(aml.balance) != 0
+ AND aat.type in ('receivable', 'payable')
+ '''
+ self._cr.execute(
+ sql_query, (formatted_date_year, formatted_date_from, formatted_date_from, formatted_date_from, self.date_from, company.id))
+
+ for row in self._cr.fetchall():
+ listrow = list(row)
+ account_id = listrow.pop()
+ w.writerow([s.encode("utf-8") for s in listrow])
+
# LINES
sql_query = '''
SELECT
diff --git a/addons/mail/tests/test_mail_channel.py b/addons/mail/tests/test_mail_channel.py
index cabfe99203b..9469e7b4879 100644
--- a/addons/mail/tests/test_mail_channel.py
+++ b/addons/mail/tests/test_mail_channel.py
@@ -42,7 +42,7 @@ class TestMailGroup(TestMail):
def mail_group_message_get_recipient_values(self, notif_message=None, recipient_ids=None):
return self.env['mail.thread'].message_get_recipient_values(notif_message=notif_message, recipient_ids=recipient_ids)
cls.env['mail.channel']._patch_method('message_get_recipient_values', mail_group_message_get_recipient_values)
- super(TestMail, cls).tearDownClass()
+ super(TestMailGroup, cls).tearDownClass()
@mute_logger('odoo.addons.base.ir.ir_model', 'odoo.models')
def test_access_rights_public(self):
diff --git a/addons/mrp/report/mrp_production_templates.xml b/addons/mrp/report/mrp_production_templates.xml
index d8a90b371ac..13fd06a4477 100644
--- a/addons/mrp/report/mrp_production_templates.xml
+++ b/addons/mrp/report/mrp_production_templates.xml
@@ -93,8 +93,7 @@
-
-
+
diff --git a/addons/payment_stripe/controllers/main.py b/addons/payment_stripe/controllers/main.py
index b4627157a9e..356f36cf101 100644
--- a/addons/payment_stripe/controllers/main.py
+++ b/addons/payment_stripe/controllers/main.py
@@ -35,5 +35,5 @@ class StripeController(http.Controller):
response = tx._create_stripe_charge(tokenid=post['tokenid'], email=post['email'])
_logger.info('Stripe: entering form_feedback with post data %s', pprint.pformat(response))
if response:
- request.env['payment.transaction'].sudo().form_feedback(response, 'stripe')
+ request.env['payment.transaction'].sudo().with_context(lang=None).form_feedback(response, 'stripe')
return post.pop('return_url', '/')
diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot
index 44de171dbe1..95f509d1bdb 100644
--- a/addons/stock/i18n/stock.pot
+++ b/addons/stock/i18n/stock.pot
@@ -2577,6 +2577,11 @@ msgstr ""
msgid "Inventory Line"
msgstr ""
+#. module: stock
+#: model:ir.actions.act_window,name:stock.action_inventory_line_tree
+msgid "Inventory Lines"
+msgstr ""
+
#. module: stock
#: model:ir.model.fields,field_description:stock.field_product_product_property_stock_inventory
#: model:ir.model.fields,field_description:stock.field_product_template_property_stock_inventory
@@ -2859,6 +2864,11 @@ msgstr ""
msgid "Linked Quant"
msgstr ""
+#. module: stock
+#: model:ir.ui.view,arch_db:stock.view_inventory_form
+msgid "List view of lines"
+msgstr ""
+
#. module: stock
#: model:ir.ui.view,arch_db:stock.view_location_form
msgid "Localization"
@@ -4402,6 +4412,11 @@ msgstr ""
msgid "Quantity"
msgstr ""
+#. module: stock
+#: model:ir.model.fields,field_description:stock.field_stock_pack_operation_qty_done_uom_ordered
+msgid "Quantity Done"
+msgstr ""
+
#. module: stock
#: model:ir.ui.view,arch_db:stock.view_warehouse_orderpoint_form
msgid "Quantity Multiple"
@@ -4424,6 +4439,17 @@ msgstr ""
msgid "Quantity cannot be negative."
msgstr ""
+#. module: stock
+#: code:addons/stock/models/stock_move.py:394
+#, python-format
+msgid "Quantity decreased!"
+msgstr ""
+
+#. module: stock
+#: model:ir.model.fields,help:stock.field_stock_pack_operation_qty_done_uom_ordered
+msgid "Quantity done in UOM ordered"
+msgstr ""
+
#. module: stock
#: model:ir.model.fields,help:stock.field_stock_move_availability
msgid "Quantity in stock that can still be reserved for this move"
@@ -4941,6 +4967,11 @@ msgstr ""
msgid "Search Inventory"
msgstr ""
+#. module: stock
+#: model:ir.ui.view,arch_db:stock.stock_inventory_line_search
+msgid "Search Inventory Lines"
+msgstr ""
+
#. module: stock
#: model:ir.ui.view,arch_db:stock.stock_scrap_search_view
msgid "Search Scrap"
@@ -5579,6 +5610,12 @@ msgstr ""
msgid "The parent location that includes this location. Example : The 'Dispatch Zone' is the 'Gate 1' parent location."
msgstr ""
+#. module: stock
+#: code:addons/stock/models/stock_picking.py:795
+#, python-format
+msgid "The pick is already validated"
+msgstr ""
+
#. module: stock
#: code:addons/stock/models/stock_picking.py:787
#, python-format
diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py
index 087c111499a..c00834613a0 100644
--- a/addons/stock/models/stock_move.py
+++ b/addons/stock/models/stock_move.py
@@ -387,9 +387,13 @@ class StockMove(models.Model):
if not self.product_id or self.product_qty < 0.0:
self.product_qty = 0.0
if self.product_qty < self._origin.product_qty:
- return {'warning': _("By changing this quantity here, you accept the "
- "new quantity as complete: Odoo will not "
- "automatically generate a back order.")}
+ warning_mess = {
+ 'title': _('Quantity decreased!'),
+ 'message' : _("By changing this quantity here, you accept the "
+ "new quantity as complete: Odoo will not "
+ "automatically generate a back order."),
+ }
+ return {'warning': warning_mess}
@api.onchange('product_id')
def onchange_product_id(self):
diff --git a/addons/stock/views/stock_production_lot_views.xml b/addons/stock/views/stock_production_lot_views.xml
index cfa5d3929ce..694eebb6258 100644
--- a/addons/stock/views/stock_production_lot_views.xml
+++ b/addons/stock/views/stock_production_lot_views.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/addons/web/static/src/js/framework/crash_manager.js b/addons/web/static/src/js/framework/crash_manager.js
index efd4bcc979c..baf577b578d 100644
--- a/addons/web/static/src/js/framework/crash_manager.js
+++ b/addons/web/static/src/js/framework/crash_manager.js
@@ -54,7 +54,7 @@ var CrashManager = core.Class.extend({
new (handler)(this, error).display();
return;
}
- if (error.data.name === "openerp.http.SessionExpiredException" || error.data.name === "werkzeug.exceptions.Forbidden") {
+ if (error.data.name === "odoo.http.SessionExpiredException" || error.data.name === "werkzeug.exceptions.Forbidden") {
this.show_warning({type: _t("Odoo Session Expired"), data: {message: _t("Your Odoo session expired. Please refresh the current web page.")}});
return;
}
diff --git a/addons/web/static/src/js/views/search_inputs.js b/addons/web/static/src/js/views/search_inputs.js
index 99535f29797..c4478956499 100644
--- a/addons/web/static/src/js/views/search_inputs.js
+++ b/addons/web/static/src/js/views/search_inputs.js
@@ -353,7 +353,8 @@ var DateField = Field.extend(/** @lends instance.web.search.DateField# */{
return $.when(null);
}
- var m = moment(v, t === 'datetime' ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD');
+ // THIS SHOULD BE FORWARDPORTED UP TO SAAS-15, NOT LATER
+ var m = moment.utc(v, t === 'datetime' ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD');
if (!m.isValid()) { return $.when(null); }
var d = m.toDate();
var date_string = formats.format_value(d, this.attrs);
diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml
index 781ffd077cb..82e3001bd81 100644
--- a/addons/website_sale/views/templates.xml
+++ b/addons/website_sale/views/templates.xml
@@ -1624,7 +1624,7 @@
-
+
Subtotal:
diff --git a/doc/cla/corporate/metrum.md b/doc/cla/corporate/metrum.md
new file mode 100644
index 00000000000..b64bf351a8b
--- /dev/null
+++ b/doc/cla/corporate/metrum.md
@@ -0,0 +1,16 @@
+Belgium, 2017-11-14
+
+METRUM SA agrees to the terms of the Odoo Corporate Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Jonathan Nemry jonathan.nemry@metrum.lu https://github.com/JonathanNEMRY
+
+List of contributors:
+
+Pascal Pelzer pascal.pelzer@metrum.lu https://github.com/PascalPelzer
+Jonathan Nemry jonathan.nemry@metrum.lu https://github.com/JonathanNEMRY
diff --git a/doc/cla/individual/grzekru.md b/doc/cla/individual/grzekru.md
new file mode 100644
index 00000000000..6dbd42dbaf6
--- /dev/null
+++ b/doc/cla/individual/grzekru.md
@@ -0,0 +1,11 @@
+Poland, 2017-09-17
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Grzegorz Krukar grzegorzgk1@gmail.com https://github.com/grzekru
\ No newline at end of file
diff --git a/doc/cla/individual/mehdi-ghezal.md b/doc/cla/individual/mehdi-ghezal.md
new file mode 100644
index 00000000000..a5083336bfd
--- /dev/null
+++ b/doc/cla/individual/mehdi-ghezal.md
@@ -0,0 +1,9 @@
+France, 2017-11-10
+
+I hereby agree to the terms of the Odoo Individual Contributor License Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this declaration.
+
+Signed,
+
+Mehdi GHEZAL mehdi.ghezal@gmail.com https://github.com/mehdi-ghezal
diff --git a/doc/reference/javascript.rst b/doc/reference/javascript.rst
index 2a1e2b3a018..a639d305f57 100644
--- a/doc/reference/javascript.rst
+++ b/doc/reference/javascript.rst
@@ -594,7 +594,7 @@ API.
Odoo Web eschews direct calls to :py:meth:`~odoo.models.Model.read_group`
in favor of calling a method of :class:`~odoo.web.Query`, :py:meth:`much
-in the way it is one in SQLAlchemy `
+in the way it is done in SQLAlchemy `
[#terminal]_::
some_query.group_by(['field1', 'field2']).then(function (groups) {
diff --git a/odoo/tools/misc.py b/odoo/tools/misc.py
index d2c9aec992b..6dca69a1cbc 100644
--- a/odoo/tools/misc.py
+++ b/odoo/tools/misc.py
@@ -1179,7 +1179,7 @@ def formatLang(env, value, digits=None, grouping=True, monetary=False, dp=False,
if isinstance(value, (str, unicode)) and not value:
return ''
- lang = env.user.company_id.partner_id.lang or 'en_US'
+ lang = env.context.get('lang') or env.user.company_id.partner_id.lang or 'en_US'
lang_objs = env['res.lang'].search([('code', '=', lang)])
if not lang_objs:
lang_objs = env['res.lang'].search([], limit=1)
diff --git a/requirements.txt b/requirements.txt
index e4946010ae3..b079a99745c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -17,7 +17,7 @@ passlib==1.6.5
Pillow==3.4.1
psutil==4.3.1
psycogreen==1.0
-psycopg2==2.7.1
+psycopg2==2.7.3
pydot==1.2.3
pyparsing==2.1.10
pyPdf==1.13