[IMP] l10n_BE: Improve and clean

bzr revid: mra@tinyerp.com-20100402114459-48rcp0jz7grm05rv
This commit is contained in:
mra (Open ERP) 2010-04-02 17:14:59 +05:30
parent 43caafbd4a
commit 4b61fc1a7d
9 changed files with 55 additions and 62 deletions

View File

@ -18,10 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Belgium - Plan Comptable Minimum Normalise',
{ 'name': 'Belgium - Plan Comptable Minimum Normalise',
'version': '1.1',
'category': 'Localisation/Account Charts',
'description': """
@ -34,8 +31,12 @@
* This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.
Wizards provided by this module:
* Enlist the partners with their related VAT and invoiced amounts.Prepares an XML file format.Path to access : Financial Management/Reporting/Listing of VAT Customers.
* Prepares an XML file for Vat Declaration of the Main company of the User currently Logged in.Path to access : Financial Management/Reporting/Listing of VAT Customers.
* Partner VAT Intra: Enlist the partners with their related VAT and invoiced amounts.Prepares an XML file format.
Path to access : Financial Management/Reporting//Legal Statements/Belgium Statements/Partner VAT Listing
* Periodical VAT Declaration: Prepares an XML file for Vat Declaration of the Main company of the User currently Logged in.
Path to access : Financial Management/Reporting/Legal Statements/Belgium Statements/Periodical VAT Declaration
* Annual Listing Of VAT-Subjected Customers: Prepares an XML file for Vat Declaration of the Main company of the User currently Logged in.Based on Fiscal year
Path to access : Financial Management/Reporting/Legal Statements/Belgium Statements/Annual Listing Of VAT-Subjected Customers
""",
'author': 'Tiny',
@ -57,9 +58,7 @@
'fiscal_templates.xml',
'security/ir.model.access.csv'
],
'demo_xml': [
'account.report.report.csv'
],
'demo_xml': ['account.report.report.csv'],
'installable': True,
'certificate': '0031977724637',
}

View File

@ -23,5 +23,4 @@ import l10_be_partner_vat_listing
import l10n_be_vat_intra
import l10n_be_account_vat_declaration
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -21,9 +21,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import datetime
import base64
from tools.translate import _
@ -140,9 +138,13 @@ class partner_vat_list(osv.osv_memory):
'file_save' : fields.binary('Save File', readonly=True),
}
def get_partners(self, cursor, user, context={}):
def _get_partners(self, cursor, user, context={}):
return context.get('partner_ids', [])
_defaults={
'partner_ids': _get_partners
}
def create_xml(self, cursor, user, ids, context={}):
datas=[]
obj_sequence = self.pool.get('ir.sequence')
@ -218,14 +220,9 @@ class partner_vat_list(osv.osv_memory):
data_file += tools.ustr(data_decl) + tools.ustr(data_comp) + tools.ustr(data_period) + tools.ustr(data_clientinfo) + '\n</VatList>'
msg = 'Save the File with '".xml"' extension.'
file_save = base64.encodestring(data_file.encode('utf8'))
self.write(cursor, user, ids, {'file_save':file_save, 'msg':msg, 'name':'vat_list.xml'}, context=context)
return True
_defaults={
'partner_ids': get_partners
}
partner_vat_list()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -18,15 +18,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import datetime
import base64
from osv import osv, fields
from tools.translate import _
class l10n_be_vat_declaration(osv.osv_memory):
""" Vat Declaration """
""" Periodical VAT Declaration """
_name = "l1on_be.vat.declaration"
_description = "Vat Declaration"

View File

@ -14,8 +14,8 @@
<field name="arch" type="xml">
<form string="Select Period">
<group colspan="4" >
<field name="period_id" select="1"/>
<button colspan="1" name="create_xml" string="Create XML" type="object" default_focus="1" icon="gtk-execute"/>
<field name="period_id" select="1" default_focus="1"/>
<button colspan="1" name="create_xml" string="Create XML" type="object" icon="gtk-execute"/>
</group>
<separator string="XML Flie has been Created." colspan="4"/>
<group colspan="4" >

View File

@ -15,7 +15,7 @@
<form string="Select Fiscal Year">
<label string="This wizard will create an XML file for Vat details and total invoiced amounts per partner." colspan="4"/>
<newline/>
<field name="fyear" />
<field name="fyear" default_focus="1"/>
<newline/>
<field name="mand_id"/>
<newline/>
@ -25,7 +25,7 @@
<separator colspan="4"/>
<group colspan="4" >
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button colspan="1" name="get_partner" string="View Client" type="object" default_focus="1" icon="terp-partner"/>
<button colspan="1" name="get_partner" string="View Client" type="object" icon="terp-partner"/>
</group>
</form>
</field>
@ -42,7 +42,7 @@
</record>
<menuitem
name="Annual Listing of VAT-Subjected Customers"
name="Annual Listing Of VAT-Subjected Customers"
parent="menu_finance_belgian_statement"
action="action_partner_vat_listing"
id="partner_vat_listing"/>
@ -55,10 +55,10 @@
<form string="Select Fiscal Year" >
<label string="You can remove clients/partners which you do not want in exported xml file" colspan="4"/>
<separator string="Clients" colspan="4"/>
<field name="partner_ids" colspan="4" nolabel="1"/>
<field name="partner_ids" colspan="4" nolabel="1" default_focus="1"/>
<separator colspan="4"/>
<group colspan="4" >
<button colspan="1" name="create_xml" string="Create XML" type="object" default_focus="1" icon="gtk-execute"/>
<button colspan="1" name="create_xml" string="Create XML" type="object" icon="gtk-execute"/>
</group>
<separator string="XML File has been Created." colspan="4"/>
<field name="msg" colspan="4" nolabel="1"/>

View File

@ -19,7 +19,6 @@
#
##############################################################################
import time
import datetime
import base64
from osv import osv, fields

View File

@ -17,26 +17,27 @@
<page string="General Information">
<label string="This wizard will create an XML file for Vat Intra" colspan="4"/>
<newline/>
<field name="fyear" />
<field name="fyear" default_focus="1" />
<newline/>
<field name="mand_id"/>
<newline/>
<field name="trimester"/>
<newline/>
<field name="test_xml"/>
<newline/>
<button colspan="4" name="create_xml" string="Create XML" type="object" icon="gtk-execute"/>
<separator colspan="4"/>
<group colspan="4" >
<field name="msg" nolabel="1" colspan="4"/>
<field name="file_save" readonly="True"/>
</group>
<button special="cancel" colspan="4" string="Cancel" icon="gtk-cancel"/>
</page>
<page string="European Countries">
<field name="country_ids" colspan="4" nolabel="1" />
</page>
</notebook>
<newline/>
<button colspan="1" name="create_xml" string="Create XML" type="object" default_focus="1" icon="gtk-execute"/>
<separator colspan="4"/>
<group colspan="4" >
<field name="msg" nolabel="1" colspan="4"/>
<field name="file_save" readonly="True"/>
</group>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
</form>
</field>
</record>
@ -52,7 +53,7 @@
</record>
<menuitem
name="Partner VAT intra"
name="Partner VAT Intra"
parent="menu_finance_belgian_statement"
action="action_vat_intra"
id="l10_be_vat_intra"/>