diff --git a/addons/account/test/account_validate_account_move.yml b/addons/account/test/account_validate_account_move.yml index 9a733d8ad5f..44acc341d8e 100644 --- a/addons/account/test/account_validate_account_move.yml +++ b/addons/account/test/account_validate_account_move.yml @@ -4,9 +4,6 @@ !record {model: account.tax.code, id: account_tax_code_0}: name : Tax Code Test sign : 1.00 -- - - - In order to test the 'Validate Journal Entries' wizard in OpenERP, I created an account move diff --git a/addons/delivery/test/delivery_report.yml b/addons/delivery/test/delivery_report.yml index 53b06a9d36a..b66528ea18c 100644 --- a/addons/delivery/test/delivery_report.yml +++ b/addons/delivery/test/delivery_report.yml @@ -12,6 +12,7 @@ invoice_state: none move_lines: - company_id: base.main_company + date: '2010-05-11 15:18:57' location_dest_id: stock.stock_location_customers location_id: stock.stock_location_stock name: HP CD writers diff --git a/addons/delivery/test/delivery_test.yml b/addons/delivery/test/delivery_test.yml deleted file mode 100644 index 9225cbca66b..00000000000 --- a/addons/delivery/test/delivery_test.yml +++ /dev/null @@ -1,155 +0,0 @@ -- - In order to test the delivery module, I will do Configuration -> Delivery -> Delivery Method - And there are two methods for doing that - Delivery based on order quantities, - Delivery based on delivered quantities. -- - I create the partner associated with the transport. -- - I create partner. -- - !record {model: res.partner, id: res_partner_thepost0}: - address: - - country_id: base.in - name: Micro Link - credit_limit: 0.0 - name: The Post - property_account_payable: account.a_pay - property_account_receivable: account.a_recv -- - - I create associated product for delivery. -- - !record {model: product.product, id: product_product_deliverybypost0}: - categ_id: product.product_category_services - cost_method: standard - mes_type: fixed - name: Delivery Product - procure_method: make_to_stock - supply_method: buy - type: service - uom_id: product.product_uom_unit - uom_po_id: product.product_uom_unit - warranty: 0.0 -- - I create the Delivery Method. -- - !record {model: delivery.carrier, id: delivery_carrier_theopenerpexperss0}: - name: The OpenERP Experss - partner_id: res_partner_thepost0 - product_id: product_product_deliverybypost0 -- - I create a delivery grid record and define the region for which the tariffs in the grid will be applicable. - Then set the condition for which this rule is applicable. -- - !record {model: delivery.grid, id: delivery_grid_weight0}: - carrier_id: delivery_carrier_theopenerpexperss0 - line_ids: - - list_price: 120.0 - max_value: 250.0 - name: Weight of product - operator: <= - standard_price: 60.0 - type: weight - price_type: fixed - variable_factor: weight - - list_price: 0.0 - max_value: 500.0 - name: Price >= 500 - operator: <= - standard_price: 20.0 - type: price - price_type: fixed - variable_factor: weight - country_ids: - - base.id - - base.be - - base.in - - base.io - - name: Weight - sequence: 1 -- - To check the Delivery based on order quantities , I have created sale order and picking_policy is direct . -- - !record {model: sale.order, id: sale_order_so0}: - date_order: '2010-05-11' - invoice_quantity: order - name: Test/delivery - order_line: - - name: '[PC1] Basic PC' - price_unit: 450.0 - product_uom: product.product_uom_unit - product_uom_qty: 10.0 - state: draft - delay: 2.0 - product_id: product.product_product_pc1 - product_uos_qty: 10.0 - th_weight: 0.0 - type: make_to_stock - order_policy: manual - partner_id: base.res_partner_agrolait - partner_invoice_id: base.res_partner_address_8 - partner_order_id: base.res_partner_address_8 - partner_shipping_id: base.res_partner_address_8 - picking_policy: direct - pricelist_id: product.list0 - shop_id: sale.shop -- - I create delivery.sale.order record. -- - !record {model: delivery.sale.order, id: delivery_sale_order_0}: - carrier_id: delivery_carrier_theopenerpexperss0 -- - To add the delivery charges on the quotation, I click on Delivery costs button and select the carrier. -- - !python {model: delivery.sale.order}: | - self.delivery_set(cr, uid, [ref("delivery_sale_order_0")], {"lang": "en_US", "active_model": - "sale.order", "tz": False, "order_id": 8, "active_ids": [ref("sale_order_so0")], - "active_id": ref("sale_order_so0"), }) -- - I confirm the sale order. -- - !workflow {model: sale.order, action: order_confirm, ref: sale_order_so0} -- - To check the Invoicing based on deliveries.I create new sale order and picking_policy is Complete Delivery. -- - !record {model: sale.order, id: sale_order_test_complete0}: - name: Test/Complete Deliver - carrier_id: delivery.delivery_carrier_theopenerpexperss0 - invoice_quantity: procurement - order_line: - - name: '[PC1] Basic PC' - price_unit: 450.0 - product_uom: product.product_uom_unit - product_uom_qty: 10.0 - state: draft - delay: 2.0 - product_id: product.product_product_pc1 - product_uos_qty: 10.0 - th_weight: 0.0 - type: make_to_stock - partner_id: base.res_partner_4 - partner_order_id: base.res_partner_address_7 - partner_invoice_id: base.res_partner_address_7 - partner_shipping_id: base.res_partner_address_7 - pricelist_id: product.list0 - order_policy: picking -- - I confirm the sale order. -- - !workflow {model: sale.order, action: order_confirm, ref: sale_order_test_complete0} -- - I Create stock.invoice.onshipping -- - !record {model: stock.invoice.onshipping, id: stock_invoice_onshipping_0}: - journal_id: account.sales_journal - type: out_invoice -- - I Create Invoice form picking. -- - !python {model: stock.invoice.onshipping}: | - so=self.pool.get('sale.order').browse(cr,uid,ref('sale_order_test_complete0')) - self.create_invoice(cr, uid, [ref("stock_invoice_onshipping_0")], {"lang": "en_US", - "tz": False, "active_model": "stock.picking", "contact_display": "partner", - "active_ids": [so.picking_ids[0].id], "active_id": so.picking_ids[0].id }) diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml index 3c9bff9be9c..4d54fa256a8 100644 --- a/addons/procurement/procurement_view.xml +++ b/addons/procurement/procurement_view.xml @@ -238,7 +238,7 @@ ','service')],states={'done': [('readonly', True)]}), 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM'), required=True,states={'done': [('readonly', True)]}), @@ -2508,16 +2516,16 @@ class stock_picking_move_wizard(osv.osv_memory): def _get_picking(self, cr, uid, ctx=None): if ctx is None: ctx = {} - if ctx.get('action_id', False): - return ctx['action_id'] + if ctx.get('active_id', False): + return ctx['active_id'] return False def _get_picking_address(self, cr, uid, context=None): picking_obj = self.pool.get('stock.picking') if context is None: context = {} - if context.get('action_id', False): - picking = picking_obj.browse(cr, uid, [context['action_id']])[0] + if context.get('active_id', False): + picking = picking_obj.browse(cr, uid, [context['active_id']])[0] return picking.address_id and picking.address_id.id or False return False diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index 33d130c2d77..bce4de8b593 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -264,6 +264,7 @@ 2binvoiced + diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index cc7f7b67349..08a00b200b2 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -101,7 +101,7 @@ string="Split inventory lines" groups="base.group_extended" type="action" icon="terp-stock_effects-object-colorize" states="draft"/> - +
@@ -127,7 +127,7 @@ - + @@ -741,13 +741,13 @@ +