Skip to content

Commit

Permalink
[MIG] sale_force_invoiced: Migration to 10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MiquelRForgeFlow committed Sep 15, 2017
1 parent 3c66b50 commit 869a6b5
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 20 deletions.
16 changes: 9 additions & 7 deletions sale_force_invoiced/README.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl
:alt: License: AGPL-3

===================
Sale Force Invoiced
===================

This module adds the possibility for users to force the invoice status of the
sales orders to 'Invoiced', even when not all the quantities ordered or
delivered have been invoiced.
sales orders to 'Invoiced', even when not all the quantities ordered or
delivered have been invoiced.

This feature useful in the following scenario:

Expand All @@ -27,20 +28,21 @@ Usage
#. Deliver the products/services.
#. Create an invoice and reduce the invoiced quantity. The sales order
invoicing status is 'To Invoice'.
#. Change the status of the sales order to 'Done'.
#. Lock the Sale Order, to change the status of it to 'Done'.
#. Check the field 'Force Invoiced'

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/167/9.0
:target: https://runbot.odoo-community.org/runbot/167/10.0


Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/sale-workflow/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.


Credits
Expand Down
2 changes: 1 addition & 1 deletion sale_force_invoiced/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# © 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import model
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# -*- coding: utf-8 -*-
# © 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
'name': 'Sale Force Invoiced',
'summary': 'Allows to force the invoice status of the sales order to '
'Invoiced',
'version': '9.0.1.0.0',
'version': '10.0.1.0.0',
"author": "Eficent,"
"Odoo Community Association (OCA)",
'category': 'sale',
Expand Down
2 changes: 1 addition & 1 deletion sale_force_invoiced/model/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# © 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import sale_order
7 changes: 4 additions & 3 deletions sale_force_invoiced/model/sale_order.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# © 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

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


class SaleOrder(models.Model):
Expand All @@ -16,7 +16,8 @@ class SaleOrder(models.Model):
'pending to invoice.',
readonly=True,
states={'done': [('readonly', False)]},
default=False)
copy=False,
)

@api.depends('force_invoiced')
def _get_invoiced(self):
Expand Down
2 changes: 1 addition & 1 deletion sale_force_invoiced/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# © 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import test_sale_force_invoiced
4 changes: 2 additions & 2 deletions sale_force_invoiced/tests/test_sale_force_invoiced.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# © 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from openerp.tests.common import TransactionCase
from odoo.tests.common import TransactionCase


class TestSaleForceInvoiced(TransactionCase):
Expand Down
6 changes: 3 additions & 3 deletions sale_force_invoiced/view/sale_view.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<odoo>

<record id="view_order_form" model="ir.ui.view">
<field name="name">sale.order.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<group name="sale_pay" position="inside">
<field name="force_invoiced" groups="base.group_sale_manager"/>
<field name="force_invoiced" groups="sales_team.group_sale_manager"/>
</group>
</field>
</record>

</openerp>
</odoo>

0 comments on commit 869a6b5

Please sign in to comment.