diff options
| author | Simon Genin (ges) <ges@odoo.com> | 2020-07-30 20:21:03 +0000 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2020-09-01 08:58:40 +0000 |
| commit | c121a246f16899735306266a3a12b526e08e7620 (patch) | |
| tree | 489c09e57ae1c46a28c3c51d7b97f08c29917479 /odoo/models.py | |
| parent | e43c35d3c95c58d6d6af424d4eebf8244c83f332 (diff) | |
[IMP] base: Document layout preview improvements
The document layout preview is a complete defferent simplified template
with its own css that replicates at best the different styles.
It does not have the external layout features and lack of fidelity.
The new preview actually use the real documents templates and put the
result in an iframe. It now has a high fidelity, though not perfect.
The goal is for a better onboarding, where clients see easely how
documents will look if they had an app to generate them. Of course, the
data on the document is a false invoice.
Refactor all this from base to web.
Task ID 2304177
closes odoo/odoo#56415
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Diffstat (limited to 'odoo/models.py')
| -rw-r--r-- | odoo/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/odoo/models.py b/odoo/models.py index 0bccf401912..f435e8ef043 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -204,6 +204,13 @@ class NewId(object): "<NewId 0x%x>" % id(self) ) + def __str__(self): + if self.origin or self.ref: + id_part = repr(self.origin or self.ref) + else: + id_part = hex(id(self)) + return "NewId_%s" % id_part + def origin_ids(ids): """ Return an iterator over the origin ids corresponding to ``ids``. |
