diff --git a/addons/product_margin/wizard/product_margin.py b/addons/product_margin/wizard/product_margin.py index e3f03b625d4..effa42dc77c 100644 --- a/addons/product_margin/wizard/product_margin.py +++ b/addons/product_margin/wizard/product_margin.py @@ -38,7 +38,7 @@ class product_margin(osv.osv_memory): @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, - @param ids: the account ID or list of IDs if we want more than one + @param ids: the ID or list of IDs if we want more than one @return: """ @@ -73,7 +73,7 @@ class product_margin(osv.osv_memory): @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, - @param ids: the account ID or list of IDs if we want more than one + @param ids: the ID or list of IDs if we want more than one @return: """ diff --git a/addons/sale/wizard/sale_line_invoice.py b/addons/sale/wizard/sale_line_invoice.py index c270ecc3b75..a9a2e77050d 100644 --- a/addons/sale/wizard/sale_line_invoice.py +++ b/addons/sale/wizard/sale_line_invoice.py @@ -37,11 +37,33 @@ class sale_order_line_make_invoice(osv.osv_memory): } def make_invoices(self, cr, uid, ids, context): + """ + @summary: To make invoices. + + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param ids: the ID or list of IDs if we want more than one + @param context: A standard dictionary + + @return: A dictionary which of fields with values. + + """ + res = False invoices = {} #TODO: merge with sale.py/make_invoice def make_invoice(order, lines): + """ + @summary: To make invoices. + + @param order: + @param lines: + + @return: + + """ a = order.partner_id.property_account_receivable.id if order.partner_id and order.partner_id.property_payment_term.id: pay_term = order.partner_id.property_payment_term.id diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index f441871946b..112aac7895c 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -39,6 +39,18 @@ class sale_advance_payment_inv(osv.osv_memory): 'qtty' : lambda *a: 1 } def create_invoices(self, cr, uid, ids, context={}): + """ + @summary: To create invoices. + + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param ids: the ID or list of IDs if we want more than one + @param context: A standard dictionary + + @return: + + """ list_inv = [] obj_sale = self.pool.get('sale.order') obj_lines = self.pool.get('account.invoice.line') @@ -130,6 +142,18 @@ class sale_open_invoice(osv.osv_memory): } def open_invoice(self, cr, uid, ids, context): + """ + @summary: To open invoice. + + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param ids: the ID or list of IDs if we want more than one + @param context: A standard dictionary + + @return: + + """ mod_obj = self.pool.get('ir.model.data') invoices = [] #TODO: Can not get invoice ids here diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 285d7c9424f..344eca867a6 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1713,8 +1713,12 @@ class stock_inventory_line(osv.osv): 'product_uom': fields.many2one('product.uom', 'Product UOM', required=True), 'product_qty': fields.float('Quantity'), 'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True), - 'prod_lot_id': fields.many2one('stock.production.lot', 'Production Lot', domain="[('product_id','=',product_id)]") + 'prod_lot_id': fields.many2one('stock.production.lot', 'Production Lot', domain="[('product_id','=',product_id)]"), +# 'state': fields.selection( (('draft', 'Draft'), ('done', 'Done'), ('cancel','Cancelled')), 'State', readonly=True), } +# _defaults = { +# 'state': lambda *a: 'draft', +# } def on_change_product_id(self, cr, uid, ids, location_id, product, uom=False): if not product: return {} diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index f6ffdb9cbde..0cc33d229d7 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -18,7 +18,11 @@ +