Skip to content

Commit

Permalink
Merge 41a9e7b into 9d63f35
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Feb 1, 2020
2 parents 9d63f35 + 41a9e7b commit 87619f3
Show file tree
Hide file tree
Showing 140 changed files with 1,403 additions and 1,776 deletions.
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
language: python
sudo: false
cache: pip
cache:
apt: true
directories:
- $HOME/.cache/pip

python:
- "2.7"
- "3.5"

addons:
postgresql: "9.6"
apt:
packages:
- expect-dev # provides unbuffer utility
- python-lxml # because pip installation is slow

env:
global:
- VERSION="8.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0"
- VERSION="12.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" MAKEPOT="0"

matrix:
- LINT_CHECK="1"
- TESTS="1" ODOO_REPO="OCA/OCB" UNIT_TEST="1"
- TESTS="1" ODOO_REPO="OCA/OCB"
- TESTS="1" ODOO_REPO="OCA/OCB" UNIT_TEST="1"

virtualenv:
system_site_packages: true
Expand Down
47 changes: 0 additions & 47 deletions intercompany_trade_account/README.rst
Original file line number Diff line number Diff line change
@@ -1,50 +1,3 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

============================
Intercompany Trade - Account
============================

This module implements intercompany trade features for account module.

Features
--------

* Create link between:
* customer 'account.invoice' and supplier 'account.invoice';
* customer 'account.invoice.line' and supplier 'account.invoice.line';
* create or delete a customer / supplier invoice update the according
customer / supplier invoice;
* create, update or delete a customer / supplier line update the according
customer / supplier line;
* Add Tax management to avoid Tax Bug:
* All invoices are Tax excluded allways;

* Customers doesn't have the possibility to change price_unit;
* Users doesn't the right to copy an 'intercompany_trade' invoice;

In intercompany trade context:

* Purchase orders can not be invoiced
* Incoming Pickings can not be invoiced

Roadmap / Issues
----------------

* For the time being, invoices validation process is quite hard because
Odoo uses workflow, where context can not be passed easily.
To do in V10 : simplify this module, removing _CUSTOMER_ALLOWED_FIELDS
system.

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

