[MIG] account_quotation_sale_order_invoice_title: Migration to 18.0

This commit is contained in:
Stéphan Sainléger
2026-03-17 23:04:52 +01:00
parent d6c6872c5c
commit 8cef75a9b3
11 changed files with 26 additions and 79 deletions

View File

@@ -1,4 +1,2 @@
# -*- coding: utf-8 -*-
from . import models
from . import wizard

View File

@@ -1,59 +1,15 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Elabore
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Quotation Sale Order Invoice Title",
"category": "Account",
"version": "16.0.1.0",
"summary": "Transfer the Receipt Lost value in invoices and account move lines",
"version": "18.0.1.0.0",
"category": "Accounting",
"summary": "Add title field in Quotations, Sale Orders and Invoices",
"author": "Elabore",
"website": "https://git.elabore.coop/elabore/account-tools",
"installable": True,
"application": False,
"auto_install": False,
"description": """
==========================================
Account Quotation Sale Order Invoice Title
==========================================
This module allows to add a title in Quotations, Sale Orders and Invoices.
When an invoice is created from a Sale Order, the title is transfered.
Installation
============
Just install account_quotation_sale_order_invoice_title, all dependencies will be installed by default.
Known issues / Roadmap
======================
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/elabore-coop/.../issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.
Credits
=======
Images
------
* Elabore: `Icon <https://elabore.coop/web/image/res.company/1/logo?unique=f3db262>`_.
Contributors
------------
* Stéphan Sainléger <https://github.com/stephansainleger>
Funders
-------
The development of this module has been financially supported by:
* Elabore (https://elabore.coop)
* Datactivist (https://datactivist.coop)
Maintainer
----------
This module is maintained by ELABORE.
""",
"license": "AGPL-3",
"depends": [
"base",
"account",
"sale",
],
@@ -63,5 +19,7 @@ This module is maintained by ELABORE.
"views/account_invoice_report.xml",
"views/sale_order_report.xml",
],
"qweb": [],
"installable": True,
"auto_install": False,
"application": False,
}

View File

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

View File

@@ -1,9 +1,7 @@
# -*- coding: utf-8 -*-
from odoo import models, fields
from odoo import fields, models
class AccountMove(models.Model):
_inherit = 'account.move'
_inherit = "account.move"
move_title = fields.Char(string="Invoice Title")

View File

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

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//span[@t-field='o.name']" position="after">

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_move_title_tree" model="ir.ui.view">
<field name="name">move_title.move.tree</field>
@@ -36,4 +36,4 @@
</record>
</odoo>
</odoo>

View File

@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_saleorder_document" inherit_id="sale.report_saleorder_document">
<template
id="report_saleorder_document"
inherit_id="sale.report_saleorder_document"
>
<xpath expr="//span[@t-field='doc.name']" position="after">
<div t-field="doc.so_title"></div>
<div t-field="doc.so_title" />
</xpath>
</template>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_order_title_tree" model="ir.ui.view">
<field name="name">so_title.sale.order.tree</field>
@@ -37,4 +37,4 @@
</record>
</odoo>
</odoo>

View File

@@ -1,3 +1 @@
# -*- coding: utf-8 -*-
from . import sale_make_invoice_advance

View File

@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
from odoo import models
@@ -7,8 +5,6 @@ class SaleAdvancePaymentInv(models.TransientModel):
_inherit = "sale.advance.payment.inv"
def _prepare_invoice_values(self, order, so_line):
res = super(SaleAdvancePaymentInv, self)._prepare_invoice_values(
order, so_line
)
res = super()._prepare_invoice_values(order, so_line)
res["move_title"] = order.so_title
return res