Merge lp:~apatel-serpentcs/openerp-usa/amazon_connector into lp:~faisal-basar/openerp-usa/Amazon-Connector
- amazon_connector
- Merge into Amazon-Connector
Proposed by
Serpent Consulting Services
Status: | Needs review |
---|---|
Proposed branch: | lp:~apatel-serpentcs/openerp-usa/amazon_connector |
Merge into: | lp:~faisal-basar/openerp-usa/Amazon-Connector |
Diff against target: |
515 lines (+139/-119) 12 files modified
__init__.py (+0/-2) __openerp__.py (+5/-4) amazon.py (+5/-3) amazon_view.xml (+38/-38) category_attribute.xml (+13/-15) invoice_stock.py (+11/-1) partner_view.xml (+2/-2) product_images_view.xml (+6/-5) product_view.xml (+41/-34) sale_view.xml (+13/-11) security/ir.model.access.csv (+2/-2) wizard/create_amazon_shop.py (+3/-2) |
To merge this branch: | bzr merge lp:~apatel-serpentcs/openerp-usa/amazon_connector |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Faisal | Approve | ||
Review via email: mp+176339@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 3. By Anu Patel(SerpentCS)
-
[IMP] Improved the Code.
Unmerged revisions
- 3. By Anu Patel(SerpentCS)
-
[IMP] Improved the Code.
- 2. By Anu Patel(SerpentCS)
-
[IMP] renamed the branch.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '__init__.py' | |||
2 | --- __init__.py 2012-05-08 11:49:19 +0000 | |||
3 | +++ __init__.py 2013-07-23 09:16:27 +0000 | |||
4 | @@ -10,5 +10,3 @@ | |||
5 | 10 | import wizard | 10 | import wizard |
6 | 11 | import invoice_stock | 11 | import invoice_stock |
7 | 12 | import product_images | 12 | import product_images |
8 | 13 | |||
9 | 14 | |||
10 | 15 | 13 | ||
11 | === modified file '__openerp__.py' | |||
12 | --- __openerp__.py 2012-05-08 11:49:19 +0000 | |||
13 | +++ __openerp__.py 2013-07-23 09:16:27 +0000 | |||
14 | @@ -2,15 +2,15 @@ | |||
15 | 2 | { | 2 | { |
16 | 3 | "name" : "Amazon e-commerce", | 3 | "name" : "Amazon e-commerce", |
17 | 4 | "version" : "1.0", | 4 | "version" : "1.0", |
19 | 5 | "depends" : ["base","product","sale",'base_sale_multichannels','product_images_olbs'], | 5 | "depends" : ["base","product","sale",'base_sale_multichannels','product_images'], |
20 | 6 | "author" : "Bista Solutions", | 6 | "author" : "Bista Solutions", |
21 | 7 | "description": """Amazon E-commerce management""", | 7 | "description": """Amazon E-commerce management""", |
22 | 8 | "website" : "http://www.bistasolutions.com/", | 8 | "website" : "http://www.bistasolutions.com/", |
23 | 9 | "category" : "Generic Modules", | 9 | "category" : "Generic Modules", |
24 | 10 | "init_xml" : [], | 10 | "init_xml" : [], |
25 | 11 | "demo_xml" : [], | 11 | "demo_xml" : [], |
28 | 12 | "update_xml" : [ | 12 | 'data': [ |
29 | 13 | 'security/ir.model.access.csv', | 13 | 'security/ir.model.access.csv', |
30 | 14 | 'amazon_view.xml', | 14 | 'amazon_view.xml', |
31 | 15 | 'product_view.xml', | 15 | 'product_view.xml', |
32 | 16 | 'partner_view.xml', | 16 | 'partner_view.xml', |
33 | @@ -21,7 +21,8 @@ | |||
34 | 21 | 'category_attribute.xml', | 21 | 'category_attribute.xml', |
35 | 22 | 'wizard/amazon_product_lookup.xml', | 22 | 'wizard/amazon_product_lookup.xml', |
36 | 23 | 'product_images_view.xml', | 23 | 'product_images_view.xml', |
38 | 24 | 'magento_sale.xml' | 24 | 'magento_sale.xml', |
39 | 25 | |||
40 | 25 | ], | 26 | ], |
41 | 26 | "active": False, | 27 | "active": False, |
42 | 27 | "installable": True, | 28 | "installable": True, |
43 | 28 | 29 | ||
44 | === modified file 'amazon.py' | |||
45 | --- amazon.py 2012-05-08 11:49:19 +0000 | |||
46 | +++ amazon.py 2013-07-23 09:16:27 +0000 | |||
47 | @@ -106,7 +106,8 @@ | |||
48 | 106 | postalcode = resultvals['PostalCode'] | 106 | postalcode = resultvals['PostalCode'] |
49 | 107 | else: | 107 | else: |
50 | 108 | postalcode = '' | 108 | postalcode = '' |
52 | 109 | address_id = self.pool.get('res.partner.address').search(cr,uid, [('country_id','=',country_id),('state_id','=',state_id),('city','=',city),('street','=',street),('zip','=',postalcode)]) | 109 | address_id = self.pool.get('res.partner').search(cr,uid, [('country_id','=',country_id),('state_id','=',state_id),('city','=',city),('street','=',street),('zip','=',postalcode)]) |
53 | 110 | # address_id = self.pool.get('res.partner.address').search(cr,uid, [('country_id','=',country_id),('state_id','=',state_id),('city','=',city),('street','=',street),('zip','=',postalcode)]) | ||
54 | 110 | if address_id: | 111 | if address_id: |
55 | 111 | address_id = address_id | 112 | address_id = address_id |
56 | 112 | if not address_id: | 113 | if not address_id: |
57 | @@ -118,10 +119,11 @@ | |||
58 | 118 | 'phone' : resultvals.get('Phone',False) and resultvals['Phone'] or False, | 119 | 'phone' : resultvals.get('Phone',False) and resultvals['Phone'] or False, |
59 | 119 | 'zip' : postalcode, | 120 | 'zip' : postalcode, |
60 | 120 | 'state_id' : state_id, | 121 | 'state_id' : state_id, |
62 | 121 | 'partner_id' : part_id, | 122 | # 'partner_id' : part_id, |
63 | 122 | 'type' : 'default', | 123 | 'type' : 'default', |
64 | 123 | } | 124 | } |
66 | 124 | address_id = self.pool.get('res.partner.address').create(cr,uid,addressvals) | 125 | address_id = self.pool.get('res.partner').create(cr,uid,addressvals) |
67 | 126 | # address_id = self.pool.get('res.partner.address').create(cr,uid,addressvals) | ||
68 | 125 | return address_id | 127 | return address_id |
69 | 126 | 128 | ||
70 | 127 | def updatePartner(self, cr, uid, id, shop_id, resultvals, part_id=0, context={}): | 129 | def updatePartner(self, cr, uid, id, shop_id, resultvals, part_id=0, context={}): |
71 | 128 | 130 | ||
72 | === modified file 'amazon_view.xml' | |||
73 | --- amazon_view.xml 2012-05-08 11:49:19 +0000 | |||
74 | +++ amazon_view.xml 2013-07-23 09:16:27 +0000 | |||
75 | @@ -3,42 +3,42 @@ | |||
76 | 3 | <data> | 3 | <data> |
77 | 4 | <!-- Amazon Form --> | 4 | <!-- Amazon Form --> |
78 | 5 | <record id="amazon_instance_form_view" model="ir.ui.view"> | 5 | <record id="amazon_instance_form_view" model="ir.ui.view"> |
81 | 6 | <field name="name">amazon.instance.form</field> | 6 | <field name="name">amazon.instance.form</field> |
80 | 7 | <field name="type">form</field> | ||
82 | 8 | <field name="model">amazon.instance</field> | 7 | <field name="model">amazon.instance</field> |
83 | 9 | <field name="arch" type="xml"> | 8 | <field name="arch" type="xml"> |
102 | 10 | <form string="Amazon Instance"> | 9 | <form string="Amazon Instance" version="7.0"> |
103 | 11 | <group colspan="4"> | 10 | <sheet> |
104 | 12 | <field name="name" colspan="4" select="1"/> | 11 | <group colspan="4"> |
105 | 13 | </group> | 12 | <field name="name" colspan="4" select="1"/> |
106 | 14 | <notebook colspan="4"> | 13 | </group> |
107 | 15 | <page string="Authentication"> | 14 | <notebook colspan="4"> |
108 | 16 | <group colspan="4" col="4"> | 15 | <page string="Authentication"> |
109 | 17 | <separator string="Amazon Seller Account Credentials" colspan="4"/> | 16 | <group colspan="4" col="4"> |
110 | 18 | <field name="aws_access_key_id"/> | 17 | <separator string="Amazon Seller Account Credentials" colspan="4"/> |
111 | 19 | <field name="aws_secret_access_key"/> | 18 | <field name="aws_access_key_id"/> |
112 | 20 | <field name="aws_market_place_id"/> | 19 | <field name="aws_secret_access_key"/> |
113 | 21 | <field name="aws_merchant_id"/> | 20 | <field name="aws_market_place_id"/> |
114 | 22 | 21 | <field name="aws_merchant_id"/> | |
115 | 23 | </group> | 22 | |
116 | 24 | <!--<button name="import_cat" string="Import Categories" colspan="4" type="object" />--> | 23 | </group> |
117 | 25 | </page> | 24 | <!--<button name="import_cat" string="Import Categories" colspan="4" type="object" />--> |
118 | 26 | </notebook> | 25 | </page> |
119 | 27 | </form> | 26 | </notebook> |
120 | 27 | </sheet> | ||
121 | 28 | </form> | ||
122 | 28 | </field> | 29 | </field> |
123 | 29 | </record> | 30 | </record> |
124 | 30 | 31 | ||
125 | 31 | <record model="ir.ui.view" id="view_patient_info_tree"> | 32 | <record model="ir.ui.view" id="view_patient_info_tree"> |
127 | 32 | <field name="name">amazon.instance.tree</field> | 33 | <field name="name">amazon.instance.tree</field> |
128 | 33 | <field name="model">amazon.instance</field> | 34 | <field name="model">amazon.instance</field> |
129 | 34 | <field name="type">tree</field> | ||
130 | 35 | <field name="arch" type="xml"> | 35 | <field name="arch" type="xml"> |
133 | 36 | <tree string="Amazon Instance"> | 36 | <tree string="Amazon Instance"> |
134 | 37 | <field name="name"/> | 37 | <field name="name"/> |
135 | 38 | <field name="aws_access_key_id"/> | 38 | <field name="aws_access_key_id"/> |
139 | 39 | <field name="aws_secret_access_key"/> | 39 | <field name="aws_secret_access_key"/> |
140 | 40 | <field name="aws_market_place_id"/> | 40 | <field name="aws_market_place_id"/> |
141 | 41 | <field name="aws_merchant_id"/> | 41 | <field name="aws_merchant_id"/> |
142 | 42 | </tree> | 42 | </tree> |
143 | 43 | </field> | 43 | </field> |
144 | 44 | </record> | 44 | </record> |
145 | @@ -57,27 +57,27 @@ | |||
146 | 57 | <!-- Amazon Browse Nodes Form,Tree Menu Action by safan--> | 57 | <!-- Amazon Browse Nodes Form,Tree Menu Action by safan--> |
147 | 58 | <record id="amazon_browse_node_form_view" model="ir.ui.view"> | 58 | <record id="amazon_browse_node_form_view" model="ir.ui.view"> |
148 | 59 | <field name="name">amazon.browse.node.form</field> | 59 | <field name="name">amazon.browse.node.form</field> |
149 | 60 | <field name="type">form</field> | ||
150 | 61 | <field name="model">amazon.browse.node</field> | 60 | <field name="model">amazon.browse.node</field> |
151 | 62 | <field name="arch" type="xml"> | 61 | <field name="arch" type="xml"> |
159 | 63 | <form string="Amazon Browse Node"> | 62 | <form string="Amazon Browse Node" version="7.0"> |
160 | 64 | <group colspan="4"> | 63 | <sheet> |
161 | 65 | <field name="browse_node_name" colspan="4" select="1"/> | 64 | <group colspan="4"> |
162 | 66 | <separator string="Available Browse Node Country" colspan="4"/> | 65 | <field name="browse_node_name" colspan="4" select="1"/> |
163 | 67 | <newline/> | 66 | <separator string="Available Browse Node Country" colspan="4"/> |
164 | 68 | <field name="browse_node_country" nolabel="1" colspan="4" domain="[('code','in',['US','GB','JP','IT','FR','ES','DE','CN','CA'])]"/> | 67 | <newline/> |
165 | 69 | </group> | 68 | <field name="browse_node_country" nolabel="1" colspan="4" domain="[('code','in',['US','GB','JP','IT','FR','ES','DE','CN','CA'])]"/> |
166 | 69 | </group> | ||
167 | 70 | </sheet> | ||
168 | 70 | </form> | 71 | </form> |
169 | 71 | </field> | 72 | </field> |
170 | 72 | </record> | 73 | </record> |
171 | 73 | 74 | ||
172 | 74 | <record model="ir.ui.view" id="view_browse_node_info_tree"> | 75 | <record model="ir.ui.view" id="view_browse_node_info_tree"> |
174 | 75 | <field name="name">amazon.browse.node.tree</field> | 76 | <field name="name">amazon.browse.node.tree</field> |
175 | 76 | <field name="model">amazon.browse.node</field> | 77 | <field name="model">amazon.browse.node</field> |
176 | 77 | <field name="type">tree</field> | ||
177 | 78 | <field name="arch" type="xml"> | 78 | <field name="arch" type="xml"> |
178 | 79 | <tree string="Amazon Browse Node"> | 79 | <tree string="Amazon Browse Node"> |
180 | 80 | <field name="browse_node_name"/> | 80 | <field name="browse_node_name"/> |
181 | 81 | </tree> | 81 | </tree> |
182 | 82 | </field> | 82 | </field> |
183 | 83 | </record> | 83 | </record> |
184 | 84 | 84 | ||
185 | === modified file 'category_attribute.xml' | |||
186 | --- category_attribute.xml 2012-05-08 11:49:19 +0000 | |||
187 | +++ category_attribute.xml 2013-07-23 09:16:27 +0000 | |||
188 | @@ -6,27 +6,27 @@ | |||
189 | 6 | <record id="view_category_attributes_form_amazon" model="ir.ui.view"> | 6 | <record id="view_category_attributes_form_amazon" model="ir.ui.view"> |
190 | 7 | <field name="name">view.category.attributes.form.amazon</field> | 7 | <field name="name">view.category.attributes.form.amazon</field> |
191 | 8 | <field name="model">amazon.category</field> | 8 | <field name="model">amazon.category</field> |
192 | 9 | <field name="type">form</field> | ||
193 | 10 | <field name="arch" type="xml"> | 9 | <field name="arch" type="xml"> |
199 | 11 | <form string="Amazon Categories"> | 10 | <form string="Amazon Categories" version="7.0"> |
200 | 12 | <field name="name" /> | 11 | <sheet> |
201 | 13 | 12 | <field name="name" /> | |
202 | 14 | <field name="amazon_attribute_ids" colspan="8"/> | 13 | <field name="amazon_attribute_ids" colspan="8"/> |
203 | 15 | 14 | </sheet> | |
204 | 16 | </form> | 15 | </form> |
205 | 17 | </field> | 16 | </field> |
206 | 18 | <!-- For Categories Master Tree View--> | ||
207 | 19 | </record> | 17 | </record> |
208 | 18 | |||
209 | 19 | <!-- For Categories Master Tree View--> | ||
210 | 20 | <record id="view_category_attributes_tree_amazon" model="ir.ui.view"> | 20 | <record id="view_category_attributes_tree_amazon" model="ir.ui.view"> |
211 | 21 | <field name="name">view.category.attributes.tree_amazon</field> | 21 | <field name="name">view.category.attributes.tree_amazon</field> |
212 | 22 | <field name="model">amazon.category</field> | 22 | <field name="model">amazon.category</field> |
213 | 23 | <field name="type">tree</field> | ||
214 | 24 | <field name="arch" type="xml"> | 23 | <field name="arch" type="xml"> |
215 | 25 | <tree string="Amazon Categories"> | 24 | <tree string="Amazon Categories"> |
216 | 26 | <field name="name" /> | 25 | <field name="name" /> |
217 | 27 | </tree> | 26 | </tree> |
218 | 28 | </field> | 27 | </field> |
219 | 29 | </record> | 28 | </record> |
220 | 29 | |||
221 | 30 | <!-- Action for the categories master--> | 30 | <!-- Action for the categories master--> |
222 | 31 | <record id="action_amazon_category_master" model="ir.actions.act_window"> | 31 | <record id="action_amazon_category_master" model="ir.actions.act_window"> |
223 | 32 | <field name="name">Amazon Categories</field> | 32 | <field name="name">Amazon Categories</field> |
224 | @@ -35,17 +35,17 @@ | |||
225 | 35 | <field name="view_mode">tree,form</field> | 35 | <field name="view_mode">tree,form</field> |
226 | 36 | <field name="view_id" ref="view_category_attributes_tree_amazon"/> | 36 | <field name="view_id" ref="view_category_attributes_tree_amazon"/> |
227 | 37 | </record> | 37 | </record> |
228 | 38 | |||
229 | 38 | <!--<menuitem id="menu_amazon_category" name="Categories" parent="menu_amazon_category_master" action="action_amazon_category_master" />--> | 39 | <!--<menuitem id="menu_amazon_category" name="Categories" parent="menu_amazon_category_master" action="action_amazon_category_master" />--> |
230 | 39 | <!--for Attributes Master Form View --> | 40 | <!--for Attributes Master Form View --> |
231 | 40 | <record id="view_amazon_attributes_form" model="ir.ui.view"> | 41 | <record id="view_amazon_attributes_form" model="ir.ui.view"> |
232 | 41 | <field name="name">view.amazon.attributes.form</field> | 42 | <field name="name">view.amazon.attributes.form</field> |
233 | 42 | <field name="model">amazon.attribute</field> | 43 | <field name="model">amazon.attribute</field> |
234 | 43 | <field name="type">form</field> | ||
235 | 44 | <field name="arch" type="xml"> | 44 | <field name="arch" type="xml"> |
240 | 45 | <form string="Attributes"> | 45 | <form string="Attributes" version="7.0"> |
241 | 46 | <field name="name" colspan="2"/> | 46 | <sheet> |
242 | 47 | 47 | <field name="name" colspan="2"/> | |
243 | 48 | 48 | </sheet> | |
244 | 49 | </form> | 49 | </form> |
245 | 50 | </field> | 50 | </field> |
246 | 51 | </record> | 51 | </record> |
247 | @@ -53,11 +53,9 @@ | |||
248 | 53 | <record id="view_amazon_attributes_tree" model="ir.ui.view"> | 53 | <record id="view_amazon_attributes_tree" model="ir.ui.view"> |
249 | 54 | <field name="name">view.amazon.attributes.tree</field> | 54 | <field name="name">view.amazon.attributes.tree</field> |
250 | 55 | <field name="model">amazon.attribute</field> | 55 | <field name="model">amazon.attribute</field> |
251 | 56 | <field name="type">tree</field> | ||
252 | 57 | <field name="arch" type="xml"> | 56 | <field name="arch" type="xml"> |
253 | 58 | <tree string="Attributes"> | 57 | <tree string="Attributes"> |
254 | 59 | <field name="name" /> | 58 | <field name="name" /> |
255 | 60 | |||
256 | 61 | </tree> | 59 | </tree> |
257 | 62 | </field> | 60 | </field> |
258 | 63 | </record> | 61 | </record> |
259 | 64 | 62 | ||
260 | === modified file 'invoice_stock.py' | |||
261 | --- invoice_stock.py 2012-05-08 11:49:19 +0000 | |||
262 | +++ invoice_stock.py 2013-07-23 09:16:27 +0000 | |||
263 | @@ -100,7 +100,17 @@ | |||
264 | 100 | 100 | ||
265 | 101 | class stock_partial_picking(osv.osv_memory): | 101 | class stock_partial_picking(osv.osv_memory): |
266 | 102 | _inherit = 'stock.partial.picking' | 102 | _inherit = 'stock.partial.picking' |
268 | 103 | 103 | ||
269 | 104 | def get_picking_type(self, cr, uid, picking, context=None): | ||
270 | 105 | picking_type = picking.type | ||
271 | 106 | for move in picking.move_lines: | ||
272 | 107 | if picking.type == 'in' and move.product_id.cost_method == 'average': | ||
273 | 108 | picking_type = 'in' | ||
274 | 109 | break | ||
275 | 110 | else: | ||
276 | 111 | picking_type = 'out' | ||
277 | 112 | return picking_type | ||
278 | 113 | |||
279 | 104 | def do_partial(self, cr, uid, ids, context=None): | 114 | def do_partial(self, cr, uid, ids, context=None): |
280 | 105 | """ Makes partial moves and pickings done. | 115 | """ Makes partial moves and pickings done. |
281 | 106 | @param self: The object pointer. | 116 | @param self: The object pointer. |
282 | 107 | 117 | ||
283 | === modified file 'partner_view.xml' | |||
284 | --- partner_view.xml 2012-05-08 11:49:19 +0000 | |||
285 | +++ partner_view.xml 2013-07-23 09:16:27 +0000 | |||
286 | @@ -7,7 +7,7 @@ | |||
287 | 7 | <field name="type">form</field> | 7 | <field name="type">form</field> |
288 | 8 | <field name="inherit_id" ref="base.view_partner_form" /> | 8 | <field name="inherit_id" ref="base.view_partner_form" /> |
289 | 9 | <field name="arch" type="xml"> | 9 | <field name="arch" type="xml"> |
291 | 10 | <xpath expr="/form/notebook" position="inside"> | 10 | <xpath expr="/form/sheet/notebook" position="inside"> |
292 | 11 | <page string="Amazon Information"> | 11 | <page string="Amazon Information"> |
293 | 12 | <separator string="Amazon Shops" colspan="4" /> | 12 | <separator string="Amazon Shops" colspan="4" /> |
294 | 13 | <field colspan="4" name="amazon_shop_ids" nolabel="1" widget="one2many_list"> | 13 | <field colspan="4" name="amazon_shop_ids" nolabel="1" widget="one2many_list"> |
295 | @@ -16,7 +16,7 @@ | |||
296 | 16 | </tree> | 16 | </tree> |
297 | 17 | </field> | 17 | </field> |
298 | 18 | </page> | 18 | </page> |
300 | 19 | </xpath> | 19 | </xpath> |
301 | 20 | </field> | 20 | </field> |
302 | 21 | </record> | 21 | </record> |
303 | 22 | </data> | 22 | </data> |
304 | 23 | 23 | ||
305 | === modified file 'product_images_view.xml' | |||
306 | --- product_images_view.xml 2012-05-08 11:49:19 +0000 | |||
307 | +++ product_images_view.xml 2013-07-23 09:16:27 +0000 | |||
308 | @@ -4,13 +4,14 @@ | |||
309 | 4 | <record id="view_images_prod_amazon" model="ir.ui.view"> | 4 | <record id="view_images_prod_amazon" model="ir.ui.view"> |
310 | 5 | <field name="name">view.images.prod.amazon</field> | 5 | <field name="name">view.images.prod.amazon</field> |
311 | 6 | <field name="model">product.images</field> | 6 | <field name="model">product.images</field> |
314 | 7 | <field name="type">form</field> | 7 | <field name="inherit_id" ref="product_images.view_product_image_form" /> |
313 | 8 | <field name="inherit_id" ref="product_images_olbs.view_product_image_form" /> | ||
315 | 9 | <field name="arch" type="xml"> | 8 | <field name="arch" type="xml"> |
317 | 10 | <xpath expr="/form/notebook" position="inside" > | 9 | <xpath expr="/form/sheet/notebook" position="inside" > |
318 | 11 | <page string="Amazon Images"> | 10 | <page string="Amazon Images"> |
321 | 12 | <field name="amazon_url_location"/> | 11 | <group> |
322 | 13 | <field name="preview_amazon" widget="image"/> | 12 | <field name="amazon_url_location"/> |
323 | 13 | <field name="preview_amazon" widget="image"/> | ||
324 | 14 | </group> | ||
325 | 14 | </page> | 15 | </page> |
326 | 15 | </xpath> | 16 | </xpath> |
327 | 16 | </field> | 17 | </field> |
328 | 17 | 18 | ||
329 | === modified file 'product_view.xml' | |||
330 | --- product_view.xml 2012-05-08 11:49:19 +0000 | |||
331 | +++ product_view.xml 2013-07-23 09:16:27 +0000 | |||
332 | @@ -4,44 +4,51 @@ | |||
333 | 4 | <record id="product_amazon_form_view" model="ir.ui.view"> | 4 | <record id="product_amazon_form_view" model="ir.ui.view"> |
334 | 5 | <field name="name">product.amazon.form.inherit</field> | 5 | <field name="name">product.amazon.form.inherit</field> |
335 | 6 | <field name="model">product.product</field> | 6 | <field name="model">product.product</field> |
336 | 7 | <field name="type">form</field> | ||
337 | 8 | <field name="inherit_id" ref="product.product_normal_form_view"/> | 7 | <field name="inherit_id" ref="product.product_normal_form_view"/> |
338 | 9 | <field name="arch" type="xml"> | 8 | <field name="arch" type="xml"> |
339 | 10 | <notebook position="inside"> | 9 | <notebook position="inside"> |
340 | 11 | <page string="Amazon Details"> | 10 | <page string="Amazon Details"> |
374 | 12 | <separator string="Amazon Details" colspan="8"/> | 11 | <group> |
375 | 13 | <field name="amazon_export"/> | 12 | <separator string="Amazon Details" colspan="8"/> |
376 | 14 | <!--<field name="amazon_sku" attrs="{'readonly':[('amazon_prod_status','in',('inactive','active'))]}"/>--> | 13 | <group col="4" colspan="4"> |
377 | 15 | <newline/> | 14 | <field name="amazon_export"/> |
378 | 16 | <field name="amazon_sku" attrs="{'readonly':[('amazon_prod_status','in',('inactive','active'))]}"/> | 15 | <!--<field name="amazon_sku" attrs="{'readonly':[('amazon_prod_status','in',('inactive','active'))]}"/>--> |
379 | 17 | <field name="amazon_asin"/> | 16 | <newline/> |
380 | 18 | <newline/> | 17 | <field name="amazon_sku" attrs="{'readonly':[('amazon_prod_status','in',('inactive','active'))]}"/> |
381 | 19 | <field name="amzn_condtn" colspan="2" /> | 18 | <field name="amazon_asin"/> |
382 | 20 | <field name="condition_note" colspan="4" attrs="{'invisible':[('amzn_condtn','=','')]}"/> | 19 | <newline/> |
383 | 21 | <field name="amz_type" on_change="onchange_amz_type(amz_type)"/> | 20 | <field name="amzn_condtn" colspan="2" /> |
384 | 22 | <field name="amz_type_value" attrs="{'required':[('amz_type','in',('UPC','EAN','ASIN','ISBN'))]}"/> | 21 | <field name="condition_note" attrs="{'invisible':[('amzn_condtn','=','')]}"/> |
385 | 23 | <!--<field name="amazon_category" colspan="2" attrs="{'required':[('amazon_export','=',True)]}"/>--> | 22 | <field name="amz_type" on_change="onchange_amz_type(amz_type)"/> |
386 | 24 | <field name="amazon_category" colspan="2" invisible="1"/> | 23 | <field name="amz_type_value" attrs="{'required':[('amz_type','in',('UPC','EAN','ASIN','ISBN'))]}"/> |
387 | 25 | <separator string="Submit Feed Details" colspan="8"/> | 24 | <!--<field name="amazon_category" colspan="2" attrs="{'required':[('amazon_export','=',True)]}"/>--> |
388 | 26 | <field name="amazon_prod_status" invisible="1"/> | 25 | <field name="amazon_category" colspan="2" invisible="1"/> |
389 | 27 | <field name="operation_performed" invisible="1"/> | 26 | </group> |
390 | 28 | <field name="submit_feed_result" colspan="4"/> | 27 | <separator string="Submit Feed Details" colspan="8"/> |
391 | 29 | <separator string="Product Lookup" colspan="8"/> | 28 | <group col="4" colspan="4"> |
392 | 30 | <field name="prod_query" colspan="4"/> | 29 | <field name="amazon_prod_status" invisible="1"/> |
393 | 31 | <field name="prod_query_contextid"/> | 30 | <field name="operation_performed" invisible="1"/> |
394 | 32 | <field name="amazon_instance_id"/> | 31 | <field name="submit_feed_result" colspan="4"/> |
395 | 33 | <button name="amazon_product_lookup" string="Perform Amazon Product Search" colspan="2" type="object" /> | 32 | </group> |
396 | 34 | <!--<button name="amazon_product_by_salesrank" string="Perform Sales Rank Operation" colspan="2" type="object" />--> | 33 | <separator string="Product Lookup" colspan="8"/> |
397 | 35 | <!--<button name="amazon_submit_feed" string="Submit Feed" colspan="4" type="object" />--> | 34 | <group col="4" colspan="4"> |
398 | 36 | <field name="amazon_products_ids" colspan="4" nolabel="1" mode="tree"> | 35 | <field name="prod_query" colspan="4"/> |
399 | 37 | <tree string="Amazon Products"> | 36 | <field name="prod_query_contextid"/> |
400 | 38 | <field name="name" /> | 37 | <field name="amazon_instance_id"/> |
401 | 39 | <field name="product_asin" /> | 38 | <button name="amazon_product_lookup" string="Perform Amazon Product Search" colspan="2" type="object" /> |
402 | 40 | <field name="product_category" /> | 39 | <!--<button name="amazon_product_by_salesrank" string="Perform Sales Rank Operation" colspan="2" type="object" />--> |
403 | 41 | <field name="product_id" /> | 40 | <!--<button name="amazon_submit_feed" string="Submit Feed" colspan="4" type="object" />--> |
404 | 42 | <button name="action_process_amazon_details" string="View Amazon Product" icon="gtk-go-forward" type="object" /> | 41 | </group> |
405 | 43 | </tree> | 42 | <field name="amazon_products_ids" colspan="4" nolabel="1" mode="tree"> |
406 | 44 | </field> | 43 | <tree string="Amazon Products"> |
407 | 44 | <field name="name" /> | ||
408 | 45 | <field name="product_asin" /> | ||
409 | 46 | <field name="product_category" /> | ||
410 | 47 | <field name="product_id" /> | ||
411 | 48 | <button name="action_process_amazon_details" string="View Amazon Product" icon="gtk-go-forward" type="object" /> | ||
412 | 49 | </tree> | ||
413 | 50 | </field> | ||
414 | 51 | </group> | ||
415 | 45 | </page> | 52 | </page> |
416 | 46 | </notebook> | 53 | </notebook> |
417 | 47 | </field> | 54 | </field> |
418 | 48 | 55 | ||
419 | === modified file 'sale_view.xml' | |||
420 | --- sale_view.xml 2012-05-08 11:49:19 +0000 | |||
421 | +++ sale_view.xml 2013-07-23 09:16:27 +0000 | |||
422 | @@ -7,7 +7,6 @@ | |||
423 | 7 | <field name="type">form</field> | 7 | <field name="type">form</field> |
424 | 8 | <field name="inherit_id" ref="base_sale_multichannels.base_sale_multichannels_view_shop_form"/> | 8 | <field name="inherit_id" ref="base_sale_multichannels.base_sale_multichannels_view_shop_form"/> |
425 | 9 | <field name="arch" type="xml"> | 9 | <field name="arch" type="xml"> |
426 | 10 | <data> | ||
427 | 11 | <field name="company_id" widget='selection' groups="base.group_multi_company" position="after"> | 10 | <field name="company_id" widget='selection' groups="base.group_multi_company" position="after"> |
428 | 12 | <field name="amazon_instance_id" attrs="{'invisible':[('amazon_shop','=',False)]}" /> | 11 | <field name="amazon_instance_id" attrs="{'invisible':[('amazon_shop','=',False)]}" /> |
429 | 13 | </field> | 12 | </field> |
430 | @@ -36,11 +35,12 @@ | |||
431 | 36 | </group> | 35 | </group> |
432 | 37 | </page> | 36 | </page> |
433 | 38 | <page string="Amazon Information" attrs="{'invisible':[('amazon_shop','=',False)]}"> | 37 | <page string="Amazon Information" attrs="{'invisible':[('amazon_shop','=',False)]}"> |
436 | 39 | <field name="amazon_shop" /> | 38 | <group> |
437 | 40 | <field name="auto_import_amazon" /> | 39 | <field name="amazon_shop" /> |
438 | 40 | <field name="auto_import_amazon" /> | ||
439 | 41 | </group> | ||
440 | 41 | </page> | 42 | </page> |
441 | 42 | </xpath> | 43 | </xpath> |
442 | 43 | </data> | ||
443 | 44 | </field> | 44 | </field> |
444 | 45 | </record> | 45 | </record> |
445 | 46 | <record id="act_amazonerp_shop_form" model="ir.actions.act_window"> | 46 | <record id="act_amazonerp_shop_form" model="ir.actions.act_window"> |
446 | @@ -56,19 +56,22 @@ | |||
447 | 56 | <record id="adding_policy_view" model="ir.ui.view"> | 56 | <record id="adding_policy_view" model="ir.ui.view"> |
448 | 57 | <field name="name">adding.policy.view</field> | 57 | <field name="name">adding.policy.view</field> |
449 | 58 | <field name="model">sale.shop</field> | 58 | <field name="model">sale.shop</field> |
450 | 59 | <field name="type">form</field> | ||
451 | 60 | <field name="inherit_id" ref="base_sale_multichannels.base_sale_multichannels_view_shop_form"/> | 59 | <field name="inherit_id" ref="base_sale_multichannels.base_sale_multichannels_view_shop_form"/> |
452 | 61 | <field name="arch" type="xml"> | 60 | <field name="arch" type="xml"> |
453 | 62 | <xpath expr="/form/notebook" position="inside"> | 61 | <xpath expr="/form/notebook" position="inside"> |
454 | 63 | <page string="Other Information" attrs="{'invisible':[('amazon_shop','=',False)]}"> | 62 | <page string="Other Information" attrs="{'invisible':[('amazon_shop','=',False)]}"> |
459 | 64 | <field name="amazon_picking_policy"/> | 63 | <group> |
460 | 65 | 64 | <field name="amazon_picking_policy"/> | |
461 | 66 | <field name="amazon_order_policy"/> | 65 | |
462 | 67 | <field name="amazon_invoice_quantity"/> | 66 | <field name="amazon_order_policy"/> |
463 | 67 | <field name="amazon_invoice_quantity"/> | ||
464 | 68 | </group> | ||
465 | 68 | </page> | 69 | </page> |
466 | 69 | <page string="Amazon Exportable Products" attrs="{'invisible':[('amazon_shop','=',False)]}"> | 70 | <page string="Amazon Exportable Products" attrs="{'invisible':[('amazon_shop','=',False)]}"> |
467 | 71 | <group> | ||
468 | 70 | <field name="amazon_exportable_product_ids" nolabel="1" colspan="4"/> | 72 | <field name="amazon_exportable_product_ids" nolabel="1" colspan="4"/> |
470 | 71 | </page> | 73 | </group> |
471 | 74 | </page> | ||
472 | 72 | </xpath> | 75 | </xpath> |
473 | 73 | </field> | 76 | </field> |
474 | 74 | </record> | 77 | </record> |
475 | @@ -77,7 +80,6 @@ | |||
476 | 77 | <record id="view_amazon_shop_search" model="ir.ui.view"> | 80 | <record id="view_amazon_shop_search" model="ir.ui.view"> |
477 | 78 | <field name="name">view.amazon.shop.search</field> | 81 | <field name="name">view.amazon.shop.search</field> |
478 | 79 | <field name="model">sale.shop</field> | 82 | <field name="model">sale.shop</field> |
479 | 80 | <field name="type">search</field> | ||
480 | 81 | <field name="arch" type="xml"> | 83 | <field name="arch" type="xml"> |
481 | 82 | <search string="Sale Shop"> | 84 | <search string="Sale Shop"> |
482 | 83 | <field name="name"/> | 85 | <field name="name"/> |
483 | 84 | 86 | ||
484 | === modified file 'security/ir.model.access.csv' | |||
485 | --- security/ir.model.access.csv 2012-05-08 11:49:19 +0000 | |||
486 | +++ security/ir.model.access.csv 2013-07-23 09:16:27 +0000 | |||
487 | @@ -1,2 +1,2 @@ | |||
490 | 1 | "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" | 1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
491 | 2 | "access_amazonerp_instance_group_sale_manager","amazonerp_instance_group_sale_manager","model_amazon_instance","base.group_sale_manager",1,1,1,1 | 2 | access_amazonerp_instance_group_sale_manager,amazonerp_instance_group_sale_manager,model_amazon_instance,base.group_sale_manager,1,1,1,1 |
492 | 3 | \ No newline at end of file | 3 | \ No newline at end of file |
493 | 4 | 4 | ||
494 | === modified file 'wizard/create_amazon_shop.py' | |||
495 | --- wizard/create_amazon_shop.py 2012-05-08 11:49:19 +0000 | |||
496 | +++ wizard/create_amazon_shop.py 2013-07-23 09:16:27 +0000 | |||
497 | @@ -14,7 +14,7 @@ | |||
498 | 14 | raise osv.except_osv(_('Warning !'), _('Shop Is Already Created')) | 14 | raise osv.except_osv(_('Warning !'), _('Shop Is Already Created')) |
499 | 15 | return res | 15 | return res |
500 | 16 | def create_amazon_shop_action(self, cr, uid, ids, context=None): | 16 | def create_amazon_shop_action(self, cr, uid, ids, context=None): |
502 | 17 | print"vishakha" | 17 | print"::::::::::create_amazon_shop_action called::::::::" |
503 | 18 | # print"data_amazon_shop",data_amazon_shop | 18 | # print"data_amazon_shop",data_amazon_shop |
504 | 19 | data_amazon_shop = self.read(cr, uid, ids, context=context)[0] | 19 | data_amazon_shop = self.read(cr, uid, ids, context=context)[0] |
505 | 20 | shop_vals = { | 20 | shop_vals = { |
506 | @@ -41,7 +41,8 @@ | |||
507 | 41 | _columns = { | 41 | _columns = { |
508 | 42 | 'name': fields.char('Shop Name', size=64, required=True), | 42 | 'name': fields.char('Shop Name', size=64, required=True), |
509 | 43 | 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse',required=True), | 43 | 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse',required=True), |
511 | 44 | 'cust_address': fields.many2one('res.partner.address', 'Address', required=True), | 44 | 'cust_address': fields.many2one('res.partner', 'Address', required=True), |
512 | 45 | # 'cust_address': fields.many2one('res.partner.address', 'Address', required=True), | ||
513 | 45 | 'company_id': fields.many2one('res.company', 'Company', required=False), | 46 | 'company_id': fields.many2one('res.company', 'Company', required=False), |
514 | 46 | 'picking_policy': fields.selection([('direct', 'Partial Delivery'), ('one', 'Complete Delivery')], | 47 | 'picking_policy': fields.selection([('direct', 'Partial Delivery'), ('one', 'Complete Delivery')], |
515 | 47 | 'Packing Policy', help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?""",required=True), | 48 | 'Packing Policy', help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?""",required=True), |
Approved