Let intrastat code to be deactivated (instead of deletion)
							parent
							
								
									9784084eb0
								
							
						
					
					
						commit
						0f518d433e
					
				|  | @ -18,6 +18,13 @@ msgstr "" | ||||||
| "X-Launchpad-Export-Date: 2014-09-24 09:44+0000\n" | "X-Launchpad-Export-Date: 2014-09-24 09:44+0000\n" | ||||||
| "X-Generator: Launchpad (build 17196)\n" | "X-Generator: Launchpad (build 17196)\n" | ||||||
| 
 | 
 | ||||||
|  | #. module: dp_custom | ||||||
|  | #: model:ir.ui.view,arch_db:dp_custom.view_report_intrastat_code_tz_tree | ||||||
|  | #: model:ir.ui.view,arch_db:dp_custom.view_report_intrastat_code_tz_form | ||||||
|  | msgid "Active" | ||||||
|  | msgstr "Aktiv" | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| #. module: dp_custom | #. module: dp_custom | ||||||
| #: model:ir.ui.view,arch_db:dp_custom.view_sale_cart | #: model:ir.ui.view,arch_db:dp_custom.view_sale_cart | ||||||
| #: model:ir.ui.view,arch_db:dp_custom.view_cart_tree | #: model:ir.ui.view,arch_db:dp_custom.view_cart_tree | ||||||
|  |  | ||||||
|  | @ -39,6 +39,17 @@ else: | ||||||
|     ssl._create_default_https_context = _create_unverified_https_context |     ssl._create_default_https_context = _create_unverified_https_context | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | class ReportIntrastatCode(models.Model): | ||||||
|  |     _inherit = "report.intrastat.code" | ||||||
|  | 
 | ||||||
|  |     active = fields.Boolean(string='Active', default=True, help="If unchecked, it will allow you to hide the code without removing it.") | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class ProductTemplate(models.Model): | ||||||
|  |     _inherit = "product.template" | ||||||
|  | 
 | ||||||
|  |     intrastat_id = fields.Many2one('report.intrastat.code', string='Intrastat Code') | ||||||
|  | 
 | ||||||
| class ProductXCategory(models.Model): | class ProductXCategory(models.Model): | ||||||
|     _name = 'product.xcategory' |     _name = 'product.xcategory' | ||||||
|     _description = 'X-Kategorie' |     _description = 'X-Kategorie' | ||||||
|  |  | ||||||
|  | @ -95,6 +95,7 @@ class Partner(models.Model): | ||||||
|     partner_flash = fields.Char() |     partner_flash = fields.Char() | ||||||
|     fax = fields.Char(string='Fax') |     fax = fields.Char(string='Fax') | ||||||
|     user_id = fields.Many2one(track_visibility='onchange') |     user_id = fields.Many2one(track_visibility='onchange') | ||||||
|  |     freight_category_id = fields.Many2one(comodel_name='res.partner.freight_category', string='Fracht-Kategorie') | ||||||
| 
 | 
 | ||||||
| # make pricelist searchable (store=True) --> code copied from: \ext\odoo\addons\product\models\res_partner.py! | # make pricelist searchable (store=True) --> code copied from: \ext\odoo\addons\product\models\res_partner.py! | ||||||
| #     property_product_pricelist = fields.Many2one( | #     property_product_pricelist = fields.Many2one( | ||||||
|  | @ -690,6 +691,17 @@ class Partner(models.Model): | ||||||
|         return res |         return res | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | class ResPartnerFreightCategory(models.Model): | ||||||
|  |     _name = 'res.partner.freight_category' | ||||||
|  |     _description = 'Fracht-Kategorie' | ||||||
|  |     _order = 'name' | ||||||
|  | 
 | ||||||
|  |     name = fields.Char(string='Fracht-Kategorie', required=True) | ||||||
|  |     description = fields.Char(string='Beschreibung', required=True) | ||||||
|  | 
 | ||||||
