Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ __pycache__/
*.py[cod]
*$py.class

# OSX Files
.DS_Store

# C extensions
*.so

Expand Down
20 changes: 20 additions & 0 deletions l10n_do_accounting/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from . import models

import logging

_logger = logging.getLogger(__name__)


def post_init_hook(cr, registry):
cr.execute(
"UPDATE account_invoice SET l10n_do_fiscal_number = reference;"
)
cr.execute(
"UPDATE account_invoice SET l10n_do_origin_ncf = origin_out;"
)
cr.execute(
"UPDATE account_journal SET l10n_latam_use_documents = TRUE WHERE type IN ('sale', 'purchase');"
)
cr.execute(
"UPDATE account_journal SET l10n_do_payment_form = payment_form;"
)
12 changes: 12 additions & 0 deletions l10n_do_accounting/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Fiscal Accounting (Rep. Dominicana)",
"summary": "",
"author": "iterativo LLC, " "Indexa",
"category": "Localization",
"license": "LGPL-3",
"version": "12.0.1.0.0",
"depends": ["l10n_do"],
"installable": True,
"auto_install": True,
"post_init_hook": "post_init_hook",
}
2 changes: 2 additions & 0 deletions l10n_do_accounting/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import account_invoice
from . import account_journal
12 changes: 12 additions & 0 deletions l10n_do_accounting/models/account_invoice.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from odoo import models, fields, api, _


class AccountInvoice(models.Model):
_inherit = "account.invoice"

l10n_do_fiscal_number = fields.Char(
"Fiscal Number",
)
l10n_do_origin_ncf = fields.Char(
string="Modifies",
)
23 changes: 23 additions & 0 deletions l10n_do_accounting/models/account_journal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from odoo import models, fields, api


class AccountJournal(models.Model):
_inherit = "account.journal"

l10n_latam_use_documents = fields.Boolean(
'Use Documents?', help="If active: will be using for legal invoicing (invoices, debit/credit notes)."
" If not set means that will be used to register accounting entries not related to invoicing legal documents."
" For Example: Receipts, Tax Payments, Register journal entries")

l10n_do_payment_form = fields.Selection(
[
("cash", "Efectivo"),
("bank", u"Cheque / Transferencia / Depósito"),
("card", u"Tarjeta Crédito / Débito"),
("credit", u"A Crédito"),
("swap", "Permuta"),
("bond", "Bonos o Certificados de Regalo"),
("others", "Otras Formas de Venta"),
],
string="Payment Form",
)
Loading