diff --git a/addons/l10n_fr_pos_cert/static/src/js/pos.js b/addons/l10n_fr_pos_cert/static/src/js/pos.js index 04d5d2843ab..e724ad149da 100644 --- a/addons/l10n_fr_pos_cert/static/src/js/pos.js +++ b/addons/l10n_fr_pos_cert/static/src/js/pos.js @@ -15,6 +15,13 @@ var _super_posmodel = models.PosModel.prototype; models.PosModel = models.PosModel.extend({ is_french_country: function(){ var french_countries = ['FR', 'MF', 'MQ', 'NC', 'PF', 'RE', 'GF', 'GP', 'TF']; + if (!this.company.country) { + this.gui.show_popup("error", { + 'title': _t("Missing Country"), + 'body': _.str.sprintf(_t('The company %s doesn\'t have a country set.'), this.company.name), + }); + return false; + } return _.contains(french_countries, this.company.country.code); }, delete_current_order: function () {