|  |     _sql_constraints = [ | ||||||
|  |         ('name_uniq', 'unique(name)', 'Die Fracht-Kategorie muss eindeutig sein') | ||||||
|  |     ] | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class PartnerSector(models.Model): | class PartnerSector(models.Model): | ||||||
|  |  | ||||||
|  | @ -13,3 +13,4 @@ access_commission_account_user,access_commission_account_user,model_commission_a | ||||||
| access_commission_account_manager,access_commission_account_manager,model_commission_account,sales_team.group_sale_manager,1,1,1,1 | access_commission_account_manager,access_commission_account_manager,model_commission_account,sales_team.group_sale_manager,1,1,1,1 | ||||||
| access_res_confirmation_queue_user,access_res_confirmation_queue_user,model_res_confirmation_queue,base.group_user,1,1,1,1 | access_res_confirmation_queue_user,access_res_confirmation_queue_user,model_res_confirmation_queue,base.group_user,1,1,1,1 | ||||||
| access_sale_cart,access_sale_cart,model_sale_cart,dp_custom.rule_cart_multi_company,1,0,0,0 | access_sale_cart,access_sale_cart,model_sale_cart,dp_custom.rule_cart_multi_company,1,0,0,0 | ||||||
|  | access_res_partner_freight_category,access_res_partner_freight_category,model_res_partner_freight_category,base.group_user,1,1,1,1 | ||||||
|  |  | ||||||
| 
 | 
|  | @ -16,7 +16,7 @@ | ||||||
| --> | --> | ||||||
|             <field name="layout_category_id"/> |             <field name="layout_category_id"/> | ||||||
|             <xpath expr="//field[@name='invoice_line_ids']/tree//field[@name='name']" position="after"> |             <xpath expr="//field[@name='invoice_line_ids']/tree//field[@name='name']" position="after"> | ||||||
|                 <field name="intrastat_id" options="{'no_quick_create':True}"/> |                 <field name="intrastat_id" options="{'no_create':True}"/> | ||||||
|             </xpath> |             </xpath> | ||||||
| 
 | 
 | ||||||
|             <xpath expr="//field[@name='invoice_line_ids']/tree//field[@name='product_id']" position="after"> |             <xpath expr="//field[@name='invoice_line_ids']/tree//field[@name='product_id']" position="after"> | ||||||
|  |  | ||||||
|  | @ -20,6 +20,10 @@ | ||||||
|                 <field name="manufacturing_number"/> |                 <field name="manufacturing_number"/> | ||||||
|                 <field name="product_color"/> |                 <field name="product_color"/> | ||||||
|             </field> |             </field> | ||||||
|  |             <field name="intrastat_id" position="replace"> | ||||||
|  |                 <field name="intrastat_id" options="{'no_create':True}"/> | ||||||
|  |             </field> | ||||||
|  | 
 | ||||||
