Skip to content

Commit

Permalink
[FIX] travis
Browse files Browse the repository at this point in the history
  • Loading branch information
gmeficent authored and LoisRForgeFlow committed Jun 12, 2017
1 parent c82bb53 commit 809b8cb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions purchase_request_to_rfq_order_approved/README.rst
Expand Up @@ -13,7 +13,7 @@ Usage

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/repo/github-com-oca-purchase-workflow-142
:target: https://runbot.odoo-community.org/runbot/142/9.0


Bug Tracker
Expand All @@ -31,7 +31,7 @@ Credits
Contributors
------------

Gisela Mora gisela.mora@eficent.com
Gisela Mora <gisela.mora@eficent.com>
Eficent. http://www.eficent.com/


Expand Down
4 changes: 2 additions & 2 deletions purchase_request_to_rfq_order_approved/init_hook.py
Expand Up @@ -10,10 +10,10 @@

def post_init_hook(cr, registry):
"""
The objective of this hook is to update the field purchase_state in
The objective of this hook is to update the field purchase_state in
existing purchase request lines
"""
update_field_purchase_state(cr )
update_field_purchase_state(cr)


def update_field_purchase_state(cr):
Expand Down
Expand Up @@ -2,7 +2,7 @@
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0).

from openerp import api, fields, models
from openerp import api, models


class PurchaseRequestLine(models.Model):
Expand All @@ -15,6 +15,7 @@ def _compute_purchase_state(self):
for rec in self:
if rec.purchase_lines:
if any([po_line.state == 'approved' for po_line in
rec.purchase_lines]) and not any([po_line.state in ['purchase', 'done']
for po_line in rec.purchase_lines]):
rec.purchase_lines]) and not any(
[po_line.state in ['purchase', 'done'] for po_line in
rec.purchase_lines]):
rec.purchase_state = 'approved'
Expand Up @@ -11,7 +11,7 @@
<filter name="purchase_state_approved"
string="Purchase Approved"
domain="[('purchase_state','=', 'approved')]"
help="At least a PO has been approved"/>
help="At least a Purchase Order has been approved"/>
</filter>
</field>
</record>
Expand Down

0 comments on commit 809b8cb

Please sign in to comment.