diff --git a/modules/entry/back/model-config.json b/modules/entry/back/model-config.json
index 0e37b947f..eddef9c41 100644
--- a/modules/entry/back/model-config.json
+++ b/modules/entry/back/model-config.json
@@ -7,5 +7,8 @@
},
"EntryLog": {
"dataSource": "vn"
+ },
+ "EntryObservation": {
+ "dataSource": "vn"
}
}
diff --git a/modules/entry/back/models/entry-observation.js b/modules/entry/back/models/entry-observation.js
new file mode 100644
index 000000000..77d15d85c
--- /dev/null
+++ b/modules/entry/back/models/entry-observation.js
@@ -0,0 +1,9 @@
+const UserError = require('vn-loopback/util/user-error');
+
+module.exports = Self => {
+ Self.rewriteDbError(function(err) {
+ if (err.code === 'ER_DUP_ENTRY')
+ return new UserError(`The observation type can't be repeated`);
+ return err;
+ });
+};
diff --git a/modules/entry/back/models/entry-observation.json b/modules/entry/back/models/entry-observation.json
new file mode 100644
index 000000000..87d3fd964
--- /dev/null
+++ b/modules/entry/back/models/entry-observation.json
@@ -0,0 +1,38 @@
+{
+ "name": "EntryObservation",
+ "base": "Loggable",
+ "log": {
+ "model": "EntryLog",
+ "relation": "entry"
+ },
+ "options": {
+ "mysql": {
+ "table": "entryObservation"
+ }
+ },
+ "properties": {
+ "id": {
+ "id": true,
+ "type": "Number",
+ "description": "Identifier"
+ },
+ "description": {
+ "type": "String",
+ "required": true
+ }
+ },
+ "relations": {
+ "entry": {
+ "type": "belongsTo",
+ "model": "Entry",
+ "foreignKey": "entryFk",
+ "required": true
+ },
+ "observationType": {
+ "type": "belongsTo",
+ "model": "ObservationType",
+ "foreignKey": "observationTypeFk",
+ "required": true
+ }
+ }
+}
diff --git a/modules/entry/front/index.js b/modules/entry/front/index.js
index e92f23fc1..14aecc8db 100644
--- a/modules/entry/front/index.js
+++ b/modules/entry/front/index.js
@@ -10,6 +10,7 @@ import './latest-buys-search-panel';
import './descriptor';
import './descriptor-popover';
import './card';
+import './note';
import './summary';
import './log';
import './buy';
diff --git a/modules/entry/front/note/index.html b/modules/entry/front/note/index.html
new file mode 100644
index 000000000..5f3c7f77e
--- /dev/null
+++ b/modules/entry/front/note/index.html
@@ -0,0 +1,72 @@
+