diff --git a/base_import_pdf_by_template/README.rst b/base_import_pdf_by_template/README.rst
index 6da7f695f9..4d2f0ecac6 100644
--- a/base_import_pdf_by_template/README.rst
+++ b/base_import_pdf_by_template/README.rst
@@ -122,7 +122,6 @@ Known issues / Roadmap
======================
- Add operator in template lines (= or ilike)
-- Add support for selection fields as default value.
- Simplify auto-detection (defining a text only to search the system
should search the corresponding regular expression).
- Allow compatibility with registration process created from email
diff --git a/base_import_pdf_by_template/demo/base_import_pdf_template.xml b/base_import_pdf_by_template/demo/base_import_pdf_template.xml
index 34be493514..cc93f61b93 100644
--- a/base_import_pdf_by_template/demo/base_import_pdf_template.xml
+++ b/base_import_pdf_by_template/demo/base_import_pdf_template.xml
@@ -49,6 +49,16 @@
fixed
+
Usage
- Add operator in template lines (= or ilike)
-- Add support for selection fields as default value.
- Simplify auto-detection (defining a text only to search the system
should search the corresponding regular expression).
- Allow compatibility with registration process created from email
diff --git a/base_import_pdf_by_template/tests/test_base_import_pdf_by_template.py b/base_import_pdf_by_template/tests/test_base_import_pdf_by_template.py
index 3c07810047..1f9ff64c30 100644
--- a/base_import_pdf_by_template/tests/test_base_import_pdf_by_template.py
+++ b/base_import_pdf_by_template/tests/test_base_import_pdf_by_template.py
@@ -82,6 +82,7 @@ def test_wizard_base_import_pdf_by_template_01(self):
self.assertEqual(record.country_id.code, "ES")
self.assertEqual(record.industry_id.name, "Food")
self.assertEqual(record.user_id, self.user)
+ self.assertEqual(record.ref, "fixed-ref")
self.assertEqual(len(record.child_ids), 3)
child_1 = record.child_ids.filtered(lambda x: x.name == "Child 1")
self.assertEqual(child_1.street, "Address 1")
@@ -118,6 +119,7 @@ def test_wizard_base_import_pdf_by_template_02(self):
self.assertEqual(record.country_id.code, "ES")
self.assertEqual(record.industry_id.name, "Food")
self.assertEqual(record.user_id, self.user)
+ self.assertEqual(record.ref, "fixed-ref")
self.assertEqual(len(record.child_ids), 3)
child_1 = record.child_ids.filtered(lambda x: x.name == "Child 1")
self.assertEqual(child_1.street, "Address 1")
@@ -128,6 +130,7 @@ def test_wizard_base_import_pdf_by_template_02(self):
child_3 = record.child_ids.filtered(lambda x: x.name == "Child 3")
self.assertEqual(child_3.street, "Address 3")
self.assertEqual(child_3.country_id.code, "ES")
+ self.assertTrue(record.message_ids) # Error message to set ref to childs
def test_wizard_base_import_pdf_by_template_error(self):
self.env.ref(
diff --git a/base_import_pdf_by_template/views/base_import_pdf_template_line_views.xml b/base_import_pdf_by_template/views/base_import_pdf_template_line_views.xml
index 3ad92a5fde..02d923386b 100644
--- a/base_import_pdf_by_template/views/base_import_pdf_template_line_views.xml
+++ b/base_import_pdf_by_template/views/base_import_pdf_template_line_views.xml
@@ -55,16 +55,59 @@
/>
+
+
+
+
+
+
+
+
+
+
ES[0-9]{10}
variable
+
+
+ header
+
+ fixed
+ fixed-origin
+
lines
@@ -215,6 +222,16 @@
fixed
+
+
+ header
+
+ fixed
+
+