15 changed files with 499 additions and 0 deletions
@ -0,0 +1,14 @@ |
|||
Payroll-Payslip Reporting v10 |
|||
============================= |
|||
This Module help Human resource managers to get a over all view for the payslips as pivot. |
|||
|
|||
Features |
|||
======== |
|||
|
|||
* Pivot view for HR payslips. |
|||
* Group By options like Employee wise, department wise, job title wise, date wise, status wise and Company wise. |
|||
* Spot Export to XLS Report. |
|||
|
|||
Credits |
|||
======= |
|||
Nikhil Krishnan @ cybrosys, nikhil@cybrosys.in |
@ -0,0 +1,25 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Nikhil krishnan(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
import models |
@ -0,0 +1,45 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Nikhil krishnan(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
{ |
|||
'name': 'Payroll-Payslip Reporting', |
|||
'version': '10.0.1.0.0', |
|||
'summary': """Payslip Pivot View Report.""", |
|||
'description': """Payslip monthly report. |
|||
This module gives a pivot view for the HR managers. they can see all the 'NET' amount of payslips in all states""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': 'http://www.cybrosys.com', |
|||
'category': 'Human Resources', |
|||
'depends': ['hr_payroll'], |
|||
'license': 'LGPL-3', |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'views/menu_payslip_report.xml' |
|||
], |
|||
'demo': [], |
|||
'images': ['static/description/banner.jpg'], |
|||
'installable': True, |
|||
'auto_install': False, |
|||
} |
@ -0,0 +1,26 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Nikhil krishnan(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
import hr_payroll_report |
|||
|
@ -0,0 +1,83 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Nikhil krishnan(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
from odoo import fields, models, tools, api |
|||
|
|||
|
|||
class PayrollReportView(models.Model): |
|||
_name = 'hr.payroll.report.view' |
|||
_auto = False |
|||
|
|||
name = fields.Many2one('hr.employee', string='Employee') |
|||
date_from = fields.Date(string='From') |
|||
date_to = fields.Date(string='To') |
|||
state = fields.Selection([('draft', 'Draft'), ('verify', 'Waiting'), ('done', 'Done'), ('cancel', 'Rejected')], |
|||
string='Status') |
|||
job_id = fields.Many2one('hr.job', string='Job Title') |
|||
company_id = fields.Many2one('res.company', string='Company') |
|||
department_id = fields.Many2one('hr.department', string='Department') |
|||
net = fields.Float(string='Net Salary') |
|||
|
|||
def _select(self): |
|||
select_str = """ |
|||
min(ps.id) as id,emp.id as name,jb.id as job_id, |
|||
dp.id as department_id,cmp.id as company_id, |
|||
ps.date_from, ps.date_to, sum(psl.total) as net, ps.state as state |
|||
""" |
|||
return select_str |
|||
|
|||
def _from(self): |
|||
from_str = """ |
|||
hr_payslip_line psl join hr_payslip ps on (ps.employee_id=psl.employee_id and ps.id=psl.slip_id) |
|||
join hr_employee emp on (ps.employee_id=emp.id) join hr_department dp on (emp.department_id=dp.id) |
|||
join hr_job jb on (emp.department_id=jb.id) join res_company cmp on (cmp.id=ps.company_id) where psl.code='NET' |
|||
""" |
|||
return from_str |
|||
|
|||
def _group_by(self): |
|||
group_by_str = """ |
|||
group by emp.id,psl.total,ps.date_from, ps.date_to, ps.state,jb.id,dp.id,cmp.id |
|||
""" |
|||
return group_by_str |
|||
|
|||
@api.model_cr |
|||
def init(self): |
|||
tools.drop_view_if_exists(self.env.cr, self._table) |
|||
self.env.cr.execute("""CREATE or REPLACE VIEW %s as ( SELECT |
|||
%s |
|||
FROM %s |
|||
%s |
|||
)""" % (self._table, self._select(), self._from(), self._group_by())) |
|||
|
|||
|
|||
# _________________Query________________________ |
|||
|
|||
# select emp.name_related as name,emp.id as employee_id,jb.name as job,jb.id as job_id, |
|||
# dp.name as department,dp.id as department_id,cmp.name as company,cmp.id as company_id, |
|||
# ps.date_from, ps.date_to, sum(psl.total) as net, ps.state as state from hr_payslip_line psl join hr_payslip |
|||
# ps on (ps.employee_id=psl.employee_id and ps.id=psl.slip_id) |
|||
# join hr_employee emp on (ps.employee_id=emp.id) join hr_department dp on (emp.department_id=dp.id) |
|||
# join hr_job jb on (emp.department_id=jb.id) join res_company cmp on (cmp.id=ps.company_id) where |
|||
# psl.code='NET' group by emp.name_related,emp.id,psl.total,ps.date_from, ps.date_to, ps.state,dp.name,jb.name, |
|||
# cmp.name,jb.id,dp.id,cmp.id |
|
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,124 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Payroll-Payslip Reporting</h2> |
|||
<h3 class="oe_slogan">Get an overview of the pay slips as pivot</h3> |
|||
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4> |
|||
<div> |
|||
<h4><p>Features:</p></h4> |
|||
<ul> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> <b>Retrieve pivot view of pay slips.</b></li> |
|||
<li style="list-style:none !important;"><span style="color:green; "> ☑</span> <b>Able to get Reports</b> </li> |
|||
<ul style="padding-left: 36px;padding-top: 2px;"> |
|||
<li style="list-style:outside !important;">Employee wise,</li> |
|||
<li style="list-style:outside !important;">Employee's department wise,</li> |
|||
<li style="list-style:outside !important;">Employee's job title wise,</li> |
|||
<li style="list-style:outside !important;">Pay slip's date wise,</li> |
|||
<li style="list-style:outside !important;">Pay slip's status wise,</li> |
|||
<li style="list-style:outside !important;">Company wise.</li> |
|||
</ul> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> <b>Spot Export to XLS Report.</b></li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Payroll Monthly Statement in Pivot View</h2> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
This report helps in payroll analysis. This helps you to check your pay slips and sorting it out from different group |
|||
criteria (Employee, Job title, Department, Company, Pay slip etc.). |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h3 class="oe_slogan">Payroll report as Pivot</h3> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="HR Payslip Report view.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
HR managers need a complete payroll statement and also payroll monthly statement. From |
|||
this pivot view we can easily generate the custom payroll report views in excel format. Also |
|||
we can download it from there. From Odoo payroll report we can get only individual employee |
|||
pay slip reports. To make the use of HR payroll management system easier we can use this pivot |
|||
view to get the payroll/pay slip statement. |
|||
</p> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h3 class="oe_slogan">Group by the pivot view</h3> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="HR report group by.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
In this View we can easily generate custom reports by using the + button, |
|||
That is we can make the filters by groups, also we can get the counts too, from the "Measures" Button |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h3 class="oe_slogan">Graph View</h3> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="Payslip Graph Report.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
In Pivot view we can easily generate custom Graphs like Pie Chart,Bar Chart, Line Chart. |
|||
With date and net salary or date and pay slip's counts. |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;border-radius: 0;" href="http://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="http://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
@ -0,0 +1,68 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id="hr_payroll_report_view_pivot" model="ir.ui.view"> |
|||
<field name="name">hr.payslip.pivot</field> |
|||
<field name="model">hr.payroll.report.view</field> |
|||
<field name="arch" type="xml"> |
|||
<pivot string="Payslip Analysis"> |
|||
<field name="name" type="row"/> |
|||
<field name="date_from" interval="month" type="col"/> |
|||
<field name="net" type="measure"/> |
|||
</pivot> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="hr_payroll_report_view_graph" model="ir.ui.view"> |
|||
<field name="name">hr.payslip.graph</field> |
|||
<field name="model">hr.payroll.report.view</field> |
|||
<field name="arch" type="xml"> |
|||
<graph string="Payslip Analysis"> |
|||
<field name="date_from" type="row"/> |
|||
<field name="net" type="measure"/> |
|||
</graph> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="hr_payroll_report_view_search" model="ir.ui.view"> |
|||
<field name="name">hr.payslip.search</field> |
|||
<field name="model">hr.payroll.report.view</field> |
|||
<field name="arch" type="xml"> |
|||
<search string="Payslip Analysis"> |
|||
<field name="name"/> |
|||
<field name="date_from"/> |
|||
<field name="company_id" groups="base.group_multi_company"/> |
|||
<filter string="This Year" name="year" domain="[('date_from','<=', time.strftime('%%Y-12-31')),('date_from','>=',time.strftime('%%Y-01-01')),('date_to','<=', time.strftime('%%Y-12-31')),('date_to','>=',time.strftime('%%Y-01-01'))]"/> |
|||
<filter name="Salary" string="Salary" domain="[('state','=', 'done')]"/> |
|||
<filter name="Draft" string="Draft" domain="[('state','=','draft')]"/> |
|||
<separator/> |
|||
<field name="department_id"/> |
|||
<group expand="1" string="Group By"> |
|||
<filter string="Employee" name="Employee" context="{'group_by':'name'}"/> |
|||
<filter string="Job" context="{'group_by':'job_id'}"/> |
|||
<filter string="Department" context="{'group_by':'department_id'}"/> |
|||
<filter name="status" string="Status" context="{'group_by':'state'}"/> |
|||
<filter string="Company" groups="base.group_multi_company" context="{'group_by':'company_id'}"/> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
|
|||
|
|||
<record id="action_hr_payslip_view_report" model="ir.actions.act_window"> |
|||
<field name="res_model">hr.payroll.report.view</field> |
|||
<field name="name">Payslips</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">pivot,graph</field> |
|||
<field name="context">{'search_default_year':1}</field> |
|||
<field name="help">This report helps in payroll analysis. This helps you to check your pay slips and sorting it out from different group |
|||
criteria (Employee, Job title, Department, Company, Pay slip etc.).</field> |
|||
</record> |
|||
|
|||
<menuitem name="Reports" id="menu_hr_payslip_reports" parent="hr_payroll.menu_hr_payroll_root" /> |
|||
|
|||
<menuitem id="menu_hr_payslip_view_report" name="Payslip Report" |
|||
parent="menu_hr_payslip_reports" action="action_hr_payslip_view_report" |
|||
groups="hr.group_hr_manager" sequence="10"/> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,112 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id="act_sale_order_2_revised" model="ir.actions.act_window"> |
|||
<field name="name">Revised Quotation Orders</field> |
|||
<field name="res_model">sale.order</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="view_id" ref="sale.view_quotation_tree"/> |
|||
<field name="domain">[('parent_so_id', '=', active_id)]</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Revised order against this Quotation Order. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
<!--In sale order menu, we need to avoid the 'revised' state orders. --> |
|||
|
|||
<record id="sale.action_orders" model="ir.actions.act_window"> |
|||
<field name="name">Sales Orders</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">sale.order</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,kanban,form,calendar,pivot,graph</field> |
|||
<field name="search_view_id" ref="sale.sale_order_view_search_inherit_sale"/> |
|||
<field name="context">{}</field> |
|||
<field name="domain">[('state', 'not in', ('draft','revised','sent', 'cancel'))]</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Create a Quotation, the first step of a new sale. |
|||
</p><p> |
|||
Once the quotation is confirmed, it becomes a sales order. |
|||
You'll be able to invoice it and collect payments. |
|||
From the <i>Sales Orders</i> menu, you can track delivery |
|||
orders or services. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="sale.action_quotations" model="ir.actions.act_window"> |
|||
<field name="name">Quotations</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">sale.order</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_id" ref="sale.view_quotation_tree"/> |
|||
<field name="view_mode">tree,kanban,form,calendar,pivot,graph</field> |
|||
<field name="context">{}</field> |
|||
<field name="domain">[('state','in',('pre','draft','sent','cancel'))]</field> |
|||
<field name="search_view_id" ref="sale.view_sales_order_filter"/> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Create a Quotation, the first step of a new sale. |
|||
</p><p> |
|||
Your next actions should flow efficiently: confirm the Quotation |
|||
to a Sale Order, then create the Invoice and collect the Payment. |
|||
</p><p> |
|||
Note that once a Quotation becomes a Sale Order, it will be moved |
|||
from the Quotations list to the Sales Order list. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_order_form_revised" model="ir.ui.view"> |
|||
<field name="name">sale.order.form</field> |
|||
<field name="model">sale.order</field> |
|||
<field name="inherit_id" ref="sale.view_order_form" /> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//button[@name='action_confirm']" position="after"> |
|||
<button name="make_revision" string="Revise the Quotation" type="object" states="sent" class="btn-primary"/> |
|||
<button name="action_quotation_send" string="Send by Email" type="object" states="pre" class="btn-primary"/> |
|||
<button name="print_quotation" string="Print" type="object" states="pre" class="btn-primary"/> |
|||
<button name="action_cancel" states="pre" type="object" string="Cancel"/> |
|||
</xpath> |
|||
|
|||
<xpath expr="//div[@name='button_box']" position="inside"> |
|||
<button class="oe_inline oe_stat_button" type="action" name="%(act_sale_order_2_revised)d" |
|||
icon="fa-bars" attrs="{'invisible':[('state','in',[('draft','revised')]}"> |
|||
<field string="Revised Quotation Orders" name="revised_order_count" widget="statinfo"/> |
|||
</button> |
|||
</xpath> |
|||
|
|||
<xpath expr="//field[@name='order_line']" position="attributes"> |
|||
<attribute name="attrs">{'readonly': [('state', 'in', ('sent','revised','done','cancel'))]}</attribute> |
|||
</xpath> |
|||
|
|||
<xpath expr="//field[@name='payment_term_id']" position="attributes"> |
|||
<attribute name="attrs">{'readonly': [('state', 'in', ('sent','revised','done','cancel'))]}</attribute> |
|||
</xpath> |
|||
|
|||
<xpath expr="//field[@name='user_id']" position="attributes"> |
|||
<attribute name="attrs">{'readonly': [('state', 'in', ('sent','revised','done','cancel'))]}</attribute> |
|||
</xpath> |
|||
|
|||
<xpath expr="//field[@name='team_id']" position="attributes"> |
|||
<attribute name="attrs">{'readonly': [('state', 'in', ('sent','revised','done','cancel'))]}</attribute> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_quotation_handler_tree" model="ir.ui.view"> |
|||
<field name="name">sale.order.tree</field> |
|||
<field name="model">sale.order</field> |
|||
<field name="inherit_id" ref="sale.view_quotation_tree" /> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//field[@name='state']" position="replace"> |
|||
<field name="state"/> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
Loading…
Reference in new issue