mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
Remove field exclude_from_intrastat
Re-organise view of intrastat.product.declaration
This commit is contained in:
@@ -27,12 +27,6 @@ from openerp.exceptions import ValidationError
|
||||
class ProductTemplate(models.Model):
|
||||
_inherit = "product.template"
|
||||
|
||||
exclude_from_intrastat = fields.Boolean(
|
||||
string='Exclude from Intrastat reports',
|
||||
help="If set to True, the product or service will not be "
|
||||
"taken into account for Intrastat Product or Service reports. "
|
||||
"So you should leave this field to False unless you have a "
|
||||
"very good reason.")
|
||||
is_accessory_cost = fields.Boolean(
|
||||
string='Is accessory cost',
|
||||
help="Activate this option for shipping costs, packaging "
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<!-- Menu entries for Intrastat -->
|
||||
<menuitem id="menu_intrastat_base_root"
|
||||
name="Intrastat Reporting"
|
||||
name="Intrastat"
|
||||
parent="account.menu_finance_legal_statement"/>
|
||||
<menuitem id="menu_intrastat_config_root" name="Intrastat"
|
||||
parent="account.menu_finance_configuration" sequence="50"/>
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<group name="properties" position="after">
|
||||
<group string="Intrastat Properties" name="intrastat">
|
||||
<field name="exclude_from_intrastat" />
|
||||
<field name="is_accessory_cost"
|
||||
attrs="{'invisible': [('type', '!=', 'service')]}"/>
|
||||
</group>
|
||||
|
||||
@@ -693,8 +693,8 @@ class IntrastatProductComputationLine(models.Model):
|
||||
string='Suppl. Unit', readonly=True,
|
||||
help="Intrastat Supplementary Unit")
|
||||
weight = fields.Float(
|
||||
string='Weight (Kg)',
|
||||
digits=dp.get_precision('Stock Weight'))
|
||||
string='Weight',
|
||||
digits=dp.get_precision('Stock Weight'), help="Net weight in Kg")
|
||||
suppl_unit_qty = fields.Float(
|
||||
string='Suppl. Unit Qty',
|
||||
digits=dp.get_precision('Product Unit of Measure'),
|
||||
@@ -723,7 +723,7 @@ class IntrastatProductComputationLine(models.Model):
|
||||
'intrastat.transport_mode',
|
||||
string='Transport Mode')
|
||||
product_origin_country_id = fields.Many2one(
|
||||
'res.country', string='Country of origin of the Product',
|
||||
'res.country', string='Country of Origin of the Product',
|
||||
help="Country of origin of the product i.e. product 'made in ____'")
|
||||
|
||||
@api.one
|
||||
@@ -783,7 +783,7 @@ class IntrastatProductDeclarationLine(models.Model):
|
||||
string='Suppl. Unit', readonly=True,
|
||||
help="Intrastat Supplementary Unit")
|
||||
weight = fields.Integer(
|
||||
string='Weight (Kg)')
|
||||
string='Weight', help="Net weight in Kg")
|
||||
suppl_unit_qty = fields.Integer(
|
||||
string='Suppl. Unit Qty',
|
||||
help="Supplementary Units Quantity")
|
||||
@@ -804,7 +804,7 @@ class IntrastatProductDeclarationLine(models.Model):
|
||||
'intrastat.transport_mode',
|
||||
string='Transport Mode')
|
||||
product_origin_country_id = fields.Many2one(
|
||||
'res.country', string='Country of origin of the Product',
|
||||
'res.country', string='Country of Origin of the Product',
|
||||
help="Country of origin of the product i.e. product 'made in ____'")
|
||||
|
||||
@api.model
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<header>
|
||||
<button name="action_gather" type="object"
|
||||
attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('action', '=', 'nihil')]}"
|
||||
string="Generate lines from invoices"
|
||||
string="Generate Lines from Invoices"
|
||||
class="oe_highlight"/>
|
||||
<button name="generate_declaration" type="object"
|
||||
attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('action', '=', 'nihil')]}"
|
||||
@@ -20,7 +20,7 @@
|
||||
type="object"
|
||||
attrs="{'invisible': [('state', '!=', 'draft')]}"/>
|
||||
<button name="done" string="Done" type="object" class="oe_highlight" states="draft"/>
|
||||
<button name="back2draft" string="Back to draft" type="object" states="done"/>
|
||||
<button name="back2draft" string="Back to Draft" type="object" states="done"/>
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
<sheet string="Intrastat Product Declaration">
|
||||
@@ -54,73 +54,14 @@
|
||||
<notebook>
|
||||
<page string="Transactions">
|
||||
<group name="computation_lines">
|
||||
<field name="computation_line_ids" nolabel="1">
|
||||
<tree string="Transactions">
|
||||
<field name="src_dest_country_id" domain="[('intrastat', '=', True)]"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_origin_country_id" invisible="1"
|
||||
string="Product C/O"/>
|
||||
<field name="hs_code_id"/>
|
||||
<field name="intrastat_unit_id"/>
|
||||
<field name="amount_company_currency"/>
|
||||
<field name="amount_accessory_cost_company_currency"/>
|
||||
<field name="weight"/>
|
||||
<field name="suppl_unit_qty" attrs="{'invisible': [('intrastat_unit_id', '=', False)], 'required': [('intrastat_unit_id', '!=', False)]}"/>
|
||||
<field name="transaction_id"/>
|
||||
<field name="region_id" invisible="1"/>
|
||||
<field name="invoice_id"/>
|
||||
<field name="reporting_level" invisible="1"/>
|
||||
</tree>
|
||||
<form string="Transactions">
|
||||
<group col="4" string="Transaction" colspan="4">
|
||||
<field name="src_dest_country_id" domain="[('intrastat', '=', True)]"/>
|
||||
<field name="product_id"/>
|
||||
<field name="hs_code_id"/>
|
||||
<field name="intrastat_unit_id"/>
|
||||
<field name="amount_company_currency"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'company_currency_id'}"/>
|
||||
<field name="amount_accessory_cost_company_currency"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'company_currency_id'}"/>
|
||||
<field name="company_currency_id" invisible="1"/>
|
||||
<field name="weight"/>
|
||||
<field name="suppl_unit_qty"/>
|
||||
<field name="transaction_id"/>
|
||||
<field name="region_id" invisible="1"/>
|
||||
<field name="invoice_id"/>
|
||||
<field name="reporting_level" invisible="1"/>
|
||||
<field name="transport_id"
|
||||
attrs="{'required': [('reporting_level', '=', 'extended')], 'invisible': [('reporting_level', '!=', 'extended')]}"/>
|
||||
<field name="incoterm_id" invisible="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
<field name="computation_line_ids" nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Declaration Lines">
|
||||
<group name="declaration_lines">
|
||||
<field name="declaration_line_ids" nolabel="1">
|
||||
<tree string="Intrastat Declaration Lines" editable="bottom">
|
||||
<field name="src_dest_country_id" domain="[('intrastat', '=', True)]"/>
|
||||
<field name="hs_code_id"/>
|
||||
<field name="product_origin_country_id" invisible="1"
|
||||
string="Product C/O"/>
|
||||
<field name="intrastat_unit_id"/>
|
||||
<field name="amount_company_currency"/>
|
||||
<field name="weight"/>
|
||||
<field name="suppl_unit_qty"/>
|
||||
<field name="transaction_id"/>
|
||||
<field name="region_id" invisible="1"/>
|
||||
<field name="reporting_level" invisible="1"/>
|
||||
<field name="transport_id"
|
||||
attrs="{'required': [('reporting_level', '=', 'extended')], 'invisible': [('reporting_level', '!=', 'extended')]}"/>
|
||||
<field name="incoterm_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="declaration_line_ids" nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
<page string="Notes">
|
||||
<field name="note"/>
|
||||
</page>
|
||||
@@ -141,7 +82,7 @@
|
||||
<field name="default" eval="False"/>
|
||||
<field name="description">Intrastat Product Declaration Validated</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="intrastat_product_declaration_view_tree" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.declaration.tree</field>
|
||||
<field name="model">intrastat.product.declaration</field>
|
||||
@@ -189,5 +130,132 @@
|
||||
|
||||
<!-- No menuitem nor action since these are provided by the localization modules -->
|
||||
|
||||
<record id="intrastat_product_computation_line_view_form" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.computation.line.form</field>
|
||||
<field name="model">intrastat.product.computation.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Intrastat Transaction">
|
||||
<group string="Transaction" name="transaction">
|
||||
<field name="parent_id"
|
||||
invisible="not context.get('intrastat_product_computation_line_main_view')"/>
|
||||
<field name="product_id"/>
|
||||
<field name="hs_code_id"/>
|
||||
<field name="src_dest_country_id" domain="[('intrastat', '=', True)]"/>
|
||||
<field name="amount_company_currency"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'company_currency_id'}"/>
|
||||
<field name="amount_accessory_cost_company_currency"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'company_currency_id'}"/>
|
||||
<field name="company_currency_id" invisible="1"/>
|
||||
<field name="transaction_id"/>
|
||||
<label for="weight"/>
|
||||
<div>
|
||||
<field name="weight" class="oe_inline"/>
|
||||
<label string=" Kg" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="suppl_unit_qty"/>
|
||||
<field name="intrastat_unit_id"/>
|
||||
<field name="reporting_level" invisible="1"/>
|
||||
<field name="transport_id"
|
||||
attrs="{'required': [('reporting_level', '=', 'extended')], 'invisible': [('reporting_level', '!=', 'extended')]}"/>
|
||||
<field name="incoterm_id" invisible="1"/>
|
||||
<field name="region_id" invisible="1"/>
|
||||
<field name="product_origin_country_id" invisible="1"/>
|
||||
<field name="invoice_id"/>
|
||||
</group>
|
||||
<group string="Declaration" name="declaration">
|
||||
<field name="declaration_line_id"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_product_computation_line_view_tree" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.computation.line.tree</field>
|
||||
<field name="model">intrastat.product.computation.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Transactions">
|
||||
<field name="parent_id"
|
||||
invisible="not context.get('intrastat_product_computation_line_main_view')"/>
|
||||
<field name="product_id"/>
|
||||
<field name="hs_code_id"/>
|
||||
<field name="src_dest_country_id" domain="[('intrastat', '=', True)]"/>
|
||||
<field name="amount_company_currency"/>
|
||||
<field name="amount_accessory_cost_company_currency"/>
|
||||
<field name="transaction_id"/>
|
||||
<field name="weight"/>
|
||||
<field name="suppl_unit_qty"
|
||||
attrs="{'invisible': [('intrastat_unit_id', '=', False)], 'required': [('intrastat_unit_id', '!=', False)]}"/>
|
||||
<field name="intrastat_unit_id"/>
|
||||
<field name="region_id" invisible="1"/>
|
||||
<field name="product_origin_country_id" invisible="1" string="Product C/O"/>
|
||||
<field name="invoice_id"/>
|
||||
<field name="reporting_level" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_product_declaration_line_view_form" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.declaration.line.form</field>
|
||||
<field name="model">intrastat.product.declaration.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Intrastat Declaration Line">
|
||||
<group name="declaration">
|
||||
<field name="parent_id"
|
||||
invisible="not context.get('intrastat_product_declaration_line_main_view')"/>
|
||||
<field name="hs_code_id"/>
|
||||
<field name="src_dest_country_id" domain="[('intrastat', '=', True)]"/>
|
||||
<field name="amount_company_currency"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'company_currency_id'}"/>
|
||||
<field name="company_currency_id" invisible="1"/>
|
||||
<field name="transaction_id"/>
|
||||
<label for="weight"/>
|
||||
<div>
|
||||
<field name="weight" class="oe_inline"/>
|
||||
<label string=" Kg" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="suppl_unit_qty"/>
|
||||
<field name="intrastat_unit_id"/>
|
||||
<field name="reporting_level" invisible="1"/>
|
||||
<field name="transport_id"
|
||||
attrs="{'required': [('reporting_level', '=', 'extended')], 'invisible': [('reporting_level', '!=', 'extended')]}"/>
|
||||
<field name="region_id" invisible="1"/>
|
||||
<field name="incoterm_id" invisible="1"/>
|
||||
<field name="product_origin_country_id" invisible="1"/>
|
||||
</group>
|
||||
<group name="computation" string="Related Transactions">
|
||||
<field name="computation_line_ids" nolabel="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_product_declaration_line_view_tree" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.declaration.line.tree</field>
|
||||
<field name="model">intrastat.product.declaration.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Intrastat Declaration Lines">
|
||||
<field name="parent_id"
|
||||
invisible="not context.get('intrastat_product_declaration_line_main_view')"/>
|
||||
<field name="hs_code_id"/>
|
||||
<field name="src_dest_country_id" domain="[('intrastat', '=', True)]"/>
|
||||
<field name="amount_company_currency"/>
|
||||
<field name="transaction_id"/>
|
||||
<field name="weight"/>
|
||||
<field name="suppl_unit_qty"/>
|
||||
<field name="intrastat_unit_id"/>
|
||||
<field name="reporting_level" invisible="1"/>
|
||||
<field name="transport_id"
|
||||
attrs="{'required': [('reporting_level', '=', 'extended')], 'invisible': [('reporting_level', '!=', 'extended')]}"/>
|
||||
<field name="region_id" invisible="1"/>
|
||||
<field name="incoterm_id" invisible="1"/>
|
||||
<field name="product_origin_country_id" invisible="1" string="Product C/O"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user