[IMP] sale modules : Cleaning modules
bzr revid: pso@tinyerp.com-20101025092424-h4ovhk9oidooby4j
This commit is contained in:
parent
f1e3927982
commit
e54dbddd67
|
@ -30,7 +30,7 @@ class sale_order_line(osv.osv):
|
|||
if context is None:
|
||||
context = {}
|
||||
line_obj = self.pool.get('account.invoice.line')
|
||||
create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context=context)
|
||||
create_ids = super(sale_order_line, self).invoice_line_create(cr, uid, ids, context=context)
|
||||
i = 0
|
||||
for line in self.browse(cr, uid, ids, context):
|
||||
line_obj.write(cr, uid, [create_ids[i]], {'analytics_id': line.analytics_id.id})
|
||||
|
@ -39,4 +39,4 @@ class sale_order_line(osv.osv):
|
|||
|
||||
sale_order_line()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -18,11 +18,8 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import time
|
||||
|
||||
from osv import osv, fields
|
||||
import netsvc
|
||||
from tools.translate import _
|
||||
|
||||
class sale_journal_invoice_type(osv.osv):
|
||||
_name = 'sale_journal.invoice.type'
|
||||
|
|
|
@ -26,8 +26,6 @@ import decimal_precision as dp
|
|||
class sale_order_line(osv.osv):
|
||||
|
||||
def _amount_line(self, cr, uid, ids, field_name, arg, context=None):
|
||||
tax_obj = self.pool.get('account.tax')
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
res = {}
|
||||
context = context or {}
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
|
@ -51,33 +49,33 @@ class sale_order_line(osv.osv):
|
|||
return invoice_line_ids
|
||||
|
||||
def onchange_sale_order_line_view(self, cr, uid, id, type, context={}, *args):
|
||||
temp = {}
|
||||
temp['value'] = {}
|
||||
if (not type):
|
||||
return {}
|
||||
if type != 'article':
|
||||
temp = {
|
||||
'value': {
|
||||
'product_id': False,
|
||||
'uos_id': False,
|
||||
'account_id': False,
|
||||
'price_unit': 0.0,
|
||||
'price_subtotal': 0.0,
|
||||
'quantity': 0,
|
||||
'discount': 0.0,
|
||||
'invoice_line_tax_id': False,
|
||||
'account_analytic_id': False,
|
||||
'product_uom_qty': 0.0,
|
||||
},
|
||||
}
|
||||
if type == 'line':
|
||||
temp['value']['name'] = ' '
|
||||
if type == 'break':
|
||||
temp['value']['name'] = ' '
|
||||
if type == 'subtotal':
|
||||
temp['value']['name'] = 'Sub Total'
|
||||
return temp
|
||||
temp = {}
|
||||
temp['value'] = {}
|
||||
if (not type):
|
||||
return {}
|
||||
if type != 'article':
|
||||
temp = {
|
||||
'value': {
|
||||
'product_id': False,
|
||||
'uos_id': False,
|
||||
'account_id': False,
|
||||
'price_unit': 0.0,
|
||||
'price_subtotal': 0.0,
|
||||
'quantity': 0,
|
||||
'discount': 0.0,
|
||||
'invoice_line_tax_id': False,
|
||||
'account_analytic_id': False,
|
||||
'product_uom_qty': 0.0,
|
||||
},
|
||||
}
|
||||
if type == 'line':
|
||||
temp['value']['name'] = ' '
|
||||
if type == 'break':
|
||||
temp['value']['name'] = ' '
|
||||
if type == 'subtotal':
|
||||
temp['value']['name'] = 'Sub Total'
|
||||
return temp
|
||||
return {}
|
||||
|
||||
def create(self, cr, user, vals, context=None):
|
||||
if vals.has_key('layout_type'):
|
||||
|
@ -103,8 +101,6 @@ class sale_order_line(osv.osv):
|
|||
default['layout_type'] = self.browse(cr, uid, id).layout_type
|
||||
return super(sale_order_line, self).copy(cr, uid, id, default, context)
|
||||
|
||||
|
||||
_name = "sale.order.line"
|
||||
_order = "order_id, sequence asc"
|
||||
_description = "Sale Order line"
|
||||
_inherit = "sale.order.line"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
from tools import config
|
||||
|
||||
class sale_order_line(osv.osv):
|
||||
_inherit = "sale.order.line"
|
||||
|
@ -108,4 +107,5 @@ class account_invoice_line(osv.osv):
|
|||
return super(account_invoice_line, self).create(cr, uid, vals, context)
|
||||
|
||||
account_invoice_line()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
Loading…
Reference in New Issue