[MIG] migrate add-on account_quotation_sale_order_invoice_title
This commit is contained in:
4
account_quotation_sale_order_invoice_title/__init__.py
Normal file
4
account_quotation_sale_order_invoice_title/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from . import wizard
|
65
account_quotation_sale_order_invoice_title/__manifest__.py
Normal file
65
account_quotation_sale_order_invoice_title/__manifest__.py
Normal file
@@ -0,0 +1,65 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
"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",
|
||||
"author": "Elabore",
|
||||
"website": "https://elabore.coop/",
|
||||
"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.
|
||||
|
||||
""",
|
||||
"depends": [
|
||||
"base",
|
||||
"account",
|
||||
"sale",
|
||||
],
|
||||
"data": [
|
||||
"views/sale_views.xml",
|
||||
"views/account_move_views.xml",
|
||||
],
|
||||
"qweb": [],
|
||||
}
|
70
account_quotation_sale_order_invoice_title/i18n/fr.po
Normal file
70
account_quotation_sale_order_invoice_title/i18n/fr.po
Normal file
@@ -0,0 +1,70 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_quotation_sale_order_invoice_title
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-04-22 08:48+0000\n"
|
||||
"PO-Revision-Date: 2022-04-22 08:48+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: account_quotation_sale_order_invoice_title
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_account_move__display_name
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_sale_advance_payment_inv__display_name
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_sale_order__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nom affiché"
|
||||
|
||||
#. module: account_quotation_sale_order_invoice_title
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_account_move__id
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_sale_advance_payment_inv__id
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_sale_order__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: account_quotation_sale_order_invoice_title
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_account_bank_statement_line__move_title
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_account_move__move_title
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_account_payment__move_title
|
||||
msgid "Invoice Title"
|
||||
msgstr "Titre de la facture"
|
||||
|
||||
#. module: account_quotation_sale_order_invoice_title
|
||||
#: model:ir.model,name:account_quotation_sale_order_invoice_title.model_account_move
|
||||
msgid "Journal Entry"
|
||||
msgstr "Pièce comptable"
|
||||
|
||||
#. module: account_quotation_sale_order_invoice_title
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_account_move____last_update
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_sale_advance_payment_inv____last_update
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_sale_order____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Dernière modification le"
|
||||
|
||||
#. module: account_quotation_sale_order_invoice_title
|
||||
#: model:ir.model,name:account_quotation_sale_order_invoice_title.model_sale_advance_payment_inv
|
||||
msgid "Sales Advance Payment Invoice"
|
||||
msgstr "Facture de paiement d'avance"
|
||||
|
||||
#. module: account_quotation_sale_order_invoice_title
|
||||
#: model:ir.model,name:account_quotation_sale_order_invoice_title.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr "Commande"
|
||||
|
||||
#. module: account_quotation_sale_order_invoice_title
|
||||
#: model:ir.model.fields,field_description:account_quotation_sale_order_invoice_title.field_sale_order__so_title
|
||||
msgid "Title"
|
||||
msgstr "Titre"
|
||||
|
||||
#. module: account_quotation_sale_order_invoice_title
|
||||
#: model_terms:ir.ui.view,arch_db:account_quotation_sale_order_invoice_title.view_move_title_form
|
||||
#: model_terms:ir.ui.view,arch_db:account_quotation_sale_order_invoice_title.view_order_form
|
||||
msgid "Title..."
|
||||
msgstr "Titre..."
|
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account_move
|
||||
from . import sale
|
@@ -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")
|
14
account_quotation_sale_order_invoice_title/models/sale.py
Normal file
14
account_quotation_sale_order_invoice_title/models/sale.py
Normal 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
|
@@ -0,0 +1,39 @@
|
||||
<?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>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<field name="move_title" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_invoice_title_tree" model="ir.ui.view">
|
||||
<field name="name">invoice_title.move.tree</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_invoice_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<field name="move_title" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_title_form" model="ir.ui.view">
|
||||
<field name="name">move_title.move.form</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('oe_title')]" position="after">
|
||||
<h1 class="mt0">
|
||||
<field name="move_title" placeholder="Title..." />
|
||||
</h1>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
@@ -0,0 +1,40 @@
|
||||
<?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>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="after">
|
||||
<field name="so_title" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_quotation_title_tree" model="ir.ui.view">
|
||||
<field name="name">so_title.quotation.tree</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_quotation_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="after">
|
||||
<field name="so_title" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_order__title_form" model="ir.ui.view">
|
||||
<field name="name">so_title.sale_order_form</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="attributes">
|
||||
<attribute name="class">oe_inline</attribute>
|
||||
</field>
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<field name="so_title" class="oe_inline" placeholder="Title..." />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import sale_make_invoice_advance
|
@@ -0,0 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class SaleAdvancePaymentInv(models.TransientModel):
|
||||
_inherit = "sale.advance.payment.inv"
|
||||
|
||||
def _prepare_invoice_values(self, order, name, amount, so_line):
|
||||
res = super(SaleAdvancePaymentInv, self)._prepare_invoice_values(
|
||||
order, name, amount, so_line
|
||||
)
|
||||
res["move_title"] = order.so_title
|
||||
return res
|
Reference in New Issue
Block a user