quelque modification non terminé

This commit is contained in:
eloyoussef 2018-03-16 16:13:18 +01:00
parent c3f7ee1bb4
commit 5b7627f667
2 changed files with 6 additions and 3 deletions

View File

@ -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,

View File

@ -22,8 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Trees -->
<!--<record model="ir.ui.view" id="golem_resource_reservation_view_tree">
<field name="name">GOLEM Resource Reservation Tree</field>
<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="arch" type="xml">
<tree>