Add sale_quotation_title module
This commit is contained in:
3
sale_quotation_title/__init__.py
Normal file
3
sale_quotation_title/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from . import sale
|
||||||
26
sale_quotation_title/__openerp__.py
Normal file
26
sale_quotation_title/__openerp__.py
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# © 2016 Akretion (http://www.akretion.com)
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'Sale Quotation Title',
|
||||||
|
'version': '0.1',
|
||||||
|
'category': 'Sale Management',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'summary': 'Adds a title field on quotations',
|
||||||
|
'description': """
|
||||||
|
Sale Quotation Title
|
||||||
|
====================
|
||||||
|
|
||||||
|
This module only adds a field *quotation_title* on sale.order (to be displayed in report).
|
||||||
|
|
||||||
|
This module has been written by Alexis de Lattre from Akretion
|
||||||
|
<alexis.delattre@akretion.com>.
|
||||||
|
""",
|
||||||
|
'author': 'Akretion',
|
||||||
|
'website': 'http://www.akretion.com',
|
||||||
|
'depends': ['sale'],
|
||||||
|
'data': ['sale_view.xml'],
|
||||||
|
'installable': True,
|
||||||
|
}
|
||||||
12
sale_quotation_title/sale.py
Normal file
12
sale_quotation_title/sale.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# © 2016 Akretion (http://www.akretion.com)
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
|
||||||
|
from openerp import models, fields
|
||||||
|
|
||||||
|
|
||||||
|
class SaleOrder(models.Model):
|
||||||
|
_inherit = 'sale.order'
|
||||||
|
|
||||||
|
quotation_title = fields.Char(string="Quotation Title")
|
||||||
45
sale_quotation_title/sale_view.xml
Normal file
45
sale_quotation_title/sale_view.xml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2016 Akretion (http://www.akretion.com/)
|
||||||
|
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
The licence is in the file __openerp__.py
|
||||||
|
-->
|
||||||
|
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<record id="view_order_tree" model="ir.ui.view">
|
||||||
|
<field name="name">quotation_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="user_id" position="before">
|
||||||
|
<field name="quotation_title"/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_quotation_tree" model="ir.ui.view">
|
||||||
|
<field name="name">quotation_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="user_id" position="before">
|
||||||
|
<field name="quotation_title"/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_order_form" model="ir.ui.view">
|
||||||
|
<field name="name">quotation_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="client_order_ref" position="before">
|
||||||
|
<field name="quotation_title"/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</openerp>
|
||||||
Reference in New Issue
Block a user