From 2ced381976c39a7e8bfd4fa9d0e178a1d42a1834 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 4 Nov 2013 14:37:29 +0530 Subject: [PATCH 1/3] [minor] fixes in test cases and demo --- .../doctype/pos_setting/test_pos_setting.py | 1 - setup/doctype/setup_control/setup_control.py | 8 +- stock/doctype/stock_entry/stock_entry.py | 1 - utilities/demo/demo_docs/Item_Price.csv | 49 +++++++ utilities/demo/demo_docs/Lead.csv | 136 +++++++++--------- utilities/demo/demo_docs/Price_List.csv | 49 ------- utilities/demo/make_demo.py | 4 +- 7 files changed, 123 insertions(+), 125 deletions(-) create mode 100644 utilities/demo/demo_docs/Item_Price.csv delete mode 100644 utilities/demo/demo_docs/Price_List.csv diff --git a/accounts/doctype/pos_setting/test_pos_setting.py b/accounts/doctype/pos_setting/test_pos_setting.py index 579a75edcd..8d02c57fd1 100644 --- a/accounts/doctype/pos_setting/test_pos_setting.py +++ b/accounts/doctype/pos_setting/test_pos_setting.py @@ -6,7 +6,6 @@ test_records = [ "doctype": "POS Setting", "name": "_Test POS Setting", "currency": "INR", - "conversion_rate": 1.0, "selling_price_list": "_Test Price List", "company": "_Test Company", "warehouse": "_Test Warehouse - _TC", diff --git a/setup/doctype/setup_control/setup_control.py b/setup/doctype/setup_control/setup_control.py index 9599e58c78..200ff3c61b 100644 --- a/setup/doctype/setup_control/setup_control.py +++ b/setup/doctype/setup_control/setup_control.py @@ -101,7 +101,9 @@ class DocType: 'default_currency': args.get('currency'), 'default_company':args.get('company_name'), 'date_format': webnotes.conn.get_value("Country", args.get("country"), "date_format"), - "float_precision": 4 + "float_precision": 3, + "time_zone": args.get("time_zone"), + "country": args.get("country") }) global_defaults.save() @@ -141,9 +143,7 @@ class DocType: # control panel cp = webnotes.doc("Control Panel", "Control Panel") - for k in ['country', 'time_zone', 'company_name']: - cp.fields[k] = args[k] - + cp.company_name = args["company_name"] cp.save() def create_feed_and_todo(self): diff --git a/stock/doctype/stock_entry/stock_entry.py b/stock/doctype/stock_entry/stock_entry.py index 9f3b0ce2ca..12b0f514a3 100644 --- a/stock/doctype/stock_entry/stock_entry.py +++ b/stock/doctype/stock_entry/stock_entry.py @@ -617,7 +617,6 @@ class DocType(StockController): return issued_item_qty def add_to_stock_entry_detail(self, item_dict, bom_no=None, idx=None): - webnotes.errprint([]) if not idx: idx = 1 expense_account, cost_center = webnotes.conn.get_values("Company", self.doc.company, \ ["default_expense_account", "cost_center"])[0] diff --git a/utilities/demo/demo_docs/Item_Price.csv b/utilities/demo/demo_docs/Item_Price.csv new file mode 100644 index 0000000000..d70b7b3e67 --- /dev/null +++ b/utilities/demo/demo_docs/Item_Price.csv @@ -0,0 +1,49 @@ +Data Import Template,,,,,,, +Table:,Item Price,,,,,, +,,,,,,, +,,,,,,, +Notes:,,,,,,, +Please do not change the template headings.,,,,,,, +First data column must be blank.,,,,,,, +"If you are uploading new records, leave the ""name"""" (ID) column blank.""",,,,,,, +"If you are uploading new records, ""Naming Series"""" becomes mandatory"," if present.""",,,,,, +Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,, +"For updating, you can update only selective columns.",,,,,,, +You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,, +,,,,,,, +DocType:,Item Price,,,,,, +Column Labels:,ID,Price List,Item Code,Rate,Valid for Buying or Selling?,Item Name,Item Description +Column Name:,name,price_list,item_code,ref_rate,buying_or_selling,item_name,item_description +Mandatory:,Yes,Yes,Yes,Yes,No,No,No +Type:,Data (text),Link,Link,Currency,Select,Data,Text +Info:,,Valid Price List,Valid Item,,"One of: Selling, Buying",, +Start entering data below this line,,,,,,, +,,Standard Buying,Base Bearing Plate,15,Buying,, +,,Standard Buying,Base Plate,20,Buying,, +,,Standard Buying,Bearing Block,10,Buying,, +,,Standard Buying,Bearing Collar,20,Buying,, +,,Standard Buying,Bearing Pipe,15,Buying,, +,,Standard Buying,Blade Rib,10,Buying,, +,,Standard Buying,Disc Collars,74,Buying,, +,,Standard Buying,External Disc,45,Buying,, +,,Standard Buying,Internal Disc,33,Buying,, +,,Standard Buying,Shaft,30,Buying,, +,,Standard Buying,Stand,40,Buying,, +,,Standard Buying,Upper Bearing Plate,50,Buying,, +,,Standard Buying,Wing Sheet,22,Buying,, +,,Standard Selling,Wind Turbine,21,Selling,, +,,Standard Selling,Wind Mill A Series,28,Selling,, +,,Standard Selling,Wind MIll C Series,14,Selling,, +,,Standard Selling,Base Bearing Plate,28,Selling,, +,,Standard Selling,Base Plate,21,Selling,, +,,Standard Selling,Bearing Block,14,Selling,, +,,Standard Selling,Bearing Collar,103.6,Selling,, +,,Standard Selling,Bearing Pipe,63,Selling,, +,,Standard Selling,Blade Rib,46.2,Selling,, +,,Standard Selling,Disc Collars,42,Selling,, +,,Standard Selling,External Disc,56,Selling,, +,,Standard Selling,Internal Disc,70,Selling,, +,,Standard Selling,Shaft,340,Selling,, +,,Standard Selling,Stand,400,Selling,, +,,Standard Selling,Upper Bearing Plate,300,Selling,, +,,Standard Selling,Wing Sheet,30.8,Selling,, \ No newline at end of file diff --git a/utilities/demo/demo_docs/Lead.csv b/utilities/demo/demo_docs/Lead.csv index c00ab44162..e3415facf7 100644 --- a/utilities/demo/demo_docs/Lead.csv +++ b/utilities/demo/demo_docs/Lead.csv @@ -1,68 +1,68 @@ -Data Import Template,,,,,,,,,,,,,,,,,,,,,,,,,,, -Table:,Lead,,,,,,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,,,,,,,, -Notes:,,,,,,,,,,,,,,,,,,,,,,,,,,, -Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,,,,,,, -First data column must be blank.,,,,,,,,,,,,,,,,,,,,,,,,,,, -Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,,,,,,,, -"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,,,,,,,, -"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,,,,,,,,,,,,,,,,,,,, -"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,,,,,,,,,,,,,,,,,,,, -You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,,,,,,,, -Column Labels,ID,Contact Name,Status,Naming Series,Company Name,Email Id,Source,From Customer,Campaign Name,Remark,Phone,Mobile No.,Fax,Website,Territory,Lead Type,Lead Owner,Market Segment,Industry,Request Type,Lost Reason,Next Contact By,Next Contact Date,Last Contact Date,Company,Unsubscribed,Blog Subscriber -Column Name:,name,lead_name,status,naming_series,company_name,email_id,source,customer,campaign_name,remark,phone,mobile_no,fax,website,territory,type,lead_owner,market_segment,industry,request_type,order_lost_reason,contact_by,contact_date,last_contact_date,company,unsubscribed,blog_subscriber -Mandatory:,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No -Type:,Data (text),Data,Select,Select,Data,Data,Select,Link,Link,Small Text,Data,Data,Data,Data,Link,Select,Link,Select,Link,Select,Link,Link,Date,Date,Link,Check,Check -Info:,,,"One of: Open, Replied, Attempted to Contact, Contact in Future, Contacted, Interested, Not interested, Lead Lost, Converted","One of: LEAD, LEAD/10-11/, LEAD/MUMBAI/",,,"One of: Advertisement, Blog Post, Campaign, Call, Customer, Exhibition, Supplier, Website, Email",Valid Customer,Valid Campaign,,,,,,Valid Territory,"One of: Client, Channel Partner, Consultant",Valid Profile,"One of: Lower Income, Middle Income, Upper Income",Valid Industry Type,"One of: Product Enquiry, Request for Information, Suggestions, Other",Valid Quotation Lost Reason,Valid Profile,,,Valid Company,0 or 1,0 or 1 -Start entering data below this line,,,,,,,,,,,,,,,,,,,,,,,,,,, -,,Mart Lakeman,Passive,,Zany Brainy,MartLakeman@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Saga Lundqvist,Passive,,Patterson-Fletcher,SagaLundqvist@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,Adna Sjöberg,Passive,,Griff's Hamburgers,AdnaSjoberg@gustr.com,,,,,,,,,,,,,,,,,,,,, -,,Ida Svendsen,Passive,,Rhodes Furniture,IdaDSvendsen@superrito.com,,,,,,,,,,,,,,,,,,,,, -,,Emppu Hämeenniemi,Passive,,Burger Chef,EmppuHameenniemi@teleworm.us,,,,,,,,,,,,,,,,,,,,, -,,Eugenio Pisano,Passive,,Stratabiz,EugenioPisano@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Semhar Hagos,Passive,,Home Quarters Warehouse,SemharHagos@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Branimira Ivanković,Passive,,Enviro Architectural Designs,BranimiraIvankovic@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Shelly Fields,Passive,,Ideal Garden Management,ShellyLFields@superrito.com,,,,,,,,,,,,,,,,,,,,, -,,Leo Mikulić,Passive,,Listen Up,LeoMikulic@gustr.com,,,,,,,,,,,,,,,,,,,,, -,,Denisa Jarošová,Passive,,I. Magnin,DenisaJarosova@teleworm.us,,,,,,,,,,,,,,,,,,,,, -,,Janek Rutkowski,Passive,,First Rate Choice,JanekRutkowski@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,美月 宇藤,Passive,,Multi Tech Development,mm@gustr.com,,,,,,,,,,,,,,,,,,,,, -,,Даниил Афанасьев,Passive,,National Auto Parts,dd@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Zorislav Petković,Passive,,Integra Investment Plan,ZorislavPetkovic@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Nanao Niwa,Passive,,The Lawn Guru,NanaoNiwa@superrito.com,,,,,,,,,,,,,,,,,,,,, -,,Hreiðar Jörundsson,Passive,,Buena Vista Realty Service,HreiarJorundsson@armyspy.com,,,,,,,,,,,,,,,,,,,,, -,,Lai Chu,Passive,,Bountiful Harvest Health Food Store,ChuThiBichLai@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Victor Aksakov,Passive,,P. Samuels Men's Clothiers,VictorAksakov@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,Saidalim Bisliev,Passive,,Vinyl Fever,SaidalimBisliev@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Totte Jakobsson,Passive,,Garden Master,TotteJakobsson@armyspy.com,,,,,,,,,,,,,,,,,,,,, -,,Naná Armas,Passive,,Big Apple,NanaArmasRobles@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Walerian Duda,Passive,,Monk House Sales,WalerianDuda@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,Moarimikashi ,Passive,,ManCharm,Moarimikashi@teleworm.us,,,,,,,,,,,,,,,,,,,,, -,,Dobromił Dąbrowski ,Passive,,Custom Lawn Care,DobromilDabrowski@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,Teigan Sinclair,Passive,,The Serendipity Dip,TeiganSinclair@gustr.com,,,,,,,,,,,,,,,,,,,,, -,,Fahad Guirguis,Passive,,Cavages,FahadSaidGuirguis@gustr.com,,,,,,,,,,,,,,,,,,,,, -,,Morten Olsen,Passive,,Gallenkamp,MortenJOlsen@armyspy.com,,,,,,,,,,,,,,,,,,,,, -,,Christian Baecker,Passive,,Webcom Business Services,ChristianBaecker@armyspy.com,,,,,,,,,,,,,,,,,,,,, -,,Sebastianus Dohmen,Passive,,Accord Investments,SebastianusDohmen@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Eero Koskinen,Passive,,American Appliance,EeroKoskinen@superrito.com,,,,,,,,,,,,,,,,,,,,, -,,富奎 盧,Passive,,Bettendorf's,LuFuKui@teleworm.us,,,,,,,,,,,,,,,,,,,,, -,,Milica Jelić,Passive,,House Of Denmark,MilicaJelic@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,Barbora Holubová,Passive,,10000 Auto Parts,BarboraHolubova@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Marta Kos,Passive,,Mages,MartaKos@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Simret Zula,Passive,,CSK Auto,SimretZula@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Kamil Chlubna,Passive,,Eagle Hardware & Garden,KamilChlubna@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Aceline Bolduc,Passive,,Rustler Steak House,AcelineBolduc@armyspy.com,,,,,,,,,,,,,,,,,,,,, -,,Lucie Stupková,Passive,,ABCO Foods,LucieStupkova@gustr.com,,,,,,,,,,,,,,,,,,,,, -,,Roland Solvik,Passive,,Trak Auto,RolandSolvik@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Mekirinzukushitakufu ,Passive,,Choices,Mekirinzukushitakufu@teleworm.us,,,,,,,,,,,,,,,,,,,,, -,,Mukharbek Sultanovich,Passive,,Megatronic,MukharbekSultanovich@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Osman Amanuel,Passive,,Handy Dan,OsmanAmanuel@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,幸子 阪部,Passive,,Channel Home Centers,dd@armyspy.com,,,,,,,,,,,,,,,,,,,,, -,,Masakazu Kamitani,Passive,,Honest Air Group,MasakazuKamitani@superrito.com,,,,,,,,,,,,,,,,,,,,, -,,Omran Sabbagh,Passive,,Pleasures and Pasttimes,OmranNuhaidSabbagh@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Rikako Matsumura,Passive,,Lazysize,RikakoMatsumura@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Anayolisa Chukwukadibia,Passive,,Prestiga-Biz,AnayolisaChukwukadibia@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Gudmunda Hinna,Passive,,Childs Restaurants,GudmundaHinna@armyspy.com,,,,,,,,,,,,,,,,,,,,, \ No newline at end of file +Data Import Template,,,,,,,,,,,,,,,,,,,,,,,,,, +Table:,Lead,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,, +Notes:,,,,,,,,,,,,,,,,,,,,,,,,,, +Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,,,,,, +First data column must be blank.,,,,,,,,,,,,,,,,,,,,,,,,,, +Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,,,,,,, +"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,,,,,,, +"If you are uploading new records, leave the ""name"""" (ID) column blank.""",,,,,,,,,,,,,,,,,,,,,,,,,, +"If you are uploading new records, ""Naming Series"""" becomes mandatory"," if present.""",,,,,,,,,,,,,,,,,,,,,,,,, +You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,, +Column Labels,ID,Contact Name,Status,Naming Series,Company Name,Email Id,Source,From Customer,Campaign Name,Remark,Phone,Mobile No.,Fax,Website,Territory,Lead Type,Lead Owner,Market Segment,Industry,Request Type,Lost Reason,Next Contact By,Next Contact Date,Company,Unsubscribed,Blog Subscriber +Column Name:,name,lead_name,status,naming_series,company_name,email_id,source,customer,campaign_name,remark,phone,mobile_no,fax,website,territory,type,lead_owner,market_segment,industry,request_type,order_lost_reason,contact_by,contact_date,company,unsubscribed,blog_subscriber +Mandatory:,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No +Type:,Data (text),Data,Select,Select,Data,Data,Select,Link,Link,Small Text,Data,Data,Data,Data,Link,Select,Link,Select,Link,Select,Link,Link,Date,Link,Check,Check +Info:,,,"One of: Open, Replied, Attempted to Contact, Contact in Future, Contacted, Interested, Not interested, Lead Lost, Converted","One of: LEAD, LEAD/10-11/, LEAD/MUMBAI/",,,"One of: Advertisement, Blog Post, Campaign, Call, Customer, Exhibition, Supplier, Website, Email",Valid Customer,Valid Campaign,,,,,,Valid Territory,"One of: Client, Channel Partner, Consultant",Valid Profile,"One of: Lower Income, Middle Income, Upper Income",Valid Industry Type,"One of: Product Enquiry, Request for Information, Suggestions, Other",Valid Quotation Lost Reason,Valid Profile,,Valid Company,0 or 1,0 or 1 +Start entering data below this line,,,,,,,,,,,,,,,,,,,,,,,,,, +,,Mart Lakeman,Passive,,Zany Brainy,MartLakeman@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Saga Lundqvist,Passive,,Patterson-Fletcher,SagaLundqvist@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,Adna Sjöberg,Passive,,Griff's Hamburgers,AdnaSjoberg@gustr.com,,,,,,,,,,,,,,,,,,,, +,,Ida Svendsen,Passive,,Rhodes Furniture,IdaDSvendsen@superrito.com,,,,,,,,,,,,,,,,,,,, +,,Emppu Hämeenniemi,Passive,,Burger Chef,EmppuHameenniemi@teleworm.us,,,,,,,,,,,,,,,,,,,, +,,Eugenio Pisano,Passive,,Stratabiz,EugenioPisano@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Semhar Hagos,Passive,,Home Quarters Warehouse,SemharHagos@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Branimira Ivanković,Passive,,Enviro Architectural Designs,BranimiraIvankovic@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Shelly Fields,Passive,,Ideal Garden Management,ShellyLFields@superrito.com,,,,,,,,,,,,,,,,,,,, +,,Leo Mikulić,Passive,,Listen Up,LeoMikulic@gustr.com,,,,,,,,,,,,,,,,,,,, +,,Denisa Jarošová,Passive,,I. Magnin,DenisaJarosova@teleworm.us,,,,,,,,,,,,,,,,,,,, +,,Janek Rutkowski,Passive,,First Rate Choice,JanekRutkowski@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,美月 宇藤,Passive,,Multi Tech Development,mm@gustr.com,,,,,,,,,,,,,,,,,,,, +,,Даниил Афанасьев,Passive,,National Auto Parts,dd@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Zorislav Petković,Passive,,Integra Investment Plan,ZorislavPetkovic@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Nanao Niwa,Passive,,The Lawn Guru,NanaoNiwa@superrito.com,,,,,,,,,,,,,,,,,,,, +,,Hreiðar Jörundsson,Passive,,Buena Vista Realty Service,HreiarJorundsson@armyspy.com,,,,,,,,,,,,,,,,,,,, +,,Lai Chu,Passive,,Bountiful Harvest Health Food Store,ChuThiBichLai@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Victor Aksakov,Passive,,P. Samuels Men's Clothiers,VictorAksakov@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,Saidalim Bisliev,Passive,,Vinyl Fever,SaidalimBisliev@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Totte Jakobsson,Passive,,Garden Master,TotteJakobsson@armyspy.com,,,,,,,,,,,,,,,,,,,, +,,Naná Armas,Passive,,Big Apple,NanaArmasRobles@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Walerian Duda,Passive,,Monk House Sales,WalerianDuda@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,Moarimikashi ,Passive,,ManCharm,Moarimikashi@teleworm.us,,,,,,,,,,,,,,,,,,,, +,,Dobromił Dąbrowski ,Passive,,Custom Lawn Care,DobromilDabrowski@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,Teigan Sinclair,Passive,,The Serendipity Dip,TeiganSinclair@gustr.com,,,,,,,,,,,,,,,,,,,, +,,Fahad Guirguis,Passive,,Cavages,FahadSaidGuirguis@gustr.com,,,,,,,,,,,,,,,,,,,, +,,Morten Olsen,Passive,,Gallenkamp,MortenJOlsen@armyspy.com,,,,,,,,,,,,,,,,,,,, +,,Christian Baecker,Passive,,Webcom Business Services,ChristianBaecker@armyspy.com,,,,,,,,,,,,,,,,,,,, +,,Sebastianus Dohmen,Passive,,Accord Investments,SebastianusDohmen@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Eero Koskinen,Passive,,American Appliance,EeroKoskinen@superrito.com,,,,,,,,,,,,,,,,,,,, +,,富奎 盧,Passive,,Bettendorf's,LuFuKui@teleworm.us,,,,,,,,,,,,,,,,,,,, +,,Milica Jelić,Passive,,House Of Denmark,MilicaJelic@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,Barbora Holubová,Passive,,10000 Auto Parts,BarboraHolubova@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Marta Kos,Passive,,Mages,MartaKos@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Simret Zula,Passive,,CSK Auto,SimretZula@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Kamil Chlubna,Passive,,Eagle Hardware & Garden,KamilChlubna@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Aceline Bolduc,Passive,,Rustler Steak House,AcelineBolduc@armyspy.com,,,,,,,,,,,,,,,,,,,, +,,Lucie Stupková,Passive,,ABCO Foods,LucieStupkova@gustr.com,,,,,,,,,,,,,,,,,,,, +,,Roland Solvik,Passive,,Trak Auto,RolandSolvik@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Mekirinzukushitakufu ,Passive,,Choices,Mekirinzukushitakufu@teleworm.us,,,,,,,,,,,,,,,,,,,, +,,Mukharbek Sultanovich,Passive,,Megatronic,MukharbekSultanovich@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Osman Amanuel,Passive,,Handy Dan,OsmanAmanuel@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,幸子 阪部,Passive,,Channel Home Centers,dd@armyspy.com,,,,,,,,,,,,,,,,,,,, +,,Masakazu Kamitani,Passive,,Honest Air Group,MasakazuKamitani@superrito.com,,,,,,,,,,,,,,,,,,,, +,,Omran Sabbagh,Passive,,Pleasures and Pasttimes,OmranNuhaidSabbagh@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Rikako Matsumura,Passive,,Lazysize,RikakoMatsumura@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Anayolisa Chukwukadibia,Passive,,Prestiga-Biz,AnayolisaChukwukadibia@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Gudmunda Hinna,Passive,,Childs Restaurants,GudmundaHinna@armyspy.com,,,,,,,,,,,,,,,,,,,, \ No newline at end of file diff --git a/utilities/demo/demo_docs/Price_List.csv b/utilities/demo/demo_docs/Price_List.csv deleted file mode 100644 index 1e0dcec7f9..0000000000 --- a/utilities/demo/demo_docs/Price_List.csv +++ /dev/null @@ -1,49 +0,0 @@ -Data Import Template,,,,,,,,,,, -Table:,Price List,,,,,,,,,, -,,,,,,,,,,, -,,,,,,,,,,, -Notes:,,,,,,,,,,, -Please do not change the template headings.,,,,,,,,,,, -First data column must be blank.,,,,,,,,,,, -"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,,,, -"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,,,, -Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,, -"For updating, you can update only selective columns.",,,,,,,,,,, -You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,, -,,,,,,,,,,, -DocType:,Price List,,,,~,Applicable Territory,valid_for_territories,~,Item Price,item_prices, -Column Labels:,ID,Price List Name,Currency,Valid for Buying or Selling?,,ID,Territory,,ID,Item Code,Rate -Column Name:,name,price_list_name,currency,buying_or_selling,~,name,territory,~,name,item_code,ref_rate -Mandatory:,Yes,Yes,Yes,Yes,,Yes,Yes,,Yes,Yes,Yes -Type:,Data (text),Data,Link,Select,,Data,Link,,Data,Link,Currency -Info:,,,Valid Currency,"One of: Buying, Selling",,Leave blank for new records,Valid Territory,,Leave blank for new records,Valid Item, -Start entering data below this line,,,,,,,,,,, -,Standard Buying,Standard Buying,USD,Buying,,,United States,,,Base Bearing Plate,15 -,,,,,,,,,,Base Plate,20 -,,,,,,,,,,Bearing Block,10 -,,,,,,,,,,Bearing Collar,20 -,,,,,,,,,,Bearing Pipe,15 -,,,,,,,,,,Blade Rib,10 -,,,,,,,,,,Disc Collars,74 -,,,,,,,,,,External Disc,45 -,,,,,,,,,,Internal Disc,33 -,,,,,,,,,,Shaft,30 -,,,,,,,,,,Stand,40 -,,,,,,,,,,Upper Bearing Plate,50 -,,,,,,,,,,Wing Sheet,22 -,Standard Selling,Standard Selling,USD,Selling,,,United States,,,Wind Turbine,21 -,,,,,,,,,,Wind Mill A Series,28 -,,,,,,,,,,Wind MIll C Series,14 -,,,,,,,,,,Base Bearing Plate,28 -,,,,,,,,,,Base Plate,21 -,,,,,,,,,,Bearing Block,14 -,,,,,,,,,,Bearing Collar,103.6 -,,,,,,,,,,Bearing Pipe,63 -,,,,,,,,,,Blade Rib,46.2 -,,,,,,,,,,Disc Collars,42 -,,,,,,,,,,External Disc,56 -,,,,,,,,,,Internal Disc,70 -,,,,,,,,,,Shaft,340 -,,,,,,,,,,Stand,400 -,,,,,,,,,,Upper Bearing Plate,300 -,,,,,,,,,,Wing Sheet,30.8 diff --git a/utilities/demo/make_demo.py b/utilities/demo/make_demo.py index 046e81a421..ea0fca6b98 100644 --- a/utilities/demo/make_demo.py +++ b/utilities/demo/make_demo.py @@ -151,7 +151,7 @@ def run_stock(current_date): if can_make("Delivery Note"): from selling.doctype.sales_order.sales_order import make_delivery_note from stock.stock_ledger import NegativeStockError - from stock.doctype.stock_ledger_entry.stock_ledger_entry import SerialNoRequiredError, SerialNoQtyError + from stock.doctype.serial_no.serial_no import SerialNoRequiredError, SerialNoQtyError report = "Ordered Items To Be Delivered" for so in list(set([r[0] for r in query_report.run(report)["result"] if r[0]!="Total"]))[:how_many("Delivery Note")]: dn = webnotes.bean(make_delivery_note(so)) @@ -382,7 +382,7 @@ def make_items(): import_data("BOM", submit=True) def make_price_lists(): - import_data("Price_List", overwrite=True) + import_data("Item_Price", overwrite=True) def make_customers_suppliers_contacts(): import_data(["Customer", "Supplier", "Contact", "Address", "Lead"]) From 3673a251767105d8e96530f6ff07a7f332a5a62a Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 4 Nov 2013 15:14:57 +0530 Subject: [PATCH 2/3] [minor] fixes after item price move --- patches/october_2013/p07_rename_for_territory.py | 5 +++-- .../p08_cleanup_after_item_price_module_change.py | 13 +++++++++++++ patches/patch_list.py | 1 + stock/doctype/item_price/item_price.py | 12 ++++++++---- stock/doctype/item_price/test_item_price.py | 6 +++--- 5 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 patches/october_2013/p08_cleanup_after_item_price_module_change.py diff --git a/patches/october_2013/p07_rename_for_territory.py b/patches/october_2013/p07_rename_for_territory.py index 2317002fe6..c4b674574c 100644 --- a/patches/october_2013/p07_rename_for_territory.py +++ b/patches/october_2013/p07_rename_for_territory.py @@ -14,8 +14,9 @@ def execute(): webnotes.reload_doc("setup", "doctype", "applicable_territory") - if os.path.exists("app/setup/doctype/for_territory"): - os.system("rm -rf app/setup/doctype/for_territory") + path = os.path.join(get_base_path(), "app", "setup", "doctype", "for_territory") + if os.path.exists(path): + os.system("rm -rf {path}".format(path=path)) if webnotes.conn.exists("DocType", "For Territory"): webnotes.delete_doc("DocType", "For Territory") \ No newline at end of file diff --git a/patches/october_2013/p08_cleanup_after_item_price_module_change.py b/patches/october_2013/p08_cleanup_after_item_price_module_change.py new file mode 100644 index 0000000000..4169d96b3e --- /dev/null +++ b/patches/october_2013/p08_cleanup_after_item_price_module_change.py @@ -0,0 +1,13 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes, os + +def execute(): + from webnotes.utils import get_base_path + + for dt in ("item_price", "price_list"): + path = os.path.join(get_base_path(), "app", "setup", "doctype", dt) + if os.path.exists(path): + os.system("rm -rf {path}".format(path=path)) \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index 67affb6de1..0cc393e02e 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -229,4 +229,5 @@ patch_list = [ "patches.october_2013.p06_update_control_panel_and_global_defaults", "patches.october_2013.p07_rename_for_territory", "patches.june_2013.p07_taxes_price_list_for_territory", + "patches.october_2013.p08_cleanup_after_item_price_module_change", ] \ No newline at end of file diff --git a/stock/doctype/item_price/item_price.py b/stock/doctype/item_price/item_price.py index be235de27c..b398326d02 100644 --- a/stock/doctype/item_price/item_price.py +++ b/stock/doctype/item_price/item_price.py @@ -7,7 +7,7 @@ from __future__ import unicode_literals import webnotes from webnotes import _ -class ItemPriceDuplicateItem(Exception): pass +class ItemPriceDuplicateItem(webnotes.ValidationError): pass class DocType: def __init__(self, d, dl): @@ -30,6 +30,10 @@ class DocType: if webnotes.conn.sql("""select name from `tabItem Price` where item_code=%s and price_list=%s and name!=%s""", (self.doc.item_code, self.doc.price_list, self.doc.name)): - webnotes.throw(_("Duplicate Item: ") + self.doc.item_code + - _(" already available in Price List: ") + self.doc.price_list, - ItemPriceDuplicateItem) \ No newline at end of file + webnotes.throw("{duplicate_item}: {item_code}, {already}: {price_list}".format(**{ + "duplicate_item": _("Duplicate Item"), + "item_code": self.doc.item_code, + "already": _("already available in Price List"), + "price_list": self.doc.price_list + }), ItemPriceDuplicateItem) + \ No newline at end of file diff --git a/stock/doctype/item_price/test_item_price.py b/stock/doctype/item_price/test_item_price.py index 43694da8fa..73b8a8ccec 100644 --- a/stock/doctype/item_price/test_item_price.py +++ b/stock/doctype/item_price/test_item_price.py @@ -4,12 +4,12 @@ from __future__ import unicode_literals import unittest import webnotes -from setup.doctype.item_price.item_price import ItemPriceDuplicateItem class TestItem(unittest.TestCase): def test_duplicate_item(self): - item_price = webnotes.bean(copy=test_records[0]) - self.assertRaises(ItemPriceDuplicateItem, item_price.insert) + from stock.doctype.item_price.item_price import ItemPriceDuplicateItem + bean = webnotes.bean(copy=test_records[0]) + self.assertRaises(ItemPriceDuplicateItem, bean.insert) test_records = [ [ From 4bfaaf33aae9f84921befa296877cc4fc6f4584f Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 4 Nov 2013 15:31:00 +0530 Subject: [PATCH 3/3] [minor] fix in patch --- patches/october_2013/p07_rename_for_territory.py | 4 +++- .../p08_cleanup_after_item_price_module_change.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/patches/october_2013/p07_rename_for_territory.py b/patches/october_2013/p07_rename_for_territory.py index c4b674574c..c7734837a0 100644 --- a/patches/october_2013/p07_rename_for_territory.py +++ b/patches/october_2013/p07_rename_for_territory.py @@ -5,6 +5,8 @@ from __future__ import unicode_literals import webnotes, os def execute(): + import shutil + webnotes.reload_doc("core", "doctype", "doctype") tables = webnotes.conn.sql_list("show tables") @@ -16,7 +18,7 @@ def execute(): path = os.path.join(get_base_path(), "app", "setup", "doctype", "for_territory") if os.path.exists(path): - os.system("rm -rf {path}".format(path=path)) + shutil.rmtree(path) if webnotes.conn.exists("DocType", "For Territory"): webnotes.delete_doc("DocType", "For Territory") \ No newline at end of file diff --git a/patches/october_2013/p08_cleanup_after_item_price_module_change.py b/patches/october_2013/p08_cleanup_after_item_price_module_change.py index 4169d96b3e..cbc1c86c8a 100644 --- a/patches/october_2013/p08_cleanup_after_item_price_module_change.py +++ b/patches/october_2013/p08_cleanup_after_item_price_module_change.py @@ -5,9 +5,10 @@ from __future__ import unicode_literals import webnotes, os def execute(): + import shutil from webnotes.utils import get_base_path for dt in ("item_price", "price_list"): path = os.path.join(get_base_path(), "app", "setup", "doctype", dt) if os.path.exists(path): - os.system("rm -rf {path}".format(path=path)) \ No newline at end of file + shutil.rmtree(path) \ No newline at end of file