[MERGE] forward port branch saas-14 up to 0bf7ab4511
This commit is contained in:
@@ -1174,7 +1174,9 @@ class AccountInvoice(models.Model):
|
|||||||
res.setdefault(line.tax_id.tax_group_id, 0.0)
|
res.setdefault(line.tax_id.tax_group_id, 0.0)
|
||||||
res[line.tax_id.tax_group_id] += line.amount
|
res[line.tax_id.tax_group_id] += line.amount
|
||||||
res = sorted(res.items(), key=lambda l: l[0].sequence)
|
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
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><span t-esc="amount_by_group[0] if len(o.tax_line_ids) > 1 else (o.tax_line_ids.tax_id.description or o.tax_line_ids.tax_id.name)"/></td>
|
<td><span t-esc="amount_by_group[0] if len(o.tax_line_ids) > 1 else (o.tax_line_ids.tax_id.description or o.tax_line_ids.tax_id.name)"/></td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<span t-esc="amount_by_group[1]" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
<span t-esc="amount_by_group[2]"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</t>
|
</t>
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
<filter name="group_by_channel" string="Channel" domain="[]" context="{'group_by':'channel_id'}"/>
|
<filter name="group_by_channel" string="Channel" domain="[]" context="{'group_by':'channel_id'}"/>
|
||||||
<filter name="group_by_operator" string="Operator" domain="[('partner_id','!=', False)]" context="{'group_by':'partner_id'}"/>
|
<filter name="group_by_operator" string="Operator" domain="[('partner_id','!=', False)]" context="{'group_by':'partner_id'}"/>
|
||||||
<separator orientation="vertical" />
|
<separator orientation="vertical" />
|
||||||
<filter name="group_by_hour" string="Creation date (hour)" domain="[]" context="{'group_by':'start_date_hour'}"/>
|
|
||||||
<filter name="group_by_day" string="Creation date (day)" domain="[]" context="{'group_by':'start_date:day'}"/>
|
<filter name="group_by_day" string="Creation date (day)" domain="[]" context="{'group_by':'start_date:day'}"/>
|
||||||
<filter name="group_by_week" string="Creation date (week)" domain="[]" context="{'group_by':'start_date:week'}"/>
|
<filter name="group_by_week" string="Creation date (week)" domain="[]" context="{'group_by':'start_date:week'}"/>
|
||||||
<filter name="group_by_month" string="Creation date (month)" domain="[]" context="{'group_by':'start_date:month'}" />
|
<filter name="group_by_month" string="Creation date (month)" domain="[]" context="{'group_by':'start_date:month'}" />
|
||||||
|
|||||||
@@ -170,8 +170,9 @@ class AccountFrFec(models.TransientModel):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
sql_query += '''
|
sql_query += '''
|
||||||
GROUP BY aml.account_id
|
GROUP BY aml.account_id, aat.type
|
||||||
HAVING sum(aml.balance) != 0
|
HAVING sum(aml.balance) != 0
|
||||||
|
AND aat.type not in ('receivable', 'payable')
|
||||||
'''
|
'''
|
||||||
formatted_date_from = self.date_from.replace('-', '')
|
formatted_date_from = self.date_from.replace('-', '')
|
||||||
date_from = datetime.strptime(self.date_from, DEFAULT_SERVER_DATE_FORMAT)
|
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
|
unaffected_earnings_results[5] = unaffected_earnings_account.name
|
||||||
w.writerow([s.encode("utf-8") for s in unaffected_earnings_results])
|
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
|
# LINES
|
||||||
sql_query = '''
|
sql_query = '''
|
||||||
SELECT
|
SELECT
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class TestMailGroup(TestMail):
|
|||||||
def mail_group_message_get_recipient_values(self, notif_message=None, recipient_ids=None):
|
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)
|
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)
|
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')
|
@mute_logger('odoo.addons.base.ir.ir_model', 'odoo.models')
|
||||||
def test_access_rights_public(self):
|
def test_access_rights_public(self):
|
||||||
|
|||||||
@@ -93,8 +93,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr t-foreach="o.move_raw_ids" t-as="line">
|
<tr t-foreach="o.move_raw_ids" t-as="line">
|
||||||
<td>
|
<td>
|
||||||
<span t-field="line.product_id.code"/>
|
<span t-field="line.product_id"/>
|
||||||
<span t-field="line.product_id.name"/>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<span t-field="line.product_uom_qty"/>
|
<span t-field="line.product_uom_qty"/>
|
||||||
|
|||||||
@@ -35,5 +35,5 @@ class StripeController(http.Controller):
|
|||||||
response = tx._create_stripe_charge(tokenid=post['tokenid'], email=post['email'])
|
response = tx._create_stripe_charge(tokenid=post['tokenid'], email=post['email'])
|
||||||
_logger.info('Stripe: entering form_feedback with post data %s', pprint.pformat(response))
|
_logger.info('Stripe: entering form_feedback with post data %s', pprint.pformat(response))
|
||||||
if 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', '/')
|
return post.pop('return_url', '/')
|
||||||
|
|||||||
@@ -2577,6 +2577,11 @@ msgstr ""
|
|||||||
msgid "Inventory Line"
|
msgid "Inventory Line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: stock
|
||||||
|
#: model:ir.actions.act_window,name:stock.action_inventory_line_tree
|
||||||
|
msgid "Inventory Lines"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: stock
|
#. module: stock
|
||||||
#: model:ir.model.fields,field_description:stock.field_product_product_property_stock_inventory
|
#: 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
|
#: model:ir.model.fields,field_description:stock.field_product_template_property_stock_inventory
|
||||||
@@ -2859,6 +2864,11 @@ msgstr ""
|
|||||||
msgid "Linked Quant"
|
msgid "Linked Quant"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: stock
|
||||||
|
#: model:ir.ui.view,arch_db:stock.view_inventory_form
|
||||||
|
msgid "List view of lines"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: stock
|
#. module: stock
|
||||||
#: model:ir.ui.view,arch_db:stock.view_location_form
|
#: model:ir.ui.view,arch_db:stock.view_location_form
|
||||||
msgid "Localization"
|
msgid "Localization"
|
||||||
@@ -4402,6 +4412,11 @@ msgstr ""
|
|||||||
msgid "Quantity"
|
msgid "Quantity"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: stock
|
||||||
|
#: model:ir.model.fields,field_description:stock.field_stock_pack_operation_qty_done_uom_ordered
|
||||||
|
msgid "Quantity Done"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: stock
|
#. module: stock
|
||||||
#: model:ir.ui.view,arch_db:stock.view_warehouse_orderpoint_form
|
#: model:ir.ui.view,arch_db:stock.view_warehouse_orderpoint_form
|
||||||
msgid "Quantity Multiple"
|
msgid "Quantity Multiple"
|
||||||
@@ -4424,6 +4439,17 @@ msgstr ""
|
|||||||
msgid "Quantity cannot be negative."
|
msgid "Quantity cannot be negative."
|
||||||
msgstr ""
|
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
|
#. module: stock
|
||||||
#: model:ir.model.fields,help:stock.field_stock_move_availability
|
#: model:ir.model.fields,help:stock.field_stock_move_availability
|
||||||
msgid "Quantity in stock that can still be reserved for this move"
|
msgid "Quantity in stock that can still be reserved for this move"
|
||||||
@@ -4941,6 +4967,11 @@ msgstr ""
|
|||||||
msgid "Search Inventory"
|
msgid "Search Inventory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: stock
|
||||||
|
#: model:ir.ui.view,arch_db:stock.stock_inventory_line_search
|
||||||
|
msgid "Search Inventory Lines"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: stock
|
#. module: stock
|
||||||
#: model:ir.ui.view,arch_db:stock.stock_scrap_search_view
|
#: model:ir.ui.view,arch_db:stock.stock_scrap_search_view
|
||||||
msgid "Search Scrap"
|
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."
|
msgid "The parent location that includes this location. Example : The 'Dispatch Zone' is the 'Gate 1' parent location."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: stock
|
||||||
|
#: code:addons/stock/models/stock_picking.py:795
|
||||||
|
#, python-format
|
||||||
|
msgid "The pick is already validated"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: stock
|
#. module: stock
|
||||||
#: code:addons/stock/models/stock_picking.py:787
|
#: code:addons/stock/models/stock_picking.py:787
|
||||||
#, python-format
|
#, python-format
|
||||||
|
|||||||
@@ -387,9 +387,13 @@ class StockMove(models.Model):
|
|||||||
if not self.product_id or self.product_qty < 0.0:
|
if not self.product_id or self.product_qty < 0.0:
|
||||||
self.product_qty = 0.0
|
self.product_qty = 0.0
|
||||||
if self.product_qty < self._origin.product_qty:
|
if self.product_qty < self._origin.product_qty:
|
||||||
return {'warning': _("By changing this quantity here, you accept the "
|
warning_mess = {
|
||||||
"new quantity as complete: Odoo will not "
|
'title': _('Quantity decreased!'),
|
||||||
"automatically generate a back order.")}
|
'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')
|
@api.onchange('product_id')
|
||||||
def onchange_product_id(self):
|
def onchange_product_id(self):
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<label for="product_qty"/>
|
<label for="product_qty"/>
|
||||||
<div class="o_row">
|
<div class="o_row">
|
||||||
<field name="product_qty"/>
|
<field name="product_qty"/>
|
||||||
<field name="product_uom_id" groups="product.group_uom"/>
|
<field name="product_uom_id" readonly="1" groups="product.group_uom"/>
|
||||||
</div>
|
</div>
|
||||||
<field name="ref"/>
|
<field name="ref"/>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ var CrashManager = core.Class.extend({
|
|||||||
new (handler)(this, error).display();
|
new (handler)(this, error).display();
|
||||||
return;
|
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.")}});
|
this.show_warning({type: _t("Odoo Session Expired"), data: {message: _t("Your Odoo session expired. Please refresh the current web page.")}});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -353,7 +353,8 @@ var DateField = Field.extend(/** @lends instance.web.search.DateField# */{
|
|||||||
return $.when(null);
|
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); }
|
if (!m.isValid()) { return $.when(null); }
|
||||||
var d = m.toDate();
|
var d = m.toDate();
|
||||||
var date_string = formats.format_value(d, this.attrs);
|
var date_string = formats.format_value(d, this.attrs);
|
||||||
|
|||||||
@@ -1624,7 +1624,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="total">
|
<template id="total">
|
||||||
<div id="cart_total" t-att-class="extra_class or ''" t-if="website_sale_order">
|
<div id="cart_total" t-att-class="extra_class or ''" t-if="website_sale_order and website_sale_order.website_order_line">
|
||||||
<div class="row" id="order_total_untaxed">
|
<div class="row" id="order_total_untaxed">
|
||||||
<span class="col-xs-6 text-right text-muted">Subtotal:</span>
|
<span class="col-xs-6 text-right text-muted">Subtotal:</span>
|
||||||
<span class="col-xs-6 text-right-not-xs text-left-xs text-muted">
|
<span class="col-xs-6 text-right-not-xs text-left-xs text-muted">
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -594,7 +594,7 @@ API.
|
|||||||
|
|
||||||
Odoo Web eschews direct calls to :py:meth:`~odoo.models.Model.read_group`
|
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 favor of calling a method of :class:`~odoo.web.Query`, :py:meth:`much
|
||||||
in the way it is one in SQLAlchemy <sqlalchemy.orm.query.Query.group_by>`
|
in the way it is done in SQLAlchemy <sqlalchemy.orm.query.Query.group_by>`
|
||||||
[#terminal]_::
|
[#terminal]_::
|
||||||
|
|
||||||
some_query.group_by(['field1', 'field2']).then(function (groups) {
|
some_query.group_by(['field1', 'field2']).then(function (groups) {
|
||||||
|
|||||||
+1
-1
@@ -1179,7 +1179,7 @@ def formatLang(env, value, digits=None, grouping=True, monetary=False, dp=False,
|
|||||||
if isinstance(value, (str, unicode)) and not value:
|
if isinstance(value, (str, unicode)) and not value:
|
||||||
return ''
|
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)])
|
lang_objs = env['res.lang'].search([('code', '=', lang)])
|
||||||
if not lang_objs:
|
if not lang_objs:
|
||||||
lang_objs = env['res.lang'].search([], limit=1)
|
lang_objs = env['res.lang'].search([], limit=1)
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ passlib==1.6.5
|
|||||||
Pillow==3.4.1
|
Pillow==3.4.1
|
||||||
psutil==4.3.1
|
psutil==4.3.1
|
||||||
psycogreen==1.0
|
psycogreen==1.0
|
||||||
psycopg2==2.7.1
|
psycopg2==2.7.3
|
||||||
pydot==1.2.3
|
pydot==1.2.3
|
||||||
pyparsing==2.1.10
|
pyparsing==2.1.10
|
||||||
pyPdf==1.13
|
pyPdf==1.13
|
||||||
|
|||||||
Reference in New Issue
Block a user