Skip to content

Commit

Permalink
Add bypass invoice policy following change on odoo#6931
Browse files Browse the repository at this point in the history
  • Loading branch information
yvaucher committed Jun 3, 2015
1 parent e039f6d commit fb5f680
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions stock_dropshipping_dual_invoice/model/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from . import move
from . import picking
from . import purchase_order
28 changes: 28 additions & 0 deletions stock_dropshipping_dual_invoice/model/purchase_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
#
# Author: Yannick Vaucher
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from openerp import models, api


class PurchaseOrder(models.Model):
_inherit = 'purchase.order'

@api.multi
def wkf_confirm_order(self):
po = self.with_context(no_invoice_policy_check=True)
super(PurchaseOrder, po).wkf_confirm_order()

0 comments on commit fb5f680

Please sign in to comment.