Skip to content

Commit

Permalink
[IMP]Improve Code and add a csv file.
Browse files Browse the repository at this point in the history
bzr revid: vba@tinyerp.com-20121101111004-no023s4rzpze3i50
  • Loading branch information
vba-odoo committed Nov 1, 2012
1 parent deaae5d commit a45cdc6
Show file tree
Hide file tree
Showing 10 changed files with 249 additions and 39 deletions.
2 changes: 1 addition & 1 deletion addons/base_import/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
'category': 'Uncategorized',
'website': 'http://www.openerp.com',
'author': 'OpenERP SA',
'depends': ['base'],
'depends': ['base','web_kanban'],
'installable': True,
'auto_install': True,
'css': [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
External ID,Name,Parent Category/External ID
a1,Expenses,product.product_category_all
a2,Other Products,product.product_category_all
a3,Sellable Products,product.product_category_all
a4,Tables,a1
a5,Seating furniture,a2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
External ID,Name,Internal Reference,Category/External ID,Can be Expensed,Can be Purchased,Can be Sold,Sale Price,Cost,Supply Method,Product Type,Procurement Method
a6,Aluminum Stool,ALS,a5,False,True,True,49.00,25.00,Buy,Stockable Product,Make to Stock
a7,Chair,CHR,a5,False,True,True,89.00,40.00,Buy,Stockable Product,Make to Stock
a8,Table,TBL,a4,False,True,True,169.00,100.00,Buy,Stockable Product,Make to Stock
a9,Software Book Tutorial,SBT,a2,False,True,False,19.00,8.00,Buy,Consumable,Make to Stock
a10,Fuel,FL,a1,True,False,False,0.30,0.25,Buy,Service,Make to Stock
6 changes: 6 additions & 0 deletions addons/base_import/csv/Name_products.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Name,Internal Reference,Can be Expensed,Can be Purchased,Can be Sold,Sale Price,Cost,Supply Method,Product Type,Procurement Method
Aluminum Stool,ALS,False,True,True,49.00,25.00,Buy,Stockable Product,Make to Stock
Chair,CHR,False,True,True,89.00,40.00,Buy,Stockable Product,Make to Stock
Table,TBL,False,True,True,169.00,100.00,Buy,Stockable Product,Make to Stock
Software Book Tutorial,SBT,False,True,False,19.00,8.00,Buy,Consumable,Make to Stock
Fuel,FL,True,False,False,0.30,0.25,Buy,Service,Make to Stock
6 changes: 6 additions & 0 deletions addons/base_import/csv/m2m_customers_tags.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Name,Reference,Tags,Customer,Street,City,Country
Credit & Leasing,3,Services,True,Central Avenue 814,Johannesburg,South Africa
Services & Finance,5,"Consultancy Services,IT Services",True,Grove Road 5,London,United Kingdom
Hydra Supplies,6,"Manufacturer,Retailer",True,Palm Street 9,Los Angeles,United States
Bolts & Screws,8,"Wholesaler,Components Buyer",True,Rua Américo 1000,Campinas,Brazil
National Parts & Supplies,18,"Manufacturer,Wholesaler",True,Guangdong Way 20,Shenzen,China
10 changes: 10 additions & 0 deletions addons/base_import/csv/o2m_purchase_order_lines.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Order Date,Order Reference,Supplier,Destination,Pricelist,Order Lines / Product,Order Lines / Quantity
2012-12-15,PO00008,ASUSTeK,Stock,Default Purchase Pricelist,ADPT,20
,,,,,CARD,30
,,,,,C-Case,40
2012-12-15,PO00009,Axelor,Stock,Default Purchase Pricelist,CD,5
,,,,,CPUa8,15
2012-12-15,PO000010,China Export,Stock,Default Purchase Pricelist,HDD SH-1,10
,,,,,HDD SH-2,20
,,,,,LAP-CUS,35
,,,,,LAP-E5,40
8 changes: 8 additions & 0 deletions addons/base_import/csv/o2m_suppliers_contacts.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Name,Address type,Street,City,Country,Tags,Supplier,Customer,Is a company,Companies that refers to partner / Parent company
Wood y Wood Pecker,,"Snow Street, 25",Kainuu,Finland,Supplier,1,0,1,
Roger Pecker,Default,"Snow Street, 27",Kainuu,Finland,Supplier,1,0,0,Wood y Wood Pecker
Sharon Pecker,Delivery,"Snow Street, 28",Kainuu,Finland,Supplier,1,0,0,Wood y Wood Pecker
Thomas Pecker,Contact,"Snow Street, 27",Kainuu,Finland,Supplier,1,0,0,Wood y Wood Pecker
Vicking Direct,,"Atonium Street, 45a",Brussels,Belgium,Supplier,1,0,1,
Yvan Holiday,Invoice,"Atonium Street, 45b",Brussels,Belgium,Supplier,1,0,0,Vicking Direct
Jack Unsworth,Contact,"Atonium Street, 45a",Brussels,Belgium,Supplier,1,0,0,Vicking Direct
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"Order Reference","Supplier","Destination","Pricelist","Order Lines / Product","Order Lines / Quantity"
"PO000020","ASUSTeK","Stock","Default Purchase Pricelist","ADPT",20
,,,,"CARD",30
,,,,"C-Case",40
"PO000021","Axelor","Stock","Default Purchase Pricelist","CD",5
,,,,"CPUa8",15
2 changes: 1 addition & 1 deletion addons/base_import/static/src/js/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ openerp.base_import = function (instance) {

instance.web_kanban.KanbanView.prototype.import_enabled = true;
instance.web_kanban.KanbanView.include({
load_kanban: function (data) {
load_kanban: function () {
var self = this;
var add_button = false;
if (!this.$buttons) {
Expand Down
236 changes: 199 additions & 37 deletions addons/base_import/static/src/xml/import.xml

Large diffs are not rendered by default.

0 comments on commit a45cdc6

Please sign in to comment.