Browse Source
Complete change of design for intrastat_type !
Complete change of design for intrastat_type !
Now that report_intrastat_product/service object is stored in database, we don't need the legal_intrastat state on invoices any more, because we will be able to create entry lines for DEB for a repair of equipment under warranty without using a legal_intrastat. Report_intrastat_type is now only required for DEB -> object moved to module l10n_fr_intrastat_product. For DEB, the button "regenerate lines" only regenerate DEB lines related to invoices. Renamed intrastat base module, because it doesn't have France-specific parameters any more. Add demo data.pull/79/head^2
Alexis de Lattre
13 years ago
20 changed files with 58 additions and 525 deletions
-
3intrastat_base/__init__.py
-
13intrastat_base/__terp__.py
-
0intrastat_base/country.py
-
0intrastat_base/country_data.xml
-
8intrastat_base/country_view.xml
-
7intrastat_base/intrastat_common.py
-
16intrastat_base/intrastat_menu.xml
-
0intrastat_base/partner_address.py
-
0intrastat_base/product.py
-
22intrastat_base/product_demo.xml
-
16intrastat_base/product_view.xml
-
1intrastat_base/security/ir.model.access.csv
-
47l10n_fr_intrastat_base/account_invoice.py
-
173l10n_fr_intrastat_base/account_invoice_view.xml
-
24l10n_fr_intrastat_base/account_invoice_workflow.xml
-
32l10n_fr_intrastat_base/company.py
-
27l10n_fr_intrastat_base/company_view.xml
-
65l10n_fr_intrastat_base/intrastat_type.py
-
31l10n_fr_intrastat_base/intrastat_type_data.xml
-
98l10n_fr_intrastat_base/intrastat_type_view.xml
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<!-- |
|||
Copyright (C) 2011 Akretion (http://www.akretion.com/) |
|||
The licence is in the file __terp__.py |
|||
--> |
|||
|
|||
<openerp> |
|||
<data> |
|||
|
|||
<!-- Menu entry for Intrastat --> |
|||
<menuitem id="menu_intrastat_base_root" name="Intrastat reporting" parent="account.menu_finance_legal_statement" /> |
|||
|
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,22 @@ |
|||
<?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> |
@ -1,3 +1,2 @@ |
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" |
|||
"access_report_intrastat_type","report.intrastat.type","model_report_intrastat_type","account.group_account_manager",1,1,1,1 |
|||
"access_report_intrastat_common","Read access on report.intrastat.common","model_report_intrastat_common","base.group_user",1,0,0,0 |
@ -1,47 +0,0 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Report intrastat base module for OpenERP |
|||
# Copyright (C) 2009-2011 Akretion (http://www.akretion.com/) All Rights Reserved |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Affero General Public License as |
|||
# published by the Free Software Foundation, either version 3 of the |
|||
# License, or (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
from osv import osv, fields |
|||
from tools.translate import _ |
|||
|
|||
class account_invoice(osv.osv): |
|||
_inherit = "account.invoice" |
|||
_columns = { |
|||
'intrastat_type_id': fields.many2one('report.intrastat.type', 'Intrastat Type',select=True,readonly=True, states={'draft':[('readonly',False)]}), |
|||
'state': fields.selection([ |
|||
('draft','Draft'), |
|||
('legal_intrastat','Legal Intrastat'), |
|||
('proforma','Pro-forma'), |
|||
('proforma2','Pro-forma'), |
|||
('open','Open'), |
|||
('paid','Done'), |
|||
('cancel','Cancelled') |
|||
],'State', select=True, readonly=True), |
|||
'intrastat_only': fields.boolean('Intrastat Only'), |
|||
} |
|||
|
|||
def intrastat_type_id_change(self, cr, uid, ids, intrastat_type_id): |
|||
if intrastat_type_id: |
|||
intrastat_only = self.pool.get('report.intrastat.type').browse(cr, uid, intrastat_type_id).intrastat_only |
|||
return {'value': {'intrastat_only': intrastat_only}} |
|||
|
|||
account_invoice() |
|||
|
@ -1,173 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<openerp> |
|||
<data> |
|||
<record model="ir.ui.view" id="view_report_intrastat_invoice_supplier_form"> |
|||
<field name="name">report.intrastat.invoice.supplier</field> |
|||
<field name="model">account.invoice</field> |
|||
<field name="inherit_id" ref="account.invoice_supplier_form" /> |
|||
<field name="arch" type="xml"> |
|||
<field name="check_total" position="after"> |
|||
<field name="intrastat_type_id" on_change="intrastat_type_id_change(intrastat_type_id)" domain="[('company_id','=',company_id)]" required="1" /> |
|||
<field name="intrastat_only" invisible="True" /> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="view_report_intrastat_invoice_form"> |
|||
<field name="name">report.intrastat.invoice</field> |
|||
<field name="model">account.invoice</field> |
|||
<field name="inherit_id" ref="account.invoice_form" /> |
|||
<field name="arch" type="xml"> |
|||
<field name="payment_term" position="after"> |
|||
<field name="intrastat_type_id" on_change="intrastat_type_id_change(intrastat_type_id)" domain="[('company_id','=',company_id)]" required="1" /> |
|||
<field name="intrastat_only" invisible="True" /> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="view_report_intrastat_invoice_supplier_form_2"> |
|||
<field name="name">report.intrastat.invoice.supplier.buttons</field> |
|||
<field name="model">account.invoice</field> |
|||
<field name="inherit_id" ref="account.invoice_supplier_form" /> |
|||
<field name="arch" type="xml"> |
|||
<button name="invoice_open" position="replace"> |
|||
<group attrs="{'invisible':[('intrastat_only','=',True)]}"> |
|||
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-execute" /> |
|||
</group> |
|||
<group attrs="{'invisible':[('intrastat_only','=',False)]}"> |
|||
<button name="invoice_legal_intrastat" states="draft" string="Legal Intrastat" icon="gtk-execute" /> |
|||
</group> |
|||
</button> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="view_report_intrastat_invoice_supplier_form_3"> |
|||
<field name="name">report.intrastat.invoice.supplier.buttons</field> |
|||
<field name="model">account.invoice</field> |
|||
<field name="inherit_id" ref="account.invoice_supplier_form" /> |
|||
<field name="arch" type="xml"> |
|||
<button name="invoice_cancel" position="replace"> |
|||
<button name="invoice_cancel" states="draft,proforma2,sale,open,legal_intrastat" string="Cancel" icon="gtk-cancel" /> |
|||
</button> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="view_report_intrastat_invoice_form_2"> |
|||
<field name="name">report.intrastat.invoice.buttons</field> |
|||
<field name="model">account.invoice</field> |
|||
<field name="inherit_id" ref="account.invoice_form" /> |
|||
<field name="arch" type="xml"> |
|||
<button name="invoice_open" position="replace"> |
|||
<group attrs="{'invisible':[('intrastat_only','=',True)]}"> |
|||
<button name="invoice_open" states="draft,proforma2" string="Create" icon="gtk-execute" /> |
|||
</group> |
|||
<group attrs="{'invisible':[('intrastat_only','=',False)]}"> |
|||
<button name="invoice_legal_intrastat" states="draft" string="Legal Intrastat" icon="gtk-execute" /> |
|||
</group> |
|||
</button> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="view_report_intrastat_invoice_form_3"> |
|||
<field name="name">report.intrastat.invoice.buttons</field> |
|||
<field name="model">account.invoice</field> |
|||
<field name="inherit_id" ref="account.invoice_form" /> |
|||
<field name="arch" type="xml"> |
|||
<button name="invoice_cancel" position="replace"> |
|||
<button name="invoice_cancel" states="draft,proforma2,sale,open,legal_intrastat" string="Cancel" icon="gtk-cancel" /> |
|||
</button> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_invoice_tree14" model="ir.actions.act_window"> |
|||
<field name="name">Customer Intrastat Invoices</field> |
|||
<field name="res_model">account.invoice</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form,calendar,graph</field> |
|||
<field name="domain">[('state','in',['legal_intrastat']),('type','=','out_invoice')]</field> |
|||
<field name="context">{'type':'out_invoice'}</field> |
|||
</record> |
|||
<record id="action_invoice_tree14_view1" model="ir.actions.act_window.view"> |
|||
<field eval="1" name="sequence" /> |
|||
<field name="view_mode">tree</field> |
|||
<field name="act_window_id" ref="action_invoice_tree14" /> |
|||
</record> |
|||
<record id="action_invoice_tree14_view2" model="ir.actions.act_window.view"> |
|||
<field eval="2" name="sequence" /> |
|||
<field name="view_mode">form</field> |
|||
<field name="view_id" ref="account.invoice_supplier_form" /> |
|||
<field name="act_window_id" ref="action_invoice_tree14" /> |
|||
</record> |
|||
|
|||
<menuitem action="action_invoice_tree14" id="menu_action_invoice_tree14" parent="account.menu_action_invoice_tree1" /> |
|||
|
|||
|
|||
<record id="action_invoice_tree15" model="ir.actions.act_window"> |
|||
<field name="name">Supplier Intrastat Invoices</field> |
|||
<field name="res_model">account.invoice</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form,calendar,graph</field> |
|||
<field name="domain">[('state','in',['legal_intrastat']),('type','=','in_invoice')]</field> |
|||
<field name="context">{'type':'out_invoice'}</field> |
|||
</record> |
|||
<record id="action_invoice_tree15_view1" model="ir.actions.act_window.view"> |
|||
<field eval="1" name="sequence" /> |
|||
<field name="view_mode">tree</field> |
|||
<field name="act_window_id" ref="action_invoice_tree15" /> |
|||
</record> |
|||
<record id="action_invoice_tree15_view2" model="ir.actions.act_window.view"> |
|||
<field eval="2" name="sequence" /> |
|||
<field name="view_mode">form</field> |
|||
<field name="view_id" ref="account.invoice_supplier_form" /> |
|||
<field name="act_window_id" ref="action_invoice_tree15" /> |
|||
</record> |
|||
|
|||
<menuitem action="action_invoice_tree15" id="menu_action_invoice_tree15" parent="account.menu_action_invoice_tree2" /> |
|||
|
|||
|
|||
<record id="action_invoice_tree16" model="ir.actions.act_window"> |
|||
<field name="name">Customer Intrastat Refunds</field> |
|||
<field name="res_model">account.invoice</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form,calendar,graph</field> |
|||
<field name="domain">[('state','in',['legal_intrastat']),('type','=','out_refund')]</field> |
|||
<field name="context">{'type':'out_refund'}</field> |
|||
</record> |
|||
<record id="action_invoice_tree16_view1" model="ir.actions.act_window.view"> |
|||
<field eval="1" name="sequence" /> |
|||
<field name="view_mode">tree</field> |
|||
<field name="act_window_id" ref="action_invoice_tree16" /> |
|||
</record> |
|||
<record id="action_invoice_tree16_view2" model="ir.actions.act_window.view"> |
|||
<field eval="2" name="sequence" /> |
|||
<field name="view_mode">form</field> |
|||
<field name="view_id" ref="account.invoice_supplier_form" /> |
|||
<field name="act_window_id" ref="action_invoice_tree16" /> |
|||
</record> |
|||
|
|||
<menuitem action="action_invoice_tree16" id="menu_action_invoice_tree16" parent="account.menu_action_invoice_tree3" /> |
|||
|
|||
<record id="action_invoice_tree17" model="ir.actions.act_window"> |
|||
<field name="name">Supplier Intrastat Refunds</field> |
|||
<field name="res_model">account.invoice</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form,calendar,graph</field> |
|||
<field name="domain">[('state','in',['legal_intrastat']),('type','=','in_refund')]</field> |
|||
<field name="context">{'type':'in_refund'}</field> |
|||
</record> |
|||
<record id="action_invoice_tree17_view1" model="ir.actions.act_window.view"> |
|||
<field eval="1" name="sequence" /> |
|||
<field name="view_mode">tree</field> |
|||
<field name="act_window_id" ref="action_invoice_tree17" /> |
|||
</record> |
|||
<record id="action_invoice_tree17_view2" model="ir.actions.act_window.view"> |
|||
<field eval="2" name="sequence" /> |
|||
<field name="view_mode">form</field> |
|||
<field name="view_id" ref="account.invoice_supplier_form" /> |
|||
<field name="act_window_id" ref="action_invoice_tree17" /> |
|||
</record> |
|||
|
|||
<menuitem action="action_invoice_tree17" id="menu_action_invoice_tree17" parent="account.menu_action_invoice_tree4" /> |
|||
|
|||
</data> |
|||
</openerp> |
@ -1,24 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
|
|||
<data> |
|||
<record id="act_legal_intrastat" model="workflow.activity"> |
|||
<field name="wkf_id" ref="account.wkf" /> |
|||
<field name="name">legal_intrastat</field> |
|||
<field name="action">write({'state':'legal_intrastat'})</field> |
|||
<field name="kind">function</field> |
|||
</record> |
|||
|
|||
<record id="t1" model="workflow.transition"> |
|||
<field name="act_from" ref="account.act_draft" /> |
|||
<field name="act_to" ref="act_legal_intrastat" /> |
|||
<field name="signal">invoice_legal_intrastat</field> |
|||
</record> |
|||
|
|||
<record id="t2" model="workflow.transition"> |
|||
<field name="act_from" ref="act_legal_intrastat" /> |
|||
<field name="act_to" ref="account.act_cancel" /> |
|||
<field name="signal">invoice_cancel</field> |
|||
</record> |
|||
</data> |
|||
</openerp> |
@ -1,32 +0,0 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Report intrastat base module for OpenERP |
|||
# Copyright (C) 2009-2011 Akretion (http://www.akretion.com/) All Rights Reserved |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Affero General Public License as |
|||
# published by the Free Software Foundation, either version 3 of the |
|||
# License, or (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
from osv import osv, fields |
|||
|
|||
class res_company(osv.osv): |
|||
_name = "res.company" |
|||
_inherit = "res.company" |
|||
_columns = { |
|||
'intrastat_type_ids': fields.one2many('report.intrastat.type', 'company_id', 'Intrastat Type'), |
|||
} |
|||
|
|||
res_company() |
|||
|
@ -1,27 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<!-- |
|||
Copyright (C) 2010-2011 Akretion (http://www.akretion.com/) |
|||
@author Alexis de Lattre <alexis.delattre@akretion.com> |
|||
The licence is in the file __terp__.py |
|||
--> |
|||
|
|||
<openerp> |
|||
<data> |
|||
|
|||
<record id="fr_intrastat_base_company_form" model="ir.ui.view"> |
|||
<field name="name">fr.intrastat.base.company.form</field> |
|||
<field name="model">res.company</field> |
|||
<field name="inherit_id" ref="base.view_company_form" /> |
|||
<field name="arch" type="xml"> |
|||
<notebook> |
|||
<page position="inside" string="France intrastat settings"> |
|||
<separator colspan="4" string="Intrastat Type" /> |
|||
<field nolabel="1" colspan="4" name="intrastat_type_ids" /> |
|||
</page> |
|||
</notebook> |
|||
</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
@ -1,65 +0,0 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Report intrastat base module for OpenERP |
|||
# Copyright (C) 2010-2011 Akretion (http://www.akretion.com/) All Rights Reserved |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Affero General Public License as |
|||
# published by the Free Software Foundation, either version 3 of the |
|||
# License, or (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
from osv import osv, fields |
|||
|
|||
|
|||
class report_intrastat_type(osv.osv): |
|||
_name = "report.intrastat.type" |
|||
_description = "Intrastat type" |
|||
_order = "type, intrastat_only" |
|||
_columns = { |
|||
'name': fields.char('Name',size=64,help="Name which appear when you select the Intrastat type on the invoice."), |
|||
'active' : fields.boolean('Active', help="The active field allows you to hide the Intrastat type without deleting it."), |
|||
'company_id': fields.many2one('res.company', 'Company'), |
|||
'type': fields.selection([('import', 'Import'),('export', 'Export'), ('other', 'Other')], 'Value', required=True, help="If 'Import' is selected, the corresponding invoices will be selected for the 'Intrastat Import' reports. Same for 'Export'. If 'Other' is selected, the corresponding invoices will NOT be selected in any Intrastat report ; so you should choose it for an invoice only in very particular cases."), |
|||
'intrastat_only': fields.boolean('Intrastat only', help="An invoice which has an Intrastat type which is 'Intrastat only' = true is not a real invoice i.e. once created it won't have an invoice number nor corresponding accounting entries. It follows a different path in the invoice workflow and it's state once created is called 'legal intrastat'. So the purpose of an 'intrastat only' invoice is to add entries to the Intrastat report without impacting anything else. This is used for example for a repair under warranty : nothing is invoiced to the customer, but it creates a movement of goods which should be part of the Intrastat report with a certain value.") |
|||
} |
|||
|
|||
_defaults = { |
|||
'active': lambda *a: 1, |
|||
} |
|||
|
|||
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): |
|||
if not args: |
|||
args=[] |
|||
|
|||
if context is None: |
|||
context={} |
|||
|
|||
ids = [] |
|||
|
|||
if context.get('type', False) == 'out_invoice': |
|||
args = args+['|',('type','=','export'), ('type','=','other')] |
|||
|
|||
if context.get('type', False) == 'in_invoice': |
|||
args = args+['|',('type','=','import'), ('type','=','other')] |
|||
|
|||
if context.get('type', False) == 'in_refund': |
|||
args = args+['|',('type','=','export'), ('type','=','other')] |
|||
|
|||
if context.get('type', False) == 'out_refund': |
|||
args = args+['|',('type','=','import'), ('type','=','other')] |
|||
|
|||
return super(report_intrastat_type,self).search(cr, user, args, offset, limit, order, context=context, count=count) |
|||
|
|||
report_intrastat_type() |
|||
|
@ -1,31 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<!-- |
|||
Copyright (C) 2010-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="regular_export" model="report.intrastat.type"> |
|||
<field name="name">Regular export</field> |
|||
<field name="company_id" ref="base.main_company"/> |
|||
<field name="type">export</field> |
|||
</record> |
|||
|
|||
<record id="regular_import" model="report.intrastat.type"> |
|||
<field name="name">Regular import</field> |
|||
<field name="company_id" ref="base.main_company"/> |
|||
<field name="type">import</field> |
|||
</record> |
|||
|
|||
<record id="other" model="report.intrastat.type"> |
|||
<field name="name">Exclude from intrastat (special)</field> |
|||
<field name="company_id" ref="base.main_company"/> |
|||
<field name="type">other</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
@ -1,98 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<!-- |
|||
Copyright (C) 2010-2011 Akretion (http://www.akretion.com/) |
|||
The licence is in the file __terp__.py |
|||
--> |
|||
|
|||
<openerp> |
|||
<data> |
|||
|
|||
<!-- Intrastat Type - Tree view for Users > Companies--> |
|||
<record id="fr_intrastat_base_report_intrastat_type_tree" model="ir.ui.view"> |
|||
<field name="name">fr.intrastat.base.report.intrastat.type.tree</field> |
|||
<field name="model">report.intrastat.type</field> |
|||
<field name="type">tree</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Intrastat Type"> |
|||
<field name="name" /> |
|||
<field name="type" /> |
|||
<field name="intrastat_only" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Intrastat Type - Form view for Users > Companies--> |
|||
<record id="fr_intrastat_base_report_intrastat_type_form" model="ir.ui.view"> |
|||
<field name="name">fr.intrastat.base.report.intrastat.type.form</field> |
|||
<field name="model">report.intrastat.type</field> |
|||
<field name="type">form</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Intrastat Type"> |
|||
<field name="name" select="1" /> |
|||
<field name="active" select="2" /> |
|||
<field name="type" select="1" /> |
|||
<field name="intrastat_only" select="2" /> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Intrastat type - Tree view for Configuration --> |
|||
<record id="fr_intrastat_base_report_intrastat_type_config_tree" model="ir.ui.view"> |
|||
<field name="name">fr.intrastat.base.report.intrastat.type.config.tree</field> |
|||
<field name="model">report.intrastat.type</field> |
|||
<field name="type">tree</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Intrastat type"> |
|||
<field name="company_id" /> |
|||
<field name="name" /> |
|||
<field name="type" /> |
|||
<field name="intrastat_only" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Intrastat type - Form view for Configuration --> |
|||
<record id="fr_intrastat_base_report_intrastat_type_config_form" model="ir.ui.view"> |
|||
<field name="name">fr.intrastat.base.report.intrastat.type.config.form</field> |
|||
<field name="model">report.intrastat.type</field> |
|||
<field name="type">form</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Intrastat type"> |
|||
<field name="company_id" select="1" /> |
|||
<field name="name" select="1" /> |
|||
<field name="active" select="2" /> |
|||
<field name="type" select="1" /> |
|||
<field name="intrastat_only" select="2" /> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
|
|||
<!-- Intrastat type - Action for Configuration --> |
|||
<record id="act_fr_intrastat_base_report_intrastat_type_config" model="ir.actions.act_window"> |
|||
<field name="name">Intrastat types</field> |
|||
<field name="res_model">report.intrastat.type</field> |
|||
<field name="view_type">form</field> |
|||
</record> |
|||
|
|||
<record id="act_fr_intrastat_base_report_intrastat_type_config_tree" model="ir.actions.act_window.view"> |
|||
<field eval="10" name="sequence" /> <!-- open tree view first --> |
|||
<field name="view_mode">tree</field> |
|||
<field name="view_id" ref="fr_intrastat_base_report_intrastat_type_config_tree" /> |
|||
<field name="act_window_id" ref="act_fr_intrastat_base_report_intrastat_type_config" /> |
|||
</record> |
|||
|
|||
<record id="act_fr_intrastat_base_report_intrastat_type_config_form" model="ir.actions.act_window.view"> |
|||
<field eval="20" name="sequence" /> |
|||
<field name="view_mode">form</field> |
|||
<field name="view_id" ref="fr_intrastat_base_report_intrastat_type_config_form" /> |
|||
<field name="act_window_id" ref="act_fr_intrastat_base_report_intrastat_type_config" /> |
|||
</record> |
|||
|
|||
<!-- Menu entry for Intrastat --> |
|||
<menuitem id="menu_fr_intrastat_base_root" name="Intrastat reporting" parent="account.menu_finance_legal_statement" /> |
|||
|
|||
|
|||
</data> |
|||
</openerp> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue