[REF] cleaing account...
bzr revid: mra@mra-laptop-20101015071433-p5vxtfo1b0ms4xu7
This commit is contained in:
parent
af37d56800
commit
d39cd7296c
|
@ -18,6 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
|
|
||||||
from osv import fields, osv
|
from osv import fields, osv
|
||||||
|
@ -58,8 +59,8 @@ class account_fiscal_position(osv.osv):
|
||||||
account_id = pos.account_dest_id.id
|
account_id = pos.account_dest_id.id
|
||||||
break
|
break
|
||||||
return account_id
|
return account_id
|
||||||
account_fiscal_position()
|
|
||||||
|
|
||||||
|
account_fiscal_position()
|
||||||
|
|
||||||
class account_fiscal_position_tax(osv.osv):
|
class account_fiscal_position_tax(osv.osv):
|
||||||
_name = 'account.fiscal.position.tax'
|
_name = 'account.fiscal.position.tax'
|
||||||
|
@ -70,8 +71,8 @@ class account_fiscal_position_tax(osv.osv):
|
||||||
'tax_src_id': fields.many2one('account.tax', 'Tax Source', required=True),
|
'tax_src_id': fields.many2one('account.tax', 'Tax Source', required=True),
|
||||||
'tax_dest_id': fields.many2one('account.tax', 'Replacement Tax')
|
'tax_dest_id': fields.many2one('account.tax', 'Replacement Tax')
|
||||||
}
|
}
|
||||||
account_fiscal_position_tax()
|
|
||||||
|
|
||||||
|
account_fiscal_position_tax()
|
||||||
|
|
||||||
class account_fiscal_position_account(osv.osv):
|
class account_fiscal_position_account(osv.osv):
|
||||||
_name = 'account.fiscal.position.account'
|
_name = 'account.fiscal.position.account'
|
||||||
|
@ -82,6 +83,7 @@ class account_fiscal_position_account(osv.osv):
|
||||||
'account_src_id': fields.many2one('account.account', 'Account Source', domain=[('type','<>','view')], required=True),
|
'account_src_id': fields.many2one('account.account', 'Account Source', domain=[('type','<>','view')], required=True),
|
||||||
'account_dest_id': fields.many2one('account.account', 'Account Destination', domain=[('type','<>','view')], required=True)
|
'account_dest_id': fields.many2one('account.account', 'Account Destination', domain=[('type','<>','view')], required=True)
|
||||||
}
|
}
|
||||||
|
|
||||||
account_fiscal_position_account()
|
account_fiscal_position_account()
|
||||||
|
|
||||||
class res_partner(osv.osv):
|
class res_partner(osv.osv):
|
||||||
|
@ -89,7 +91,7 @@ class res_partner(osv.osv):
|
||||||
_inherit = 'res.partner'
|
_inherit = 'res.partner'
|
||||||
_description = 'Partner'
|
_description = 'Partner'
|
||||||
|
|
||||||
def _credit_debit_get(self, cr, uid, ids, field_names, arg, context):
|
def _credit_debit_get(self, cr, uid, ids, field_names, arg, context=None):
|
||||||
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
|
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
|
||||||
cr.execute("""SELECT l.partner_id, a.type, SUM(l.debit-l.credit)
|
cr.execute("""SELECT l.partner_id, a.type, SUM(l.debit-l.credit)
|
||||||
FROM account_move_line l
|
FROM account_move_line l
|
||||||
|
@ -184,6 +186,7 @@ class res_partner(osv.osv):
|
||||||
'Companies that refers to partner'),
|
'Companies that refers to partner'),
|
||||||
'last_reconciliation_date': fields.datetime('Latest Reconciliation Date', help='Date on which the partner accounting entries were reconciled last time')
|
'last_reconciliation_date': fields.datetime('Latest Reconciliation Date', help='Date on which the partner accounting entries were reconciled last time')
|
||||||
}
|
}
|
||||||
|
|
||||||
res_partner()
|
res_partner()
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -19,8 +19,6 @@
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
import time
|
|
||||||
import netsvc
|
|
||||||
from osv import fields, osv
|
from osv import fields, osv
|
||||||
|
|
||||||
class product_category(osv.osv):
|
class product_category(osv.osv):
|
||||||
|
@ -75,5 +73,7 @@ class product_template(osv.osv):
|
||||||
view_load=True,
|
view_load=True,
|
||||||
help="This account will be used for invoices instead of the default one to value expenses for the current product"),
|
help="This account will be used for invoices instead of the default one to value expenses for the current product"),
|
||||||
}
|
}
|
||||||
|
|
||||||
product_template()
|
product_template()
|
||||||
|
|
||||||
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
|
@ -33,10 +33,11 @@ class account_analytic_journal(osv.osv):
|
||||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||||
}
|
}
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'active': lambda *a: True,
|
'active': True,
|
||||||
'type': lambda *a: 'general',
|
'type': 'general',
|
||||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
||||||
}
|
}
|
||||||
|
|
||||||
account_analytic_journal()
|
account_analytic_journal()
|
||||||
|
|
||||||
class account_journal(osv.osv):
|
class account_journal(osv.osv):
|
||||||
|
@ -45,7 +46,7 @@ class account_journal(osv.osv):
|
||||||
_columns = {
|
_columns = {
|
||||||
'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal',help="Journal for analytic entries"),
|
'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal',help="Journal for analytic entries"),
|
||||||
}
|
}
|
||||||
|
|
||||||
account_journal()
|
account_journal()
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
|
@ -62,6 +62,7 @@ class ir_sequence(osv.osv):
|
||||||
context=context)
|
context=context)
|
||||||
return super(ir_sequence, self).get_id(cr, uid, sequence_id, test,
|
return super(ir_sequence, self).get_id(cr, uid, sequence_id, test,
|
||||||
context=context)
|
context=context)
|
||||||
|
|
||||||
ir_sequence()
|
ir_sequence()
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
Loading…
Reference in New Issue