Skip to content
Snippets Groups Projects
Commit 7f848773bde2 authored by damien.habets's avatar damien.habets
Browse files

Alternate Ledger for Odoo 11

parent c91c85d3d025
No related branches found
No related tags found
1 merge request!1Alternate Ledger for Odoo 11
Pipeline #8883 passed with warnings
Showing with 2243 additions and 3199 deletions
include:
- project: xcg/ci-templates
file: /odoo/11.0/gitlab-ci.yaml
# Allow failure until there is a simple way to install dependency in ci-templates
test:
allow_failure: true
install_modules_without_demo:
allow_failure: true
alternate_ledger 1.8
=========
ChangeLog
=========
11.0.1.0.0
==========
Odoo version 11
This new version has been writen from scratch disregarding the existing code.
1.8
===
Deleted the invoice field from alternate ledger move lines. Deleted the
associated methods and its declarations in the views.
Deleted the code checking this field in the unlink method of alternate ledgers.
......@@ -2,9 +14,10 @@
Deleted the invoice field from alternate ledger move lines. Deleted the
associated methods and its declarations in the views.
Deleted the code checking this field in the unlink method of alternate ledgers.
alternate_ledger 1.7
1.7
===
Production release
......@@ -8,7 +21,8 @@
Production release
alternate_ledger 1.6.1
1.6.1
=====
- Some fixes brought from account_streamline
......@@ -12,7 +26,8 @@
- Some fixes brought from account_streamline
alternate_ledger 1.6
1.6
===
Production release
### README ###
### Alternate Ledger for Odoo/OpenERP ###
# Alternate Ledger for Odoo
This module allows to create additionals accounting books in Odoo/OpenERP.
Once installed you will have access to:
......@@ -5,9 +2,9 @@
This module allows to create additionals accounting books in Odoo/OpenERP.
Once installed you will have access to:
- The creation of new accounting ledgers that store
separate transactions. These transactions are completely separated
from the main accounting journal.
- The creation of new accounting ledgers that store
separate transactions. These transactions are completely separated
from the main accounting journal.
......@@ -13,2 +10,1 @@
import alternate_ledger_move_line
import alternate_ledger
import account
import account_journal
from . import models, security # noqa: F401
# -*- coding: utf-8 -*-
##############################################################################
#
......@@ -2,7 +1,7 @@
##############################################################################
#
# Alternate Ledger, for OpenERP
# Copyright (C) 2013 XCG Consulting (http://odoo.consulting)
# Alternate Ledger, for Odoo
# Copyright (C) 2013, 2020 XCG Consulting (http://odoo.consulting)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
......@@ -20,5 +19,5 @@
##############################################################################
{
"name": "Alternate Ledger",
"version": "1.7",
"version": "11.0.1.0.0",
"author": "XCG Consulting",
......@@ -24,11 +23,8 @@
"author": "XCG Consulting",
"category": 'Accounting',
"description": '''Allow the creation of new accounting ledgers that store
separate transactions.''',
'website': 'http://odoo.consulting/',
'init_xml': [],
"depends": [
'base',
'account_streamline',
],
"category": "Accounting",
"description": """Allow the creation of new accounting ledgers that store
separate transactions.""",
"website": "http://odoo.consulting/",
"licence": "AGPL-3",
"depends": ["base", "account", "analytic_structure"],
"data": [
......@@ -34,8 +30,8 @@
"data": [
'security/ir.model.access.csv',
'security/security.xml',
'views/account_view.xml',
'views/ledger_type.xml',
'views/menu.xml',
'views/account_journal.xml',
"security/ir.model.access.csv",
"security/security.xml",
"views/alternate_ledger_move.xml",
"views/alternate_ledger_move_type.xml",
"views/menu.xml",
"views/account_journal.xml",
],
......@@ -41,10 +37,5 @@
],
'js': [
'static/src/js/account_move_line_alternate_quickadd.js',
],
'qweb': [
'static/src/xml/account_move_line_alternate_quickadd.xml',
],
'installable': True,
'active': False,
"js": ["static/src/js/account_move_line_alternate_quickadd.js"],
"qweb": ["static/src/xml/account_move_line_alternate_quickadd.xml"],
"installable": True,
}
......@@ -50,2 +41,1 @@
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
from . import ( # noqa: F401
account,
account_journal,
alternate_ledger_move,
alternate_ledger_move_line,
alternate_ledger_move_type,
)
from osv import fields, osv
##############################################################################
#
# Alternate Ledger, for Odoo
# Copyright (C) 2020 XCG Consulting <http://odoo.consulting>
#
# 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 odoo import fields, models
......@@ -2,5 +22,5 @@
class account_account(osv.osv):
_inherit = 'account.account'
class AccountAccount(models.Model):
_inherit = ["account.account"]
......@@ -6,7 +26,4 @@
_columns = {
'ledger_types': fields.many2many(
'account_streamline.ledger_type',
string='Ledger Types'
)
}
ledger_type_ids = fields.Many2many(
comodel_name="alternate_ledger.move.type", string="Ledger Types"
)
from openerp.osv import (
osv,
fields
)
##############################################################################
#
# Alternate Ledger, for Odoo
# Copyright (C) 2020 XCG Consulting <http://odoo.consulting>
#
# 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 odoo import fields, models
......@@ -5,5 +22,5 @@
class account_journal(osv.Model):
_inherit = 'account.journal'
class AccountJournal(models.Model):
_inherit = ["account.journal"]
......@@ -9,5 +26,2 @@
_columns = {
'version_number': fields.char(u"Version", size=8),
'is_active': fields.boolean(u"Is Active"),
}
version_number = fields.Char(string="Version")
This diff is collapsed.
##############################################################################
#
# Alternate Ledger, for Odoo
# Copyright (C) 2020 XCG Consulting <http://odoo.consulting>
#
# 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 odoo import fields, models
class AlternateLedgerMoveType(models.Model):
_name = "alternate_ledger.move.type"
_rec_name = "ledger_type"
ledger_type = fields.Char(string="Ledger Type")
account_ids = fields.Many2many(
comodel_name="account.account", string="Accounts"
)
......@@ -3,5 +3,5 @@
alternate_ledger_move_manager_id,alternate_ledger_move_manager,model_alternate_ledger_move,account.group_account_manager,1,1,1,1
alternate_ledger_move_line_user_id,alternate_ledger_move_line_user,model_alternate_ledger_move_line,account.group_account_user,1,0,0,0
alternate_ledger_move_line_manager_id,alternate_ledger_move_line_manager,model_alternate_ledger_move_line,account.group_account_manager,1,1,1,1
alternate_ledger_move_reconcile_user_id,alternate_ledger_move_reconcile_user,model_alternate_ledger_move_reconcile,account.group_account_user,1,0,0,0
alternate_ledger_move_reconcile_manager_id,alternate_ledger_move_reconcile_manager,model_alternate_ledger_move_reconcile,account.group_account_manager,1,1,1,1
alternate_ledger_move_line_user_id,alternate_ledger_move_line_user,model_alternate_ledger_move_type,account.group_account_user,1,0,0,0
alternate_ledger_move_line_manager_id,alternate_ledger_move_line_manager,model_alternate_ledger_move_type,account.group_account_manager,1,1,1,1
from . import test_alternate_ledger # noqa: F401
##############################################################################
#
# Alternate Ledger, for Odoo
# Copyright (C) 2020 XCG Consulting <http://odoo.consulting>
#
# 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/>.
#
##############################################################################
import odoo
@odoo.tests.common.at_install(False)
@odoo.tests.common.post_install(True)
class Test(odoo.tests.TransactionCase):
def setUp(self):
super(Test, self).setUp()
def test_0000_alternate_ledger_move(self):
"""
Create, Edit and Delete
"""
self.env["alternate_ledger.move"].create(
{
"date": odoo.fields.Date.today(),
"ref": "a ref",
"journal_id": self.env["account.journal"]
.search([], limit=1)
.id,
"line_ids": [
(
0,
0,
{
"account_id": self.env["account.journal"]
.search([], limit=1)
.id,
"partner_id": self.env["res.partner"]
.search([], limit=1)
.id,
"debit": 42.0,
},
),
(
0,
0,
{
"account_id": self.env["account.journal"]
.search([], limit=1)
.id,
"partner_id": self.env["res.partner"]
.search([], limit=1)
.id,
"credit": 42.0,
},
),
],
}
)
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="alternate_ledger_account_journal" model="ir.ui.view">
<field name="name">account.journal.form</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='type']" position="after">
<field name="version_number" />
<field name="is_active" />
</xpath>
</field>
</record>
</data>
</openerp>
<odoo>
<record id="alternate_ledger_account_journal" model="ir.ui.view">
<field name="name">account.journal.form</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='type']" position="after">
<field name="version_number" />
</xpath>
</field>
</record>
</odoo>
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment