account_move_line_filter_wizard: Port to v10
This commit is contained in:
@@ -1,30 +1,12 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# Copyright (C) 2016-2018 Akretion (http://www.akretion.com)
|
||||||
#
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# Account Move Line Filter Wizard module for Odoo
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
# Copyright (C) 2016 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License 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 <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Account Move Line Filter Wizard',
|
'name': 'Account Move Line Filter Wizard',
|
||||||
'version': '0.1',
|
'version': '10.0.1.0.0',
|
||||||
'category': 'Accounting & Finance',
|
'category': 'Accounting',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Easy and fast access to the details of an account',
|
'summary': 'Easy and fast access to the details of an account',
|
||||||
'description': """
|
'description': """
|
||||||
@@ -39,5 +21,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
|||||||
'website': 'http://www.akretion.com',
|
'website': 'http://www.akretion.com',
|
||||||
'depends': ['account_usability'],
|
'depends': ['account_usability'],
|
||||||
'data': ['wizard/account_move_line_filter_view.xml'],
|
'data': ['wizard/account_move_line_filter_view.xml'],
|
||||||
'installable': False,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# Copyright 2016-2018 Akretion (http://www.akretion.com)
|
||||||
#
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# Account Move Line Filter Wizard module for Odoo
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
# Copyright (C) 2016 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License 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 <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp import models, fields, api
|
from odoo import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
class AccountMoveLineFilterWizard(models.TransientModel):
|
class AccountMoveLineFilterWizard(models.TransientModel):
|
||||||
@@ -31,12 +14,13 @@ class AccountMoveLineFilterWizard(models.TransientModel):
|
|||||||
'res.partner', string='Partner', domain=[('parent_id', '=', False)])
|
'res.partner', string='Partner', domain=[('parent_id', '=', False)])
|
||||||
account_id = fields.Many2one(
|
account_id = fields.Many2one(
|
||||||
'account.account', string='Account',
|
'account.account', string='Account',
|
||||||
domain=[('type', 'not in', ('view', 'closed'))], required=True)
|
domain=[('deprecated', '=', False)], required=True)
|
||||||
account_reconcile = fields.Boolean(related='account_id.reconcile')
|
account_reconcile = fields.Boolean(
|
||||||
|
related='account_id.reconcile', readonly=True)
|
||||||
reconcile = fields.Selection([
|
reconcile = fields.Selection([
|
||||||
('unreconciled', 'Unreconciled'),
|
('unreconciled', 'Unreconciled'),
|
||||||
('reconciled', 'Fully Reconciled'),
|
('reconciled', 'Fully Reconciled'),
|
||||||
('partial_reconciled', 'Partially Reconciled'),
|
# ('partial_reconciled', 'Partially Reconciled'),
|
||||||
], string='Reconciliation Filter')
|
], string='Reconciliation Filter')
|
||||||
|
|
||||||
@api.onchange('partner_id')
|
@api.onchange('partner_id')
|
||||||
@@ -44,11 +28,11 @@ class AccountMoveLineFilterWizard(models.TransientModel):
|
|||||||
if self.partner_id:
|
if self.partner_id:
|
||||||
if self.partner_id.customer:
|
if self.partner_id.customer:
|
||||||
self.account_id =\
|
self.account_id =\
|
||||||
self.partner_id.property_account_receivable.id
|
self.partner_id.property_account_receivable_id.id
|
||||||
else:
|
else:
|
||||||
self.account_id = self.partner_id.property_account_payable.id
|
self.account_id =\
|
||||||
|
self.partner_id.property_account_payable_id.id
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def go(self):
|
def go(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
action = self.env['ir.actions.act_window'].for_xml_id(
|
action = self.env['ir.actions.act_window'].for_xml_id(
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Copyright (C) 2016 Akretion (http://www.akretion.com/)
|
Copyright (C) 2016-2018 Akretion (http://www.akretion.com/)
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
The licence is in the file __openerp__.py
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<openerp>
|
<odoo>
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="account_move_line_filter_wizard_form" model="ir.ui.view">
|
<record id="account_move_line_filter_wizard_form" model="ir.ui.view">
|
||||||
<field name="name">account_move_line_filter_wizard_form</field>
|
<field name="name">account_move_line_filter_wizard_form</field>
|
||||||
@@ -22,8 +21,8 @@
|
|||||||
attrs="{'invisible': [('account_reconcile', '!=', True)]}"/>
|
attrs="{'invisible': [('account_reconcile', '!=', True)]}"/>
|
||||||
</group>
|
</group>
|
||||||
<footer>
|
<footer>
|
||||||
<button type="object" name="go" string="Go" class="oe_highlight"/>
|
<button type="object" name="go" string="Go" class="btn-primary"/>
|
||||||
<button special="cancel" string="Cancel" class="oe_link"/>
|
<button special="cancel" string="Cancel" class="btn-default"/>
|
||||||
</footer>
|
</footer>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
@@ -42,5 +41,4 @@
|
|||||||
sequence="-1"/>
|
sequence="-1"/>
|
||||||
|
|
||||||
|
|
||||||
</data>
|
</odoo>
|
||||||
</openerp>
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ This module has been written by Alexis de Lattre from Akretion
|
|||||||
'data': [
|
'data': [
|
||||||
'sale_view.xml',
|
'sale_view.xml',
|
||||||
'product_view.xml',
|
'product_view.xml',
|
||||||
|
'security/ir.model.access.csv',
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,7 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<filter context="{'group_by':'date_order'}" position="after">
|
<filter context="{'group_by':'date_order'}" position="after">
|
||||||
<filter string="Order Confirmation Month" name="confirmation_date_groupby" context="{'group_by': 'confirmation_date'}"/>
|
<filter string="Order Confirmation Month" name="confirmation_date_groupby" context="{'group_by': 'confirmation_date'}"/>
|
||||||
|
<filter string="State" name="state_groupby" context="{'group_by': 'state'}"/>
|
||||||
</filter>
|
</filter>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
Reference in New Issue
Block a user