|             <xpath expr="//page[@name='general_information']/group" position="inside"> |             <xpath expr="//page[@name='general_information']/group" position="inside"> | ||||||
|                 <group name="note" string="Notizen"> |                 <group name="note" string="Notizen"> | ||||||
|                     <field name="notes"/> |                     <field name="notes"/> | ||||||
|  | @ -186,4 +190,52 @@ | ||||||
|               action="product_xcategory_action"/> |               action="product_xcategory_action"/> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |         <!-- Intrastat code --> | ||||||
|  |         <record id="view_report_intrastat_code_tz_tree" model="ir.ui.view"> | ||||||
|  |             <field name="name">report.intrastat.code.tz_tree</field> | ||||||
|  |             <field name="model">report.intrastat.code</field> | ||||||
|  |             <field name="inherit_id" ref="report_intrastat.view_report_intrastat_code_tree"/> | ||||||
|  |             <field name="arch" type="xml"> | ||||||
|  |                 <field name="description" position="after"> | ||||||
|  |                     <field name="active" string="Active"/> | ||||||
|  |                 </field> | ||||||
|  |             </field> | ||||||
|  |         </record> | ||||||
|  |         <record id="view_report_intrastat_code_tz_form" model="ir.ui.view"> | ||||||
|  |             <field name="name">report.intrastat.code.tz_form</field> | ||||||
|  |             <field name="model">report.intrastat.code</field> | ||||||
|  |             <field name="inherit_id" ref="report_intrastat.view_report_intrastat_code_form"/> | ||||||
|  |             <field name="arch" type="xml"> | ||||||
|  | <!--                            class="oe_stat_button" icon="fa-archive" groups="sales_team.group_sale_manager"> --> | ||||||
|  | <!-- | ||||||
|  |                 <xpath expr="//form" position="attributes"> | ||||||
|  |                     <attribute name="delete">false</attribute> | ||||||
|  |                 </xpath> | ||||||
|  | --> | ||||||
|  |                 <xpath expr="//form" position="inside"> | ||||||
|  |                     <div class="oe_button_box" name="button_box"> | ||||||
|  |                         <button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive"> | ||||||
|  |                             <field name="active" widget="boolean_button" options='{"terminology": "active"}'/> | ||||||
|  |                         </button> | ||||||
|  |                     </div> | ||||||
|  |                 </xpath> | ||||||
|  |             </field> | ||||||
|  |         </record> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |         <record id="view_report_intrastat_search_view" model="ir.ui.view"> | ||||||
|  |         <field name="name">report.intrastat.code.search</field> | ||||||
|  |         <field name="model">report.intrastat.code</field> | ||||||
|  |         <field name="context">{'filter_active': 1}</field> | ||||||
|  |         <field name="arch" type="xml"> | ||||||
|  |             <search string="Intrastat"> | ||||||
|  |                 <field name="name" string="Intrastat Code" filter_domain="[('name','ilike',self)]"/> | ||||||
|  |                 <field name="description" string="Bezeichnung" filter_domain="[('description','ilike',self)]"/> | ||||||
|  |                 <filter string="Archived" name="inactive" domain="[('active','=',False)]"/> | ||||||
|  |                 <filter string="All" name="all" domain="['|',('active','=',False),('active','=',True)]"/> | ||||||
|  |             </search> | ||||||
|  |         </field> | ||||||
|  |         </record> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| </odoo> | </odoo> | ||||||
|  |  | ||||||
|  | @ -46,6 +46,7 @@ | ||||||
|             </xpath> |             </xpath> | ||||||
| 
 | 
 | ||||||
|             <xpath expr="//field[@name='property_product_pricelist']" position="after"> |             <xpath expr="//field[@name='property_product_pricelist']" position="after"> | ||||||
|  |                 <field name="freight_category_id"/> | ||||||
|                 <field name="portal_managed_pricelist" groups="dp_custom.group_allow_change_portal_managed_pricelist"/> |                 <field name="portal_managed_pricelist" groups="dp_custom.group_allow_change_portal_managed_pricelist"/> | ||||||
|                 <field name="portal_managed_pricelist" attrs="{'readonly': True}" groups="!dp_custom.group_allow_change_portal_managed_pricelist"/> |                 <field name="portal_managed_pricelist" attrs="{'readonly': True}" groups="!dp_custom.group_allow_change_portal_managed_pricelist"/> | ||||||
|             </xpath> |             </xpath> | ||||||
|  |  | ||||||
|  | @ -95,7 +95,7 @@ | ||||||
|                 <field name="from_designbox"/> |                 <field name="from_designbox"/> | ||||||
|             </xpath> |             </xpath> | ||||||
|             <xpath expr="//field[@name='order_line']/tree//field[@name='name']" position="after"> |             <xpath expr="//field[@name='order_line']/tree//field[@name='name']" position="after"> | ||||||
|                 <field name="intrastat_id" options="{'no_quick_create':True}"/> |                 <field name="intrastat_id" options="{'no_create':True}"/> | ||||||
|             </xpath> |             </xpath> | ||||||
|             <xpath expr="//field[@name='order_line']/tree//field[@name='product_id']" position="after"> |             <xpath expr="//field[@name='order_line']/tree//field[@name='product_id']" position="after"> | ||||||
|                 <field name="item_notes" invisible="1"/> |                 <field name="item_notes" invisible="1"/> | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ | ||||||
|             <field name="ref" position="after"> |             <field name="ref" position="after"> | ||||||
|                 <field name="assembled" string="Zusammengebaut"/> |                 <field name="assembled" string="Zusammengebaut"/> | ||||||
|                 <field name="weight"/> |                 <field name="weight"/> | ||||||
|                 <field name="intrastat_id" options="{'no_quick_create':True}"/> |                 <field name="intrastat_id" options="{'no_create':True}"/> | ||||||
|                 <field name="notes"/> |                 <field name="notes"/> | ||||||
|             </field> |             </field> | ||||||
|         </field> |         </field> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue