diff --git a/addons/delivery/wizard/delivery_sale_order.py b/addons/delivery/wizard/delivery_sale_order.py index c1896e6d851..a2fd83c29c5 100644 --- a/addons/delivery/wizard/delivery_sale_order.py +++ b/addons/delivery/wizard/delivery_sale_order.py @@ -36,7 +36,7 @@ class make_delivery(osv.osv_memory): def default_get(self, cr, uid, fields, context): """ - @summary: To get default values for the object. + To get default values for the object. @param self: The object pointer. @param cr: A database cursor @@ -61,7 +61,7 @@ class make_delivery(osv.osv_memory): def delivery_set(self, cr, uid, ids, context): """ - @summary: Adds delivery costs to Sale Order Line. + Adds delivery costs to Sale Order Line. @param self: The object pointer. @param cr: A database cursor diff --git a/addons/mrp/wizard/change_production_qty.py b/addons/mrp/wizard/change_production_qty.py index fbe4c10dfe7..8092cf1dc8d 100644 --- a/addons/mrp/wizard/change_production_qty.py +++ b/addons/mrp/wizard/change_production_qty.py @@ -36,7 +36,7 @@ class change_production_qty(osv.osv_memory): def default_get(self, cr, uid, fields, context): """ - @summary: To get default values for the object. + To get default values for the object. @param self: The object pointer. @param cr: A database cursor @@ -61,7 +61,7 @@ class change_production_qty(osv.osv_memory): def change_prod_qty(self, cr, uid, ids, context): """ - @summary: Changes the Quantity of Product. + Changes the Quantity of Product. @param self: The object pointer. @param cr: A database cursor diff --git a/addons/mrp/wizard/make_procurement_product.py b/addons/mrp/wizard/make_procurement_product.py index c1eaa8d8086..b0c3d5ad131 100644 --- a/addons/mrp/wizard/make_procurement_product.py +++ b/addons/mrp/wizard/make_procurement_product.py @@ -30,7 +30,7 @@ class make_procurement(osv.osv_memory): def onchange_product_id(self, cr, uid, ids, prod_id): """ - @summary: On Change of Product ID getting the value of related UoM. + On Change of Product ID getting the value of related UoM. @param self: The object pointer. @param cr: A database cursor @@ -59,7 +59,7 @@ class make_procurement(osv.osv_memory): def make_procurement(self, cr, uid, ids, context=None): """ - @summary: Creates procurement order for selected product. + Creates procurement order for selected product. @param self: The object pointer. @param cr: A database cursor @@ -110,7 +110,7 @@ class make_procurement(osv.osv_memory): def default_get(self, cr, uid, fields, context=None): """ - @summary: To get default values for the object. + To get default values for the object. @param self: The object pointer. @param cr: A database cursor diff --git a/addons/mrp/wizard/mrp_product_produce.py b/addons/mrp/wizard/mrp_product_produce.py index 387465efe3f..5c1a59f2115 100644 --- a/addons/mrp/wizard/mrp_product_produce.py +++ b/addons/mrp/wizard/mrp_product_produce.py @@ -35,7 +35,7 @@ class mrp_product_produce(osv.osv_memory): def _get_product_qty(self, cr, uid, context): """ - @summary: to obtain product quantity + To obtain product quantity @param self: The object pointer. @param cr: A database cursor @@ -58,7 +58,7 @@ class mrp_product_produce(osv.osv_memory): def do_produce(self, cr, uid, ids, context={}): """ - @summary: to check the product type + To check the product type @param self: The object pointer. @param cr: A database cursor diff --git a/addons/mrp_repair/wizard/cancel_repair.py b/addons/mrp_repair/wizard/cancel_repair.py index 1dc4159257e..00b0f7695c7 100644 --- a/addons/mrp_repair/wizard/cancel_repair.py +++ b/addons/mrp_repair/wizard/cancel_repair.py @@ -29,7 +29,7 @@ class repair_cancel(osv.osv_memory): def cancel_repair(self, cr, uid, ids, context): """ - @summary: Cancels the repair + Cancels the repair @param self: The object pointer. @param cr: A database cursor @@ -55,7 +55,7 @@ class repair_cancel(osv.osv_memory): def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ - @summary: Changes the view dynamically + Changes the view dynamically @param self: The object pointer. @param cr: A database cursor diff --git a/addons/mrp_repair/wizard/make_invoice.py b/addons/mrp_repair/wizard/make_invoice.py index cc82f0590da..063040590e6 100644 --- a/addons/mrp_repair/wizard/make_invoice.py +++ b/addons/mrp_repair/wizard/make_invoice.py @@ -32,7 +32,7 @@ class make_invoice(osv.osv_memory): def make_invoices(self, cr, uid, ids, context): """ - @summary: Generates invoice(s) of selected records. + Generates invoice(s) of selected records. @param self: The object pointer. @param cr: A database cursor diff --git a/addons/point_of_sale/wizard/pos_add_product.py b/addons/point_of_sale/wizard/pos_add_product.py index 6b1b472f223..f02d8bd3b30 100644 --- a/addons/point_of_sale/wizard/pos_add_product.py +++ b/addons/point_of_sale/wizard/pos_add_product.py @@ -37,7 +37,7 @@ class add_product(osv.osv_memory): def select_product(self, cr, uid, ids, context): """ - @summary: To get the product and quantity and add in order . + To get the product and quantity and add in order . @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in diff --git a/addons/point_of_sale/wizard/pos_box_entries.py b/addons/point_of_sale/wizard/pos_box_entries.py index 7ef9eed6634..83e3e576044 100644 --- a/addons/point_of_sale/wizard/pos_box_entries.py +++ b/addons/point_of_sale/wizard/pos_box_entries.py @@ -28,7 +28,7 @@ from tools.translate import _ def get_journal(self,cr,uid,context): """ - @summary: Make the selection list of Cash Journal . + Make the selection list of Cash Journal . @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @@ -53,7 +53,7 @@ class pos_box_entries(osv.osv_memory): def _get_income_product(self,cr,uid,context): """ - @summary: Make the selection list of purchasing products. + Make the selection list of purchasing products. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @@ -84,7 +84,7 @@ class pos_box_entries(osv.osv_memory): """ - @summary: Create the entry of statement in journal . + Create the entry of statement in journal . @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in diff --git a/addons/point_of_sale/wizard/pos_box_out.py b/addons/point_of_sale/wizard/pos_box_out.py index c2dcec98a49..52d2be0a3d0 100644 --- a/addons/point_of_sale/wizard/pos_box_out.py +++ b/addons/point_of_sale/wizard/pos_box_out.py @@ -35,7 +35,7 @@ class pos_box_out(osv.osv_memory): def _get_expense_product(self,cr,uid,context): """ - @summary: Make the selection list of expense product. + Make the selection list of expense product. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @@ -64,7 +64,7 @@ class pos_box_out(osv.osv_memory): def get_out(self, cr, uid, ids, context): """ - @summary: Create the entries in the CashBox . + Create the entries in the CashBox . @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in diff --git a/addons/point_of_sale/wizard/pos_close_statement.py b/addons/point_of_sale/wizard/pos_close_statement.py index 8dd8c051fa9..4a1d305973d 100644 --- a/addons/point_of_sale/wizard/pos_close_statement.py +++ b/addons/point_of_sale/wizard/pos_close_statement.py @@ -31,7 +31,7 @@ class pos_close_statement(osv.osv_memory): def close_statement(self, cr, uid, ids, context): """ - @summary: Close the statements + Close the statements @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in diff --git a/addons/point_of_sale/wizard/pos_confirm.py b/addons/point_of_sale/wizard/pos_confirm.py index f73d7e60828..f2765a5b74a 100644 --- a/addons/point_of_sale/wizard/pos_confirm.py +++ b/addons/point_of_sale/wizard/pos_confirm.py @@ -28,7 +28,7 @@ class pos_confirm(osv.osv_memory): _description = 'Point of Sale Confirm' def action_confirm(self, cr, uid, ids, context): """ - @summary: Confirm the order and close the sales . + Confirm the order and close the sales . @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in diff --git a/addons/point_of_sale/wizard/pos_discount.py b/addons/point_of_sale/wizard/pos_discount.py index a6b537193d7..801ecc9739b 100644 --- a/addons/point_of_sale/wizard/pos_discount.py +++ b/addons/point_of_sale/wizard/pos_discount.py @@ -37,7 +37,7 @@ class pos_discount(osv.osv_memory): def apply_discount(self, cr, uid, ids, context): """ - @summary: To give the discount of product and check the . + To give the discount of product and check the . @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @@ -82,7 +82,7 @@ class pos_discount(osv.osv_memory): def check_discount(self, cr, uid, record_id,discount, context): """ - @summary: Check the discount of define by company . + Check the discount of define by company . @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in diff --git a/addons/point_of_sale/wizard/pos_get_sale.py b/addons/point_of_sale/wizard/pos_get_sale.py index fae826f70b9..901cc3a521f 100644 --- a/addons/point_of_sale/wizard/pos_get_sale.py +++ b/addons/point_of_sale/wizard/pos_get_sale.py @@ -33,7 +33,7 @@ class pos_get_sale(osv.osv_memory): def sale_complete(self, cr, uid, ids, context): """ - @summary: Select the picking order and add the in Point of sale order + Select the picking order and add the in Point of sale order @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in diff --git a/addons/point_of_sale/wizard/pos_open_statement.py b/addons/point_of_sale/wizard/pos_open_statement.py index a3ee7efa6ce..1c02221677c 100644 --- a/addons/point_of_sale/wizard/pos_open_statement.py +++ b/addons/point_of_sale/wizard/pos_open_statement.py @@ -30,7 +30,7 @@ class pos_open_statement(osv.osv_memory): def open_statement(self, cr, uid, ids, context): """ - @summary: open the statements + Open the statements @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in diff --git a/addons/product_margin/wizard/product_margin.py b/addons/product_margin/wizard/product_margin.py index effa42dc77c..dcde53571cd 100644 --- a/addons/product_margin/wizard/product_margin.py +++ b/addons/product_margin/wizard/product_margin.py @@ -34,8 +34,6 @@ class product_margin(osv.osv_memory): def action_open_window(self, cr, uid, ids, context): """ - @summary: - @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: the ID or list of IDs if we want more than one diff --git a/addons/sale/wizard/sale_line_invoice.py b/addons/sale/wizard/sale_line_invoice.py index dac1a99b9c1..4bf3074db54 100644 --- a/addons/sale/wizard/sale_line_invoice.py +++ b/addons/sale/wizard/sale_line_invoice.py @@ -38,7 +38,7 @@ class sale_order_line_make_invoice(osv.osv_memory): def make_invoices(self, cr, uid, ids, context): """ - @summary: To make invoices. + To make invoices. @param self: The object pointer. @param cr: A database cursor @@ -56,7 +56,7 @@ class sale_order_line_make_invoice(osv.osv_memory): #TODO: merge with sale.py/make_invoice def make_invoice(order, lines): """ - @summary: To make invoices. + To make invoices. @param order: @param lines: diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index 112aac7895c..6c9ca17b836 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -40,7 +40,7 @@ class sale_advance_payment_inv(osv.osv_memory): } def create_invoices(self, cr, uid, ids, context={}): """ - @summary: To create invoices. + To create invoices. @param self: The object pointer. @param cr: A database cursor @@ -143,7 +143,7 @@ class sale_open_invoice(osv.osv_memory): def open_invoice(self, cr, uid, ids, context): """ - @summary: To open invoice. + To open invoice. @param self: The object pointer. @param cr: A database cursor diff --git a/addons/stock/wizard/stock_change_standard_price.py b/addons/stock/wizard/stock_change_standard_price.py index c1ab02e83bf..90412c3b388 100644 --- a/addons/stock/wizard/stock_change_standard_price.py +++ b/addons/stock/wizard/stock_change_standard_price.py @@ -31,7 +31,7 @@ class change_standard_price(osv.osv_memory): def default_get(self, cr, uid, fields, context): """ - @summary: To get default values for the object. + To get default values for the object. @param self: The object pointer. @param cr: A database cursor @@ -50,8 +50,8 @@ class change_standard_price(osv.osv_memory): def change_price(self, cr, uid, ids, context): """ - @summary: Changes the Standard Price of Product. - And creates an account move accordingly. + Changes the Standard Price of Product. + And creates an account move accordingly. @param self: The object pointer. @param cr: A database cursor @@ -68,6 +68,7 @@ class change_standard_price(osv.osv_memory): lot_obj = self.pool.get('stock.report.prodlots') move_obj = self.pool.get('account.move') move_line_obj = self.pool.get('account.move.line') + data_obj = self.pool.get('ir.model.data') res = self.read(cr, uid, ids[0], ['new_price']) new_price = res.get('new_price',[]) @@ -85,7 +86,7 @@ class change_standard_price(osv.osv_memory): for lots in lot_obj.browse(cr, uid, lot_ids): qty += lots.name - + if stock_input_acc and stock_output_acc: move_id = move_obj.create(cr, uid, {'journal_id': data.categ_id.property_stock_journal.id}) if diff > 0: @@ -125,7 +126,23 @@ class change_standard_price(osv.osv_memory): else: raise osv.except_osv(_('Warning!'),_('No Accounts are defined for ' 'this product on its location.\nCan\'t create Move.')) - return {} + + id2 = data_obj._get_id(cr, uid, 'account', 'view_move_tree') + id3 = data_obj._get_id(cr, uid, 'account', 'view_move_form') + + if id2: + id2 = data_obj.browse(cr, uid, id2, context=context).res_id + if id3: + id3 = data_obj.browse(cr, uid, id3, context=context).res_id + + return { + 'view_type': 'form', + 'view_mode': 'tree,form', + 'res_model': 'account.move', + 'res_id' : move_id, + 'views': [(id3,'form'),(id2,'tree')], + 'type': 'ir.actions.act_window', + } change_standard_price() diff --git a/addons/stock/wizard/stock_fill_inventory.py b/addons/stock/wizard/stock_fill_inventory.py index 0c5ff199244..c96638c8d52 100644 --- a/addons/stock/wizard/stock_fill_inventory.py +++ b/addons/stock/wizard/stock_fill_inventory.py @@ -39,7 +39,7 @@ class stock_fill_inventory(osv.osv_memory): def fill_inventory(self, cr, uid, ids, context): """ - @summary: To fill stock inventory according to products available in the selected locations.. + To fill stock inventory according to products available in the selected locations.. @param self: The object pointer. @param cr: A database cursor diff --git a/addons/stock/wizard/stock_inventory_line_split.py b/addons/stock/wizard/stock_inventory_line_split.py index 4a77660ed8a..31fe8f88c32 100644 --- a/addons/stock/wizard/stock_inventory_line_split.py +++ b/addons/stock/wizard/stock_inventory_line_split.py @@ -38,7 +38,7 @@ class stock_inventory_line_split(osv.osv_memory): def _check_production_lot(self, cr, uid, context): """ - @summary: to check the availability of production lot. + To check the availability of production lot. @param self: The object pointer. @param cr: A database cursor @@ -63,7 +63,7 @@ inventory lines, make sure the production lot is assigned to this product.')) def split_lines(self, cr, uid, ids, context): """ - @summary: to split stock inventory lines according to production lot + To split stock inventory lines according to production lot @param self: The object pointer. @param cr: A database cursor diff --git a/addons/stock/wizard/stock_inventory_set_stock_zero.py b/addons/stock/wizard/stock_inventory_set_stock_zero.py index 8e10ab42bb5..63296b69875 100644 --- a/addons/stock/wizard/stock_inventory_set_stock_zero.py +++ b/addons/stock/wizard/stock_inventory_set_stock_zero.py @@ -38,7 +38,7 @@ class inventory_set_stock_zero(osv.osv_memory): def do_merge(self, cr, uid, ids, context): """ - @summary:To set stock to Zero + To set stock to Zero @param self: The object pointer. @param cr: A database cursor diff --git a/addons/stock/wizard/stock_invoice_onshipping.py b/addons/stock/wizard/stock_invoice_onshipping.py index 26788d8ad76..22e48631f8b 100644 --- a/addons/stock/wizard/stock_invoice_onshipping.py +++ b/addons/stock/wizard/stock_invoice_onshipping.py @@ -43,7 +43,7 @@ class stock_invoice_onshipping(osv.osv_memory): def _get_type(self, cr, uid, context): """ - @summary:To get invoice type + To get invoice type @param self: The object pointer. @param cr: A database cursor @@ -82,7 +82,7 @@ class stock_invoice_onshipping(osv.osv_memory): def create_invoice(self, cr, uid, ids, context): """ - @summary:To create invoice + To create invoice @param self: The object pointer. @param cr: A database cursor diff --git a/addons/stock/wizard/stock_location_product.py b/addons/stock/wizard/stock_location_product.py index 4f9e45196ac..3966f696475 100755 --- a/addons/stock/wizard/stock_location_product.py +++ b/addons/stock/wizard/stock_location_product.py @@ -38,7 +38,7 @@ class stock_location_product(osv.osv_memory): def action_open_window(self, cr, uid, ids, context): """ - @summary:To open location wise product information specific to given duration + To open location wise product information specific to given duration @param self: The object pointer. @param cr: A database cursor diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py index a9b1613b7b1..8c407117bed 100644 --- a/addons/stock/wizard/stock_move.py +++ b/addons/stock/wizard/stock_move.py @@ -37,7 +37,7 @@ class stock_move_track(osv.osv_memory): def track_lines(self, cr, uid, ids, context={}): """ - @summary:To track stock moves lines + To track stock moves lines @param self: The object pointer. @param cr: A database cursor @@ -90,7 +90,7 @@ class stock_move_consume(osv.osv_memory): def do_move_consume(self, cr, uid, ids, context={}): """ - @summary:To move consumed products + To move consumed products @param self: The object pointer. @param cr: A database cursor @@ -123,7 +123,7 @@ class stock_move_scrap(osv.osv_memory): def move_scrap(self, cr, uid, ids, context={}): """ - @summary:To move scraped products + To move scraped products @param self: The object pointer. @param cr: A database cursor @@ -164,7 +164,7 @@ class split_in_production_lot(osv.osv_memory): def split_lot(self, cr, uid, ids, context=None): """ - @summary:To split a lot + To split a lot @param self: The object pointer. @param cr: A database cursor @@ -180,7 +180,7 @@ class split_in_production_lot(osv.osv_memory): def split(self, cr, uid, ids, move_ids, context=None): """ - @summary:To split stock moves into production lot + To split stock moves into production lot @param self: The object pointer. @param cr: A database cursor