* Sylvain LE GAL (https://twitter.com/legalsylvain)

Funders
-------

The development of this module has been financially supported by:

* GRAP, Groupement Régional Alimentaire de Proximité (http://www.grap.coop)
1 change: 0 additions & 1 deletion intercompany_trade_account/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# coding: utf-8
from . import models
29 changes: 29 additions & 0 deletions intercompany_trade_account/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (C) 2015 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Intercompany Trade - Account",
"version": "12.0.1.0.0",
"category": "Intercompany Trade",
"author": "GRAP",
"website": "http://www.grap.coop",
"license": "AGPL-3",
"depends": [
"intercompany_trade_base",
"account",
],
"demo": [
"demo/res_groups.xml",
"demo/account_account.xml",
"demo/account_journal.xml",
"demo/ir_property.xml",
"demo/account_tax.xml",
"demo/product_product.xml",
"demo/product_supplierinfo.xml",
"demo/account_invoice.xml",
],
"data": ["views/menu.xml", "views/view_account_invoice.xml"],
"auto_install": True,
"installable": True,
}
36 changes: 0 additions & 36 deletions intercompany_trade_account/__openerp__.py

This file was deleted.

50 changes: 12 additions & 38 deletions intercompany_trade_account/demo/account_account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,78 +5,52 @@ Copyright (C) 2015 - Today: GRAP (http://www.grap.coop)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->

<openerp><data>

<!-- Supplier Company -->
<record id="supplier_account_root" model="account.account">
<field name="name">Intercompany Trade - Supplier Root Account</field>
<field name="code">SUP_ROOT</field>
<field name="type">view</field>
<field name="user_type" ref="account.data_account_type_view" />
<field name="company_id" ref="intercompany_trade_base.supplier_company" />
</record>
<odoo>

<record id="supplier_account_income" model="account.account">
<field name="name">Intercompany Trade - Supplier Incomes</field>
<field name="code">CUS_7</field>
<field name="type">other</field>
<field name="parent_id" ref="supplier_account_root" />
<field name="user_type" ref="account.data_account_type_income" />
<field name="user_type_id" ref="account.data_account_type_revenue" />
<field name="company_id" ref="intercompany_trade_base.supplier_company" />
</record>

<record id="supplier_account_receivable" model="account.account">
<field name="name">Intercompany Trade - Supplier Debtors</field>
<field name="code">SUP_411</field>
<field name="type">receivable</field>
<field name="parent_id" ref="supplier_account_root" />
<field name="user_type" ref="account.data_account_type_receivable" />
<field name="user_type_id" ref="account.data_account_type_receivable" />
<field name="reconcile" eval="True"/>
<field name="company_id" ref="intercompany_trade_base.supplier_company" />
</record>

<record id="supplier_account_payable" model="account.account">
<field name="name">Intercompany Trade - Supplier Creditors</field>
<field name="code">SUP_401</field>
<field name="type">payable</field>
<field name="parent_id" ref="supplier_account_root" />
<field name="user_type" ref="account.data_account_type_payable" />
<field name="user_type_id" ref="account.data_account_type_payable" />
<field name="reconcile" eval="True"/>
<field name="company_id" ref="intercompany_trade_base.supplier_company" />
</record>

<!-- Customer Company -->
<record id="customer_account_root" model="account.account">
<field name="name">Intercompany Trade - Customer Root Account</field>
<field name="code">CUS_ROOT</field>
<field name="type">view</field>
<field name="user_type" ref="account.data_account_type_view" />
<field name="company_id" ref="intercompany_trade_base.customer_company" />
</record>

<record id="customer_account_expense" model="account.account">
<field name="name">Intercompany Trade - Customer Expenses</field>
<field name="code">CUS_6</field>
<field name="type">other</field>
<field name="parent_id" ref="customer_account_root" />
<field name="user_type" ref="account.data_account_type_expense" />
<field name="user_type_id" ref="account.data_account_type_expenses" />
<field name="company_id" ref="intercompany_trade_base.customer_company" />
</record>

<record id="customer_account_receivable" model="account.account">
<field name="name">Intercompany Trade - Customer Debtors</field>
<field name="code">CUS_411</field>
<field name="type">receivable</field>
<field name="parent_id" ref="customer_account_root" />
<field name="user_type" ref="account.data_account_type_receivable" />
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_receivable" />
<field name="company_id" ref="intercompany_trade_base.customer_company" />
</record>

<record id="customer_account_payable" model="account.account">
<field name="name">Intercompany Trade - Customer Creditors</field>
<field name="code">CUS_401</field>
<field name="type">payable</field>
<field name="parent_id" ref="customer_account_root" />
<field name="user_type" ref="account.data_account_type_payable" />
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_payable" />
<field name="company_id" ref="intercompany_trade_base.customer_company" />
</record>

</data></openerp>
</odoo>
26 changes: 0 additions & 26 deletions intercompany_trade_account/demo/account_fiscalyear.xml

This file was deleted.

6 changes: 3 additions & 3 deletions intercompany_trade_account/demo/account_invoice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Copyright (C) 2017 - Today: GRAP (http://www.grap.coop)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->

<openerp><data>
<odoo>

<record id="intercompany_invoice" model="account.invoice" context="{'tracking_disable': True}">
<field name="company_id" ref="intercompany_trade_base.supplier_company"/>
Expand Down Expand Up @@ -38,10 +38,10 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<field name="name">Supplier Service (Strict Link - With Tax)</field>
<field name="quantity">20</field>
<field name="price_unit">10</field>
<field name="invoice_line_tax_id" eval="[(6, 0, [ref('sale_vat_10_excluded')])]"/>
<field name="invoice_line_tax_ids" eval="[(6, 0, [ref('sale_vat_10_excluded')])]"/>
<field name="invoice_id" ref="intercompany_invoice"/>
<field name="product_id" ref="product_supplier_service_10_excl"/>
<field name="account_id" ref="supplier_account_income"/>
</record>

</data></openerp>
</odoo>
7 changes: 4 additions & 3 deletions intercompany_trade_account/demo/account_journal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Copyright (C) 2015 - Today: GRAP (http://www.grap.coop)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->

<openerp><data>
<odoo>
<data noupdate="1">

<record id="customer_journal_purchase" model="account.journal">
<field name="name">Intercompany Trade - Customer Purchase Journal</field>
Expand All @@ -20,5 +21,5 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<field name="type">sale</field>
<field name="company_id" ref="intercompany_trade_base.supplier_company" />
</record>

</data></openerp>
</data>
</odoo>
Loading

0 comments on commit 87619f3

Please sign in to comment.