You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
574 B

  1. // Copyright (C) 2018 DynApps <http://www.dynapps.be>
  2. // @author Stefan Rijnhart <stefan@opener.amsterdam>
  3. // License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  4. openerp.web_copy_confirm = function(instance) {
  5. instance.web.FormView.include({
  6. on_button_duplicate: function() {
  7. var self = this;
  8. this.has_been_loaded.done(function() {
  9. if (confirm(_t("Do you really want to copy this record?"))) {
  10. return self._super.apply(self, arguments);
  11. }
  12. });
  13. }
  14. });
  15. };