[NEW] invoice_sale_order_note

This commit is contained in:
clementthomas
2024-09-26 13:30:01 +02:00
parent e5c26a7ebd
commit a66e6a2427
9 changed files with 154 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
from . import account_move
from . import sale

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
from odoo import models, fields
class AccountMove(models.Model):
_inherit = 'account.move'
report_note = fields.Html("Note")

View File

@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
from odoo import models, fields
from odoo.addons.sale.models.sale_order import LOCKED_FIELD_STATES
class SaleOrder(models.Model):
_inherit = "sale.order"
report_note = fields.Html("Note", states=LOCKED_FIELD_STATES,)
def _prepare_invoice(self):
res = super(SaleOrder, self)._prepare_invoice()
res["report_note"] = self.report_note
return res