Compare commits
4 Commits
old16.0
...
16-gn-cash
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12572120e3 | ||
|
|
9f06e88b88 | ||
|
|
9dedfed123 | ||
|
|
b78f1f4e96 |
23
gn_cash/README.md
Normal file
23
gn_cash/README.md
Normal file
@ -0,0 +1,23 @@
|
||||
# GN-CASH
|
||||
|
||||
This modules revivals cash statements from Odoo 15.
|
||||
|
||||
It adds a wizard for cashbox counting after balance_start an balance_end_real fields of bank.statement form view.
|
||||
|
||||
It is based on modules:
|
||||
- (account_statement_base from OCA)[https://github.com/OCA/account-reconcile]
|
||||
|
||||
## How do we work with it:
|
||||
|
||||
1. Each day, users create operations they assume (like receive donation, etc.)
|
||||
2. If time is short, they can also declare it on a simple solo statement line
|
||||
3. At the end of the week, Odoo generates a statement with missing lines (i.e. lines with payment suspense accounts)
|
||||
4. the accountant verifies cashbox balance and validate loss/profit
|
||||
|
||||
|
||||
## Whats Needs to Be Done:
|
||||
|
||||
- add validate cashbox and entry lines creation
|
||||
- allow user to add statement lines 'on-the-fly'
|
||||
- allow user to create Donation / Expense / Cash-In / Cash-Out operations
|
||||
- create an action triggered by a button leading to a wizard that auto-generates cash statement from lines with payment suspense account.
|
||||
3
gn_cash/__init__.py
Normal file
3
gn_cash/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
17
gn_cash/__manifest__.py
Normal file
17
gn_cash/__manifest__.py
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
'name': "Gn Cash",
|
||||
'version': '16.0.0.0.1',
|
||||
'author': 'Garage Numérique',
|
||||
'category': 'Accounting',
|
||||
'description': """
|
||||
This module revivals cash statements from odoo 15.
|
||||
""",
|
||||
'depends': ['account_statement_base'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/account_cash_statement_views.xml',
|
||||
'views/cash_statement_views.xml',
|
||||
],
|
||||
'translate': True,
|
||||
'installable': True,
|
||||
}
|
||||
4
gn_cash/models/__init__.py
Normal file
4
gn_cash/models/__init__.py
Normal file
@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import cash_statement
|
||||
#account_journal_dashboard
|
||||
182
gn_cash/models/cash_statement.py
Normal file
182
gn_cash/models/cash_statement.py
Normal file
@ -0,0 +1,182 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import math
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.tools import float_is_zero
|
||||
from odoo.tools.misc import formatLang, format_date, str2bool
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
|
||||
class AccountCashboxLine(models.Model):
|
||||
""" Cash Box Details """
|
||||
_name = 'gn_cash.account.cashbox.line'
|
||||
_description = 'CashBox Line'
|
||||
_rec_name = 'coin_value'
|
||||
_order = 'coin_value'
|
||||
|
||||
@api.depends('coin_value', 'number')
|
||||
def _sub_total(self):
|
||||
""" Calculates Sub total"""
|
||||
for cashbox_line in self:
|
||||
cashbox_line.subtotal = cashbox_line.coin_value * cashbox_line.number
|
||||
|
||||
coin_value = fields.Float(string='Coin/Bill Value', required=True, digits=0)
|
||||
number = fields.Integer(string='#Coins/Bills', help='Opening Unit Numbers')
|
||||
subtotal = fields.Float(compute='_sub_total', string='Subtotal', digits=0, readonly=True)
|
||||
cashbox_id = fields.Many2one('gn_cash.account.bank.statement.cashbox', string="Cashbox")
|
||||
currency_id = fields.Many2one('res.currency', related='cashbox_id.currency_id')
|
||||
|
||||
class AccountBankStmtCashWizard(models.Model):
|
||||
"""
|
||||
Account Bank Statement popup that allows entering cash details.
|
||||
"""
|
||||
_name = 'gn_cash.account.bank.statement.cashbox'
|
||||
_description = 'Bank Statement Cashbox'
|
||||
_rec_name = 'id'
|
||||
|
||||
cashbox_lines_ids = fields.One2many('gn_cash.account.cashbox.line', 'cashbox_id', string='Cashbox Lines')
|
||||
start_bank_stmt_ids = fields.One2many('account.bank.statement', 'cashbox_start_id')
|
||||
end_bank_stmt_ids = fields.One2many('account.bank.statement', 'cashbox_end_id')
|
||||
total = fields.Float(compute='_compute_total')
|
||||
currency_id = fields.Many2one('res.currency', compute='_compute_currency')
|
||||
|
||||
@api.depends('start_bank_stmt_ids', 'end_bank_stmt_ids')
|
||||
def _compute_currency(self):
|
||||
for cashbox in self:
|
||||
cashbox.currency_id = False
|
||||
if cashbox.end_bank_stmt_ids:
|
||||
cashbox.currency_id = cashbox.end_bank_stmt_ids[0].currency_id
|
||||
if cashbox.start_bank_stmt_ids:
|
||||
cashbox.currency_id = cashbox.start_bank_stmt_ids[0].currency_id
|
||||
|
||||
@api.depends('cashbox_lines_ids', 'cashbox_lines_ids.coin_value', 'cashbox_lines_ids.number')
|
||||
def _compute_total(self):
|
||||
for cashbox in self:
|
||||
cashbox.total = sum([line.subtotal for line in cashbox.cashbox_lines_ids])
|
||||
|
||||
@api.model
|
||||
def default_get(self, fields):
|
||||
vals = super(AccountBankStmtCashWizard, self).default_get(fields)
|
||||
balance = self.env.context.get('balance')
|
||||
statement_id = self.env.context.get('statement_id')
|
||||
if 'start_bank_stmt_ids' in fields and not vals.get('start_bank_stmt_ids') and statement_id and balance == 'start':
|
||||
vals['start_bank_stmt_ids'] = [(6, 0, [statement_id])]
|
||||
if 'end_bank_stmt_ids' in fields and not vals.get('end_bank_stmt_ids') and statement_id and balance == 'close':
|
||||
vals['end_bank_stmt_ids'] = [(6, 0, [statement_id])]
|
||||
|
||||
return vals
|
||||
|
||||
def name_get(self):
|
||||
result = []
|
||||
for cashbox in self:
|
||||
result.append((cashbox.id, str(cashbox.total)))
|
||||
return result
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals):
|
||||
cashboxes = super(AccountBankStmtCashWizard, self).create(vals)
|
||||
cashboxes._validate_cashbox()
|
||||
return cashboxes
|
||||
|
||||
def write(self, vals):
|
||||
res = super(AccountBankStmtCashWizard, self).write(vals)
|
||||
self._validate_cashbox()
|
||||
return res
|
||||
|
||||
def _validate_cashbox(self):
|
||||
for cashbox in self:
|
||||
if cashbox.start_bank_stmt_ids:
|
||||
cashbox.start_bank_stmt_ids.write({'balance_start': cashbox.total})
|
||||
if cashbox.end_bank_stmt_ids:
|
||||
cashbox.end_bank_stmt_ids.write({'balance_end_real': cashbox.total})
|
||||
|
||||
class AccountBankStmtCloseCheck(models.TransientModel):
|
||||
"""
|
||||
Account Bank Statement wizard that check that closing balance is correct.
|
||||
"""
|
||||
_name = 'gn_cash.account.bank.statement.closebalance'
|
||||
_description = 'Bank Statement Closing Balance'
|
||||
|
||||
"""
|
||||
Warning!! This method is not linked to effective operations.
|
||||
We need to figure out what to do with difference found beetween calculated total and wizard total
|
||||
i.e. which moves need to be created
|
||||
"""
|
||||
def validate(self):
|
||||
bnk_stmt_id = self.env.context.get('active_id', False)
|
||||
if bnk_stmt_id:
|
||||
self.env['account.bank.statement'].browse(bnk_stmt_id).button_validate()
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
class BankStatement(models.Model):
|
||||
_inherit = 'account.bank.statement'
|
||||
|
||||
cashbox_start_id = fields.Many2one('gn_cash.account.bank.statement.cashbox', string="Starting Cashbox")
|
||||
cashbox_end_id = fields.Many2one('gn_cash.account.bank.statement.cashbox', string="Ending Cashbox")
|
||||
|
||||
|
||||
#This is the function we need to verify in order to have a functionnal validate on wizard
|
||||
|
||||
def _check_cash_balance_end_real_same_as_computed(self):
|
||||
""" Check the balance_end_real (encoded manually by the user) is equals to the balance_end (computed by odoo).
|
||||
For a cash statement, if there is a difference, the different is set automatically to a profit/loss account.
|
||||
"""
|
||||
for statement in self.filtered(lambda stmt: stmt.journal_type == 'cash'):
|
||||
if not statement.currency_id.is_zero(statement.difference):
|
||||
st_line_vals = {
|
||||
'statement_id': statement.id,
|
||||
'journal_id': statement.journal_id.id,
|
||||
'amount': statement.difference,
|
||||
'date': statement.date,
|
||||
}
|
||||
|
||||
if statement.currency_id.compare_amounts(statement.difference, 0.0) < 0.0:
|
||||
if not statement.journal_id.loss_account_id:
|
||||
raise UserError(_(
|
||||
"Please go on the %s journal and define a Loss Account. "
|
||||
"This account will be used to record cash difference.",
|
||||
statement.journal_id.name
|
||||
))
|
||||
|
||||
st_line_vals['payment_ref'] = _("Cash difference observed during the counting (Loss)")
|
||||
st_line_vals['counterpart_account_id'] = statement.journal_id.loss_account_id.id
|
||||
else:
|
||||
# statement.difference > 0.0
|
||||
if not statement.journal_id.profit_account_id:
|
||||
raise UserError(_(
|
||||
"Please go on the %s journal and define a Profit Account. "
|
||||
"This account will be used to record cash difference.",
|
||||
statement.journal_id.name
|
||||
))
|
||||
|
||||
st_line_vals['payment_ref'] = _("Cash difference observed during the counting (Profit)")
|
||||
st_line_vals['counterpart_account_id'] = statement.journal_id.profit_account_id.id
|
||||
|
||||
self.env['account.bank.statement.line'].create(st_line_vals)
|
||||
return True
|
||||
|
||||
def open_cashbox_id(self):
|
||||
self.ensure_one()
|
||||
context = dict(self.env.context or {})
|
||||
if context.get('balance'):
|
||||
context['statement_id'] = self.id
|
||||
if context['balance'] == 'start':
|
||||
cashbox_id = self.cashbox_start_id.id
|
||||
elif context['balance'] == 'close':
|
||||
cashbox_id = self.cashbox_end_id.id
|
||||
else:
|
||||
cashbox_id = False
|
||||
|
||||
action = {
|
||||
'name': _('Cash Control'),
|
||||
'view_mode': 'form',
|
||||
'res_model': 'gn_cash.account.bank.statement.cashbox',
|
||||
'view_id': self.env.ref('gn_cash.view_account_bnk_stmt_cashbox_footer').id,
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_id': cashbox_id,
|
||||
'context': context,
|
||||
'target': 'new'
|
||||
}
|
||||
|
||||
return action
|
||||
3
gn_cash/security/ir.model.access.csv
Normal file
3
gn_cash/security/ir.model.access.csv
Normal file
@ -0,0 +1,3 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_account_cashbox,account.bank.statement.cashbox,model_gn_cash_account_bank_statement_cashbox,account.group_account_user,1,1,1,1
|
||||
access_account_cashbox_line,account.bank.statement.cashbox.line,model_gn_cash_account_cashbox_line,account.group_account_user,1,1,1,1
|
||||
|
36
gn_cash/views/account_cash_statement_views.xml
Normal file
36
gn_cash/views/account_cash_statement_views.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="gn_cash.action_cash_statement_tree" model="ir.actions.act_window">
|
||||
<field name="name">Cash Logs</field>
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_mode">tree,form,pivot,graph</field>
|
||||
<field name="domain">['|', ('journal_id', '=', False), ('journal_id.type', '=', 'cash')]</field>
|
||||
<field name="context">{'journal_type':'cash'}</field>
|
||||
<field name="search_view_id" ref="account.view_bank_statement_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new cash log
|
||||
</p><p>
|
||||
A Cash Register allows you to manage cash entries in your cash
|
||||
journals. This feature provides an easy way to follow up cash
|
||||
payments on a daily basis.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<record id="gn_cash.view_cash_statement_form" model="ir.ui.view">
|
||||
<field name="name">gn_cash.account.cash.statement.form</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="account_statement_base.view_bank_statement_form"/>
|
||||
<field name="priority">100</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='balance_start']" position="after" >
|
||||
<button name="open_cashbox_id" invisible ="context.get('journal_type', False) != 'cash'" string="→ Count" type="object" class="oe_edit_only oe_link oe_inline" context="{'balance':'start'}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='balance_end_real']" position="after">
|
||||
<button name="open_cashbox_id" invisible ="context.get('journal_type', False) != 'cash'" string="→ Count" type="object" class="oe_edit_only oe_link oe_inline" context="{'balance':'close'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
73
gn_cash/views/cash_statement_views.xml
Normal file
73
gn_cash/views/cash_statement_views.xml
Normal file
@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="gn_cash.view_account_bnk_stmt_cashbox" model="ir.ui.view">
|
||||
<field name="name">gn_cash.account.bnk_stmt_cashbox.form</field>
|
||||
<field name="model">gn_cash.account.bank.statement.cashbox</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<field name="start_bank_stmt_ids" invisible="1"/>
|
||||
<field name="end_bank_stmt_ids" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="cashbox_lines_ids" nolabel="1" context="{'default_currency_id': currency_id}">
|
||||
<tree editable="bottom">
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="number"/>
|
||||
<field name="coin_value" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="subtotal" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
</tree>
|
||||
</field>
|
||||
<div>
|
||||
<group>
|
||||
<group class="oe_subtotal_footer oe_right" cols="6">
|
||||
<field name="currency_id" invisible="1" />
|
||||
<div class="o_td_label"></div>
|
||||
<field name="total" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
</group>
|
||||
</group>
|
||||
</div>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="gn_cash.view_account_bnk_stmt_cashbox_footer" model="ir.ui.view">
|
||||
<field name="name">gn_cash.account.bnk_stmt_cashbox.form</field>
|
||||
<field name="model">gn_cash.account.bank.statement.cashbox</field>
|
||||
<field name="priority">1000</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="gn_cash.view_account_bnk_stmt_cashbox"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//sheet" position="after">
|
||||
<footer>
|
||||
<button string="Confirm" class="btn-primary" special="save" data-hotkey="v"/>
|
||||
<button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z"/>
|
||||
</footer>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="gn_cash.view_account_bnk_stmt_check" model="ir.ui.view">
|
||||
<field name="name">gn_cash.account.bnk_stmt_check.form</field>
|
||||
<field name="model">gn_cash.account.bank.statement.closebalance</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<div>
|
||||
<p>The closing balance is different than the computed one!</p>
|
||||
<p>Confirming this will create automatically a journal entry with the difference in the profit/loss account set on the cash journal.</p>
|
||||
<footer>
|
||||
<button string="Confirm" name="validate" type="object" class="btn-primary" data-hotkey="q"/>
|
||||
<button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z"/>
|
||||
</footer>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="gn_cash.action_view_account_bnk_stmt_check" model="ir.actions.act_window">
|
||||
<field name="name">Check Closing Balance</field>
|
||||
<field name="res_model">gn_cash.account.bank.statement.closebalance</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_account_bnk_stmt_check"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
7
gn_cash/views/delete_views.xml
Normal file
7
gn_cash/views/delete_views.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<delete model="ir.ui.view" id="gn_cash.account_journal_dashboard_kanban_view"/>
|
||||
<delete model="ir.ui.view" id="gn_cash.view_account_journal_form"/>
|
||||
</data>
|
||||
</odoo>
|
||||
@ -22,7 +22,6 @@
|
||||
"pcg_1043","Primes d'apport",104300,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_1044","Primes de conversion d'obligations en actions",104400,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_1045","Bons de souscription d'actions",104500,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_105","Ecarts de réévaluation",105000,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_1051","Ecarts de réévaluation sur des biens sans droit de reprise",105100,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_1052","Ecarts de réévaluation sur des biens avec droit de reprise",105200,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_106","Réserves",106000,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
@ -32,7 +31,6 @@
|
||||
"pcg_1068","Autres réserves",106800,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_10681","Réserves pour projet de l'entité",106810,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_10688","Réserves diverses",106880,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_108","Dotations consomptibles",108000,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_1081","Dotations consomptibles",108100,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_1089","Dotations consomptibles inscrites au compte de résultat",108900,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_11","Report à nouveau excédentaire (solde créditeur)",110000,"equity","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
@ -78,7 +76,7 @@
|
||||
"pcg_157","Provisions pour charges à répartir sur plusieurs exercices",157000,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_1572","Provisions pour gros entretiens ou grandes révisions",157200,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_158","Autres provisions pour charges",158000,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_163","Emprunts obligataires",163000,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_163","Autres Emprunts obligataires",163000,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_1631","Titres associatifs et assimilés",163100,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_164","Emprunts auprès des établissements de crédit",164000,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_165","Dépôts et cautionnements reçus",165000,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
@ -103,7 +101,6 @@
|
||||
"pcg_185","Biens et prestations de services échangés entre établissements et siège social",185000,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_186","Biens et prestations de services entre établissements (charges)",186000,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_187","Biens et prestations de services entre établissements (produits)",187000,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_191","Fonds reportés liés aux legs ou donations",191000,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_1911","Fonds reportés liés aux legs ou donations – Legs ou donations",191100,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_1912","Fonds reportés liés aux legs ou donations – Donations temporaires d'usufruit",191200,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_193","Fonds dédiés des fondations abritées",193000,"liability_current","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
@ -153,6 +150,7 @@
|
||||
"pcg_2383","Avances et acomptes versés sur commandes d'immobilisations corporelles – Constructions",238300,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_2385","Avances et acomptes versés sur commandes d'immobilisations corporelles – Installations techniques, matériel et outillage industriels",238500,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_2388","Avances et acomptes versés sur commandes d'immobilisations corporelles – Autres immobilisations corporelles",238800,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_24","Biens reçus par legs ou donations destinés à être cédés",240000,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_261","Titres de participation",261000,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_2611","Titres de participation – Actions",261100,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_2618","Autres titres de participation",261800,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
@ -184,7 +182,7 @@
|
||||
"pcg_27688","Autres créances immobilisées - Intérêts courus sur créances diverses",276880,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_279","Versements restant à effectuer sur titres immobilisés non libérés",279000,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_28","Amortissements des immobilisations incorporelles",280000,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"True"
|
||||
"pcg_2802","Amortissements des immobilisations incorporelles – Frais de premier établissement",280200,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"True"
|
||||
"pcg_2801","Amortissements des immobilisations incorporelles – Frais de premier établissement",280100,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"True"
|
||||
"pcg_2803","Amortissements des immobilisations incorporelles – Frais de recherche et développement",280300,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"True"
|
||||
"pcg_2804","Amortissements des immobilisations incorporelles – Donations temporaires d'usufruit",280400,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"True"
|
||||
"pcg_2805","Amortissements des immobilisations incorporelles – Concessions et droits similaires, brevets, licences, marques et procédés, droits et valeurs similaires",280500,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"True"
|
||||
@ -202,7 +200,8 @@
|
||||
"pcg_2908","Dépréciations des autres immobilisations incorporelles",290800,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_291","Provisions pour dépréciation des immobilisations corporelles",291000,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_2911","Provisions pour dépréciation des immobilisations corporelles – Terrains",291100,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_293","Provisions pour dépréciation des immobilisations en cours",293000,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_2931","Provisions pour dépréciation des immobilisations corporelles en cours",293100,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_2932","Provisions pour dépréciation des immobilisations incorporelles en cours",293200,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_294","Dépréciations des biens reçus par legs ou donations destinés à être cédés",294000,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_296","Provisions pour dépréciation des participations et Créances rattachées ",296000,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_2961","Provisions pour dépréciation des participations et Créances rattachées - Titres de participation",296100,"asset_fixed","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
@ -597,7 +596,7 @@ pcg_44587,Taxes sur le chiffre d'affaires sur factures à établir,445870,liabil
|
||||
"pcg_6556","Frais de siège social du gestionnaire",655600,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_6558","Quotes-parts de résultat sur opérations faites dans le cadre d'un groupement",655800,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_657","Aides financières",657000,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_6571","Aides financières versées",657100,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_6571","Aides financières octroyées",657100,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_6572","Quotes-parts de générosité reversée",657200,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_658","Charges diverses de gestion courante",658000,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_6586","Fonds de solidarité",658600,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
@ -635,7 +634,8 @@ pcg_44587,Taxes sur le chiffre d'affaires sur factures à établir,445870,liabil
|
||||
"pcg_6811","Dotations aux amortissements sur immobilisations incorporelles et corporelles",681100,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_6812","Dotation aux amortissements des charges d'exploitation à répartir",681200,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_6815","Dotations aux provisions d'exploitation",681500,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_6816","Dotations pour dépréciations d'immobilisations incorporelles et corporelles",681600,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_68161","Dotations pour dépréciations d'immobilisations incorporelles",681610,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_68162","Dotations pour dépréciations d'immobilisations corporelles",681620,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_68164","Dotations pour dépréciation d'actifs reçus par legs ou donations destinés à être cédés",681640,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_6817","Dotations pour dépréciations des actifs circulant",681700,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_686","Dotations aux amortissements et aux provisions - charges financières",686000,"expense","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
@ -718,7 +718,6 @@ pcg_70854,Ports et frais accessoires facturés Extracom,708540,income,gn_l10n_fr
|
||||
"pcg_7531","Versements des fondateurs ",753100,"income","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_7532","Quotes-parts de dotation consomptible virée au compte de résultat",753200,"income","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_754","Ressources liées à la générosité du public",754000,"income","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_7541","Dons manuels",754100,"income","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_75411","Dons manuels",754110,"income","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_75412","Abandons de frais par les bénévoles",754120,"income","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
"pcg_7542","Mécénats",754200,"income","gn_l10n_fr_pcg_asso.l10n_fr_pcg_chart_template",,"False"
|
||||
|
||||
|
26
gn_mis_reports/README.md
Normal file
26
gn_mis_reports/README.md
Normal file
@ -0,0 +1,26 @@
|
||||
#GN Mis Reports
|
||||
|
||||
Mis reports models by Le Garage Numérique
|
||||
|
||||
COded by Florian ROGER.
|
||||
|
||||
|
||||
## State of Progress
|
||||
### Existing Reports
|
||||
|
||||
None
|
||||
|
||||
### In-progress Reports
|
||||
|
||||
- Bilan Comptables Norme ANC 2023
|
||||
|
||||
### ToDo Reports
|
||||
|
||||
- Compte de résultat Norme ANC 2023
|
||||
|
||||
## ToDo & Issues by Report
|
||||
|
||||
### Bilan Comptable Norme ANC 2023
|
||||
|
||||
- Quid du 4488 Etat - Trésor Public (Passif Circulant) -?> Dettes fiscales et sociales
|
||||
- Le 4088 - Fournisseurs – Intérêts courus est au Passig dans les dettes sur immo. Tout doit-il y figurer?
|
||||
16
gn_mis_reports/__manifest__.py
Normal file
16
gn_mis_reports/__manifest__.py
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
'name': "Gn Mis Reports",
|
||||
'version': '16.0.0.0.1',
|
||||
'author': 'Garage Numérique',
|
||||
'category': 'Reporting',
|
||||
'description': """
|
||||
This module adds reports for french Compte de Résultats and Bilan using mis_builder addon
|
||||
""",
|
||||
'depends': ['mis_builder', 'l10n_fr_mis_reports'],
|
||||
'data': [
|
||||
'data/mis_report.xml',
|
||||
'data/bilan_ANC201806.xml',
|
||||
],
|
||||
'installable': True,
|
||||
"license": "LGPL-3",
|
||||
}
|
||||
1480
gn_mis_reports/data/bilan_ANC201806.xml
Normal file
1480
gn_mis_reports/data/bilan_ANC201806.xml
Normal file
File diff suppressed because it is too large
Load Diff
112
gn_mis_reports/data/mis_report.xml
Normal file
112
gn_mis_reports/data/mis_report.xml
Normal file
@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<template id="gn_mis_reports.gn_mis_reports_layout">
|
||||
<t t-name="gn_mis_reports.report_layout">
|
||||
<div t-attf-class="header o_company_#{company.id}_layout" t-att-style="report_header_style">
|
||||
<div class="o_clean_header">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="first-page">
|
||||
<div t-attf-class="article o_report_layout_bold o_company_#{company.id}_layout {{ 'o_report_layout_background' if company.layout_background in ['Geometric', 'Custom'] else '' }}" t-attf-style="background-image: url({{ 'data:image/png;base64,%s' % company.layout_background_image.decode('utf-8') if company.layout_background_image and company.layout_background == 'Custom' else ('/base/static/img/bg_background_template.jpg' if company.layout_background == 'Geometric' else '') }});" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id" t-att-data-oe-lang="o and o.env.context.get('lang')">
|
||||
<t t-call="web.address_layout"/>
|
||||
<t t-out="0"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div t-attf-class="footer o_clean_footer o_company_#{company.id}_layout">
|
||||
<div class="row h6">
|
||||
<div class="col-5 mt-2">
|
||||
<span t-field="company.name"/><span> - TVA N° </span><span t-field="company.vat"/>
|
||||
</div>
|
||||
<div class="col-6 mt-2 text-center">
|
||||
<t t-if="o"><span t-esc="o.name"/></t>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<ul t-if="report_type == 'pdf'" class="list-inline pagenumber float-end text-center">
|
||||
<li class="list-inline-item"><strong><span class="page"/></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
<template id="gn_mis_reports.gn_mis_builder_report" inherit_id="mis_builder.report_mis_report_instance">
|
||||
<xpath expr="//t[@t-call='web.internal_layout']" position="replace">
|
||||
<t t-call="gn_mis_reports.gn_mis_reports_layout">
|
||||
<t t-set="matrix" t-value="o._compute_matrix()"/>
|
||||
<t t-set="style_obj" t-value="o.env['mis.report.style']"/>
|
||||
<div class="page">
|
||||
<h3>
|
||||
<span t-field="o.name"/>
|
||||
<span>-</span>
|
||||
<t t-foreach="o.query_company_ids" t-as="company">
|
||||
<span t-field="company.name"/>
|
||||
<span t-if="company != o.query_company_ids[-1]">,</span>
|
||||
</t>
|
||||
</h3>
|
||||
<p>
|
||||
<div class="mis_report_filers">
|
||||
<t t-foreach="o.get_filter_descriptions()" t-as="filter_description">
|
||||
<div>
|
||||
<span t-out="filter_description"/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</p>
|
||||
<div class="mis_table table">
|
||||
<div class="mis_thead">
|
||||
<div class="mis_row">
|
||||
<div class="mis_cell mis_collabel"/>
|
||||
<t t-foreach="matrix.iter_cols()" t-as="col">
|
||||
<div class="mis_cell mis_collabel">
|
||||
<t t-out="col.label"/>
|
||||
<t t-if="col.description">
|
||||
<br/>
|
||||
<t t-out="col.description"/>
|
||||
</t>
|
||||
</div>
|
||||
<!-- add empty cells because we have no colspan with css tables -->
|
||||
<t t-foreach="list(col.iter_subcols())[1:]" t-as="subcol">
|
||||
<div class="mis_cell mis_collabel"/>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
<div class="mis_row">
|
||||
<div class="mis_cell mis_collabel"/>
|
||||
<t t-foreach="matrix.iter_subcols()" t-as="subcol">
|
||||
<div class="mis_cell mis_collabel">
|
||||
<t t-out="subcol.label"/>
|
||||
<t t-if="subcol.description">
|
||||
<br/>
|
||||
<t t-out="subcol.description"/>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mis_tbody">
|
||||
<t t-foreach="matrix.iter_rows()" t-as="row">
|
||||
<div t-if="not ((row.style_props.hide_empty and row.is_empty()) or row.style_props.hide_always)" class="mis_row">
|
||||
<div t-att-style="style_obj.to_css_style(row.style_props)" class="mis_cell mis_rowlabel">
|
||||
<t t-out="row.label"/>
|
||||
<t t-if="row.description">
|
||||
<br/>
|
||||
<t t-out="row.description"/>
|
||||
</t>
|
||||
</div>
|
||||
<t t-foreach="row.iter_cells()" t-as="cell">
|
||||
<div t-att-style="cell and style_obj.to_css_style(cell.style_props) or ''" class="mis_cell mis_amount">
|
||||
<t t-out="cell and cell.val_rendered or ''"/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
Loading…
x
Reference in New Issue
Block a user