← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/ksa-addons2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons2

 

Kirti Savalia(OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/ksa-addons2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons2.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  #500931 No analytic entry is generated finishing one production order
  https://bugs.launchpad.net/bugs/500931
  #543979 product: check uos not necessary
  https://bugs.launchpad.net/bugs/543979
  #623680 [5.0] stock - Stock Inventory with date past
  https://bugs.launchpad.net/bugs/623680
  #674551 "qunatity" in MRP
  https://bugs.launchpad.net/bugs/674551
  #674578 no pdf report "delivery order" in warehouse management
  https://bugs.launchpad.net/bugs/674578
  #675418 account moves with same account in debit and credit
  https://bugs.launchpad.net/bugs/675418
  #677437 Production : done moves should not be re-considered while completing production order
  https://bugs.launchpad.net/bugs/677437
  #680916 "Work center" spelling is inconsistent
  https://bugs.launchpad.net/bugs/680916
  #683231 [6.0][purchase] destination address inside company makes picking to "customer" location
  https://bugs.launchpad.net/bugs/683231
  #687352 remove the domain on the filter field in segment
  https://bugs.launchpad.net/bugs/687352
  #687360 Warehouse : change order of buttons in incoming and outgoingview 
  https://bugs.launchpad.net/bugs/687360
  #690583 stock.picking.test_finished: write() takes at most 6 arguments (8 given)
  https://bugs.launchpad.net/bugs/690583
  #690700 [purchase-stock] Wrong Partner used when invoicing from picking coming from a puchase with sent_to_address
  https://bugs.launchpad.net/bugs/690700
  #691901 [6.0] delivery data.xml contains demo data
  https://bugs.launchpad.net/bugs/691901
  #692461 [6.0] wiki_faq - update problem - reloads template
  https://bugs.launchpad.net/bugs/692461
  #692467 menuitem for price.type object is missing
  https://bugs.launchpad.net/bugs/692467
  #695343 mrp_repair doesn't work with products with lot tracking
  https://bugs.launchpad.net/bugs/695343
  #697273 [6.0 rc2] regression - cannot specify dedicated inventory accounts for periodical inventory or production
  https://bugs.launchpad.net/bugs/697273
  #697554 Custom Reports do not display any values
  https://bugs.launchpad.net/bugs/697554
  #699821 add access group on button used to update stock on product
  https://bugs.launchpad.net/bugs/699821
  #701017 Duplication of product should not duplicate its BoM if the product is a component.
  https://bugs.launchpad.net/bugs/701017
  #704289 "Deliveries to Invoice" lists "Put in new pack" twice
  https://bugs.launchpad.net/bugs/704289
  #710516 [Trunk] purchase: Try to select partner address which has no partner on it
  https://bugs.launchpad.net/bugs/710516

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/ksa-addons2/+merge/48146

https://bugs.launchpad.net/openobject-addons/+bug/710516

correct the yaml test that will fail in the end of year because of code like
datetime.now().year,datetime.now().month+3 
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/ksa-addons2/+merge/48146
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/ksa-addons2.
=== modified file 'membership/test/test_membership.yml'
--- membership/test/test_membership.yml	2011-01-31 12:38:54 +0000
+++ membership/test/test_membership.yml	2011-02-01 12:32:36 +0000
@@ -6,12 +6,16 @@
   !record {model: product.product, id: product_product_membershipproduct0}:
     categ_id: product.cat1
     membership: 1
-    membership_date_from: !eval datetime.today().strftime("%Y-%m-%d")
-    membership_date_to: !eval "(datetime.now() + timedelta(6*31)).strftime('%Y-%m-%d')" 
+    membership_date_from: !eval time.strftime('%Y-%m-%d')
+    membership_date_to: !eval time.strftime('%Y-%m-%d')
     name: Golden Membership
     type: service
     list_price: 80.00
-
+-
+  !python {model: product.product}: |
+    from datetime import datetime
+    from dateutil.relativedelta import *
+    self.write(cr, uid, [ref("product_product_membershipproduct0")], {'membership_date_to': datetime.now() + relativedelta(months=3)})
 - |
   "Mark Johnson" want to join "Golden Membership".
 - |
@@ -102,14 +106,20 @@
   !record {model: product.product, id: product_product_membershipproduct1}:
     categ_id: product.cat1
     membership: 1
-    membership_date_from: !eval datetime.today().strftime("%Y-%m-%d")
-    membership_date_to: !eval "(datetime.now() + timedelta(6*31)).strftime('%Y-%m-%d')" 
+    membership_date_from: !eval time.strftime('%Y-%m-%d')
+    membership_date_to: !eval time.strftime('%Y-%m-%d')
     name: Silver Membership
     type: service
     list_price: 50.00
 - |
   I'm making invoice of "Mark Johnson" member on joining new membership "Silver Membership".
 -
+-
+  !python {model: product.product}: |
+    from datetime import datetime
+    from dateutil.relativedelta import *
+    self.write(cr, uid, [ref("product_product_membershipproduct1")], {'membership_date_to': datetime.now() + relativedelta(months=3)})
+-
   !python {model: res.partner}: |
     self.create_membership_invoice(cr, uid, [ref("res_partner_markjohnson0")], product_id=ref("product_product_membershipproduct1"), datas={"amount":50.00})
 - |

=== modified file 'mrp/wizard/change_production_qty.py'
--- mrp/wizard/change_production_qty.py	2011-01-14 00:11:01 +0000
+++ mrp/wizard/change_production_qty.py	2011-02-01 12:32:36 +0000
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
-#    
+#
 #    OpenERP, Open Source Management Solution
 #    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
 #
@@ -15,7 +15,7 @@
 #    GNU Affero General Public License for more details.
 #
 #    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.     
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
 
@@ -25,7 +25,7 @@
 class change_production_qty(osv.osv_memory):
     _name = 'change.production.qty'
     _description = 'Change Quantity of Products'
-    
+
     _columns = {
         'product_qty': fields.float('Product Qty', required=True),
     }
@@ -35,28 +35,28 @@
         @param self: The object pointer.
         @param cr: A database cursor
         @param uid: ID of the user currently logged in
-        @param fields: List of fields for which we want default values 
-        @param context: A standard dictionary 
-        @return: A dictionary which of fields with values. 
-        """        
+        @param fields: List of fields for which we want default values
+        @param context: A standard dictionary
+        @return: A dictionary which of fields with values.
+        """
         if context is None:
             context = {}
-        res = super(change_production_qty, self).default_get(cr, uid, fields, context=context)        
+        res = super(change_production_qty, self).default_get(cr, uid, fields, context=context)
         prod_obj = self.pool.get('mrp.production')
         prod = prod_obj.browse(cr, uid, context.get('active_id'), context=context)
         if 'product_qty' in fields:
-            res.update({'product_qty': prod.product_qty})  
+            res.update({'product_qty': prod.product_qty})
         return res
-        
+
     def change_prod_qty(self, cr, uid, ids, context=None):
-        """ 
+        """
         Changes the Quantity of Product.
         @param self: The object pointer.
         @param cr: A database cursor
         @param uid: ID of the user currently logged in
-        @param ids: List of IDs selected 
-        @param context: A standard dictionary 
-        @return:  
+        @param ids: List of IDs selected
+        @param context: A standard dictionary
+        @return:
         """
         record_id = context and context.get('active_id',False)
         assert record_id, _('Active Id is not found')
@@ -66,7 +66,7 @@
             prod = prod_obj.browse(cr, uid, record_id, context=context)
             prod_obj.write(cr, uid,prod.id, {'product_qty': wiz_qty.product_qty})
             prod_obj.action_compute(cr, uid, [prod.id])
-        
+
             move_lines_obj = self.pool.get('stock.move')
             for move in prod.move_lines:
                 bom_point = prod.bom_id
@@ -77,10 +77,10 @@
                         raise osv.except_osv(_('Error'), _("Couldn't find bill of material for product"))
                     prod_obj.write(cr, uid, [prod.id], {'bom_id': bom_id})
                     bom_point = bom_obj.browse(cr, uid, [bom_id])[0]
-        
+
                 if not bom_id:
                     raise osv.except_osv(_('Error'), _("Couldn't find bill of material for product"))
-        
+
                 factor = prod.product_qty * prod.product_uom.factor / bom_point.product_uom.factor
                 res = bom_obj._bom_explode(cr, uid, bom_point, factor / bom_point.product_qty, [])
                 for r in res[0]:
@@ -88,9 +88,9 @@
                         move_lines_obj.write(cr, uid, [move.id], {'product_qty' :  r['product_qty']})
             for m in prod.move_created_ids:
                 move_lines_obj.write(cr, uid, [m.id], {'product_qty': wiz_qty.product_qty})
-    
+
         return {}
-    
+
 change_production_qty()
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== modified file 'point_of_sale/test/point_of_sale_report.yml'
--- point_of_sale/test/point_of_sale_report.yml	2011-01-31 12:38:54 +0000
+++ point_of_sale/test/point_of_sale_report.yml	2011-02-01 12:32:36 +0000
@@ -93,7 +93,7 @@
     journal_id: account_journal_cash0
     line_ids:
         - name: statement
-          date: !eval "(datetime.now() + timedelta(5*31)).strftime('%Y-%m-%d')" 
+          date: !eval time.strftime('%Y-%m-%d')
           type: customer
           account_id: account_pos_account_sales
           amount: 100
@@ -105,9 +105,12 @@
 -
   !python {model: account.bank.statement}: |
     import netsvc, tools, os, time
+    from datetime import datetime
+    from dateutil.relativedelta import *
     (data, format) = netsvc.LocalService('report.account.statement').create(cr, uid, [ref('point_of_sale.account_bank_statement_st0')], {}, {})
     if tools.config['test_report_directory']:
         file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-account_statement_report'+format), 'wb+').write(data)
+    self.write(cr, uid, [ref("account_bank_statement_st0")], {'date': datetime.now() + relativedelta(months=3)})
 -
   In order to test the PDF reports defined on a Point Of Sale, we will print a POS User Product Report
 -

=== modified file 'point_of_sale/test/point_of_sale_test.yml'
--- point_of_sale/test/point_of_sale_test.yml	2011-01-31 12:38:54 +0000
+++ point_of_sale/test/point_of_sale_test.yml	2011-02-01 12:32:36 +0000
@@ -271,7 +271,7 @@
     categ_id: product_category_computer0
     cost_method: standard
     mes_type: fixed
-    list_price: 1000.0    
+    list_price: 1000.0
     name: HP Pavilion Desktop PCs
     procure_method: make_to_stock
     seller_ids:
@@ -290,7 +290,7 @@
   !record {model: pos.order, id: pos_order_pos0}:
     company_id: base.main_company
     date_order: !eval time.strftime('%Y-%m-%d %H:%M:%S')
-    date_validity: !eval "(datetime.now() + timedelta(6*1)).strftime('%Y-%m-%d')" 
+    date_validity: !eval time.strftime('%Y-%m-%d %H:%M:%S')
     lines:
       - company_id: base.main_company
         name: Order Line/01
@@ -305,27 +305,32 @@
     sale_journal: account.sales_journal
     shop_id: sale.shop
     user_salesman_id: base.user_root
-- 
-  I add discount. 
-- 
+-
+  !python {model: pos.order}: |
+    from datetime import datetime
+    from dateutil.relativedelta import *
+    self.write(cr, uid, [ref("pos_order_pos0")], {'date_validity': datetime.now() + relativedelta(months=3)})
+-
+  I add discount.
+-
   !record {model: pos.discount, id: pos_discount_0}:
     discount: 5.0
     discount_notes: More then 5 product
-- 
-  I Apply the discount. 
-- 
+-
+  I Apply the discount.
+-
   !python {model: pos.discount}: |
     self.apply_discount(cr, uid, [ref("pos_discount_0")], {"lang": "en_US", "active_model":
       "pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id":
       ref("pos_order_pos0"), })
-- 
+-
   I open the register.
-- 
+-
   !record {model: pos.open.statement, id: pos_open_statement_0}:
     {}
-- 
+-
   I open the statement.
-- 
+-
   !python {model: pos.open.statement}: |
     jou_obj = self.pool.get('account.journal')
     statement_obj = self.pool.get('account.bank.statement')
@@ -339,8 +344,8 @@
           "ir.ui.menu", "active_ids": [ref("point_of_sale.menu_open_statement")], "tz":
           False, "active_id": ref("point_of_sale.menu_open_statement"), })
 -
-  I click on the "Make Payment" wizard.  
-- 
+  I click on the "Make Payment" wizard.
+-
   !record {model: pos.make.payment, id: pos_make_payment_0}:
     amount: 1615.0
     journal: 7
@@ -349,9 +354,9 @@
     product_id: product_product_hppaviliondesktoppcs0
     pricelist_id: product.list0
     partner_id: base.res_partner_agrolait
-- 
+-
   I make the payment.
-- 
+-
   !python {model: pos.make.payment}: |
     self.check(cr, uid, [ref("pos_make_payment_0")], {"lang": "en_US", "active_model":
       "pos.order", "active_ids": [ref("point_of_sale.pos_order_pos0")], "tz":
@@ -361,48 +366,48 @@
 -
   !python {model: pos.order}: |
    order=self.browse(cr,uid,ref("pos_order_pos0"))
-   assert(order.statement_ids!=[]), "Statement lines not created"    
+   assert(order.statement_ids!=[]), "Statement lines not created"
 -
   When I click on Return picking button , I get three option.
 -
   1. Cancel 2.Return Goods and Exchange 3.Return without Refund
 -
-  When I click on  Return Goods and Exchange.  
--  
-  Then it allows me to define the quantity of products, which will return to the stock. 
-- 
+  When I click on  Return Goods and Exchange.
+-
+  Then it allows me to define the quantity of products, which will return to the stock.
+-
   I click on Return Picking button.
-- 
+-
   !record {model: pos.return, id: pos_return_0}:
    {}
-- 
+-
   I Return the product.
-- 
+-
   !python {model: pos.return}: |
     self.create_returns(cr, uid, [ref("pos_return_0")], {"lang": "en_US", "active_model":
       "pos.order", "active_ids": [ref("point_of_sale.pos_order_pos0")], "tz":
       False, "active_id": ref("point_of_sale.pos_order_pos0"), })
-- 
+-
   Then it allows me to define the quantity of products, which will return to the stock.
 -
-  I select the  HP Pavilion Desktop PCs for exchange.   
-- 
+  I select the  HP Pavilion Desktop PCs for exchange.
+-
   !record {model: pos.add.product, id: pos_add_product_0}:
     product_id: product_product_hppaviliondesktoppcs0
     quantity: 5.0
--    
+-
   I click on close button.
-- 
+-
   !python {model: pos.add.product}: |
     return_obj = self.pool.get('pos.return')
-    context['active_ids'] = [ref("pos_order_pos0")] 
+    context['active_ids'] = [ref("pos_order_pos0")]
     return_obj.view_init(cr, uid, [],context=context)
     self.close_action(cr, uid, [ref("pos_add_product_0")], {"lang": "en_US", "active_model":
       "pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id": ref("pos_order_pos0"),
       })
--    
+-
   I create payment.
-- 
+-
   !record {model: pos.make.payment, id: pos_make_payment_1}:
     amount: 680.0
     journal: 7
@@ -411,40 +416,40 @@
     product_id: product_product_hppaviliondesktoppcs0
     pricelist_id: product.list0
     partner_id: base.res_partner_agrolait
-- 
-  For payment, I click on  Make Payment. 
-- 
+-
+  For payment, I click on  Make Payment.
+-
   !python {model: pos.make.payment}: |
     self.check(cr, uid, [ref("pos_make_payment_1")], {"lang": "en_US", "active_model":
       "pos.order", "active_ids": [ref("pos_order_pos0")], "tz":
-      False, "active_id": ref("pos_order_pos0"), })    
-- 
+      False, "active_id": ref("pos_order_pos0"), })
+-
   To check the Return without Refund . I click button "Return without Refund ".
-- 
+-
   !record {model: pos.return, id: pos_return_0}:
    {}
 -
   The quantity which is selected in Return lines wizard is refunded.
-- 
+-
   !python {model: pos.return}: |
     self.create_returns2(cr, uid, [ref("pos_return_0")], {"lang": "en_US", "active_model":
       "pos.order", "active_ids": [ref("pos_order_pos0")], "tz":
       False, "active_id": ref("pos_order_pos0"), })
-- 
+-
   To Close order, I use the wizard "Sale Confirm".
-- 
+-
   !record {model: pos.confirm, id: pos_confirm_0}:
     {}
-- 
+-
   I close this order.
-- 
+-
   !python {model: pos.confirm}: |
     self.action_confirm(cr, uid, [ref("pos_confirm_0")], {"lang": "en_US", "active_model":
       "pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id": ref("pos_order_pos0"),
       })
-- 
+-
   I check order state is done.
-- 
+-
   !python {model: pos.order}: |
-    order=self.browse(cr,uid,ref("pos_order_pos0"))    
-    assert(order.state=='done'), "Order is not done"    
+    order=self.browse(cr,uid,ref("pos_order_pos0"))
+    assert(order.state=='done'), "Order is not done"

=== modified file 'procurement/__openerp__.py'
--- procurement/__openerp__.py	2011-01-17 13:51:36 +0000
+++ procurement/__openerp__.py	2011-02-01 12:32:36 +0000
@@ -46,6 +46,7 @@
         'board_mrp_procurement_view.xml',
     ],
     'demo_xml': ['stock_orderpoint.xml'],
+    'test': ['test/procurement_test.yml'],
     'installable': True,
     'active': False,
     'certificate': '00954248826881074509',

=== modified file 'procurement/procurement_view.xml'
--- procurement/procurement_view.xml	2011-01-17 13:55:22 +0000
+++ procurement/procurement_view.xml	2011-02-01 12:32:36 +0000
@@ -28,6 +28,7 @@
             <field name="name">procurement.order.tree.board</field>
             <field name="model">procurement.order</field>
             <field name="type">tree</field>
+            <field eval="20" name="priority"/>
             <field name="arch" type="xml">
                 <tree string="Procurement Lines" colors="red:date_planned&lt;current_date and state in ('exception');black:state=='running';darkgreen:state=='confirmed';gray:state in ['done','cancel'];blue:state in ('ready')">
                     <field name="date_planned" widget="date"/>
@@ -246,8 +247,8 @@
         <act_window
         context="{'search_default_warehouse_id': active_id}"
         id="act_stock_warehouse_2_stock_warehouse_orderpoint"
-        name="Minimum Stock Rules" 
-        res_model="stock.warehouse.orderpoint" 
+        name="Minimum Stock Rules"
+        res_model="stock.warehouse.orderpoint"
         src_model="stock.warehouse"
         groups="stock.group_stock_user"/>
 

=== added directory 'procurement/test'
=== added file 'procurement/test/procurement_test.yml'
--- procurement/test/procurement_test.yml	1970-01-01 00:00:00 +0000
+++ procurement/test/procurement_test.yml	2011-02-01 12:32:36 +0000
@@ -0,0 +1,60 @@
+-
+  In order to test the Procurement flow,I start by creating a new product 'Apple'
+-
+  !record {model: product.product, id: product_product_apple0}:
+    categ_id: product.cat1
+    name: Apple
+    procure_method: make_to_stock
+    seller_ids:
+      - delay: 1
+        name: base.res_partner_asus
+        min_qty: 1.0
+        product_uom: product.product_uom_kgm
+    supply_method: buy
+    type: product
+    uom_id: product.product_uom_kgm
+    uom_po_id: product.product_uom_kgm
+    property_stock_inventory: stock.location_inventory
+    property_stock_procurement: stock.location_procurement
+    property_stock_production: stock.location_production
+-
+  I define Minimum stock rules for my stockable product "Apple".
+-
+  !record {model: stock.warehouse.orderpoint, id: stock_warehouse_orderpoint_op0}:
+    company_id: base.main_company
+    location_id: stock.stock_location_stock
+    logic: max
+    name: OP/00002
+    product_id: product_product_apple0
+    product_max_qty: 10.0
+    product_min_qty: 5.0
+    product_uom: product.product_uom_kgm
+    qty_multiple: 1
+    warehouse_id: stock.warehouse0
+-
+  The scheduler runs.
+-
+  !function {model: procurement.order, name: run_scheduler}:
+    - model: procurement.order
+      search: "[]"
+-
+  I also check that there are procurement order for Apple or not.
+-
+  !python {model: procurement.order}: |
+    proc_ids = self.search(cr, uid, [('product_id','in',[ref('product_product_apple0')])])
+    assert proc_ids, 'No Procurements.'
+-
+  Apply Request for Procurement clicking on "Procurement Request" From Product.
+-
+  !record {model: make.procurement, id: procurement_order_apple0}:
+    product_id: product_product_apple0
+    qty: 10.0
+    date_planned: '2010-04-20'
+    uom_id: product.product_uom_kgm
+    warehouse_id: stock.warehouse0
+-
+  Create procurement order for selected product.
+-
+  !python {model: make.procurement}: |
+    self.make_procurement(cr, uid, [ref('procurement_order_apple0')], context={'active_id': ref('product_product_apple0')})
+

=== modified file 'project_planning/test/planning_states.yml'
--- project_planning/test/planning_states.yml	2011-01-31 12:38:54 +0000
+++ project_planning/test/planning_states.yml	2011-02-01 12:32:36 +0000
@@ -1,33 +1,34 @@
-- 
+-
   Create a analytic planning 'Project Planning'
-- 
+-
   !record {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0}:
     business_days: 20
     date_from: !eval time.strftime('%Y-%m-%d')
-    date_to: !eval "(datetime.now() + timedelta(31)).strftime('%Y-%m-%d')"
+    date_to: !eval time.strftime('%Y-%m-%d')
     name: Project Planning
     state: draft
     user_id: base.user_demo
-    
-    
-- 
+-
   Open the planning
-- 
+-
   !python {model: report_account_analytic.planning}: |
+    from datetime import datetime
+    from dateutil.relativedelta import *
     self.action_open(cr, uid, [ref("report_account_analytic_planning_projectplanning0")],
       {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")],
       "tz": False, "active_model": "ir.ui.menu", "section_id": False, "active_id":
       ref("project_planning.menu_report_account_analytic_planning"), "search_default_user_id":
       1, "project_id": False, "department_id": False, })
+    self.write(cr, uid, [ref("report_account_analytic_planning_projectplanning0")], {'date_to': datetime.now() + relativedelta(months=3)})
 -
    Check if planning in open state
 -
-   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in open state}:     
+   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in open state}:
      - state == "open"
 
-- 
+-
   Cancel the planning
-- 
+-
   !python {model: report_account_analytic.planning}: |
     self.action_cancel(cr, uid, [ref("report_account_analytic_planning_projectplanning0")],
       {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")],
@@ -37,12 +38,12 @@
 -
    Check if planning in cancel state
 -
-   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in cancel state}:     
-     - state == "cancel"    
-    
-- 
+   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in cancel state}:
+     - state == "cancel"
+
+-
   Reopen the planning
-- 
+-
   !python {model: report_account_analytic.planning}: |
     self.action_draft(cr, uid, [ref("report_account_analytic_planning_projectplanning0")],
       {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")],
@@ -52,12 +53,12 @@
 -
    Check if planning in draft state
 -
-   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in draft state}:     
-     - state == "draft"   
-    
-- 
+   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in draft state}:
+     - state == "draft"
+
+-
   Open the planning
-- 
+-
   !python {model: report_account_analytic.planning}: |
     self.action_open(cr, uid, [ref("report_account_analytic_planning_projectplanning0")],
       {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")],
@@ -67,12 +68,12 @@
 -
    Check if planning in open state
 -
-   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in open state}:     
-     - state == "open"    
-    
-- 
+   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in open state}:
+     - state == "open"
+
+-
   Close the planning
-- 
+-
   !python {model: report_account_analytic.planning}: |
     self.action_done(cr, uid, [ref("report_account_analytic_planning_projectplanning0")],
       {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")],
@@ -82,5 +83,3 @@
 -
    Check if planning in done state
 -
-   !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in done state}:     
-     - state == "done"

=== modified file 'purchase/purchase.py'
--- purchase/purchase.py	2011-01-24 16:13:46 +0000
+++ purchase/purchase.py	2011-02-01 12:32:36 +0000
@@ -170,7 +170,7 @@
         'partner_id':fields.many2one('res.partner', 'Supplier', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, change_default=True),
         'partner_address_id':fields.many2one('res.partner.address', 'Address', required=True,
             states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]},domain="[('partner_id', '=', partner_id)]"),
-        'dest_address_id':fields.many2one('res.partner.address', 'Destination Address',
+        'dest_address_id':fields.many2one('res.partner.address', 'Destination Address',domain="[('partner_id', '<>', partner_id)]",
             states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]},
             help="Put an address if you want to deliver directly from the supplier to the customer." \
                 "In this case, it will remove the warehouse link and set the customer location."

=== modified file 'stock/stock.py'
--- stock/stock.py	2011-01-24 16:13:46 +0000
+++ stock/stock.py	2011-02-01 12:32:36 +0000
@@ -1463,7 +1463,7 @@
     _description = "Stock Move"
     _order = 'date_expected desc, id'
     _log_create = False
-    
+
     def action_partial_move(self, cr, uid, ids, context=None):
         if context is None: context = {}
         partial_id = self.pool.get("stock.partial.move").create(
@@ -1481,7 +1481,7 @@
             'domain': '[]',
             'context': context
         }
-        
+
 
     def name_get(self, cr, uid, ids, context=None):
         res = []
@@ -1855,11 +1855,6 @@
         """
         moves = self.browse(cr, uid, ids, context=context)
         self.write(cr, uid, ids, {'state': 'confirmed'})
-        res_obj = self.pool.get('res.company')
-        location_obj = self.pool.get('stock.location')
-        move_obj = self.pool.get('stock.move')
-        wf_service = netsvc.LocalService("workflow")
-
         self.create_chained_picking(cr, uid, moves, context)
         return []
 


Follow ups