diff --git a/golem_resource_account/models/golem_resource_reservation.py b/golem_resource_account/models/golem_resource_reservation.py
index 43fec4e..011d248 100644
--- a/golem_resource_account/models/golem_resource_reservation.py
+++ b/golem_resource_account/models/golem_resource_reservation.py
@@ -28,10 +28,12 @@ class GolemResourceReservation(models.Model):
_inherit = 'golem.resource.reservation'
resource_product_id = fields.Many2one(related='resource_id.product_tmpl_id')
- invoice_id = fields.Many2one('account.invoice')
- invoicing_state = fields.Selection(related="invoice_id.state",
- string="Invoicing Status", default="None")
-
+ invoice_id = fields.Many2one('account.invoice', 'Invoice', index=True)
+ invoice_state = fields.Selection(related='invoice_id.state', store=True)
+ invoice_amount_total = fields.Monetary(related='invoice_id.amount_total')
+ invoice_line_id = fields.Many2one('account.invoice.line')
+ invoice_line_price_subtotal = fields.Monetary(related='invoice_line_id.price_subtotal')
+ currency_id = fields.Many2one(related='invoice_id.currency_id')
@api.multi
def create_invoice(self):
diff --git a/golem_resource_account/views/golem_resource_reservation_views.xml b/golem_resource_account/views/golem_resource_reservation_views.xml
index 3d5e3ca..37cc902 100644
--- a/golem_resource_account/views/golem_resource_reservation_views.xml
+++ b/golem_resource_account/views/golem_resource_reservation_views.xml
@@ -28,7 +28,7 @@ along with this program. If not, see .
-
+
@@ -41,44 +41,40 @@ along with this program. If not, see .
+
+
+
+
+
+
+
+
+
-
+
+