[MIG] account_quotation_sale_order_invoice_title: Migration to 18.0
This commit is contained in:
@@ -1,4 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from . import wizard
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account_move
|
||||
from . import sale
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import sale_make_invoice_advance
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user