diff --git a/erpnext/patches/v5_7/item_template_attributes.py b/erpnext/patches/v5_7/item_template_attributes.py index c0e68516cf..9536f1628c 100644 --- a/erpnext/patches/v5_7/item_template_attributes.py +++ b/erpnext/patches/v5_7/item_template_attributes.py @@ -40,8 +40,8 @@ def rename_and_reload_doctypes(): frappe.reload_doctype("Item") frappe.reload_doc("Stock", "DocType", "Item Variant Attribute") - frappe.reload_doctype("Item Attribute Value") - frappe.reload_doctype("Item Attribute") + frappe.reload_doc("Stock", "DocType", "Item Attribute Value") + frappe.reload_doc("Stock", "DocType", "Item Attribute") def migrate_manage_variants(): item_attribute = {} diff --git a/erpnext/setup/page/setup_wizard/fixtures/industry_type.py b/erpnext/setup/page/setup_wizard/fixtures/industry_type.py index af508c2f50..74a10ff56a 100644 --- a/erpnext/setup/page/setup_wizard/fixtures/industry_type.py +++ b/erpnext/setup/page/setup_wizard/fixtures/industry_type.py @@ -1,54 +1,56 @@ from frappe import _ -items = [ -_('Accounting'), -_('Advertising'), -_('Aerospace'), -_('Agriculture'), -_('Airline'), -_('Apparel & Accessories'), -_('Automotive'), -_('Banking'), -_('Biotechnology'), -_('Broadcasting'), -_('Brokerage'), -_('Chemical'), -_('Computer'), -_('Consulting'), -_('Consumer Products'), -_('Cosmetics'), -_('Defense'), -_('Department Stores'), -_('Education'), -_('Electronics'), -_('Energy'), -_('Entertainment & Leisure'), -_('Executive Search'), -_('Financial Services'), -_('Food, Beverage & Tobacco'), -_('Grocery'), -_('Health Care'), -_('Internet Publishing'), -_('Investment Banking'), -_('Legal'), -_('Manufacturing'), -_('Motion Picture & Video'), -_('Music'), -_('Newspaper Publishers'), -_('Online Auctions'), -_('Pension Funds'), -_('Pharmaceuticals'), -_('Private Equity'), -_('Publishing'), -_('Real Estate'), -_('Retail & Wholesale'), -_('Securities & Commodity Exchanges'), -_('Service'), -_('Soap & Detergent'), -_('Software'), -_('Sports'), -_('Technology'), -_('Telecommunications'), -_('Television'), -_('Transportation'), -_('Venture Capital')] +def get_industry_types(): + return [ + _('Accounting'), + _('Advertising'), + _('Aerospace'), + _('Agriculture'), + _('Airline'), + _('Apparel & Accessories'), + _('Automotive'), + _('Banking'), + _('Biotechnology'), + _('Broadcasting'), + _('Brokerage'), + _('Chemical'), + _('Computer'), + _('Consulting'), + _('Consumer Products'), + _('Cosmetics'), + _('Defense'), + _('Department Stores'), + _('Education'), + _('Electronics'), + _('Energy'), + _('Entertainment & Leisure'), + _('Executive Search'), + _('Financial Services'), + _('Food, Beverage & Tobacco'), + _('Grocery'), + _('Health Care'), + _('Internet Publishing'), + _('Investment Banking'), + _('Legal'), + _('Manufacturing'), + _('Motion Picture & Video'), + _('Music'), + _('Newspaper Publishers'), + _('Online Auctions'), + _('Pension Funds'), + _('Pharmaceuticals'), + _('Private Equity'), + _('Publishing'), + _('Real Estate'), + _('Retail & Wholesale'), + _('Securities & Commodity Exchanges'), + _('Service'), + _('Soap & Detergent'), + _('Software'), + _('Sports'), + _('Technology'), + _('Telecommunications'), + _('Television'), + _('Transportation'), + _('Venture Capital') + ] diff --git a/erpnext/setup/page/setup_wizard/fixtures/operations.py b/erpnext/setup/page/setup_wizard/fixtures/operations.py index 4c982c186a..cbb3071c15 100644 --- a/erpnext/setup/page/setup_wizard/fixtures/operations.py +++ b/erpnext/setup/page/setup_wizard/fixtures/operations.py @@ -3,163 +3,165 @@ from __future__ import unicode_literals from frappe import _ -items = [ -_("Centrifugal casting"), -_("Continuous casting"), -_("Die casting"), -_("Evaporative-pattern casting"), -_("Full-mold casting"), -_("Lost-foam casting"), -_("Investment casting"), -_("Countergravity casting"), -_("Permanent mold casting"), -_("Resin casting"), -_("Sand casting"), -_("Shell molding"), -_("Spray forming"), -_("Vacuum molding"), -_("Molding"), -_("Compaction plus sintering"), -_("Hot isostatic pressing"), -_("Metal injection molding"), -_("Injection molding"), -_("Compression molding"), -_("Blow molding"), -_("Dip molding"), -_("Rotational molding"), -_("Thermoforming"), -_("Laminating"), -_("Shrink fitting"), -_("Shrink wrapping"), -_("End tube forming"), -_("Tube beading"), -_("Forging"), -_("Rolling"), -_("Cold rolling"), -_("Hot rolling"), -_("Cryorolling"), -_("Cross-rolling"), -_("Pressing"), -_("Embossing"), -_("Stretch forming"), -_("Blanking"), -_("Drawing"), -_("Bulging"), -_("Necking"), -_("Nosing"), -_("Deep drawing"), -_("Bending"), -_("Hemming"), -_("Shearing"), -_("Piercing"), -_("Trimming"), -_("Shaving"), -_("Notching"), -_("Perforating"), -_("Nibbling"), -_("Lancing"), -_("Cutting"), -_("Stamping"), -_("Coining"), -_("Straight shearing"), -_("Slitting"), -_("Redrawing"), -_("Ironing"), -_("Flattening"), -_("Swaging"), -_("Spinning"), -_("Peening"), -_("Explosive forming"), -_("Electroforming"), -_("Staking"), -_("Seaming"), -_("Flanging"), -_("Straightening"), -_("Decambering"), -_("Cold sizing"), -_("Hubbing"), -_("Hot metal gas forming"), -_("Curling"), -_("Hydroforming"), -_("Machining"), -_("Milling"), -_("Hammering"), -_("Smelting"), -_("Refining"), -_("Annealing"), -_("Pickling"), -_("Coating"), -_("Turning"), -_("Facing"), -_("Boring"), -_("Knurling"), -_("Hard turning"), -_("Drilling"), -_("Reaming"), -_("Countersinking"), -_("Tapping"), -_("Sawing"), -_("Filing"), -_("Broaching"), -_("Shaping"), -_("Planing"), -_("Double housing"), -_("Abrasive jet machining"), -_("Water jet cutting"), -_("Photochemical machining"), -_("Honing"), -_("Electro-chemical grinding"), -_("Finishing & industrial finishing"), -_("Abrasive blasting"), -_("Buffing"), -_("Burnishing"), -_("Electroplating"), -_("Electropolishing"), -_("Magnetic field-assisted finishing"), -_("Etching"), -_("Linishing"), -_("Mass finishing"), -_("Tumbling"), -_("Spindle finishing"), -_("Vibratory finishing"), -_("Plating"), -_("Polishing"), -_("Superfinishing"), -_("Wire brushing"), -_("Routing"), -_("Hobbing"), -_("Ultrasonic machining"), -_("Electron beam machining"), -_("Electrochemical machining"), -_("Laser cutting"), -_("Laser drilling"), -_("Grinding"), -_("Gashing"), -_("Biomachining"), -_("Joining"), -_("Welding"), -_("Brazing"), -_("Sintering"), -_("Adhesive bonding"), -_("Nailing"), -_("Screwing"), -_("Riveting"), -_("Clinching"), -_("Pinning"), -_("Stitching"), -_("Stapling"), -_("Press fitting"), -_("3D printing"), -_("Direct metal laser sintering"), -_("Fused deposition modeling"), -_("Laminated object manufacturing"), -_("Laser engineered net shaping"), -_("Selective laser sintering"), -_("Mining"), -_("Quarrying"), -_("Blasting"), -_("Woodworking"), -_("Lapping"), -_("Morticing"), -_("Crushing"), -_("Packaging and labeling")] +def get_operations(): + return [ + _("Centrifugal casting"), + _("Continuous casting"), + _("Die casting"), + _("Evaporative-pattern casting"), + _("Full-mold casting"), + _("Lost-foam casting"), + _("Investment casting"), + _("Countergravity casting"), + _("Permanent mold casting"), + _("Resin casting"), + _("Sand casting"), + _("Shell molding"), + _("Spray forming"), + _("Vacuum molding"), + _("Molding"), + _("Compaction plus sintering"), + _("Hot isostatic pressing"), + _("Metal injection molding"), + _("Injection molding"), + _("Compression molding"), + _("Blow molding"), + _("Dip molding"), + _("Rotational molding"), + _("Thermoforming"), + _("Laminating"), + _("Shrink fitting"), + _("Shrink wrapping"), + _("End tube forming"), + _("Tube beading"), + _("Forging"), + _("Rolling"), + _("Cold rolling"), + _("Hot rolling"), + _("Cryorolling"), + _("Cross-rolling"), + _("Pressing"), + _("Embossing"), + _("Stretch forming"), + _("Blanking"), + _("Drawing"), + _("Bulging"), + _("Necking"), + _("Nosing"), + _("Deep drawing"), + _("Bending"), + _("Hemming"), + _("Shearing"), + _("Piercing"), + _("Trimming"), + _("Shaving"), + _("Notching"), + _("Perforating"), + _("Nibbling"), + _("Lancing"), + _("Cutting"), + _("Stamping"), + _("Coining"), + _("Straight shearing"), + _("Slitting"), + _("Redrawing"), + _("Ironing"), + _("Flattening"), + _("Swaging"), + _("Spinning"), + _("Peening"), + _("Explosive forming"), + _("Electroforming"), + _("Staking"), + _("Seaming"), + _("Flanging"), + _("Straightening"), + _("Decambering"), + _("Cold sizing"), + _("Hubbing"), + _("Hot metal gas forming"), + _("Curling"), + _("Hydroforming"), + _("Machining"), + _("Milling"), + _("Hammering"), + _("Smelting"), + _("Refining"), + _("Annealing"), + _("Pickling"), + _("Coating"), + _("Turning"), + _("Facing"), + _("Boring"), + _("Knurling"), + _("Hard turning"), + _("Drilling"), + _("Reaming"), + _("Countersinking"), + _("Tapping"), + _("Sawing"), + _("Filing"), + _("Broaching"), + _("Shaping"), + _("Planing"), + _("Double housing"), + _("Abrasive jet machining"), + _("Water jet cutting"), + _("Photochemical machining"), + _("Honing"), + _("Electro-chemical grinding"), + _("Finishing & industrial finishing"), + _("Abrasive blasting"), + _("Buffing"), + _("Burnishing"), + _("Electroplating"), + _("Electropolishing"), + _("Magnetic field-assisted finishing"), + _("Etching"), + _("Linishing"), + _("Mass finishing"), + _("Tumbling"), + _("Spindle finishing"), + _("Vibratory finishing"), + _("Plating"), + _("Polishing"), + _("Superfinishing"), + _("Wire brushing"), + _("Routing"), + _("Hobbing"), + _("Ultrasonic machining"), + _("Electron beam machining"), + _("Electrochemical machining"), + _("Laser cutting"), + _("Laser drilling"), + _("Grinding"), + _("Gashing"), + _("Biomachining"), + _("Joining"), + _("Welding"), + _("Brazing"), + _("Sintering"), + _("Adhesive bonding"), + _("Nailing"), + _("Screwing"), + _("Riveting"), + _("Clinching"), + _("Pinning"), + _("Stitching"), + _("Stapling"), + _("Press fitting"), + _("3D printing"), + _("Direct metal laser sintering"), + _("Fused deposition modeling"), + _("Laminated object manufacturing"), + _("Laser engineered net shaping"), + _("Selective laser sintering"), + _("Mining"), + _("Quarrying"), + _("Blasting"), + _("Woodworking"), + _("Lapping"), + _("Morticing"), + _("Crushing"), + _("Packaging and labeling") + ] diff --git a/erpnext/setup/page/setup_wizard/install_fixtures.py b/erpnext/setup/page/setup_wizard/install_fixtures.py index 6ecd9ffa77..02fa27fb59 100644 --- a/erpnext/setup/page/setup_wizard/install_fixtures.py +++ b/erpnext/setup/page/setup_wizard/install_fixtures.py @@ -177,9 +177,9 @@ def install(country=None): {'doctype': "Print Heading", 'print_heading': _("Debit Note")} ] - from erpnext.setup.page.setup_wizard.fixtures import industry_type - records += [{"doctype":"Industry Type", "industry": d} for d in industry_type.items] - # records += [{"doctype":"Operation", "operation": d} for d in operations.items] + from erpnext.setup.page.setup_wizard.fixtures.industry_type import get_industry_types + records += [{"doctype":"Industry Type", "industry": d} for d in get_industry_types()] + # records += [{"doctype":"Operation", "operation": d} for d in get_operations()] from frappe.modules import scrub for r in records: