add contexual field to invoice form and copy value from sales if available

This commit is contained in:
Kristof Bernaert
2026-06-09 12:42:39 +02:00
parent 6dbd1ceb38
commit 6e55250daa
7 changed files with 40 additions and 6 deletions
@@ -7,3 +7,9 @@ class SaleOrderContextual(models.Model):
contextual_note = fields.Text(
string='Contextuele opmerking',
)
def _prepare_invoice(self):
vals = super()._prepare_invoice()
if self.contextual_note:
vals['contextual_note'] = self.contextual_note
return vals