[MIG] migrate add-on account_quotation_sale_order_invoice_title

This commit is contained in:
Stéphan Sainléger
2024-08-02 10:32:47 +02:00
parent f329a27f4b
commit c521801cb3
10 changed files with 262 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'
move_title = fields.Char(string="Invoice Title")

View File

@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
from odoo import models, fields
class SaleOrder(models.Model):
_inherit = "sale.order"
so_title = fields.Char(string="Title")
def _prepare_invoice(self):
res = super(SaleOrder, self)._prepare_invoice()
res["move_title"] = self.so_title
return res