Initial commit: Core packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:45 +02:00
commit 12c29a983b
9512 changed files with 8379910 additions and 0 deletions

View file

@ -0,0 +1,24 @@
/** @odoo-module **/
import { registerModel } from '@mail/model/model_core';
import { attr } from '@mail/model/model_field';
import { clear } from '@mail/model/model_field_command';
registerModel({
name: 'Country',
fields: {
code: attr(),
flagUrl: attr({
compute() {
if (!this.code) {
return clear();
}
return `/base/static/img/country_flags/${this.code}.png`;
},
}),
id: attr({
identifying: true,
}),
name: attr(),
},
});