Steps to reproduce:
- go to "Link Tracker" app;
- go to "Campaigns" tab (UTMs);
- create a new campaign;
- leave and return in this record.
Issue:
A traceback appears.
Error message:
`Invalid props for component 'Notebook': 'defaultPage' is not a string`
Cause:
The `defaultPage` prop must be a string.
When the record is new, it will be `undefined`,
so it will pass props validation because this prop is optional.
But when we try to calculate it and it does not return a value,
the `defaultPage` is null.
The variable is therefore declared but it is empty
(and therefore not a string).
`null` value does not pass the props validation test.
The problem appears in the "Campaigns" tab
because there is a notebook without content.
Solution:
Test if it is possible to have a value.
If not, set the `defaultPage` prop to be `undefined`.
opw-3109327
closesodoo/odoo#109533
X-original-commit: 402b1a822c3983af33aa1d3a3c7e93d8836c60d8
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>