Skip to content

Commit

Permalink
[REL] Migration account_invoice_control to 11.0
Browse files Browse the repository at this point in the history
* [FIX] Update Readme & Manifest
* [REM] remove the depends to purchase and the link to PO
* [REM] remove the link to SO, now is in sale_ux
* [FIX] add dependencies to sale_ux module
* [REM] remove the class becase now it's not necesary in this module. Moving to sale_ux & purchase_ux
* [FIX] remove the executable to init and views file
  • Loading branch information
nicomacr authored and jjscarafia committed Aug 7, 2018
1 parent 65307cb commit 0a19a83
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 208 deletions.
46 changes: 23 additions & 23 deletions account_invoice_control/README.rst
@@ -1,23 +1,27 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
.. |company| replace:: ADHOC SA

.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png
:alt: ADHOC SA
:target: https://www.adhoc.com.ar

.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png

.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3

==========================
Invoice origin and control
==========================

This module add a link from invoices to the purchase orders and sale orders that generate it.

It also creates a new users group "Restrict Edit Invoice", users in that group can not edit lines of invoices generated from Sale Orders

WARNING: this module depends on sale and purchase (and purchase on stock), so lot of modules will be installed.
* It also creates a new users group "Restrict Edit Invoice", users in that group can not edit lines of invoices generated from Sale Orders

Installation
============

To install this module, you need to:

#. Just install it
#. Only need to install the module

Configuration
=============
Expand All @@ -26,23 +30,22 @@ To configure this module, you need to:

#. Set "Restrict Edit Invoice" to the users you want to restrict

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.adhoc.com.ar/
Usage
=====

.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt
.. branch is "8.0" for example
To use this module, you need to:

Known issues / Roadmap
======================
#. Go to ...

* Split this module so it does not require purchase
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: http://runbot.adhoc.com.ar/

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

Bugs are tracked on `GitHub Issues
<https://github.com/ingadhoc/{project_repo}/issues>`_. In case of trouble, please
<https://github.com/ingadhoc/account-invoicing/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.

Expand All @@ -52,19 +55,16 @@ Credits
Images
------

* ADHOC SA: `Icon <http://fotos.subefotos.com/83fed853c1e15a8023b86b2b22d6145bo.png>`_.
* |company| |icon|

Contributors
------------


Maintainer
----------

.. image:: http://fotos.subefotos.com/83fed853c1e15a8023b86b2b22d6145bo.png
:alt: Odoo Community Association
:target: https://www.adhoc.com.ar
|company_logo|

This module is maintained by the ADHOC SA.
This module is maintained by the |company|.

To contribute to this module, please visit https://www.adhoc.com.ar.
1 change: 0 additions & 1 deletion account_invoice_control/__init__.py 100755 → 100644
Expand Up @@ -2,4 +2,3 @@
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from . import account_invoice
14 changes: 5 additions & 9 deletions account_invoice_control/__manifest__.py
Expand Up @@ -20,20 +20,16 @@
{
'name': 'Account Invoice Control',
'author': 'ADHOC SA',
'version': '9.0.1.3.0',
'version': '11.0.1.0.0',
'license': 'AGPL-3',
'category': 'Accounting & Finance',
'depends': [
'sale',
'purchase',
'account_invoice_prices_update',
'sale_ux',
],
'test': [],
'data': [
'security/security.xml',
'views/account_invoice_view.xml',
'views/account_invoice_supplier_view.xml',
'security/account_invoice_control_security.xml',
'views/account_invoice_views.xml',
],
'website': 'www.adhoc.com.ar',
'installable': False,
'installable': True,
}
33 changes: 0 additions & 33 deletions account_invoice_control/account_invoice.py

This file was deleted.

@@ -1,11 +1,8 @@
<?xml version="1.0"?>
<openerp>
<data>
<odoo>

<record model="res.groups" id="group_restrict_edit_invoice">
<field name="name">Restrict Edit Invoice</field>
</record>

</data>
</odoo>

</odoo>
67 changes: 0 additions & 67 deletions account_invoice_control/views/account_invoice_supplier_view.xml

This file was deleted.

70 changes: 0 additions & 70 deletions account_invoice_control/views/account_invoice_view.xml

This file was deleted.

50 changes: 50 additions & 0 deletions account_invoice_control/views/account_invoice_views.xml
@@ -0,0 +1,50 @@
<?xml version="1.0"?>
<odoo>
<!-- CUSTOMER INVOICES -->
<record id="invoice_restrict_edit_form" model="ir.ui.view">
<field name="name">invoice.form.inherit</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="sale_ux.invoice_form"/>
<field name="groups_id" eval="[(6, 0, [ref('group_restrict_edit_invoice')])]"/>
<field name="priority">20</field>
<field name="arch" type="xml">
<field name="invoice_line_ids" position="attributes">
<attribute name="attrs">{'readonly':[('type','=','out_invoice'),('sale_order_ids','!=',[])]}</attribute>
</field>
<xpath expr="//page[2]//field[@name='account_id']" position="attributes">
<attribute name="attrs">{'readonly':[('type','=','out_invoice'),('sale_order_ids','!=',[])]}</attribute>
</xpath>
<xpath expr="//page[2]//field[@name='company_id']" position="attributes">
<attribute name="attrs">{'readonly':[('type','=','out_invoice'),('sale_order_ids','!=',[])]}</attribute>
</xpath>
<field name="team_id" position="attributes">
<attribute name="attrs">{'readonly':[('type','=','out_invoice'),('sale_order_ids','!=',[])]}</attribute>
</field>
<xpath expr="//page[@name='other_info']//field[contains(@name, 'origin')]" position="attributes">
<attribute name="attrs">{'readonly':[('type','=','out_invoice'),('sale_order_ids','!=',[])]}</attribute>
</xpath>
<field name="date_invoice" position="attributes">
<attribute name="attrs">{'readonly':[('type','=','out_invoice'),('sale_order_ids','!=',[])]}</attribute>
</field>
<field name="partner_id" position="attributes">
<attribute name="attrs">{'readonly':[('type','=','out_invoice'),('sale_order_ids','!=',[])]}</attribute>
</field>
<field name="user_id" position="attributes">
<attribute name="attrs">{'readonly':[('type','=','out_invoice'),('sale_order_ids','!=',[])]}</attribute>
</field>
<field name="fiscal_position_id" position="attributes">
<attribute name="attrs">{'readonly':[('type','=','out_invoice'),('sale_order_ids','!=',[])]}</attribute>
</field>
<field name="date_due" position="attributes">
<attribute name="attrs">{'readonly':[('type','=','out_invoice'),('sale_order_ids','!=',[])]}</attribute>
</field>
<field name="payment_term_id" position="attributes">
<attribute name="attrs">{'readonly':[('type','=','out_invoice'),('sale_order_ids','!=',[])]}</attribute>
</field>
<field name="partner_bank_id" position="attributes">
<attribute name="attrs">{'readonly':[('type','=','out_invoice'),('sale_order_ids','!=',[])]}</attribute>
</field>
</field>
</record>

</odoo>
1 change: 1 addition & 0 deletions oca_dependencies.txt
@@ -1,2 +1,3 @@
# web
ingadhoc-account-financial-tools https://github.com/ingadhoc/account-financial-tools.git
ingadhoc-sale https://github.com/ingadhoc/sale.git

0 comments on commit 0a19a83

Please sign in to comment.