Moved some demo data from l10n_fr_intrastat_product to intrastat_base Moved configuration about taxes from company form to tax form Some modifications to ease v5 -> v6 migration : - object report_intrastat_code now belong to group account manager - button functions now return True Tried to implement the following feature : open attachement form when the XML file as been generated : works on v6, but make client crash en v5 -> code has been commented DEB lines with procedure code = 25 are now deducted from the fiscal total. Round invoice total.

This commit is contained in:
Alexis de Lattre
2011-04-26 09:28:46 +02:00
committed by Alexis de Lattre
parent d4a2e7d492
commit 8eb4b7c8e4
4 changed files with 75 additions and 24 deletions

View File

@@ -47,7 +47,7 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'country_view.xml',
'intrastat_menu.xml',
],
'demo_xml': ['product_demo.xml'],
'demo_xml': ['intrastat_demo.xml'],
'installable': True,
'active': False,
}

View File

@@ -102,7 +102,23 @@ class report_intrastat_common(osv.osv_memory):
context = {}
context.update({'default_res_id' : ids[0], 'default_res_model': object._name})
attach_id = attach_obj.create(cr, uid, {'name': attach_name, 'datas': base64.encodestring(xml_string), 'datas_fname': filename}, context=context)
return None
return attach_id
def _open_attach_view(self, cr, uid, attach_id, title='XML file', context=None):
'''Returns an action which opens the form view of the corresponding attachement'''
action = {
'name': title,
'view_type': 'form',
'view_mode': 'form,tree',
'view_id': False,
'res_model': 'ir.attachment',
'type': 'ir.actions.act_window',
'nodestroy': True,
'target': 'current',
'res_id': [attach_id],
}
return action
def partner_on_change(self, cr, uid, ids, partner_id=False):

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2011 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __terp__.py
-->
<openerp>
<data noupdate="1">
<record id="base.main_partner" model="res.partner">
<field name="vat">FR58441019213</field>
</record>
<record id="base.res_partner_8" model="res.partner">
<field name="vat">BE0828696437</field>
<field name="supplier">True</field>
</record>
<record id="base.res_partner_5" model="res.partner">
<field name="vat">BE0443167858</field>
<field name="supplier">True</field>
</record>
<record id="base.res_partner_agrolait" model="res.partner">
<field name="vat">BE0884025633</field>
<field name="supplier">True</field>
</record>
<record id="account.sales_journal" model="account.journal">
<field name="update_posted">True</field>
</record>
<record id="account.refund_sales_journal" model="account.journal">
<field name="update_posted">True</field>
</record>
<record id="account.expenses_journal" model="account.journal">
<field name="update_posted">True</field>
</record>
<record id="account.refund_expenses_journal" model="account.journal">
<field name="update_posted">True</field>
</record>
<record id="shipping_costs_exclude" model="product.product">
<field name="name">Shipping costs</field>
<field name="code">SHIP</field>
<field name="type">service</field>
<field name="categ_id" ref="product.product_category_services"/>
<field name="list_price">30</field>
<field name="exclude_from_intrastat">False</field>
</record>
</data>
</openerp>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2011 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __terp__.py
-->
<openerp>
<data noupdate="1">
<record id="shipping_costs_exclude" model="product.product">
<field name="name">Shipping costs</field>
<field name="code">SHIP</field>
<field name="type">service</field>
<field name="categ_id" ref="product.product_category_services"/>
<field name="list_price">30</field>
<field name="exclude_from_intrastat">False</field>
</record>
</data>
</openerp>