[MERGE] forward port branch 10.0 up to d5cc05c994
This commit is contained in:
@@ -9987,3 +9987,8 @@ msgstr ""
|
|||||||
msgid "→ Count"
|
msgid "→ Count"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account
|
||||||
|
#: code:addons/account/models/account.py:309
|
||||||
|
#, python-format
|
||||||
|
msgid "Currency field should only be set if the journal's currency is different from the company's. Leave the field blank to use company currency."
|
||||||
|
msgstr ""
|
||||||
|
|||||||
@@ -262,6 +262,8 @@ class AccountJournal(models.Model):
|
|||||||
@api.constrains('currency_id', 'default_credit_account_id', 'default_debit_account_id')
|
@api.constrains('currency_id', 'default_credit_account_id', 'default_debit_account_id')
|
||||||
def _check_currency(self):
|
def _check_currency(self):
|
||||||
if self.currency_id:
|
if self.currency_id:
|
||||||
|
if self.currency_id == self.company_id.currency_id:
|
||||||
|
raise ValidationError(_("Currency field should only be set if the journal's currency is different from the company's. Leave the field blank to use company currency."))
|
||||||
if self.default_credit_account_id and not self.default_credit_account_id.currency_id.id == self.currency_id.id:
|
if self.default_credit_account_id and not self.default_credit_account_id.currency_id.id == self.currency_id.id:
|
||||||
raise ValidationError(_('Configuration error!\nThe currency of the journal should be the same than the default credit account.'))
|
raise ValidationError(_('Configuration error!\nThe currency of the journal should be the same than the default credit account.'))
|
||||||
if self.default_debit_account_id and not self.default_debit_account_id.currency_id.id == self.currency_id.id:
|
if self.default_debit_account_id and not self.default_debit_account_id.currency_id.id == self.currency_id.id:
|
||||||
|
|||||||
@@ -1224,6 +1224,9 @@ var ClientListScreenWidget = ScreenWidget.extend({
|
|||||||
fields.id = partner.id || false;
|
fields.id = partner.id || false;
|
||||||
fields.country_id = fields.country_id || false;
|
fields.country_id = fields.country_id || false;
|
||||||
|
|
||||||
|
var contents = this.$(".client-details-contents");
|
||||||
|
contents.off("click", ".button.save");
|
||||||
|
|
||||||
new Model('res.partner').call('create_from_ui',[fields]).then(function(partner_id){
|
new Model('res.partner').call('create_from_ui',[fields]).then(function(partner_id){
|
||||||
self.saved_client_details(partner_id);
|
self.saved_client_details(partner_id);
|
||||||
},function(err,event){
|
},function(err,event){
|
||||||
@@ -1237,6 +1240,7 @@ var ClientListScreenWidget = ScreenWidget.extend({
|
|||||||
'title': _t('Error: Could not Save Changes'),
|
'title': _t('Error: Could not Save Changes'),
|
||||||
'body': error_body,
|
'body': error_body,
|
||||||
});
|
});
|
||||||
|
contents.on('click','.button.save',function(){ self.save_client_details(partner); });
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1254,6 +1258,8 @@ var ClientListScreenWidget = ScreenWidget.extend({
|
|||||||
// has created, and reload_partner() must have loaded the newly created partner.
|
// has created, and reload_partner() must have loaded the newly created partner.
|
||||||
self.display_client_details('hide');
|
self.display_client_details('hide');
|
||||||
}
|
}
|
||||||
|
}).always(function(){
|
||||||
|
$(".client-details-contents").on('click','.button.save',function(){ self.save_client_details(partner); });
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -518,6 +518,14 @@ var RTE = Widget.extend({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Removes strange _moz_abspos attribute when it appears. Cannot
|
||||||
|
// find another solution which works in all cases. A grabber still
|
||||||
|
// appears at the same time which I did not manage to remove.
|
||||||
|
// TODO find a complete and better solution
|
||||||
|
_.defer(function () {
|
||||||
|
$editable.find('[_moz_abspos]').removeAttr('_moz_abspos');
|
||||||
|
});
|
||||||
|
|
||||||
if ($target.is('a')) {
|
if ($target.is('a')) {
|
||||||
/**
|
/**
|
||||||
* Remove content editable everywhere and add it on the link only so that characters can be added
|
* Remove content editable everywhere and add it on the link only so that characters can be added
|
||||||
|
|||||||
@@ -368,7 +368,11 @@ class WebsiteSale(http.Controller):
|
|||||||
|
|
||||||
@http.route(['/shop/cart/update'], type='http', auth="public", methods=['POST'], website=True, csrf=False)
|
@http.route(['/shop/cart/update'], type='http', auth="public", methods=['POST'], website=True, csrf=False)
|
||||||
def cart_update(self, product_id, add_qty=1, set_qty=0, **kw):
|
def cart_update(self, product_id, add_qty=1, set_qty=0, **kw):
|
||||||
request.website.sale_get_order(force_create=1)._cart_update(
|
sale_order = request.website.sale_get_order(force_create=1)
|
||||||
|
if sale_order.state != 'draft':
|
||||||
|
request.session['sale_order_id'] = None
|
||||||
|
sale_order = request.website.sale_get_order(force_create=True)
|
||||||
|
sale_order._cart_update(
|
||||||
product_id=int(product_id),
|
product_id=int(product_id),
|
||||||
add_qty=add_qty,
|
add_qty=add_qty,
|
||||||
set_qty=set_qty,
|
set_qty=set_qty,
|
||||||
|
|||||||
@@ -94,11 +94,12 @@ def add_doc_link(app, pagename, templatename, context, doctree):
|
|||||||
if not app.config.github_user and app.config.github_project:
|
if not app.config.github_user and app.config.github_project:
|
||||||
return
|
return
|
||||||
|
|
||||||
# FIXME: find other way to recover current document's source suffix
|
|
||||||
# in Sphinx 1.3 it's possible to have mutliple source suffixes and that
|
|
||||||
# may be useful in the future
|
|
||||||
source_suffix = app.config.source_suffix
|
source_suffix = app.config.source_suffix
|
||||||
source_suffix = source_suffix if isinstance(source_suffix, basestring) else source_suffix[0]
|
# in 1.3 source_suffix can be a list
|
||||||
|
# in 1.8 source_suffix can be a mapping
|
||||||
|
# FIXME: will break if we ever add support for !rst markdown documents maybe
|
||||||
|
if not isinstance(source_suffix, basestring):
|
||||||
|
source_suffix = next(iter(source_suffix))
|
||||||
# can't use functools.partial because 3rd positional is line not mode
|
# can't use functools.partial because 3rd positional is line not mode
|
||||||
context['github_link'] = lambda mode='edit': make_github_link(
|
context['github_link'] = lambda mode='edit': make_github_link(
|
||||||
app, 'doc/%s%s' % (pagename, source_suffix), mode=mode)
|
app, 'doc/%s%s' % (pagename, source_suffix), mode=mode)
|
||||||
|
|||||||
@@ -8,10 +8,13 @@ import sphinx.environment
|
|||||||
import sphinx.builders.html
|
import sphinx.builders.html
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
def setup(app):
|
def setup(app):
|
||||||
if getattr(app.config, 'html_translator_class', None):
|
if hasattr(app, 'set_translator'):
|
||||||
app.warn("Overriding the explicitly set html_translator_class setting",
|
app.set_translator('html', translator.BootstrapTranslator)
|
||||||
location="odoo extension")
|
else:
|
||||||
app.config.html_translator_class = 'odoo_ext.translator.BootstrapTranslator'
|
if getattr(app.config, 'html_translator_class', None):
|
||||||
|
app.warn("Overriding the explicitly set html_translator_class setting",
|
||||||
|
location="odoo extension")
|
||||||
|
app.config.html_translator_class = 'odoo_ext.translator.BootstrapTranslator'
|
||||||
|
|
||||||
switcher.setup(app)
|
switcher.setup(app)
|
||||||
app.add_config_value('odoo_cover_default', None, 'env')
|
app.add_config_value('odoo_cover_default', None, 'env')
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
Index: addons/openacademy/__manifest__.py
|
Index: addons/openacademy/__manifest__.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- addons.orig/openacademy/__manifest__.py 2014-08-26 17:26:21.535783052 +0200
|
--- addons.orig/openacademy/__manifest__.py 2014-08-29 08:39:43.975536806 +0200
|
||||||
+++ addons/openacademy/__manifest__.py 2014-08-26 17:26:21.531783052 +0200
|
+++ addons/openacademy/__manifest__.py 2014-08-29 08:39:52.000000000 +0200
|
||||||
@@ -21,7 +21,7 @@
|
@@ -21,7 +21,7 @@
|
||||||
'version': '0.1',
|
'version': '0.1',
|
||||||
|
|
||||||
@@ -14,10 +14,6 @@ Index: addons/openacademy/__manifest__.py
|
|||||||
|
|
||||||
# always loaded
|
# always loaded
|
||||||
'data': [
|
'data': [
|
||||||
Index: addons/openacademy/__manifest__.py
|
|
||||||
===================================================================
|
|
||||||
--- addons.orig/openacademy/__manifest__.py 2014-08-29 08:39:43.975536806 +0200
|
|
||||||
+++ addons/openacademy/__manifest__.py 2014-08-29 08:39:52.000000000 +0200
|
|
||||||
@@ -30,6 +30,7 @@
|
@@ -30,6 +30,7 @@
|
||||||
'templates.xml',
|
'templates.xml',
|
||||||
'views/openacademy.xml',
|
'views/openacademy.xml',
|
||||||
|
|||||||
@@ -942,17 +942,17 @@ them (e.g. to change their default sort order):
|
|||||||
|
|
||||||
.. literalinclude:: ../../odoo/addons/test_documentation_examples/extension.py
|
.. literalinclude:: ../../odoo/addons/test_documentation_examples/extension.py
|
||||||
:language: python
|
:language: python
|
||||||
:lines: 5-
|
:lines: 7-
|
||||||
|
|
||||||
.. literalinclude:: ../../odoo/addons/test_documentation_examples/tests/test_extension.py
|
.. literalinclude:: ../../odoo/addons/test_documentation_examples/tests/test_extension.py
|
||||||
:language: python
|
:language: python
|
||||||
:lines: 8,13
|
:lines: 10,15
|
||||||
|
|
||||||
will yield:
|
will yield:
|
||||||
|
|
||||||
.. literalinclude:: ../../odoo/addons/test_documentation_examples/tests/test_extension.py
|
.. literalinclude:: ../../odoo/addons/test_documentation_examples/tests/test_extension.py
|
||||||
:language: text
|
:language: text
|
||||||
:lines: 11
|
:lines: 13
|
||||||
|
|
||||||
.. note:: it will also yield the various :ref:`automatic fields
|
.. note:: it will also yield the various :ref:`automatic fields
|
||||||
<reference/orm/model/automatic>` unless they've been disabled
|
<reference/orm/model/automatic>` unless they've been disabled
|
||||||
|
|||||||
Reference in New Issue
Block a user