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.
 
 
 
 
 

19 lines
513 B

/** @odoo-module **/
import { ImageField } from '@web/views/fields/image/image_field';
import { patch } from "@web/core/utils/patch";
import { CameraDialog } from "./CameraDialog.js";
import { useService } from "@web/core/utils/hooks";
/**
* Updates ImageField
*/
patch(ImageField.prototype,{
setup(){
super.setup();
this.dialogService = useService('dialog')
},
onFileCamera(ev){
ev.stopPropagation()
this.dialogService.add(CameraDialog, {parent: this},);
}
})