From a4a9be78bc55866488c1e145d00934ba8cde7243 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 25 May 2018 13:25:00 +0200 Subject: [PATCH] account_move_line_filter_wizard: Port to v10 --- .../__manifest__.py | 30 +++------------ .../wizard/account_move_line_filter.py | 38 ++++++------------- .../wizard/account_move_line_filter_view.xml | 16 ++++---- sale_usability/__manifest__.py | 1 + sale_usability/sale_view.xml | 1 + 5 files changed, 26 insertions(+), 60 deletions(-) diff --git a/account_move_line_filter_wizard/__manifest__.py b/account_move_line_filter_wizard/__manifest__.py index 9ddc634..ba47cef 100644 --- a/account_move_line_filter_wizard/__manifest__.py +++ b/account_move_line_filter_wizard/__manifest__.py @@ -1,30 +1,12 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Account Move Line Filter Wizard module for Odoo -# Copyright (C) 2016 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# 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 . -# -############################################################################## - +# Copyright (C) 2016-2018 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Account Move Line Filter Wizard', - 'version': '0.1', - 'category': 'Accounting & Finance', + 'version': '10.0.1.0.0', + 'category': 'Accounting', 'license': 'AGPL-3', 'summary': 'Easy and fast access to the details of an account', 'description': """ @@ -39,5 +21,5 @@ This module has been written by Alexis de Lattre from Akretion -# -# 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 . -# -############################################################################## +# Copyright 2016-2018 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp import models, fields, api +from odoo import models, fields, api class AccountMoveLineFilterWizard(models.TransientModel): @@ -31,12 +14,13 @@ class AccountMoveLineFilterWizard(models.TransientModel): 'res.partner', string='Partner', domain=[('parent_id', '=', False)]) account_id = fields.Many2one( 'account.account', string='Account', - domain=[('type', 'not in', ('view', 'closed'))], required=True) - account_reconcile = fields.Boolean(related='account_id.reconcile') + domain=[('deprecated', '=', False)], required=True) + account_reconcile = fields.Boolean( + related='account_id.reconcile', readonly=True) reconcile = fields.Selection([ ('unreconciled', 'Unreconciled'), ('reconciled', 'Fully Reconciled'), - ('partial_reconciled', 'Partially Reconciled'), + # ('partial_reconciled', 'Partially Reconciled'), ], string='Reconciliation Filter') @api.onchange('partner_id') @@ -44,11 +28,11 @@ class AccountMoveLineFilterWizard(models.TransientModel): if self.partner_id: if self.partner_id.customer: self.account_id =\ - self.partner_id.property_account_receivable.id + self.partner_id.property_account_receivable_id.id 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): self.ensure_one() action = self.env['ir.actions.act_window'].for_xml_id( diff --git a/account_move_line_filter_wizard/wizard/account_move_line_filter_view.xml b/account_move_line_filter_wizard/wizard/account_move_line_filter_view.xml index 2126deb..45c6003 100644 --- a/account_move_line_filter_wizard/wizard/account_move_line_filter_view.xml +++ b/account_move_line_filter_wizard/wizard/account_move_line_filter_view.xml @@ -1,13 +1,12 @@ - - + account_move_line_filter_wizard_form @@ -22,8 +21,8 @@ attrs="{'invisible': [('account_reconcile', '!=', True)]}"/>
-
@@ -42,5 +41,4 @@ sequence="-1"/> -
-
+ diff --git a/sale_usability/__manifest__.py b/sale_usability/__manifest__.py index 4ca8552..4577b53 100644 --- a/sale_usability/__manifest__.py +++ b/sale_usability/__manifest__.py @@ -27,6 +27,7 @@ This module has been written by Alexis de Lattre from Akretion 'data': [ 'sale_view.xml', 'product_view.xml', + 'security/ir.model.access.csv', ], 'installable': True, } diff --git a/sale_usability/sale_view.xml b/sale_usability/sale_view.xml index a24d772..63da34a 100644 --- a/sale_usability/sale_view.xml +++ b/sale_usability/sale_view.xml @@ -70,6 +70,7 @@ +