diff --git a/addons/l10n_ch/data/account_fiscal_position_data.xml b/addons/l10n_ch/data/account_fiscal_position_data.xml index 869ee872407..85d08ad18cb 100644 --- a/addons/l10n_ch/data/account_fiscal_position_data.xml +++ b/addons/l10n_ch/data/account_fiscal_position_data.xml @@ -19,6 +19,16 @@ + + + + + + + + + + @@ -29,6 +39,16 @@ + + + + + + + + + + @@ -46,13 +66,21 @@ - + + + + + - + + + + + diff --git a/addons/l10n_ch/data/account_vat2011_data.xml b/addons/l10n_ch/data/account_vat2011_data.xml index 1ce2068f2fb..3eaca4c5371 100644 --- a/addons/l10n_ch/data/account_vat2011_data.xml +++ b/addons/l10n_ch/data/account_vat2011_data.xml @@ -32,6 +32,10 @@ Switzerland VAT Form: grid 301 base taxes + + Switzerland VAT Form: grid 302 base + taxes + Switzerland VAT Form: grid 311 base taxes @@ -40,6 +44,10 @@ Switzerland VAT Form: grid 341 base taxes + + Switzerland VAT Form: grid 342 base + taxes + Switzerland VAT Form: grid 381 base taxes @@ -48,6 +56,10 @@ Switzerland VAT Form: grid 301 tax taxes + + Switzerland VAT Form: grid 302 tax + taxes + Switzerland VAT Form: grid 311 tax taxes @@ -56,6 +68,10 @@ Switzerland VAT Form: grid 341 tax taxes + + Switzerland VAT Form: grid 342 tax + taxes + Switzerland VAT Form: grid 381 tax taxes @@ -160,6 +176,75 @@ + + TVA due a 3.7% (TS) + 3.7% + + percent + + sale + + + + + + TVA due à 3.7% (Incl. TS) + 3.7% Incl. + + + percent + + sale + + + + + + TVA 3.7% sur achat B&S (TS) + 3.7% achat + + percent + + purchase + + + + + + TVA 3.7% sur achat B&S (Incl. TS) + 3.7% achat Incl. + + + percent + + purchase + + + + + + TVA 3.7% sur invest. et autres ch. (TS) + 3.7% invest + + percent + + purchase + + + + + + TVA 3.7% sur invest. et autres ch. (Incl. TS) + 3.7% invest Incl. + + + percent + + purchase + + + + TVA due a 3.8% (TS) 3.8% @@ -229,6 +314,80 @@ + + + TVA due a 7.7% (TN) + 7.7% + + + percent + + sale + + + + + + TVA due à 7.7% (Incl. TN) + 7.7% Incl. + + + + percent + + sale + + + + + + TVA 7.7% sur achat B&S (TN) + 7.7% achat + + percent + + + purchase + + + + + + TVA 7.7% sur achat B&S (Incl. TN) + 7.7% achat Incl. + + + percent + + + purchase + + + + + + TVA 7.7% sur invest. et autres ch. (TN) + 7.7% invest. + + percent + + purchase + + + + + + TVA 7.7% sur invest. et autres ch. (Incl. TN) + 7.7% invest. Incl. + + + percent + + purchase + + + + TVA due a 8.0% (TN) 8.0% diff --git a/addons/web_editor/static/src/js/summernote.js b/addons/web_editor/static/src/js/summernote.js index fe2ff837142..af5e0112e38 100644 --- a/addons/web_editor/static/src/js/summernote.js +++ b/addons/web_editor/static/src/js/summernote.js @@ -19,6 +19,57 @@ var editor = eventHandler.modules.editor; var renderer = $.summernote.renderer; var options = $.summernote.options; +// Browser-unify execCommand +var oldJustify = {}; +_.each(['Left', 'Right', 'Full', 'Center'], function (align) { + oldJustify[align] = editor['justify' + align]; + editor['justify' + align] = function ($editable, value) { + // Before calling the standard function, check all elements which have + // an 'align' attribute and mark them with their value + var $align = $editable.find('[align]'); + _.each($align, function (el) { + var $el = $(el); + $el.data('__align', $el.attr('align')); + }); + + // Call the standard function + oldJustify[align].apply(this, arguments); + + // Then: + + // Remove the text-align of elements which lost the 'align' attribute + var $newAlign = $editable.find('[align]'); + $align.not($newAlign).css('text-align', ''); + + // Transform the 'align' attribute into the 'text-align' css + // property for elements which received the 'align' attribute or whose + // 'align' attribute changed + _.each($newAlign, function (el) { + var $el = $(el); + + var oldAlignValue = $align.data('__align'); + var alignValue = $el.attr('align'); + if (oldAlignValue === alignValue) { + // If the element already had an 'align' attribute and that it + // did not changed, do nothing (compatibility) + return; + } + + $el.removeAttr('align'); + $el.css('text-align', alignValue); + + // Note the first step (removing the text-align of elemnts which + // lost the 'align' attribute) is kinda the same as this one, but + // this one handles the elements which have been edited with chrome + // or with this new system + $el.find('*').css('text-align', ''); + }); + + // Unmark the elements + $align.removeData('__align'); + }; +}); + ////////////////////////////////////////////////////////////////////////////////////////////////////////// /* Add method to Summernote*/