-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] Added l10n_co_dian_resolution module
- Loading branch information
svazquezco
committed
Dec 13, 2018
1 parent
3a19f7a
commit 0229d83
Showing
7 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
|
||
], | ||
'data': [ | ||
'views/l10n_co_dian_resolution.xml', | ||
|
||
], | ||
'installable': True | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import l10n_co_dian_resolution |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import test_dian_resolution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from odoo import fields | ||
|
||
from odoo.tests.common import TransactionCase | ||
from odoo.exceptions import UserError | ||
|
||
|
||
class TestL10nCoDianResolution(TransactionCase): | ||
|
||
def setUp(self): | ||
self.dian_resolution = self.env.ref('l10n.co.dian.resolution') | ||
self.resolution_fe = self.dian_resolution.create({ | ||
'name': 'Resolution FE', | ||
'document_type': 'fe', | ||
'technical_key': 'abc123455', | ||
'prefix': 'PRE', | ||
'range_from': '1', | ||
'range_to': '100', | ||
'next_number': 1, | ||
'start_date': fields.Date.today(), | ||
'end_date': fields.Date.today(), | ||
}) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
|
||
<record id="l10n_co_dian_resolution_tree" model="ir.ui.view"> | ||
<field name="name">l10n.co.dian.resolution.tree</field> | ||
<field name="model">l10n.co.dian.resolution</field> | ||
<field name="arch" type="xml"> | ||
<tree string="DIAN - Resolutions"> | ||
<field name="name"/> | ||
<field name="company_id"/> | ||
<field name="document_type"/> | ||
<field name="resolution_number"/> | ||
<field name="technical_key"/> | ||
<field name="prefix"/> | ||
<field name="range_from"/> | ||
<field name="range_to"/> | ||
<field name="next_number"/> | ||
<field name="start_date"/> | ||
<field name="end_date"/> | ||
<field name="active"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<record id="l10n_co_dian_resolution_form" model="ir.ui.view"> | ||
<field name="name">l10n.co.dian.resolution.form</field> | ||
<field name="model">l10n.co.dian.resolution</field> | ||
<field name="arch" type="xml"> | ||
<form string="DIAN - Resolutions"> | ||
<group> | ||
<field name="name"/> | ||
<field name="company_id" groups="base.group_multi_company" options="{'no_open': True, 'no_create': True}"/> | ||
<field name="document_type"/> | ||
<field name="resolution_number"/> | ||
<field name="technical_key"/> | ||
<field name="prefix"/> | ||
<field name="range_from"/> | ||
<field name="range_to"/> | ||
<field name="next_number"/> | ||
<field name="start_date"/> | ||
<field name="end_date"/> | ||
<field name="active"/> | ||
</group> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="l10n_co_dian_resolution_search" model="ir.ui.view"> | ||
<field name="name">l10n.co.dian.resolution.search</field> | ||
<field name="model">l10n.co.dian.resolution</field> | ||
<field name="arch" type="xml"> | ||
<search> | ||
<field name="name"/> | ||
<field name="resolution_number"/> | ||
<field name="technical_key"/> | ||
<field name="document_type"/> | ||
</search> | ||
</field> | ||
</record> | ||
|
||
<record id="action_l10n_co_dian_resolution" model="ir.actions.act_window"> | ||
<field name="name">DIAN - Resolutions</field> | ||
<field name="res_model">l10n.co.dian.resolution</field> | ||
<field name="view_mode">tree,form</field> | ||
<field name="view_type">form</field> | ||
<field name="view_id" ref="l10n_co_dian_resolution_tree"/> | ||
</record> | ||
|
||
|
||
<menuitem action="action_l10n_co_dian_resolution" | ||
name="DIAN - Resolutions" | ||
id="l10n_co_dian_resolution" | ||
parent="account.menu_finance_configuration"/> | ||
|
||
</odoo> |