← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~camptocamp/sale-financial/7.0-port-sale_line_watcher into lp:sale-financial

 

Yannick Vaucher @ Camptocamp has proposed merging lp:~camptocamp/sale-financial/7.0-port-sale_line_watcher into lp:sale-financial.

Requested reviews:
  Sale Core Editors (sale-core-editors)

For more details, see:
https://code.launchpad.net/~camptocamp/sale-financial/7.0-port-sale_line_watcher/+merge/214058

Portage of module sale_line_watcher to v7
-- 
https://code.launchpad.net/~camptocamp/sale-financial/7.0-port-sale_line_watcher/+merge/214058
Your team Sale Core Editors is requested to review the proposed merge of lp:~camptocamp/sale-financial/7.0-port-sale_line_watcher into lp:sale-financial.
=== modified file 'sale_line_watcher/__openerp__.py'
--- sale_line_watcher/__openerp__.py	2013-11-14 08:16:22 +0000
+++ sale_line_watcher/__openerp__.py	2014-04-03 15:31:56 +0000
@@ -23,11 +23,15 @@
  'author' : 'Camptocamp',
  'maintainer': 'Camptocamp',
  'category': 'Hidden',
- 'complexity': "normal",  # easy, normal, expert
+ 'complexity': "normal",
  'depends' : ['base', 'sale'],
- 'description': """Add new base onchange methods on sale_order class
-
- onchange_price_unit and onchange_discount both accept the following arguments:
+ 'description': """
+Sale order line watcher
+=======================
+
+Add new base onchange methods on sale_order class
+
+onchange_price_unit and onchange_discount both accept the following arguments:
  (self, cr, uid, ids, price_unit, product_id, discount, product_uom, pricelist, **kwargs)
 """,
  'website': 'http://www.camptocamp.com',
@@ -35,7 +39,7 @@
  'update_xml': ['sale_view.xml'],
  'demo_xml': [],
  'tests': [],
- 'installable': False,
+ 'installable': True,
  'auto_install': False,
  'license': 'AGPL-3',
  'application': True}

=== modified file 'sale_line_watcher/sale_view.xml'
--- sale_line_watcher/sale_view.xml	2012-05-29 07:06:32 +0000
+++ sale_line_watcher/sale_view.xml	2014-04-03 15:31:56 +0000
@@ -3,7 +3,6 @@
   <data>
     <record model="ir.ui.view" id="sale_watcher_sale_order_line_form2">
       <field name="name">sales_line_watcher.view.form2</field>
-      <field name="type">form</field>
       <field name="model">sale.order.line</field>
       <field name="inherit_id" ref="sale.view_order_line_form2" />
       <field name="arch" type="xml">
@@ -17,7 +16,6 @@
 
     <record model="ir.ui.view" id="sale_watcher_sale_order_line_form3">
       <field name="name">sales_line_watcher.view.form3</field>
-      <field name="type">form</field>
       <field name="model">sale.order.line</field>
       <field name="inherit_id" ref="sale.view_order_line_form2" />
       <field name="arch" type="xml">
@@ -32,7 +30,6 @@
       <field name="name">sales_line_watcher.form.floorprice</field>
       <field name="model">sale.order</field>
       <field name="inherit_id" ref="sale.view_order_form" />
-      <field name="type">form</field>
       <field name="arch" type="xml">
         <field name="discount" position="replace">
           <field name="discount"
@@ -45,11 +42,10 @@
       <field name="name">sales_line_watcher.form.floorprice</field>
       <field name="model">sale.order</field>
       <field name="inherit_id" ref="sale.view_order_form" />
-      <field name="type">form</field>
       <field name="arch" type="xml">
         <field name="price_unit" position="replace">
           <field name="price_unit"
-                 on_change="onchange_price_unit(price_unit ,product_id ,discount, product_uom_qty, parent.pricelist_id)"
+                 on_change="onchange_price_unit(price_unit, product_id ,discount, product_uom_qty, parent.pricelist_id)"
                  select="2"/>
         </field>
       </field>

=== modified file 'sale_line_watcher/sale_watcher.py'
--- sale_line_watcher/sale_watcher.py	2012-05-29 07:06:32 +0000
+++ sale_line_watcher/sale_watcher.py	2014-04-03 15:31:56 +0000
@@ -25,20 +25,20 @@
     _inherit = 'sale.order.line'
 
     def onchange_price_unit(self, cr, uid, ids,
-                            price_unit, product_id, discount, product_uom, pricelist,
-                            **kwargs):
-        '''
+                            price_unit, product_id, discount, product_uom,
+                            pricelist, **kwargs):
+        """
         Place holder function for onchange unit price
-        '''
+        """
         res = {}
         return res
 
     def onchange_discount(self, cr, uid, ids,
-                          price_unit, product_id, discount, product_uom, pricelist,
-                          **kwargs):
-        '''
+                          price_unit, product_id, discount, product_uom,
+                          pricelist, **kwargs):
+        """
         Place holder function for onchange discount
-        '''
+        """
         res = {}
         return res
 


Follow ups