Browse Source

[UPTD] changes

pull/57/head
Sreejith 7 years ago
parent
commit
63aea992e0
  1. 39
      filter_aged_partners/README.rst
  2. 2
      filter_aged_partners/__init__.py
  3. 44
      filter_aged_partners/__manifest__.py
  4. 3
      filter_aged_partners/models/__init__.py
  5. 11
      filter_aged_partners/models/filter_aged_partners.py
  6. BIN
      filter_aged_partners/static/description/banner.jpg
  7. BIN
      filter_aged_partners/static/description/icon.png
  8. 30
      filter_aged_partners/static/description/index.html
  9. 3
      filter_aged_partners/views/filter_aged_partners.xml

39
filter_aged_partners/README.rst

@ -0,0 +1,39 @@
Aged Partner Balance with Partner Filter v10
============================================
Aged Partner report with Partner Filter
You can generate aged partner report from wizard with partner filter
Depends
=======
[account] addon Odoo
Tech
====
* [Python] - Models
* [XML] - Odoo views
Installation
============
- www.odoo.com/documentation/10.0/setup/install.html
- Install our custom addon
License
=======
GNU LESSER GENERAL PUBLIC LICENSE, Version 3 (LGPLv3)
(http://www.gnu.org/licenses/agpl.html)
Bug Tracker
===========
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Authors
-------
* Sreejith P <sreejith@cybrosys.in>
Maintainer
----------
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com.

2
filter_aged_partners/__init__.py

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

44
filter_aged_partners/__manifest__.py

@ -1,17 +1,39 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Sreejith P(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
{
'name': 'Aged partner filter',
'summary': "Aged partners filtered pdf reports",
'version': '10.0.1.0',
'author': 'Cybrosys Technologies',
'website': "http://www.cybrosys.com",
'name': 'Aged Partner Balance with Partner Filter',
'version': '10.0.1.0.0',
'summary': """Partner Wise on Aged Partner Balance""",
'category': 'Accounting',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
"category": "Accounts",
'depends': ['base', 'account', 'sale'],
'data': ['views/filter_aged_partners.xml',
],
'license': 'LGPL-3',
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'depends': ['base', 'account'],
'data': ['views/filter_aged_partners.xml'],
'demo': [],
'images': ['static/description/banner.jpg'],
'license': 'AGPL-3',
'installable': True,
'application': True,
'auto_install': False,
'application': False,
}

3
filter_aged_partners/models/__init__.py

@ -1 +1,2 @@
import filter_aged_partners
# -*- coding: utf-8 -*-
from . import filter_aged_partners

11
filter_aged_partners/models/filter_aged_partners.py

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
import time
from odoo.tools import float_is_zero
from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo import fields, models, _
from odoo.exceptions import UserError
from odoo.tools import float_is_zero
class FilterAgedPartner(models.TransientModel):
@ -13,7 +14,6 @@ class FilterAgedPartner(models.TransientModel):
customer = fields.Many2many('res.partner', 'name', string='Customers')
def _print_report(self, data):
# data['form']=super(FilterAgedPartner, self)._print_report(data)
res = {}
data = self.pre_print_report(data)
data['form'].update(self.read(['period_length'])[0])
@ -36,7 +36,6 @@ class FilterAgedPartner(models.TransientModel):
start = stop - relativedelta(days=1)
data['form'].update(res)
data['form'].update({'customer': self.customer.ids})
# data=super(FilterAgedPartner, self)._print_report(data)
return self.env['report'].with_context(landscape=True).get_action(self, 'account.report_agedpartnerbalance',
data=data)
@ -86,15 +85,10 @@ class FilterAgedCustomer(models .AbstractModel):
ORDER BY UPPER(res_partner.name)'''
cr.execute(query, arg_list)
partners = cr.dictfetchall()
print 'filtered', partners
#-------------filter--------------#
if customer:
for ptnr in partners[:]:
print customer
print 'm', ptnr['partner_id']
if ptnr['partner_id'] not in customer:
partners.remove(ptnr)
#---------------------------------#
for i in range(7):
total.append(0)
@ -235,7 +229,6 @@ class FilterAgedCustomer(models .AbstractModel):
return res, total, lines
def render_html(self, docids, data=None):
print 'mymodule'
if not data.get('form') or not self.env.context.get('active_model') or not self.env.context.get('active_id'):
raise UserError(_("Form content is missing, this report cannot be printed."))

BIN
filter_aged_partners/static/description/banner.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 129 KiB

BIN
filter_aged_partners/static/description/icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 32 KiB

30
filter_aged_partners/static/description/index.html

@ -1,8 +1,25 @@
<section class="oe_container oe_dark">
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Aged Partner report with Partner Filter</h2>
<h4 class="oe_slogan">Cybrosys Techno Solutions - www.cybrosys.com</h4>
<h3 class="oe_slogan"></h3>
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4>
</div>
<div class="oe_row oe_spaced" style="padding-left:65px;">
<div>
<span style="color:green;"> &#9745; </span> Use Partner Filtration on Aged Partner Balance.<br/>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_picture">
<h3 class="oe_slogan">Overview</h3>
<p class="oe_mt32 text-justify" style="text-align: center;">
This Cybrosys's module allows you to easily check Partners Aging, Currently we can't take individual aging report. By using this modules we can take aging report of one or more customers.
</p>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h5 class="oe_slogan"><b>You can generate aged partner report from wizard with partner filter</b></h5>
@ -20,10 +37,9 @@
<div class="oe_row oe_spaced">
<h5 class="oe_slogan"><b>This will open partner ledger report wizard with the selected partner. </b></h5>
<h5 class="oe_slogan"><b>You can add or remove partner from wizard in case of fault selection </b></h5>
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
@ -33,7 +49,6 @@
<div class="oe_demo_footer oe_centeralign"style="background-color:rgba(162, 70, 137, 0.7);">Aged Partner Report</div>
</div>
</div>
</section>
<section class="oe_container">
@ -61,4 +76,3 @@
</div>
</div>
</section>

3
filter_aged_partners/views/filter_aged_partners.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="partner_filter_form" model="ir.ui.view">
<record id="partner_filter_aged_balance_view" model="ir.ui.view">
<field name="name">partner.filter.form</field>
<field name="model">account.aged.trial.balance</field>
<field name="inherit_id" ref="account.account_aged_balance_view" />
@ -11,6 +11,5 @@
</field>
</field>
</record>
</data>
</odoo>
Loading…
Cancel
Save