Skip to content

Commit 49cc74f

Browse files
committed
[ADD] Add new module account invoice report by date
1 parent d7749a3 commit 49cc74f

File tree

6 files changed

+176
-0
lines changed

6 files changed

+176
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# -*- coding: utf-8 -*-
2+
###############################################################################
3+
#
4+
# OpenERP, Open Source Management Solution
5+
# Copyright (C) 2014-Today Julius Network Solutions SARL <[email protected]>
6+
#
7+
# This program is free software: you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 3 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# This program is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License
18+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
#
20+
###############################################################################
21+
22+
from . import wizard
23+
24+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -*- coding: utf-8 -*-
2+
###############################################################################
3+
#
4+
# OpenERP, Open Source Management Solution
5+
# Copyright (C) 2014-Today Julius Network Solutions SARL <[email protected]>
6+
#
7+
# This program is free software: you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 3 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# This program is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License
18+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
#
20+
###############################################################################
21+
22+
{
23+
"name": "Account Invoice Report By Date",
24+
"summary": "Account Invoice Report By Date",
25+
"version": "0.1",
26+
"author": "Julius Network Solutions",
27+
"website": "http://julius.fr",
28+
"category": "Accounting",
29+
"depends": [
30+
"account",
31+
],
32+
"description": """
33+
Print Invoices:
34+
===============
35+
36+
Module to manage mass invoice report by date
37+
""",
38+
"demo": [],
39+
"data": [
40+
"wizard/mass_print_view.xml",
41+
],
42+
'installable': True,
43+
'active': False,
44+
}
45+
46+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Loading
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# -*- coding: utf-8 -*-
2+
###############################################################################
3+
#
4+
# OpenERP, Open Source Management Solution
5+
# Copyright (C) 2014-Today Julius Network Solutions SARL <[email protected]>
6+
#
7+
# This program is free software: you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 3 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# This program is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License
18+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
#
20+
###############################################################################
21+
22+
from . import mass_print
23+
24+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
###############################################################################
3+
#
4+
# OpenERP, Open Source Management Solution
5+
# Copyright (C) 2014-Today Julius Network Solutions SARL <[email protected]>
6+
#
7+
# This program is free software: you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 3 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# This program is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License
18+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
#
20+
###############################################################################
21+
22+
from openerp import models, fields, api, _
23+
24+
class mass_invoice_report(models.TransientModel):
25+
_name = 'mass.invoice.report'
26+
_description = 'Mass Invoice Report'
27+
28+
journal_id = fields.Many2one('account.journal', string='Journal',
29+
required=True)
30+
31+
date_start = fields.Date('Date Start', required=True)
32+
date_end = fields.Date('Date End ', required=True)
33+
34+
@api.multi
35+
def mass_invoice(self):
36+
domain = [
37+
('date_invoice','>=',self.date_start),
38+
('date_invoice','<=',self.date_end),
39+
('journal_id','=',self.journal_id.id)
40+
]
41+
invoices = self.env['account.invoice'].search(domain)
42+
return self.env['report'].get_action(invoices,
43+
'account.report_invoice')
44+
45+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0"?>
2+
<openerp>
3+
<data>
4+
5+
<record model="ir.ui.view" id="view_mass_invoice_report">
6+
<field name="name">mass.invoice.report.view</field>
7+
<field name="model">mass.invoice.report</field>
8+
<field name="arch" type="xml">
9+
<form string="Print Invoice Report">
10+
<separator string="Print Invoice Report"/>
11+
<label string="Please choose the journal, and the period to get"/>
12+
<group>
13+
<field name="journal_id"/>
14+
</group>
15+
<div>
16+
<label for="date_start" string="Period"/>
17+
<field name="date_start" class="oe_inline"/> - <field name="date_end" class="oe_inline"/>
18+
</div>
19+
<footer>
20+
<button string="Print Invoice Report" name="mass_invoice" type="object" class="oe_highlight"/>
21+
or
22+
<button string="Cancel" class="oe_link" special="cancel"/>
23+
</footer>
24+
</form>
25+
</field>
26+
</record>
27+
28+
<act_window name="Mass Invoices Report"
29+
res_model="mass.invoice.report"
30+
src_model="account.invoice"
31+
view_mode="form"
32+
target="new"
33+
key2="client_print_multi"
34+
id="action_mass_invoice_report"/>
35+
36+
</data>
37+
</openerp>

0 commit comments

Comments
 (0)