From 5b7627f667de96e96bbd7f5b1536e0b867999ef8 Mon Sep 17 00:00:00 2001 From: eloyoussef Date: Fri, 16 Mar 2018 16:13:18 +0100 Subject: [PATCH] =?UTF-8?q?quelque=20modification=20non=20termin=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- golem_resource_account/models/golem_resource_reservation.py | 5 ++++- .../views/golem_resource_reservation_views.xml | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/golem_resource_account/models/golem_resource_reservation.py b/golem_resource_account/models/golem_resource_reservation.py index ca8baa5..bb6cef7 100644 --- a/golem_resource_account/models/golem_resource_reservation.py +++ b/golem_resource_account/models/golem_resource_reservation.py @@ -27,6 +27,9 @@ class GolemResourceReservation(models.Model): """ GOLEM Resource Reservation Adaptation """ _inherit = 'golem.resource.reservation' + invoice_id = fields.Many2one('account.invoice') + invoice_state = fields.Selection(related="invoice_id.state") + @api.multi def create_invoice(self): @@ -47,7 +50,7 @@ class GolemResourceReservation(models.Model): _('There is no income account defined for this product: "%s". \ You may have to install a chart of account from Accounting \ app, settings menu.') % (product.name,)) - + invoice = inv_obj.create({ 'name': reservation.name, diff --git a/golem_resource_account/views/golem_resource_reservation_views.xml b/golem_resource_account/views/golem_resource_reservation_views.xml index 809edbf..a1add3a 100644 --- a/golem_resource_account/views/golem_resource_reservation_views.xml +++ b/golem_resource_account/views/golem_resource_reservation_views.xml @@ -22,8 +22,8 @@ along with this program. If not, see . -