bemade_fsm: Printing from a subtask prints the root ancestor.

Fixes Dur-Pro/bemade-addons#83

Also added some styling to prevent table headers overlapping with table
content when tables run multiple pages. This is due to a rendering bug
in wkhtmltopdf.
This commit is contained in:
Marc Durepos 2023-08-29 08:06:37 -04:00
parent 853862cde1
commit 632c03ebda
2 changed files with 11 additions and 41 deletions

View file

@ -351,6 +351,7 @@
<template id="work_order">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-set="doc" t-value="doc.root_ancestor" t-if="doc.parent_id"/>
<t t-call="web.external_layout">
<t t-call="bemade_fsm.work_order_page"
t-lang="doc.partner_id.lang"/>

View file

@ -1,45 +1,14 @@
.border-black {
border: 1px solid black;
/* This prevents repeating the header, which overlaps with the body due to a bug in
wkhtmltopdf rendering.
*/
thead {
display: table-row-group;
}
.wo-information{
border: 1px solid black;
.row{
.col-auto{
border: 1px solid black;
}
}
tfoot {
display: table-row-group;
}
tr {
page-break-inside: avoid;
}
.wo-intervention{
border: 1px solid black;
margin-bottom: 10px;
padding-bottom: 10px;
page-break-inside: avoid;
}
.wo-parts-used{
page-break-inside: avoid;
}
.wo-task{
border: 1px solid black;
margin-bottom: 10px;
padding-bottom: 10px;
page-break-inside: avoid;
}
.border-top-black{
border-top: 1px solid black;
}
.text-left {
text-align: left;
}
.manual_line_input {
border-bottom: 1px solid black;
margin: 30px 0px 0px 0px;
width: 100%;
}