forked from Yaltik/golem
suite des modifications : ajout du status de facturation sur reservation list
This commit is contained in:
parent
5b7627f667
commit
4aea2c069f
@ -18,7 +18,7 @@
|
||||
|
||||
""" GOLEM Resource Reservation Adaptation"""
|
||||
|
||||
from math import modf
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
|
||||
@ -28,7 +28,7 @@ class GolemResourceReservation(models.Model):
|
||||
_inherit = 'golem.resource.reservation'
|
||||
|
||||
invoice_id = fields.Many2one('account.invoice')
|
||||
invoice_state = fields.Selection(related="invoice_id.state")
|
||||
invoicing_state = fields.Selection(related="invoice_id.state", string="Invoicing Status", default="None")
|
||||
|
||||
|
||||
@api.multi
|
||||
@ -52,7 +52,7 @@ class GolemResourceReservation(models.Model):
|
||||
app, settings menu.') % (product.name,))
|
||||
|
||||
|
||||
invoice = inv_obj.create({
|
||||
reservation.invoice_id = inv_obj.create({
|
||||
'name': reservation.name,
|
||||
#'origin': self.application_number,
|
||||
'type': 'out_invoice',
|
||||
|
@ -25,17 +25,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<record model="ir.ui.view" id="golem_resource_reservation_tree_inherit_golem_resource_account">
|
||||
<field name="name">GOLEM Resource Reservation Tree Adaptation to invoicing</field>
|
||||
<field name="model">golem.resource.reservation</field>
|
||||
<field name='inherit_id' ref="golem_resource.golem_resource_reservation_view_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="resource_id" />
|
||||
<field name="date" />
|
||||
<field name="hour_start" widget="float_time" />
|
||||
<field name="hour_stop" widget="float_time" />
|
||||
<field name="partner_id" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
<field name="state" position="after">
|
||||
<field name="invoicing_state"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>-->
|
||||
</record>
|
||||
|
||||
<!-- Forms -->
|
||||
<record model="ir.ui.view"
|
||||
|
@ -76,3 +76,4 @@ class GolemReservationInvoiceWizard(models.TransientModel):
|
||||
'partner_id': partner_id.id,
|
||||
'invoice_line_ids': lines,
|
||||
})
|
||||
self.reservation_ids.write({'invoice_id': invoice.id})
|
||||
|
Loading…
x
Reference in New Issue
Block a user