From 9a3fa8dbe071bc508a9395d18a9bd606fbe2fe2b Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 30 Jul 2015 10:09:10 +0200 Subject: [PATCH] Add date_confirm in sale order view ! Add onchange on important sale.order fields --- sale_usability_extension/__init__.py | 21 +------------- sale_usability_extension/sale.py | 40 ++++++++++++++++++++++++++ sale_usability_extension/sale_view.xml | 14 ++++++++- 3 files changed, 54 insertions(+), 21 deletions(-) create mode 100644 sale_usability_extension/sale.py diff --git a/sale_usability_extension/__init__.py b/sale_usability_extension/__init__.py index 6720d69..1d47105 100644 --- a/sale_usability_extension/__init__.py +++ b/sale_usability_extension/__init__.py @@ -1,22 +1,3 @@ # -*- encoding: utf-8 -*- -############################################################################## -# -# Sale Usability Extension module for OpenERP -# Copyright (C) 2014 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 . -# -############################################################################## +from . import sale diff --git a/sale_usability_extension/sale.py b/sale_usability_extension/sale.py new file mode 100644 index 0000000..4c5e82e --- /dev/null +++ b/sale_usability_extension/sale.py @@ -0,0 +1,40 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Sale Usability Extension module for Odoo +# Copyright (C) 2015 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 . +# +############################################################################## + +from openerp import models, fields + + +class SaleOrder(models.Model): + _inherit = 'sale.order' + + state = fields.Selection(track_visibility='onchange') + date_order = fields.Datetime(track_visibility='onchange') + date_confirm = fields.Date(track_visibility='onchange') + client_order_ref = fields.Char(track_visibility='onchange') + partner_id = fields.Many2one(track_visibility='onchange') + partner_shipping_id = fields.Many2one(track_visibility='onchange') + partner_invoice_id = fields.Many2one(track_visibility='onchange') + pricelist_id = fields.Many2one(track_visibility='onchange') + order_policy = fields.Selection(track_visibility='onchange') + payment_term = fields.Many2one(track_visibility='onchange') + fiscal_position = fields.Many2one(track_visibility='onchange') + user_id = fields.Many2one(track_visibility='onchange') diff --git a/sale_usability_extension/sale_view.xml b/sale_usability_extension/sale_view.xml index 3ae0f23..1551d94 100644 --- a/sale_usability_extension/sale_view.xml +++ b/sale_usability_extension/sale_view.xml @@ -1,6 +1,6 @@ @@ -21,6 +21,10 @@ + + + @@ -43,8 +47,16 @@ + + 1 + + + + + +