merge upstream
bzr revid: chs@openerp.com-20130717142947-de40mn3234gt5044
|
@ -99,7 +99,6 @@ for a particular financial year and for preparation of vouchers there is a modul
|
|||
'project/wizard/project_account_analytic_line_view.xml',
|
||||
'account_end_fy.xml',
|
||||
'account_invoice_view.xml',
|
||||
'partner_view.xml',
|
||||
'data/account_data.xml',
|
||||
'data/data_account_type.xml',
|
||||
'data/configurable_account_chart.xml',
|
||||
|
@ -112,6 +111,7 @@ for a particular financial year and for preparation of vouchers there is a modul
|
|||
'project/wizard/account_analytic_journal_report_view.xml',
|
||||
'project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml',
|
||||
'project/wizard/account_analytic_chart_view.xml',
|
||||
'partner_view.xml',
|
||||
'product_view.xml',
|
||||
'account_assert_test.xml',
|
||||
'process/statement_process.xml',
|
||||
|
|
|
@ -648,10 +648,10 @@ class account_account(osv.osv):
|
|||
if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]):
|
||||
#Check for 'Closed' type
|
||||
if old_type == 'closed' and new_type !='closed':
|
||||
raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!"))
|
||||
raise osv.except_osv(_('Warning!'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!"))
|
||||
# Forbid to change an account type for restricted_groups as it contains journal items (or if one of its children does)
|
||||
if (new_type in restricted_groups):
|
||||
raise osv.except_osv(_('Warning !'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,))
|
||||
raise osv.except_osv(_('Warning!'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,))
|
||||
|
||||
return True
|
||||
|
||||
|
@ -719,7 +719,7 @@ class account_journal(osv.osv):
|
|||
'user_id': fields.many2one('res.users', 'User', help="The user responsible for this journal"),
|
||||
'groups_id': fields.many2many('res.groups', 'account_journal_group_rel', 'journal_id', 'group_id', 'Groups'),
|
||||
'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'),
|
||||
'entry_posted': fields.boolean('Skip \'Draft\' State for Manual Entries', help='Check this box if you don\'t want new journal entries to pass through the \'draft\' state and instead goes directly to the \'posted state\' without any manual validation. \nNote that journal entries that are automatically created by the system are always skipping that state.'),
|
||||
'entry_posted': fields.boolean('Autopost Created Moves', help='Check this box to automatically post entries of this journal. Note that legally, some entries may be automatically posted when the source document is validated (Invoices), whatever the status of this field.'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, select=1, help="Company related to this journal"),
|
||||
'allow_date':fields.boolean('Check Date in Period', help= 'If set to True then do not accept the entry if the entry date is not into the period dates'),
|
||||
|
||||
|
@ -1001,8 +1001,7 @@ class account_period(osv.osv):
|
|||
def find(self, cr, uid, dt=None, context=None):
|
||||
if context is None: context = {}
|
||||
if not dt:
|
||||
dt = fields.date.context_today(self,cr,uid,context=context)
|
||||
#CHECKME: shouldn't we check the state of the period?
|
||||
dt = fields.date.context_today(self, cr, uid, context=context)
|
||||
args = [('date_start', '<=' ,dt), ('date_stop', '>=', dt)]
|
||||
if context.get('company_id', False):
|
||||
args.append(('company_id', '=', context['company_id']))
|
||||
|
@ -1010,20 +1009,20 @@ class account_period(osv.osv):
|
|||
company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
|
||||
args.append(('company_id', '=', company_id))
|
||||
result = []
|
||||
if context.get('account_period_prefer_normal'):
|
||||
if context.get('account_period_prefer_normal', True):
|
||||
# look for non-special periods first, and fallback to all if no result is found
|
||||
result = self.search(cr, uid, args + [('special', '=', False)], context=context)
|
||||
if not result:
|
||||
result = self.search(cr, uid, args, context=context)
|
||||
if not result:
|
||||
raise osv.except_osv(_('Error !'), _('There is no period defined for this date: %s.\nPlease create one.')%dt)
|
||||
raise osv.except_osv(_('Error!'), _('There is no period defined for this date: %s.\nPlease create one.')%dt)
|
||||
return result
|
||||
|
||||
def action_draft(self, cr, uid, ids, *args):
|
||||
mode = 'draft'
|
||||
for period in self.browse(cr, uid, ids):
|
||||
if period.fiscalyear_id.state == 'done':
|
||||
raise osv.except_osv(_('Warning !'), _('You can not re-open a period which belongs to closed fiscal year'))
|
||||
raise osv.except_osv(_('Warning!'), _('You can not re-open a period which belongs to closed fiscal year'))
|
||||
cr.execute('update account_journal_period set state=%s where period_id in %s', (mode, tuple(ids),))
|
||||
cr.execute('update account_period set state=%s where id in %s', (mode, tuple(ids),))
|
||||
return True
|
||||
|
@ -1035,9 +1034,15 @@ class account_period(osv.osv):
|
|||
context = {}
|
||||
ids = []
|
||||
if name:
|
||||
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
|
||||
ids = self.search(cr, user,
|
||||
[('code', 'ilike', name)] + args,
|
||||
limit=limit,
|
||||
context=context)
|
||||
if not ids:
|
||||
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
|
||||
ids = self.search(cr, user,
|
||||
[('name', operator, name)] + args,
|
||||
limit=limit,
|
||||
context=context)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
|
@ -1060,10 +1065,14 @@ class account_period(osv.osv):
|
|||
raise osv.except_osv(_('Error!'), _('You should choose the periods that belong to the same company.'))
|
||||
if period_date_start > period_date_stop:
|
||||
raise osv.except_osv(_('Error!'), _('Start period should precede then end period.'))
|
||||
|
||||
# /!\ We do not include a criterion on the company_id field below, to allow producing consolidated reports
|
||||
# on multiple companies. It will only work when start/end periods are selected and no fiscal year is chosen.
|
||||
|
||||
#for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search).
|
||||
if period_from.special:
|
||||
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)])
|
||||
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id), ('special', '=', False)])
|
||||
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop)])
|
||||
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('special', '=', False)])
|
||||
|
||||
|
||||
class account_journal_period(osv.osv):
|
||||
|
@ -1214,7 +1223,7 @@ class account_move(osv.osv):
|
|||
return res
|
||||
|
||||
def _get_period(self, cr, uid, context=None):
|
||||
ctx = dict(context or {}, account_period_prefer_normal=True)
|
||||
ctx = dict(context or {})
|
||||
period_ids = self.pool.get('account.period').find(cr, uid, context=ctx)
|
||||
return period_ids[0]
|
||||
|
||||
|
@ -1671,7 +1680,7 @@ class account_move_reconcile(osv.osv):
|
|||
elif reconcile.line_partial_ids:
|
||||
first_partner = reconcile.line_partial_ids[0].partner_id.id
|
||||
move_lines = reconcile.line_partial_ids
|
||||
if any([line.partner_id.id != first_partner for line in move_lines]):
|
||||
if any([(line.account_id.type in ('receivable', 'payable') and line.partner_id.id != first_partner) for line in move_lines]):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
@ -1786,7 +1795,7 @@ class account_tax_code(osv.osv):
|
|||
if context.get('period_id', False):
|
||||
period_id = context['period_id']
|
||||
else:
|
||||
period_id = self.pool.get('account.period').find(cr, uid)
|
||||
period_id = self.pool.get('account.period').find(cr, uid, context=context)
|
||||
if not period_id:
|
||||
return dict.fromkeys(ids, 0.0)
|
||||
period_id = period_id[0]
|
||||
|
@ -1855,6 +1864,12 @@ class account_tax_code(osv.osv):
|
|||
_order = 'code'
|
||||
|
||||
|
||||
def get_precision_tax():
|
||||
def change_digit_tax(cr):
|
||||
res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')
|
||||
return (16, res+3)
|
||||
return change_digit_tax
|
||||
|
||||
class account_tax(osv.osv):
|
||||
"""
|
||||
A tax object.
|
||||
|
@ -1875,12 +1890,6 @@ class account_tax(osv.osv):
|
|||
default.update({'name': name + _(' (Copy)')})
|
||||
return super(account_tax, self).copy_data(cr, uid, id, default=default, context=context)
|
||||
|
||||
def get_precision_tax():
|
||||
def change_digit_tax(cr):
|
||||
res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')
|
||||
return (16, res+2)
|
||||
return change_digit_tax
|
||||
|
||||
_name = 'account.tax'
|
||||
_description = 'Tax'
|
||||
_columns = {
|
||||
|
@ -2308,7 +2317,7 @@ class account_model(osv.osv):
|
|||
try:
|
||||
entry['name'] = model.name%{'year': move_date.strftime('%Y'), 'month': move_date.strftime('%m'), 'date': move_date.strftime('%Y-%m')}
|
||||
except:
|
||||
raise osv.except_osv(_('Wrong model !'), _('You have a wrong expression "%(...)s" in your model !'))
|
||||
raise osv.except_osv(_('Wrong Model!'), _('You have a wrong expression "%(...)s" in your model!'))
|
||||
move_id = account_move_obj.create(cr, uid, {
|
||||
'ref': entry['name'],
|
||||
'period_id': period_id,
|
||||
|
@ -2320,7 +2329,7 @@ class account_model(osv.osv):
|
|||
analytic_account_id = False
|
||||
if line.analytic_account_id:
|
||||
if not model.journal_id.analytic_journal_id:
|
||||
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,))
|
||||
raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,))
|
||||
analytic_account_id = line.analytic_account_id.id
|
||||
val = {
|
||||
'move_id': move_id,
|
||||
|
@ -2796,7 +2805,7 @@ class account_tax_template(osv.osv):
|
|||
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
|
||||
'name': fields.char('Tax Name', size=64, required=True),
|
||||
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from lower sequences to higher ones. The order is important if you have a tax that has several tax children. In this case, the evaluation order is important."),
|
||||
'amount': fields.float('Amount', required=True, digits=(14,4), help="For Tax Type percent enter % ratio between 0-1."),
|
||||
'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For Tax Type percent enter % ratio between 0-1."),
|
||||
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True),
|
||||
'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True, help="If not applicable (computed through a Python code), the tax won't appear on the invoice."),
|
||||
'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
|
||||
|
|
|
@ -65,12 +65,11 @@ class bank(osv.osv):
|
|||
# Find the code and parent of the bank account to create
|
||||
dig = 6
|
||||
current_num = 1
|
||||
ids = obj_acc.search(cr, uid, [('type','=','liquidity'), ('company_id', '=', bank.company_id.id)], context=context)
|
||||
ids = obj_acc.search(cr, uid, [('type','=','liquidity'), ('company_id', '=', bank.company_id.id), ('parent_id', '!=', False)], context=context)
|
||||
# No liquidity account exists, no template available
|
||||
if not ids: continue
|
||||
|
||||
ref_acc_bank_temp = obj_acc.browse(cr, uid, ids[0], context=context)
|
||||
ref_acc_bank = ref_acc_bank_temp.parent_id
|
||||
ref_acc_bank = obj_acc.browse(cr, uid, ids[0], context=context).parent_id
|
||||
while True:
|
||||
new_code = str(ref_acc_bank.code.ljust(dig-len(str(current_num)), '0')) + str(current_num)
|
||||
ids = obj_acc.search(cr, uid, [('code', '=', new_code), ('company_id', '=', bank.company_id.id)])
|
||||
|
@ -82,7 +81,7 @@ class bank(osv.osv):
|
|||
'name': name,
|
||||
'code': new_code,
|
||||
'type': 'liquidity',
|
||||
'user_type': ref_acc_bank_temp.user_type.id,
|
||||
'user_type': ref_acc_bank.user_type.id,
|
||||
'reconcile': False,
|
||||
'parent_id': ref_acc_bank.id,
|
||||
'company_id': bank.company_id.id,
|
||||
|
|
|
@ -61,7 +61,7 @@ class account_bank_statement(osv.osv):
|
|||
return res
|
||||
|
||||
def _get_period(self, cr, uid, context=None):
|
||||
periods = self.pool.get('account.period').find(cr, uid,context=context)
|
||||
periods = self.pool.get('account.period').find(cr, uid, context=context)
|
||||
if periods:
|
||||
return periods[0]
|
||||
return False
|
||||
|
@ -420,7 +420,7 @@ class account_bank_statement(osv.osv):
|
|||
for st_line in st.line_ids:
|
||||
if st_line.analytic_account_id:
|
||||
if not st.journal_id.analytic_journal_id:
|
||||
raise osv.except_osv(_('No Analytic Journal !'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,))
|
||||
raise osv.except_osv(_('No Analytic Journal!'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,))
|
||||
if not st_line.amount:
|
||||
continue
|
||||
st_line_number = self.get_next_st_line_number(cr, uid, st_number, st_line, context)
|
||||
|
|
|
@ -252,7 +252,7 @@ class account_cash_statement(osv.osv):
|
|||
for statement in statement_pool.browse(cr, uid, ids, context=context):
|
||||
vals = {}
|
||||
if not self._user_allow(cr, uid, statement.id, context=context):
|
||||
raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal !') % (statement.journal_id.name, )))
|
||||
raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal!') % (statement.journal_id.name, )))
|
||||
|
||||
if statement.name and statement.name == '/':
|
||||
c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id}
|
||||
|
|
|
@ -6,16 +6,19 @@
|
|||
-->
|
||||
<record id="account_financial_report_profitandloss0" model="account.financial.report">
|
||||
<field name="name">Profit and Loss</field>
|
||||
<field name="sign" eval="-1" />
|
||||
<field name="type">sum</field>
|
||||
</record>
|
||||
<record id="account_financial_report_income0" model="account.financial.report">
|
||||
<field name="name">Income</field>
|
||||
<field name="sign" eval="-1" />
|
||||
<field name="parent_id" ref="account_financial_report_profitandloss0"/>
|
||||
<field name="display_detail">detail_with_hierarchy</field>
|
||||
<field name="type">account_type</field>
|
||||
</record>
|
||||
<record id="account_financial_report_expense0" model="account.financial.report">
|
||||
<field name="name">Expense</field>
|
||||
<field name="sign" eval="-1" />
|
||||
<field name="parent_id" ref="account_financial_report_profitandloss0"/>
|
||||
<field name="display_detail">detail_with_hierarchy</field>
|
||||
<field name="type">account_type</field>
|
||||
|
|
|
@ -20,10 +20,11 @@
|
|||
</p>
|
||||
<group>
|
||||
<field name="charts" class="oe_inline"/>
|
||||
<field name="company_id" widget="selection"/><!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
|
||||
</group>
|
||||
<group string="Configure your Fiscal Year" groups="account.group_account_user">
|
||||
<field name="has_default_company" invisible="1" />
|
||||
<field name="company_id" colspan="4" widget="selection" attrs="{'invisible' : [('has_default_company', '=', True)]}"/><!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
|
||||
|
||||
<label for="date_start" string="Date Range"/>
|
||||
<div>
|
||||
<field name="date_start" on_change="on_change_start_date(date_start)" class="oe_inline"/> -
|
||||
|
|
|
@ -51,9 +51,12 @@ class account_invoice(osv.osv):
|
|||
company_id = context.get('company_id', user.company_id.id)
|
||||
type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale_refund', 'in_refund': 'purchase_refund'}
|
||||
journal_obj = self.pool.get('account.journal')
|
||||
res = journal_obj.search(cr, uid, [('type', '=', type2journal.get(type_inv, 'sale')),
|
||||
('company_id', '=', company_id)],
|
||||
limit=1)
|
||||
domain = [('company_id', '=', company_id)]
|
||||
if isinstance(type_inv, list):
|
||||
domain.append(('type', 'in', [type2journal.get(type) for type in type_inv if type2journal.get(type)]))
|
||||
else:
|
||||
domain.append(('type', '=', type2journal.get(type_inv, 'sale')))
|
||||
res = journal_obj.search(cr, uid, domain, limit=1)
|
||||
return res and res[0] or False
|
||||
|
||||
def _get_currency(self, cr, uid, context=None):
|
||||
|
@ -69,7 +72,7 @@ class account_invoice(osv.osv):
|
|||
tt = type2journal.get(type_inv, 'sale')
|
||||
result = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=',tt)], context=context)
|
||||
if not result:
|
||||
raise osv.except_osv(_('No Analytic Journal !'),_("You must define an analytic journal of type '%s'!") % (tt,))
|
||||
raise osv.except_osv(_('No Analytic Journal!'),_("You must define an analytic journal of type '%s'!") % (tt,))
|
||||
return result[0]
|
||||
|
||||
def _get_type(self, cr, uid, context=None):
|
||||
|
@ -89,13 +92,43 @@ class account_invoice(osv.osv):
|
|||
return [('none', _('Free Reference'))]
|
||||
|
||||
def _amount_residual(self, cr, uid, ids, name, args, context=None):
|
||||
"""Function of the field residua. It computes the residual amount (balance) for each invoice"""
|
||||
if context is None:
|
||||
context = {}
|
||||
ctx = context.copy()
|
||||
result = {}
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
for invoice in self.browse(cr, uid, ids, context=context):
|
||||
nb_inv_in_partial_rec = max_invoice_id = 0
|
||||
result[invoice.id] = 0.0
|
||||
if invoice.move_id:
|
||||
for m in invoice.move_id.line_id:
|
||||
if m.account_id.type in ('receivable','payable'):
|
||||
result[invoice.id] += m.amount_residual_currency
|
||||
for aml in invoice.move_id.line_id:
|
||||
if aml.account_id.type in ('receivable','payable'):
|
||||
if aml.currency_id and aml.currency_id.id == invoice.currency_id.id:
|
||||
result[invoice.id] += aml.amount_residual_currency
|
||||
else:
|
||||
ctx['date'] = aml.date
|
||||
result[invoice.id] += currency_obj.compute(cr, uid, aml.company_id.currency_id.id, invoice.currency_id.id, aml.amount_residual, context=ctx)
|
||||
|
||||
if aml.reconcile_partial_id.line_partial_ids:
|
||||
#we check if the invoice is partially reconciled and if there are other invoices
|
||||
#involved in this partial reconciliation (and we sum these invoices)
|
||||
for line in aml.reconcile_partial_id.line_partial_ids:
|
||||
if line.invoice:
|
||||
nb_inv_in_partial_rec += 1
|
||||
#store the max invoice id as for this invoice we will make a balance instead of a simple division
|
||||
max_invoice_id = max(max_invoice_id, line.invoice.id)
|
||||
if nb_inv_in_partial_rec:
|
||||
#if there are several invoices in a partial reconciliation, we split the residual by the number
|
||||
#of invoice to have a sum of residual amounts that matches the partner balance
|
||||
new_value = currency_obj.round(cr, uid, invoice.currency_id, result[invoice.id] / nb_inv_in_partial_rec)
|
||||
if invoice.id == max_invoice_id:
|
||||
#if it's the last the invoice of the bunch of invoices partially reconciled together, we make a
|
||||
#balance to avoid rounding errors
|
||||
result[invoice.id] = result[invoice.id] - ((nb_inv_in_partial_rec - 1) * new_value)
|
||||
else:
|
||||
result[invoice.id] = new_value
|
||||
|
||||
#prevent the residual amount on the invoice to be less than 0
|
||||
result[invoice.id] = max(result[invoice.id], 0.0)
|
||||
return result
|
||||
|
@ -188,8 +221,8 @@ class account_invoice(osv.osv):
|
|||
'type': {
|
||||
},
|
||||
'state': {
|
||||
'account.mt_invoice_paid': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'paid' and obj['type'] in ('out_invoice', 'out_refund'),
|
||||
'account.mt_invoice_validated': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'open' and obj['type'] in ('out_invoice', 'out_refund'),
|
||||
'account.mt_invoice_paid': lambda self, cr, uid, obj, ctx=None: obj.state == 'paid' and obj.type in ('out_invoice', 'out_refund'),
|
||||
'account.mt_invoice_validated': lambda self, cr, uid, obj, ctx=None: obj.state == 'open' and obj.type in ('out_invoice', 'out_refund'),
|
||||
},
|
||||
}
|
||||
_columns = {
|
||||
|
@ -286,7 +319,10 @@ class account_invoice(osv.osv):
|
|||
'payment_ids': fields.function(_compute_lines, relation='account.move.line', type="many2many", string='Payments'),
|
||||
'move_name': fields.char('Journal Entry', size=64, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'user_id': fields.many2one('res.users', 'Salesperson', readonly=True, track_visibility='onchange', states={'draft':[('readonly',False)]}),
|
||||
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position', readonly=True, states={'draft':[('readonly',False)]})
|
||||
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'commercial_partner_id': fields.related('partner_id', 'commercial_partner_id', string='Commercial Entity', type='many2one',
|
||||
relation='res.partner', store=True, readonly=True,
|
||||
help="The commercial entity that will be used on Journal Entries for this invoice")
|
||||
}
|
||||
_defaults = {
|
||||
'type': _get_type,
|
||||
|
@ -545,6 +581,10 @@ class account_invoice(osv.osv):
|
|||
return {'value': {}}
|
||||
|
||||
def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id, context=None):
|
||||
#TODO: add the missing context parameter when forward-porting in trunk so we can remove
|
||||
# this hack!
|
||||
context = self.pool['res.users'].context_get(cr, uid)
|
||||
|
||||
val = {}
|
||||
dom = {}
|
||||
obj_journal = self.pool.get('account.journal')
|
||||
|
@ -597,18 +637,17 @@ class account_invoice(osv.osv):
|
|||
obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id'])
|
||||
if obj_l.company_id.id != company_id:
|
||||
raise osv.except_osv(_('Configuration Error!'),
|
||||
_('Invoice line account\'s company and invoice\'s compnay does not match.'))
|
||||
_('Invoice line account\'s company and invoice\'s company does not match.'))
|
||||
else:
|
||||
continue
|
||||
if company_id and type:
|
||||
if type in ('out_invoice'):
|
||||
journal_type = 'sale'
|
||||
elif type in ('out_refund'):
|
||||
journal_type = 'sale_refund'
|
||||
elif type in ('in_refund'):
|
||||
journal_type = 'purchase_refund'
|
||||
else:
|
||||
journal_type = 'purchase'
|
||||
journal_mapping = {
|
||||
'out_invoice': 'sale',
|
||||
'out_refund': 'sale_refund',
|
||||
'in_refund': 'purchase_refund',
|
||||
'in_invoice': 'purchase',
|
||||
}
|
||||
journal_type = journal_mapping[type]
|
||||
journal_ids = obj_journal.search(cr, uid, [('company_id','=',company_id), ('type', '=', journal_type)])
|
||||
if journal_ids:
|
||||
val['journal_id'] = journal_ids[0]
|
||||
|
@ -618,7 +657,12 @@ class account_invoice(osv.osv):
|
|||
if r[1] == 'journal_id' and r[2] in journal_ids:
|
||||
val['journal_id'] = r[2]
|
||||
if not val.get('journal_id', False):
|
||||
raise osv.except_osv(_('Configuration Error!'), (_('Cannot find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration\Journals\Journals.') % (journal_type)))
|
||||
journal_type_map = dict(obj_journal._columns['type'].selection)
|
||||
journal_type_label = self.pool['ir.translation']._get_source(cr, uid, None, ('code','selection'),
|
||||
context.get('lang'),
|
||||
journal_type_map.get(journal_type))
|
||||
raise osv.except_osv(_('Configuration Error!'),
|
||||
_('Cannot find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration\Journals\Journals.') % ('"%s"' % journal_type_label))
|
||||
dom = {'journal_id': [('id', 'in', journal_ids)]}
|
||||
else:
|
||||
journal_ids = obj_journal.search(cr, uid, [])
|
||||
|
@ -632,6 +676,26 @@ class account_invoice(osv.osv):
|
|||
self.create_workflow(cr, uid, ids)
|
||||
return True
|
||||
|
||||
# ----------------------------------------
|
||||
# Mail related methods
|
||||
# ----------------------------------------
|
||||
|
||||
def _get_formview_action(self, cr, uid, id, context=None):
|
||||
""" Update form view id of action to open the invoice """
|
||||
action = super(account_invoice, self)._get_formview_action(cr, uid, id, context=context)
|
||||
obj = self.browse(cr, uid, id, context=context)
|
||||
if obj.type == 'in_invoice':
|
||||
model, view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'invoice_supplier_form')
|
||||
action.update({
|
||||
'views': [(view_id, 'form')],
|
||||
})
|
||||
else:
|
||||
model, view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'invoice_form')
|
||||
action.update({
|
||||
'views': [(view_id, 'form')],
|
||||
})
|
||||
return action
|
||||
|
||||
# Workflow stuff
|
||||
#################
|
||||
|
||||
|
@ -719,7 +783,7 @@ class account_invoice(osv.osv):
|
|||
inv = self.browse(cr, uid, id)
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
|
||||
company_currency = inv.company_id.currency_id.id
|
||||
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
|
||||
if inv.type in ('out_invoice', 'in_refund'):
|
||||
sign = 1
|
||||
else:
|
||||
|
@ -733,7 +797,7 @@ class account_invoice(osv.osv):
|
|||
else:
|
||||
ref = self._convert_ref(cr, uid, inv.number)
|
||||
if not inv.journal_id.analytic_journal_id:
|
||||
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,))
|
||||
raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,))
|
||||
il['analytic_lines'] = [(0,0, {
|
||||
'name': il['name'],
|
||||
'date': inv['date_invoice'],
|
||||
|
@ -766,6 +830,7 @@ class account_invoice(osv.osv):
|
|||
return move_lines
|
||||
|
||||
def check_tax_lines(self, cr, uid, inv, compute_taxes, ait_obj):
|
||||
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id
|
||||
if not inv.tax_line:
|
||||
for tax in compute_taxes.values():
|
||||
ait_obj.create(cr, uid, tax)
|
||||
|
@ -779,7 +844,7 @@ class account_invoice(osv.osv):
|
|||
if not key in compute_taxes:
|
||||
raise osv.except_osv(_('Warning!'), _('Global taxes defined, but they are not in invoice lines !'))
|
||||
base = compute_taxes[key]['base']
|
||||
if abs(base - tax.base) > inv.company_id.currency_id.rounding:
|
||||
if abs(base - tax.base) > company_currency.rounding:
|
||||
raise osv.except_osv(_('Warning!'), _('Tax base different!\nClick on compute to update the tax base.'))
|
||||
for key in compute_taxes:
|
||||
if not key in tax_key:
|
||||
|
@ -858,7 +923,7 @@ class account_invoice(osv.osv):
|
|||
if not inv.journal_id.sequence_id:
|
||||
raise osv.except_osv(_('Error!'), _('Please define sequence on the journal related to this invoice.'))
|
||||
if not inv.invoice_line:
|
||||
raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
|
||||
raise osv.except_osv(_('No Invoice Lines!'), _('Please create some invoice lines.'))
|
||||
if inv.move_id:
|
||||
continue
|
||||
|
||||
|
@ -866,7 +931,7 @@ class account_invoice(osv.osv):
|
|||
ctx.update({'lang': inv.partner_id.lang})
|
||||
if not inv.date_invoice:
|
||||
self.write(cr, uid, [inv.id], {'date_invoice': fields.date.context_today(self,cr,uid,context=context)}, context=ctx)
|
||||
company_currency = inv.company_id.currency_id.id
|
||||
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
|
||||
# create the analytical lines
|
||||
# one move line per invoice line
|
||||
iml = self._get_analytic_lines(cr, uid, inv.id, context=ctx)
|
||||
|
@ -879,7 +944,7 @@ class account_invoice(osv.osv):
|
|||
group_check_total = self.pool.get('res.groups').browse(cr, uid, group_check_total_id, context=context)
|
||||
if group_check_total and uid in [x.id for x in group_check_total.users]:
|
||||
if (inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0)):
|
||||
raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe encoded total does not match the computed total.'))
|
||||
raise osv.except_osv(_('Bad Total!'), _('Please verify the price of the invoice!\nThe encoded total does not match the computed total.'))
|
||||
|
||||
if inv.payment_term:
|
||||
total_fixed = total_percent = 0
|
||||
|
@ -914,7 +979,7 @@ class account_invoice(osv.osv):
|
|||
total, total_currency, iml = self.compute_invoice_totals(cr, uid, inv, company_currency, ref, iml, context=ctx)
|
||||
acc_id = inv.account_id.id
|
||||
|
||||
name = inv['name'] or '/'
|
||||
name = inv['name'] or inv['supplier_invoice_number'] or '/'
|
||||
totlines = False
|
||||
if inv.payment_term:
|
||||
totlines = payment_term_obj.compute(cr,
|
||||
|
@ -982,11 +1047,11 @@ class account_invoice(osv.osv):
|
|||
'line_id': line,
|
||||
'journal_id': journal_id,
|
||||
'date': date,
|
||||
'narration':inv.comment
|
||||
'narration': inv.comment,
|
||||
'company_id': inv.company_id.id,
|
||||
}
|
||||
period_id = inv.period_id and inv.period_id.id or False
|
||||
ctx.update(company_id=inv.company_id.id,
|
||||
account_period_prefer_normal=True)
|
||||
ctx.update(company_id=inv.company_id.id)
|
||||
if not period_id:
|
||||
period_ids = period_obj.find(cr, uid, inv.date_invoice, context=ctx)
|
||||
period_id = period_ids and period_ids[0] or False
|
||||
|
@ -1113,12 +1178,12 @@ class account_invoice(osv.osv):
|
|||
if not ids:
|
||||
return []
|
||||
types = {
|
||||
'out_invoice': 'Invoice ',
|
||||
'in_invoice': 'Sup. Invoice ',
|
||||
'out_refund': 'Refund ',
|
||||
'in_refund': 'Supplier Refund ',
|
||||
'out_invoice': _('Invoice'),
|
||||
'in_invoice': _('Supplier Invoice'),
|
||||
'out_refund': _('Refund'),
|
||||
'in_refund': _('Supplier Refund'),
|
||||
}
|
||||
return [(r['id'], (r['number']) or types[r['type']] + (r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
|
||||
return [(r['id'], '%s %s' % (r['number'] or types[r['type']], r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
|
||||
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
|
@ -1262,9 +1327,7 @@ class account_invoice(osv.osv):
|
|||
ref = invoice.reference
|
||||
else:
|
||||
ref = self._convert_ref(cr, uid, invoice.number)
|
||||
partner = invoice.partner_id
|
||||
if partner.parent_id and not partner.is_company:
|
||||
partner = partner.parent_id
|
||||
partner = self.pool['res.partner']._find_accounting_partner(invoice.partner_id)
|
||||
# Pay attention to the sign for both debit/credit AND amount_currency
|
||||
l1 = {
|
||||
'debit': direction * pay_amount>0 and direction * pay_amount,
|
||||
|
@ -1423,7 +1486,7 @@ class account_invoice_line(osv.osv):
|
|||
context = dict(context)
|
||||
context.update({'company_id': company_id, 'force_company': company_id})
|
||||
if not partner_id:
|
||||
raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") )
|
||||
raise osv.except_osv(_('No Partner Defined!'),_("You must first select a partner!") )
|
||||
if not product:
|
||||
if type in ('in_invoice', 'in_refund'):
|
||||
return {'value': {}, 'domain':{'product_uom':[]}}
|
||||
|
@ -1438,6 +1501,7 @@ class account_invoice_line(osv.osv):
|
|||
result = {}
|
||||
res = self.pool.get('product.product').browse(cr, uid, product, context=context)
|
||||
|
||||
result['name'] = res.partner_ref
|
||||
if type in ('out_invoice','out_refund'):
|
||||
a = res.property_account_income.id
|
||||
if not a:
|
||||
|
@ -1452,19 +1516,21 @@ class account_invoice_line(osv.osv):
|
|||
|
||||
if type in ('out_invoice', 'out_refund'):
|
||||
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
|
||||
if res.description_sale:
|
||||
result['name'] += '\n'+res.description_sale
|
||||
else:
|
||||
taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
|
||||
if res.description_purchase:
|
||||
result['name'] += '\n'+res.description_purchase
|
||||
|
||||
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
|
||||
|
||||
if type in ('in_invoice', 'in_refund'):
|
||||
result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} )
|
||||
else:
|
||||
result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
|
||||
result['name'] = res.partner_ref
|
||||
|
||||
result['uos_id'] = uom_id or res.uom_id.id
|
||||
if res.description:
|
||||
result['name'] += '\n'+res.description
|
||||
|
||||
domain = {'uos_id':[('category_id','=',res.uom_id.category_id.id)]}
|
||||
|
||||
|
@ -1517,8 +1583,7 @@ class account_invoice_line(osv.osv):
|
|||
if context is None:
|
||||
context = {}
|
||||
inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context)
|
||||
company_currency = inv.company_id.currency_id.id
|
||||
|
||||
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
|
||||
for line in inv.invoice_line:
|
||||
mres = self.move_line_get_item(cr, uid, line, context)
|
||||
if not mres:
|
||||
|
@ -1662,8 +1727,7 @@ class account_invoice_tax(osv.osv):
|
|||
cur_obj = self.pool.get('res.currency')
|
||||
inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context)
|
||||
cur = inv.currency_id
|
||||
company_currency = inv.company_id.currency_id.id
|
||||
|
||||
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
|
||||
for line in inv.invoice_line:
|
||||
for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, (line.price_unit* (1-(line.discount or 0.0)/100.0)), line.quantity, line.product_id, inv.partner_id)['taxes']:
|
||||
val={}
|
||||
|
@ -1734,15 +1798,11 @@ class res_partner(osv.osv):
|
|||
'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True),
|
||||
}
|
||||
|
||||
def _find_accounting_partner(self, part):
|
||||
def _find_accounting_partner(self, partner):
|
||||
'''
|
||||
Find the partner for which the accounting entries will be created
|
||||
'''
|
||||
#if the chosen partner is not a company and has a parent company, use the parent for the journal entries
|
||||
#because you want to invoice 'Agrolait, accounting department' but the journal items are for 'Agrolait'
|
||||
if part.parent_id and not part.is_company:
|
||||
part = part.parent_id
|
||||
return part
|
||||
return partner.commercial_partner_id
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
default = default or {}
|
||||
|
|
|
@ -117,6 +117,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state == 'draft';black:state in ('proforma','proforma2','open');gray:state == 'cancel'" string="Invoice">
|
||||
<field name="partner_id" groups="base.group_user"/>
|
||||
<field name="commercial_partner_id" invisible="1"/>
|
||||
<field name="date_invoice"/>
|
||||
<field name="number"/>
|
||||
<field name="reference" invisible="1"/>
|
||||
|
@ -196,7 +197,7 @@
|
|||
<field name="name"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="account_id" groups="account.group_account_user"
|
||||
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
|
||||
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]"
|
||||
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
|
||||
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
|
||||
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
|
||||
|
@ -319,8 +320,9 @@
|
|||
<group>
|
||||
<field string="Customer" name="partner_id"
|
||||
on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
|
||||
groups="base.group_user" context="{'search_default_customer':1, 'show_address': 1}"
|
||||
options='{"always_reload": True}'/>
|
||||
context="{'search_default_customer':1, 'show_address': 1}"
|
||||
options='{"always_reload": True}'
|
||||
domain="[('customer', '=', True)]"/>
|
||||
<field name="fiscal_position" widget="selection" />
|
||||
</group>
|
||||
<group>
|
||||
|
@ -351,7 +353,7 @@
|
|||
<field name="name"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="account_id" groups="account.group_account_user"
|
||||
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
|
||||
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]"
|
||||
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
|
||||
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
|
||||
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
|
||||
|
@ -447,19 +449,20 @@
|
|||
<field name="model">account.invoice</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Invoice">
|
||||
<field name="number" string="Invoice" filter_domain="['|','|','|', ('number','ilike',self), ('origin','ilike',self), ('supplier_invoice_number', 'ilike', self), ('partner_id', 'ilike', self)]"/>
|
||||
<field name="number" string="Invoice" filter_domain="['|','|','|', ('number','ilike',self), ('origin','ilike',self), ('supplier_invoice_number', 'ilike', self), ('partner_id', 'child_of', self)]"/>
|
||||
<filter name="draft" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/>
|
||||
<filter name="proforma" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices" groups="account.group_proforma_invoices"/>
|
||||
<filter name="invoices" string="Invoices" domain="[('state','not in',['draft','cancel'])]" help="Proforma/Open/Paid Invoices"/>
|
||||
<filter name="unpaid" string="Unpaid" domain="[('state','=','open')]" help="Unpaid Invoices"/>
|
||||
<separator/>
|
||||
<field name="partner_id"/>
|
||||
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
|
||||
<field name="user_id" string="Salesperson"/>
|
||||
<field name="period_id" string="Period"/>
|
||||
<separator/>
|
||||
<filter domain="[('user_id','=',uid)]" help="My Invoices"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter name="partner_id" string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter name="commercial_partner_id" string="Commercial Partner" domain="[]" context="{'group_by':'commercial_partner_id'}"/>
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
|
@ -622,8 +625,6 @@
|
|||
</record>
|
||||
<menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="menu_finance_payables"/>
|
||||
|
||||
<act_window context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}" id="act_res_partner_2_account_invoice_opened" name="Invoices" res_model="account.invoice" src_model="res.partner"/>
|
||||
|
||||
<act_window
|
||||
id="act_account_journal_2_account_invoice_opened"
|
||||
name="Unpaid Invoices"
|
||||
|
|
|
@ -192,7 +192,7 @@ class account_move_line(osv.osv):
|
|||
for obj_line in self.browse(cr, uid, ids, context=context):
|
||||
if obj_line.analytic_account_id:
|
||||
if not obj_line.journal_id.analytic_journal_id:
|
||||
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, ))
|
||||
raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, ))
|
||||
vals_line = self._prepare_analytic_line(cr, uid, obj_line, context=context)
|
||||
acc_ana_line_obj.create(cr, uid, vals_line)
|
||||
return True
|
||||
|
@ -626,7 +626,7 @@ class account_move_line(osv.osv):
|
|||
(_check_date, 'The date of your Journal Entry is not in the defined period! You should change the date or remove this constraint from the journal.', ['date']),
|
||||
(_check_currency, 'The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal.', ['currency_id']),
|
||||
(_check_currency_and_amount, "You cannot create journal items with a secondary currency without recording both 'currency' and 'amount currency' field.", ['currency_id','amount_currency']),
|
||||
(_check_currency_amount, 'The amount expressed in the secondary currency must be positif when journal item are debit and negatif when journal item are credit.', ['amount_currency']),
|
||||
(_check_currency_amount, 'The amount expressed in the secondary currency must be positive when the journal item is a debit and negative when if it is a credit.', ['amount_currency']),
|
||||
(_check_currency_company, "You cannot provide a secondary currency if it is the same than the company one." , ['currency_id']),
|
||||
]
|
||||
|
||||
|
@ -655,13 +655,7 @@ class account_move_line(osv.osv):
|
|||
}
|
||||
return result
|
||||
|
||||
def onchange_account_id(self, cr, uid, ids, account_id, context=None):
|
||||
res = {'value': {}}
|
||||
if account_id:
|
||||
res['value']['account_tax_id'] = [x.id for x in self.pool.get('account.account').browse(cr, uid, account_id, context=context).tax_ids]
|
||||
return res
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False):
|
||||
def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False, context=None):
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
payment_term_obj = self.pool.get('account.payment.term')
|
||||
journal_obj = self.pool.get('account.journal')
|
||||
|
@ -675,8 +669,8 @@ class account_move_line(osv.osv):
|
|||
date = datetime.now().strftime('%Y-%m-%d')
|
||||
jt = False
|
||||
if journal:
|
||||
jt = journal_obj.browse(cr, uid, journal).type
|
||||
part = partner_obj.browse(cr, uid, partner_id)
|
||||
jt = journal_obj.browse(cr, uid, journal, context=context).type
|
||||
part = partner_obj.browse(cr, uid, partner_id, context=context)
|
||||
|
||||
payment_term_id = False
|
||||
if jt and jt in ('purchase', 'purchase_refund') and part.property_supplier_payment_term:
|
||||
|
@ -701,20 +695,20 @@ class account_move_line(osv.osv):
|
|||
elif part.supplier:
|
||||
val['account_id'] = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, id1)
|
||||
if val.get('account_id', False):
|
||||
d = self.onchange_account_id(cr, uid, ids, val['account_id'])
|
||||
d = self.onchange_account_id(cr, uid, ids, account_id=val['account_id'], partner_id=part.id, context=context)
|
||||
val.update(d['value'])
|
||||
return {'value':val}
|
||||
|
||||
def onchange_account_id(self, cr, uid, ids, account_id=False, partner_id=False):
|
||||
def onchange_account_id(self, cr, uid, ids, account_id=False, partner_id=False, context=None):
|
||||
account_obj = self.pool.get('account.account')
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
fiscal_pos_obj = self.pool.get('account.fiscal.position')
|
||||
val = {}
|
||||
if account_id:
|
||||
res = account_obj.browse(cr, uid, account_id)
|
||||
res = account_obj.browse(cr, uid, account_id, context=context)
|
||||
tax_ids = res.tax_ids
|
||||
if tax_ids and partner_id:
|
||||
part = partner_obj.browse(cr, uid, partner_id)
|
||||
part = partner_obj.browse(cr, uid, partner_id, context=context)
|
||||
tax_id = fiscal_pos_obj.map_tax(cr, uid, part and part.property_account_position or False, tax_ids)[0]
|
||||
else:
|
||||
tax_id = tax_ids and tax_ids[0].id or False
|
||||
|
@ -986,8 +980,7 @@ class account_move_line(osv.osv):
|
|||
if context is None:
|
||||
context = {}
|
||||
period_pool = self.pool.get('account.period')
|
||||
ctx = dict(context, account_period_prefer_normal=True)
|
||||
pids = period_pool.find(cr, user, date, context=ctx)
|
||||
pids = period_pool.find(cr, user, date, context=context)
|
||||
if pids:
|
||||
res.update({
|
||||
'period_id':pids[0]
|
||||
|
@ -1073,12 +1066,12 @@ class account_move_line(osv.osv):
|
|||
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
ctx = context.copy()
|
||||
if ('journal_id' not in ctx):
|
||||
if not ctx.get('journal_id'):
|
||||
if line.move_id:
|
||||
ctx['journal_id'] = line.move_id.journal_id.id
|
||||
else:
|
||||
ctx['journal_id'] = line.journal_id.id
|
||||
if ('period_id' not in ctx):
|
||||
if not ctx.get('period_id'):
|
||||
if line.move_id:
|
||||
ctx['period_id'] = line.move_id.period_id.id
|
||||
else:
|
||||
|
@ -1108,7 +1101,7 @@ class account_move_line(osv.osv):
|
|||
period = period_obj.browse(cr, uid, period_id, context=context)
|
||||
for (state,) in result:
|
||||
if state == 'done':
|
||||
raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name)))
|
||||
raise osv.except_osv(_('Error!'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name)))
|
||||
if not result:
|
||||
jour_period_obj.create(cr, uid, {
|
||||
'name': (journal.code or journal.name)+':'+(period.name or ''),
|
||||
|
@ -1188,7 +1181,7 @@ class account_move_line(osv.osv):
|
|||
move_id = move_obj.create(cr, uid, v, context)
|
||||
vals['move_id'] = move_id
|
||||
else:
|
||||
raise osv.except_osv(_('No piece number !'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
|
||||
raise osv.except_osv(_('No Piece Number!'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
|
||||
ok = not (journal.type_control_ids or journal.account_control_ids)
|
||||
if ('account_id' in vals):
|
||||
account = account_obj.browse(cr, uid, vals['account_id'], context=context)
|
||||
|
|
|
@ -585,7 +585,10 @@
|
|||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="['|',('parent_id','=',False),('is_company','=',True)]"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[
|
||||
'&',
|
||||
'|',('parent_id','=',False),('is_company','=',True),
|
||||
'|',('customer','=',True),('supplier','=',True)]"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field name="account_id" options='{"no_open":True}' domain="[('journal_id','=',parent.journal_id), ('company_id', '=', parent.company_id)]"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]"/>
|
||||
|
@ -907,9 +910,7 @@
|
|||
<label for="type"/>
|
||||
<div>
|
||||
<field name="type"/>
|
||||
<field name="amount" class="oe_inline"
|
||||
attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
|
||||
<label string="%%" attrs="{'invisible':[('type','<>','percent')]}"/>
|
||||
<field name="amount" attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
|
||||
</div>
|
||||
<field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
||||
<field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
||||
|
@ -1112,7 +1113,7 @@
|
|||
<field name="ref"/>
|
||||
<field name="statement_id" invisible="1"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
|
||||
<field name="account_id" options='{"no_open":True}' domain="[('journal_id','=',journal_id), ('company_id', '=', company_id)]" on_change="onchange_account_id(account_id)"/>
|
||||
<field name="account_id" options='{"no_open":True}' domain="[('journal_id','=',journal_id), ('company_id', '=', company_id)]" on_change="onchange_account_id(account_id, partner_id, context)"/>
|
||||
<field name="account_tax_id" options='{"no_open":True}' invisible="context.get('journal_type', False) not in ['sale','sale_refund','purchase','purchase_refund','general']"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type','not in',['view','template'])]" invisible="not context.get('analytic_journal_id',False)"/>
|
||||
<field name="move_id" required="0"/>
|
||||
|
@ -1194,7 +1195,12 @@
|
|||
sequence="1"
|
||||
groups="group_account_user"
|
||||
/>
|
||||
|
||||
<record id="action_account_moves_all_tree" model="ir.actions.act_window">
|
||||
<field name="name">Journal Items</field>
|
||||
<field name="res_model">account.move.line</field>
|
||||
<field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
|
||||
<field name="view_id" ref="view_move_line_tree"/>
|
||||
</record>
|
||||
<record id="view_move_line_tree_reconcile" model="ir.ui.view">
|
||||
<field name="model">account.move.line</field>
|
||||
<field eval="24" name="priority"/>
|
||||
|
@ -1288,7 +1294,7 @@
|
|||
<group col="6" colspan="4">
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(False, partner_id, account_id, debit, credit, date, journal_id, context)"/>
|
||||
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
|
@ -1352,7 +1358,7 @@
|
|||
<tree colors="blue:state == 'draft';black:state == 'posted'" editable="top" string="Journal Items">
|
||||
<field name="invoice"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(False, partner_id, account_id, debit, credit, parent.date, parent.journal_id, context)"/>
|
||||
<field name="account_id" domain="[('journal_id','=',parent.journal_id),('company_id', '=', parent.company_id)]"/>
|
||||
<field name="date_maturity"/>
|
||||
<field name="debit" sum="Total Debit"/>
|
||||
|
@ -1771,23 +1777,6 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- res.partner links -->
|
||||
<act_window
|
||||
context="{'search_default_unreconciled':True, 'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
|
||||
domain="[('account_id.reconcile', '=', True),('account_id.type', 'in', ['receivable', 'payable'])]"
|
||||
id="act_account_partner_account_move_all"
|
||||
name="Receivables & Payables"
|
||||
res_model="account.move.line"
|
||||
src_model="res.partner"/>
|
||||
|
||||
<act_window
|
||||
context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
|
||||
id="act_account_partner_account_move"
|
||||
name="Journal Items"
|
||||
res_model="account.move.line"
|
||||
src_model="res.partner"
|
||||
groups="account.group_account_user"/>
|
||||
|
||||
<!-- Account Templates -->
|
||||
<menuitem
|
||||
id="account_template_folder"
|
||||
|
@ -2123,10 +2112,8 @@
|
|||
<group attrs="{'invisible': [('only_one_chart_template','=',True)]}">
|
||||
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
|
||||
</group>
|
||||
<group groups="base.group_multi_company">
|
||||
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
|
||||
</group>
|
||||
<group>
|
||||
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
|
||||
<field name="currency_id" class="oe_inline"/>
|
||||
<field name="sale_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
|
||||
<label for="sale_tax_rate" string="Sale Tax" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
|
||||
|
|
|
@ -313,8 +313,8 @@
|
|||
<field name="code">TSAJ</field>
|
||||
<field name="type">sale</field>
|
||||
<field name="sequence_id" ref="sequence_sale_journal"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="a_sale"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="a_sale"/>
|
||||
<field name="default_credit_account_id" ref="a_sale"/>
|
||||
<field name="default_debit_account_id" ref="a_sale"/>
|
||||
<field name="analytic_journal_id" ref="cose_journal_sale"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
|
@ -323,8 +323,8 @@
|
|||
<field name="code">TSCNJ</field>
|
||||
<field name="type">sale_refund</field>
|
||||
<field name="sequence_id" ref="sequence_refund_sales_journal"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="a_sale"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="a_sale"/>
|
||||
<field name="default_credit_account_id" ref="a_sale"/>
|
||||
<field name="default_debit_account_id" ref="a_sale"/>
|
||||
<field name="analytic_journal_id" ref="cose_journal_sale"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
|
@ -334,8 +334,8 @@
|
|||
<field name="code">TEXJ</field>
|
||||
<field name="type">purchase</field>
|
||||
<field name="sequence_id" ref="sequence_purchase_journal"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="a_expense"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="a_expense"/>
|
||||
<field name="default_debit_account_id" ref="a_expense"/>
|
||||
<field name="default_credit_account_id" ref="a_expense"/>
|
||||
<field name="analytic_journal_id" ref="exp"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
|
@ -344,8 +344,8 @@
|
|||
<field name="code">TECNJ</field>
|
||||
<field name="type">purchase_refund</field>
|
||||
<field name="sequence_id" ref="sequence_refund_purchase_journal"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="a_expense"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="a_expense"/>
|
||||
<field name="default_debit_account_id" ref="a_expense"/>
|
||||
<field name="default_credit_account_id" ref="a_expense"/>
|
||||
<field name="analytic_journal_id" ref="exp"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
|
@ -355,8 +355,8 @@
|
|||
<field name="code">TBNK</field>
|
||||
<field name="type">bank</field>
|
||||
<field name="sequence_id" ref="sequence_bank_journal"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="bnk"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="bnk"/>
|
||||
<field name="default_debit_account_id" ref="bnk"/>
|
||||
<field name="default_credit_account_id" ref="bnk"/>
|
||||
<field name="analytic_journal_id" ref="sit"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
|
@ -365,8 +365,8 @@
|
|||
<field name="code">TCHK</field>
|
||||
<field name="type">bank</field>
|
||||
<field name="sequence_id" ref="sequence_check_journal"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="cash"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="cash"/>
|
||||
<field name="default_debit_account_id" ref="cash"/>
|
||||
<field name="default_credit_account_id" ref="cash"/>
|
||||
<field name="analytic_journal_id" ref="sit"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
|
@ -374,9 +374,9 @@
|
|||
<field name="name">Cash Journal - (test)</field>
|
||||
<field name="code">TCSH</field>
|
||||
<field name="type">cash</field>
|
||||
<field name="profit_account_id" model="account.account" ref="rsa" />
|
||||
<field name="loss_account_id" model="account.account" ref="rsa" />
|
||||
<field name="internal_account_id" model="account.account" ref="rsa" />
|
||||
<field name="profit_account_id" ref="rsa" />
|
||||
<field name="loss_account_id" ref="rsa" />
|
||||
<field name="internal_account_id" ref="rsa" />
|
||||
<field name="with_last_closing_balance" eval="True" />
|
||||
<!--
|
||||
Usually, cash payment methods requires a control at opening and closing.
|
||||
|
@ -385,8 +385,8 @@
|
|||
-->
|
||||
<field name="cash_control" eval="False"/>
|
||||
<field name="sequence_id" ref="sequence_cash_journal"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="cash"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="cash"/>
|
||||
<field name="default_debit_account_id" ref="cash"/>
|
||||
<field name="default_credit_account_id" ref="cash"/>
|
||||
<field name="analytic_journal_id" ref="sit"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
|
@ -403,8 +403,8 @@
|
|||
<field name="code">TOEJ</field>
|
||||
<field name="type">situation</field>
|
||||
<field name="sequence_id" ref="sequence_opening_journal"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="o_income"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="o_expense"/>
|
||||
<field name="default_debit_account_id" ref="o_income"/>
|
||||
<field name="default_credit_account_id" ref="o_expense"/>
|
||||
<field eval="True" name="centralisation"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
|
@ -413,8 +413,8 @@
|
|||
<field name="name">USD Bank Journal - (test)</field>
|
||||
<field name="code">TUBK</field>
|
||||
<field name="type">bank</field>
|
||||
<field model="account.account" name="default_debit_account_id" ref="usd_bnk"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="usd_bnk"/>
|
||||
<field name="default_debit_account_id" ref="usd_bnk"/>
|
||||
<field name="default_credit_account_id" ref="usd_bnk"/>
|
||||
<field name="currency" ref="base.USD"/>
|
||||
</record>
|
||||
<!--
|
||||
|
|
|
@ -7,15 +7,14 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
||||
"PO-Revision-Date: 2012-12-22 23:17+0000\n"
|
||||
"Last-Translator: Fábio Martinelli - http://zupy.com.br "
|
||||
"<webmaster@guaru.net>\n"
|
||||
"PO-Revision-Date: 2013-04-18 17:44+0000\n"
|
||||
"Last-Translator: Thiago Tognoli <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-03-16 05:19+0000\n"
|
||||
"X-Generator: Launchpad (build 16532)\n"
|
||||
"X-Launchpad-Export-Date: 2013-04-19 05:24+0000\n"
|
||||
"X-Generator: Launchpad (build 16567)\n"
|
||||
|
||||
#. module: account
|
||||
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
|
||||
|
@ -431,7 +430,7 @@ msgstr "Data de criação"
|
|||
#. module: account
|
||||
#: selection:account.journal,type:0
|
||||
msgid "Purchase Refund"
|
||||
msgstr "Devolução da Venda"
|
||||
msgstr "Devolução de Compra"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.journal,type:0
|
||||
|
@ -12678,13 +12677,6 @@ msgstr ""
|
|||
#~ msgid "This period is already closed !"
|
||||
#~ msgstr "Este período já está fechado"
|
||||
|
||||
#, python-format
|
||||
#~ msgid ""
|
||||
#~ "Selected Move lines does not have any account move enties in draft state"
|
||||
#~ msgstr ""
|
||||
#~ "As linhas do movimento selecionado nao tem nenhuma conta a ser movida para o "
|
||||
#~ "estado de esboço"
|
||||
|
||||
#~ msgid "Unpaid Customer Refunds"
|
||||
#~ msgstr "Reembolsos a clientes não pagos"
|
||||
|
||||
|
@ -13232,6 +13224,13 @@ msgstr ""
|
|||
#~ msgid "Can not %s draft/proforma/cancel invoice."
|
||||
#~ msgstr "Não pode %s provisório/proforma/cancelar fatura."
|
||||
|
||||
#, python-format
|
||||
#~ msgid ""
|
||||
#~ "Selected Move lines does not have any account move enties in draft state"
|
||||
#~ msgstr ""
|
||||
#~ "As linhas de movimento selecionadas não tem nenhum movimento nesta conta no "
|
||||
#~ "modo provisório"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Can not pay draft/proforma/cancel invoice."
|
||||
#~ msgstr "Não se pode pagar uma fatura provisória/proforma/cancelada"
|
||||
|
|
|
@ -23,10 +23,16 @@ import datetime
|
|||
from dateutil.relativedelta import relativedelta
|
||||
import logging
|
||||
from operator import itemgetter
|
||||
from os.path import join as opj
|
||||
import time
|
||||
import urllib2
|
||||
import urlparse
|
||||
|
||||
from openerp import tools
|
||||
try:
|
||||
import simplejson as json
|
||||
except ImportError:
|
||||
import json # noqa
|
||||
|
||||
from openerp.release import serie
|
||||
from openerp.tools.translate import _
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
|
@ -38,13 +44,28 @@ class account_installer(osv.osv_memory):
|
|||
|
||||
def _get_charts(self, cr, uid, context=None):
|
||||
modules = self.pool.get('ir.module.module')
|
||||
|
||||
# try get the list on apps server
|
||||
try:
|
||||
apps_server = self.pool.get('ir.config_parameter').get_param(cr, uid, 'apps.server', 'https://apps.openerp.com')
|
||||
|
||||
up = urlparse.urlparse(apps_server)
|
||||
url = '{0.scheme}://{0.netloc}/apps/charts?serie={1}'.format(up, serie)
|
||||
|
||||
j = urllib2.urlopen(url, timeout=3).read()
|
||||
apps_charts = json.loads(j)
|
||||
|
||||
charts = dict(apps_charts)
|
||||
except Exception:
|
||||
charts = dict()
|
||||
|
||||
# Looking for the module with the 'Account Charts' category
|
||||
category_name, category_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'module_category_localization_account_charts')
|
||||
ids = modules.search(cr, uid, [('category_id', '=', category_id)], context=context)
|
||||
charts = list(
|
||||
sorted(((m.name, m.shortdesc)
|
||||
for m in modules.browse(cr, uid, ids, context=context)),
|
||||
key=itemgetter(1)))
|
||||
if ids:
|
||||
charts.update((m.name, m.shortdesc) for m in modules.browse(cr, uid, ids, context=context))
|
||||
|
||||
charts = sorted(charts.items(), key=itemgetter(1))
|
||||
charts.insert(0, ('configurable', _('Custom')))
|
||||
return charts
|
||||
|
||||
|
@ -57,9 +78,9 @@ class account_installer(osv.osv_memory):
|
|||
"country."),
|
||||
'date_start': fields.date('Start Date', required=True),
|
||||
'date_stop': fields.date('End Date', required=True),
|
||||
'period': fields.selection([('month', 'Monthly'), ('3months','3 Monthly')], 'Periods', required=True),
|
||||
'period': fields.selection([('month', 'Monthly'), ('3months', '3 Monthly')], 'Periods', required=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'has_default_company' : fields.boolean('Has Default Company', readonly=True),
|
||||
'has_default_company': fields.boolean('Has Default Company', readonly=True),
|
||||
}
|
||||
|
||||
def _default_company(self, cr, uid, context=None):
|
||||
|
@ -78,30 +99,29 @@ class account_installer(osv.osv_memory):
|
|||
'has_default_company': _default_has_default_company,
|
||||
'charts': 'configurable'
|
||||
}
|
||||
|
||||
|
||||
def get_unconfigured_cmp(self, cr, uid, context=None):
|
||||
""" get the list of companies that have not been configured yet
|
||||
but don't care about the demo chart of accounts """
|
||||
cmp_select = []
|
||||
company_ids = self.pool.get('res.company').search(cr, uid, [], context=context)
|
||||
cr.execute("SELECT company_id FROM account_account WHERE active = 't' AND account_account.parent_id IS NULL AND name != %s", ("Chart For Automated Tests",))
|
||||
configured_cmp = [r[0] for r in cr.fetchall()]
|
||||
return list(set(company_ids)-set(configured_cmp))
|
||||
|
||||
|
||||
def check_unconfigured_cmp(self, cr, uid, context=None):
|
||||
""" check if there are still unconfigured companies """
|
||||
if not self.get_unconfigured_cmp(cr, uid, context=context):
|
||||
raise osv.except_osv(_('No unconfigured company !'), _("There is currently no company without chart of account. The wizard will therefore not be executed."))
|
||||
|
||||
raise osv.except_osv(_('No Unconfigured Company!'), _("There is currently no company without chart of account. The wizard will therefore not be executed."))
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
if context is None:context = {}
|
||||
res = super(account_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
|
||||
if context is None: context = {}
|
||||
res = super(account_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
|
||||
cmp_select = []
|
||||
# display in the widget selection only the companies that haven't been configured yet
|
||||
unconfigured_cmp = self.get_unconfigured_cmp(cr, uid, context=context)
|
||||
for field in res['fields']:
|
||||
if field == 'company_id':
|
||||
res['fields'][field]['domain'] = [('id','in',unconfigured_cmp)]
|
||||
res['fields'][field]['domain'] = [('id', 'in', unconfigured_cmp)]
|
||||
res['fields'][field]['selection'] = [('', '')]
|
||||
if unconfigured_cmp:
|
||||
cmp_select = [(line.id, line.name) for line in self.pool.get('res.company').browse(cr, uid, unconfigured_cmp)]
|
||||
|
@ -117,7 +137,7 @@ class account_installer(osv.osv_memory):
|
|||
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
self.execute_simple(cr, uid, ids, context)
|
||||
super(account_installer, self).execute(cr, uid, ids, context=context)
|
||||
return super(account_installer, self).execute(cr, uid, ids, context=context)
|
||||
|
||||
def execute_simple(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
|
@ -129,8 +149,8 @@ class account_installer(osv.osv_memory):
|
|||
if not f_ids:
|
||||
name = code = res['date_start'][:4]
|
||||
if int(name) != int(res['date_stop'][:4]):
|
||||
name = res['date_start'][:4] +'-'+ res['date_stop'][:4]
|
||||
code = res['date_start'][2:4] +'-'+ res['date_stop'][2:4]
|
||||
name = res['date_start'][:4] + '-' + res['date_stop'][:4]
|
||||
code = res['date_start'][2:4] + '-' + res['date_stop'][2:4]
|
||||
vals = {
|
||||
'name': name,
|
||||
'code': code,
|
||||
|
@ -150,7 +170,7 @@ class account_installer(osv.osv_memory):
|
|||
chart = self.read(cr, uid, ids, ['charts'],
|
||||
context=context)[0]['charts']
|
||||
_logger.debug('Installing chart of accounts %s', chart)
|
||||
return modules | set([chart])
|
||||
return (modules | set([chart])) - set(['has_default_company', 'configurable'])
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -189,49 +189,44 @@ class res_partner(osv.osv):
|
|||
'debit': fields.function(_credit_debit_get, fnct_search=_debit_search, string='Total Payable', multi='dc', help="Total amount you have to pay to this supplier."),
|
||||
'debit_limit': fields.float('Payable Limit'),
|
||||
'property_account_payable': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Account Payable",
|
||||
view_load=True,
|
||||
domain="[('type', '=', 'payable')]",
|
||||
help="This account will be used instead of the default one as the payable account for the current partner",
|
||||
required=True),
|
||||
'property_account_receivable': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Account Receivable",
|
||||
view_load=True,
|
||||
domain="[('type', '=', 'receivable')]",
|
||||
help="This account will be used instead of the default one as the receivable account for the current partner",
|
||||
required=True),
|
||||
'property_account_position': fields.property(
|
||||
'account.fiscal.position',
|
||||
type='many2one',
|
||||
relation='account.fiscal.position',
|
||||
string="Fiscal Position",
|
||||
view_load=True,
|
||||
help="The fiscal position will determine taxes and accounts used for the partner.",
|
||||
),
|
||||
'property_payment_term': fields.property(
|
||||
'account.payment.term',
|
||||
type='many2one',
|
||||
relation='account.payment.term',
|
||||
string ='Customer Payment Term',
|
||||
view_load=True,
|
||||
help="This payment term will be used instead of the default one for sale orders and customer invoices"),
|
||||
'property_supplier_payment_term': fields.property(
|
||||
'account.payment.term',
|
||||
type='many2one',
|
||||
relation='account.payment.term',
|
||||
string ='Supplier Payment Term',
|
||||
view_load=True,
|
||||
help="This payment term will be used instead of the default one for purchase orders and supplier invoices"),
|
||||
'ref_companies': fields.one2many('res.company', 'partner_id',
|
||||
'Companies that refers to partner'),
|
||||
'last_reconciliation_date': fields.datetime('Latest Full Reconciliation Date', help='Date on which the partner accounting entries were fully reconciled last time. It differs from the last date where a reconciliation has been made for this partner, as here we depict the fact that nothing more was to be reconciled at this date. This can be achieved in 2 different ways: either the last unreconciled debit/credit entry of this partner was reconciled, either the user pressed the button "Nothing more to reconcile" during the manual reconciliation process.')
|
||||
}
|
||||
|
||||
def _commercial_fields(self, cr, uid, context=None):
|
||||
return super(res_partner, self)._commercial_fields(cr, uid, context=context) + \
|
||||
['debit_limit', 'property_account_payable', 'property_account_receivable', 'property_account_position',
|
||||
'property_payment_term', 'property_supplier_payment_term', 'last_reconciliation_date']
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -50,6 +50,30 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_open_partner_analytic_accounts" model="ir.actions.act_window">
|
||||
<field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
|
||||
<field name="name">Contracts/Analytic Accounts</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="view_id" ref="view_account_analytic_account_tree"/>
|
||||
<field name="search_view_id" ref="view_account_analytic_account_search"/>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="partner_view_buttons">
|
||||
<field name="name">partner.view.buttons</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='buttons']" position="inside">
|
||||
<button type="action" string="Invoices"
|
||||
name="%(account.action_invoice_tree)d"
|
||||
context="{'search_default_partner_id': active_id,'default_partner_id': active_id}" groups="account.group_account_invoice"/>
|
||||
<button type="action" string="Journal Items" name="%(account.action_account_moves_all_tree)d" groups="account.group_account_user"/>
|
||||
<button type="action" string="Contracts" name="%(account.action_open_partner_analytic_accounts)d"
|
||||
groups="analytic.group_analytic_accounting"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_fiscal_position_form" model="ir.actions.act_window">
|
||||
<field name="name">Fiscal Positions</field>
|
||||
<field name="res_model">account.fiscal.position</field>
|
||||
|
@ -72,8 +96,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="History" position="before" version="7.0">
|
||||
<page string="Accounting" col="4">
|
||||
<page name="sales_purchases" position="after" version="7.0">
|
||||
<page string="Accounting" col="4" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}">
|
||||
<group>
|
||||
<group>
|
||||
<field name="property_account_position" widget="selection"/>
|
||||
|
@ -103,20 +127,13 @@
|
|||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Accounting" name="accounting_disabled" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}">
|
||||
<div>
|
||||
<p>Accounting-related settings are managed on <button name="open_commercial_entity" type="object" string="the parent company" class="oe_link"/></p>
|
||||
</div>
|
||||
</page>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Partners info tab view-->
|
||||
|
||||
<act_window
|
||||
id="action_analytic_open"
|
||||
name="Contracts/Analytic Accounts"
|
||||
res_model="account.analytic.account"
|
||||
context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
|
||||
src_model="res.partner"
|
||||
view_type="form"
|
||||
view_mode="tree,form"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -123,24 +123,24 @@
|
|||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Confirm statement"""" name="name"/>
|
||||
<field eval=""""The accountant confirms the statement."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_accountingstatemententries0"/>
|
||||
<field model="process.node" name="source_node_id" ref="account.process_node_draftstatement0"/>
|
||||
<field name="target_node_id" ref="process_node_accountingstatemententries0"/>
|
||||
<field name="source_node_id" ref="account.process_node_draftstatement0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_analyticinvoice0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""From analytic accounts"""" name="name"/>
|
||||
<field eval=""""Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft invoices."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_draftinvoices0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_analytic0"/>
|
||||
<field name="target_node_id" ref="process_node_draftinvoices0"/>
|
||||
<field name="source_node_id" ref="process_node_analytic0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_customerinvoice0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Validation"""" name="name"/>
|
||||
<field eval=""""Draft invoices are checked, validated and printed."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_invoiceinvoice0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_draftinvoices0"/>
|
||||
<field name="target_node_id" ref="process_node_invoiceinvoice0"/>
|
||||
<field name="source_node_id" ref="process_node_draftinvoices0"/>
|
||||
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
|
||||
</record>
|
||||
|
||||
|
@ -148,40 +148,40 @@
|
|||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Validation"""" name="name"/>
|
||||
<field eval=""""Accountant validates the accounting entries coming from the invoice."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_accountingentries0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_invoiceinvoice0"/>
|
||||
<field name="target_node_id" ref="process_node_accountingentries0"/>
|
||||
<field name="source_node_id" ref="process_node_invoiceinvoice0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_entriesreconcile0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Accounting entries"""" name="name"/>
|
||||
<field eval=""""Accounting entries are the first input of the reconciliation."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_accountingentries0"/>
|
||||
<field name="target_node_id" ref="process_node_reconciliation0"/>
|
||||
<field name="source_node_id" ref="process_node_accountingentries0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_statemententries0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Validation"""" name="name"/>
|
||||
<field eval=""""Manual or automatic creation of payment entries according to the statements"""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_paymententries0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_bankstatement0"/>
|
||||
<field name="target_node_id" ref="process_node_paymententries0"/>
|
||||
<field name="source_node_id" ref="process_node_bankstatement0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_paymentreconcile0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Payment entries"""" name="name"/>
|
||||
<field eval=""""Payment entries are the second input of the reconciliation."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_paymententries0"/>
|
||||
<field name="target_node_id" ref="process_node_reconciliation0"/>
|
||||
<field name="source_node_id" ref="process_node_paymententries0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_reconcilepaid0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Payment"""" name="name"/>
|
||||
<field eval=""""As soon as the reconciliation is done, the invoice can be paid."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_paidinvoice0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_reconciliation0"/>
|
||||
<field name="target_node_id" ref="process_node_paidinvoice0"/>
|
||||
<field name="source_node_id" ref="process_node_reconciliation0"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
|
|
|
@ -68,8 +68,8 @@
|
|||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Automatic import of the bank statement"""" name="name"/>
|
||||
<field eval=""""Import of the statement in the system from an electronic file"""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_electronicfile0"/>
|
||||
<field name="target_node_id" ref="process_node_draftstatement0"/>
|
||||
<field name="source_node_id" ref="process_node_electronicfile0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_invoicemanually0" model="process.transition">
|
||||
|
@ -77,17 +77,17 @@
|
|||
<field eval=""""Manual entry"""" name="name"/>
|
||||
<field eval=""""A statement with manual entries becomes a draft statement."""" name="note"/>
|
||||
|
||||
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_manually0"/>
|
||||
<field name="target_node_id" ref="process_node_draftstatement0"/>
|
||||
<field name="source_node_id" ref="process_node_manually0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_invoiceimport0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Import from invoice or payment"""" name="name"/>
|
||||
<field eval=""""Import of the statement in the system from a supplier or customer invoice"""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_importinvoice0"/>
|
||||
<field name="target_node_id" ref="process_node_draftstatement0"/>
|
||||
<field name="source_node_id" ref="process_node_importinvoice0"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
|
|
@ -111,16 +111,16 @@
|
|||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""From analytic accounts"""" name="name"/>
|
||||
<field eval=""""Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft supplier invoices."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_analyticcost0"/>
|
||||
<field name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
|
||||
<field name="source_node_id" ref="process_node_analyticcost0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_suppliercustomerinvoice0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Validation"""" name="name"/>
|
||||
<field eval=""""Draft invoices are validated. """" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_supplierinvoiceinvoice0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
|
||||
<field name="target_node_id" ref="process_node_supplierinvoiceinvoice0"/>
|
||||
<field name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
|
||||
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
|
||||
</record>
|
||||
|
||||
|
@ -128,40 +128,40 @@
|
|||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Validation"""" name="name"/>
|
||||
<field eval=""""Accountant validates the accounting entries coming from the invoice. """" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_supplieraccountingentries0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_supplierinvoiceinvoice0"/>
|
||||
<field name="target_node_id" ref="process_node_supplieraccountingentries0"/>
|
||||
<field name="source_node_id" ref="process_node_supplierinvoiceinvoice0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_supplierentriesreconcile0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Accounting entries"""" name="name"/>
|
||||
<field eval=""""Accounting entries are an input of the reconciliation."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_supplieraccountingentries0"/>
|
||||
<field name="target_node_id" ref="process_node_supplierreconciliation0"/>
|
||||
<field name="source_node_id" ref="process_node_supplieraccountingentries0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_paymentorderbank0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Payment entries"""" name="name"/>
|
||||
<field eval=""""The payment order is sent to the bank."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_supplierbankstatement0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_supplierpaymentorder0"/>
|
||||
<field name="target_node_id" ref="process_node_supplierbankstatement0"/>
|
||||
<field name="source_node_id" ref="process_node_supplierpaymentorder0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_paymentorderreconcilation0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Validation"""" name="name"/>
|
||||
<field eval=""""Bank statements are entered in the system."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_supplierbankstatement0"/>
|
||||
<field name="target_node_id" ref="process_node_supplierreconciliation0"/>
|
||||
<field name="source_node_id" ref="process_node_supplierbankstatement0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_supplierreconcilepaid0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""System payment"""" name="name"/>
|
||||
<field eval=""""As soon as the reconciliation is done, the invoice's state turns to “done” (i.e. paid) in the system."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_supplierpaidinvoice0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_supplierreconciliation0"/>
|
||||
<field name="target_node_id" ref="process_node_supplierpaidinvoice0"/>
|
||||
<field name="source_node_id" ref="process_node_supplierreconciliation0"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
|
|
@ -25,18 +25,14 @@ class product_category(osv.osv):
|
|||
_inherit = "product.category"
|
||||
_columns = {
|
||||
'property_account_income_categ': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Income Account",
|
||||
view_load=True,
|
||||
help="This account will be used for invoices to value sales."),
|
||||
'property_account_expense_categ': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Expense Account",
|
||||
view_load=True,
|
||||
help="This account will be used for invoices to value expenses."),
|
||||
}
|
||||
|
||||
|
@ -54,18 +50,14 @@ class product_template(osv.osv):
|
|||
'product_supplier_taxes_rel', 'prod_id', 'tax_id',
|
||||
'Supplier Taxes', domain=[('parent_id', '=', False),('type_tax_use','in',['purchase','all'])]),
|
||||
'property_account_income': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Income Account",
|
||||
view_load=True,
|
||||
help="This account will be used for invoices instead of the default one to value sales for the current product."),
|
||||
'property_account_expense': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Expense Account",
|
||||
view_load=True,
|
||||
help="This account will be used for invoices instead of the default one to value expenses for the current product."),
|
||||
}
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
<page string="Accounting" groups="account.group_account_invoice">
|
||||
<group name="properties">
|
||||
<group>
|
||||
<field name="property_account_income" domain="[('type','<>','view'),('type','<>','consolidation')]" groups="account.group_account_user"/>
|
||||
<field name="property_account_income" domain="[('type','=','other')]" groups="account.group_account_user"/>
|
||||
<field name="taxes_id" colspan="2" attrs="{'readonly':[('sale_ok','=',0)]}" widget="many2many_tags"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="property_account_expense" domain="[('type','<>','view'),('type','<>','consolidation')]" groups="account.group_account_user"/>
|
||||
<field name="property_account_expense" domain="[('type','=','other')]" groups="account.group_account_user"/>
|
||||
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags"/>
|
||||
</group>
|
||||
</group>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<search string="Analytic Account">
|
||||
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Account"/>
|
||||
<field name="date"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
|
||||
<field name="manager_id"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="user_id"/>
|
||||
|
@ -68,6 +68,7 @@
|
|||
<field name="parent_id" invisible="1"/>
|
||||
<field name="type"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="template_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -77,6 +78,7 @@
|
|||
<field name="name">Analytic Accounts</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="context">{}</field> <!-- repair invalid context by setting empty one -->
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_account_analytic_account_tree"/>
|
||||
|
@ -361,7 +363,7 @@
|
|||
<field name="inherit_id" ref="account.view_account_journal_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="type" position="after">
|
||||
<field name="analytic_journal_id"/>
|
||||
<field name="analytic_journal_id" groups="analytic.group_analytic_accounting"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -366,12 +366,13 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
|||
return period or 0.0
|
||||
|
||||
def _get_partners(self,data):
|
||||
# TODO: deprecated, to remove in trunk
|
||||
if data['form']['result_selection'] == 'customer':
|
||||
return 'Receivable Accounts'
|
||||
return self._translate('Receivable Accounts')
|
||||
elif data['form']['result_selection'] == 'supplier':
|
||||
return 'Payable Accounts'
|
||||
return self._translate('Payable Accounts')
|
||||
elif data['form']['result_selection'] == 'customer_supplier':
|
||||
return 'Receivable and Payable Accounts'
|
||||
return self._translate('Receivable and Payable Accounts')
|
||||
return ''
|
||||
|
||||
report_sxw.report_sxw('report.account.aged_trial_balance', 'res.partner',
|
||||
|
|
|
@ -147,7 +147,9 @@
|
|||
<para style="terp_default_Centre_8">[[ data['form']['period_length'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_partners(data) ]]</para>
|
||||
<para style="terp_default_Centre_8">Receivable Accounts[[ data['form']['result_selection'] == 'customer' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_8">Payable Accounts[[ data['form']['result_selection'] == 'supplier' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_8">Receivable and Payable Accounts[[ data['form']['result_selection'] == 'customer_supplier' or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ data['form']['direction_selection'] ]]</para>
|
||||
|
@ -166,7 +168,8 @@
|
|||
<para style="terp_tblheader_Details">Partners</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">Due[[ data['form']['direction_selection'] == 'future' and ' ' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">Not due[[ data['form']['direction_selection'] != 'future' and ' ' or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ data['form']['4']['name'] ]]</para>
|
||||
|
|
|
@ -211,8 +211,10 @@
|
|||
</para>
|
||||
<blockTable colWidths="130.0,80.0,100.0,140.0,90.0" style="Table8">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.account' and 'Company'or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]]</para></td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Company[[ data['model']=='account.account' and ' ' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre">Chart of Accounts[[ data['model']=='ir.ui.menu' and ' ' or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Fiscal Year</para>
|
||||
</td>
|
||||
|
@ -233,7 +235,11 @@
|
|||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_7">All[[ data['form']['display_account']=='all' and ' ' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_7">With movements[[ data['form']['display_account']=='movement' and ' ' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_7">With balance is not equal to 0[[ data['form']['display_account']=='not_zero' and ' ' or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td> <para style="terp_default_Centre_8">[[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="60.0,60.0" style="Table5">[[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
|
|
|
@ -81,7 +81,7 @@ class account_entries_report(osv.osv):
|
|||
period_obj = self.pool.get('account.period')
|
||||
for arg in args:
|
||||
if arg[0] == 'period_id' and arg[2] == 'current_period':
|
||||
current_period = period_obj.find(cr, uid)[0]
|
||||
current_period = period_obj.find(cr, uid, context=context)[0]
|
||||
args.append(['period_id','in',[current_period]])
|
||||
break
|
||||
elif arg[0] == 'period_id' and arg[2] == 'current_year':
|
||||
|
@ -100,7 +100,7 @@ class account_entries_report(osv.osv):
|
|||
fiscalyear_obj = self.pool.get('account.fiscalyear')
|
||||
period_obj = self.pool.get('account.period')
|
||||
if context.get('period', False) == 'current_period':
|
||||
current_period = period_obj.find(cr, uid)[0]
|
||||
current_period = period_obj.find(cr, uid, context=context)[0]
|
||||
domain.append(['period_id','in',[current_period]])
|
||||
elif context.get('year', False) == 'current_year':
|
||||
current_year = fiscalyear_obj.find(cr, uid)
|
||||
|
|
|
@ -220,8 +220,8 @@
|
|||
</blockTable>
|
||||
<blockTable colWidths="80.0,100,80.0,150.0,100.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Company[[ data['model']=='account.journal.period' and ' ' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre">Chart of Accounts[[ data['model']=='ir.ui.menu' and ' ' or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journals</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]]</para></td>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
|
|
@ -360,9 +360,8 @@
|
|||
<blockTable colWidths="110.0,110.0,110.0,110.0,128.0,93.0,110.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">[[ data['model']=='account.account' and 'Company' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre">[[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<para style="terp_tblheader_General_Centre">Company[[ data['model']=='account.account' and ' ' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre">Chart of Accounts[[ data['model']=='ir.ui.menu' and ' ' or removeParentNode('para') ]]</para></td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Fiscal Year</para>
|
||||
</td>
|
||||
|
@ -395,7 +394,9 @@
|
|||
<para style="terp_default_Centre_7">[[', '.join([ lt or '' for lt in get_journal(data) ]) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_7">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para>
|
||||
<para style="terp_default_Centre_7">All[[ data['form']['display_account']=='all' and ' ' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_7">With movements[[ data['form']['display_account']=='movement' and ' ' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_7">With balance is not equal to 0[[ data['form']['display_account']=='not_zero' and ' ' or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_7">[[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]]</para>
|
||||
|
|
|
@ -70,6 +70,7 @@ class account_invoice_report(osv.osv):
|
|||
'categ_id': fields.many2one('product.category','Category of Product', readonly=True),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', readonly=True),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
|
||||
'commercial_partner_id': fields.many2one('res.partner', 'Partner Company', help="Commercial Entity"),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
'user_id': fields.many2one('res.users', 'Salesperson', readonly=True),
|
||||
'price_total': fields.float('Total Without Tax', readonly=True),
|
||||
|
@ -98,17 +99,18 @@ class account_invoice_report(osv.osv):
|
|||
'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
|
||||
'residual': fields.float('Total Residual', readonly=True),
|
||||
'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
|
||||
'country_id': fields.many2one('res.country', 'Country of the Partner Company'),
|
||||
}
|
||||
_order = 'date desc'
|
||||
|
||||
def _select(self):
|
||||
select_str = """
|
||||
SELECT sub.id, sub.date, sub.year, sub.month, sub.day, sub.product_id, sub.partner_id,
|
||||
SELECT sub.id, sub.date, sub.year, sub.month, sub.day, sub.product_id, sub.partner_id, sub.country_id,
|
||||
sub.payment_term, sub.period_id, sub.uom_name, sub.currency_id, sub.journal_id,
|
||||
sub.fiscal_position, sub.user_id, sub.company_id, sub.nbr, sub.type, sub.state,
|
||||
sub.categ_id, sub.date_due, sub.account_id, sub.account_line_id, sub.partner_bank_id,
|
||||
sub.product_qty, sub.price_total / cr.rate as price_total, sub.price_average /cr.rate as price_average,
|
||||
cr.rate as currency_rate, sub.residual / cr.rate as residual
|
||||
cr.rate as currency_rate, sub.residual / cr.rate as residual, sub.commercial_partner_id as commercial_partner_id
|
||||
"""
|
||||
return select_str
|
||||
|
||||
|
@ -170,7 +172,9 @@ class account_invoice_report(osv.osv):
|
|||
LEFT JOIN account_invoice a ON a.id = l.invoice_id
|
||||
WHERE a.id = ai.id)
|
||||
ELSE 1::bigint
|
||||
END::numeric AS residual
|
||||
END::numeric AS residual,
|
||||
ai.commercial_partner_id as commercial_partner_id,
|
||||
partner.country_id
|
||||
"""
|
||||
return select_str
|
||||
|
||||
|
@ -178,6 +182,7 @@ class account_invoice_report(osv.osv):
|
|||
from_str = """
|
||||
FROM account_invoice_line ail
|
||||
JOIN account_invoice ai ON ai.id = ail.invoice_id
|
||||
JOIN res_partner partner ON ai.commercial_partner_id = partner.id
|
||||
LEFT JOIN product_product pr ON pr.id = ail.product_id
|
||||
left JOIN product_template pt ON pt.id = pr.product_tmpl_id
|
||||
LEFT JOIN product_uom u ON u.id = ail.uos_id
|
||||
|
@ -193,7 +198,7 @@ class account_invoice_report(osv.osv):
|
|||
ai.partner_id, ai.payment_term, ai.period_id, u.name, ai.currency_id, ai.journal_id,
|
||||
ai.fiscal_position, ai.user_id, ai.company_id, ai.type, ai.state, pt.categ_id,
|
||||
ai.date_due, ai.account_id, ail.account_id, ai.partner_bank_id, ai.residual,
|
||||
ai.amount_total, u.uom_type, u.category_id
|
||||
ai.amount_total, u.uom_type, u.category_id, ai.commercial_partner_id, partner.country_id
|
||||
"""
|
||||
return group_by_str
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="commercial_partner_id" invisible="1"/>
|
||||
<field name="country_id" invisible="1"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="uom_name" invisible="not context.get('set_visible',False)"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
|
@ -65,7 +67,9 @@
|
|||
<field name="user_id" />
|
||||
<field name="categ_id" filter_domain="[('categ_id', 'child_of', self)]"/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="Partner" name="partner" icon="terp-partner" context="{'group_by':'partner_id','residual_visible':True}"/>
|
||||
<filter string="Partner" name="partner_id" context="{'group_by':'partner_id','residual_visible':True}"/>
|
||||
<filter string="Commercial Partner" name="commercial_partner_id" context="{'group_by':'commercial_partner_id','residual_visible':True}"/>
|
||||
<filter string="Commercial Partner's Country" name="country_id" context="{'group_by':'country_id'}"/>
|
||||
<filter string="Salesperson" name='user' icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Due Date" icon="terp-go-today" context="{'group_by':'date_due'}"/>
|
||||
<filter string="Period" icon="terp-go-month" context="{'group_by':'period_id'}" name="period"/>
|
||||
|
|
|
@ -189,11 +189,12 @@ class journal_print(report_sxw.rml_parse, common_report_header):
|
|||
return data['form']['amount_currency']
|
||||
|
||||
def _get_sortby(self, data):
|
||||
# TODO: deprecated, to remove in trunk
|
||||
if self.sort_selection == 'date':
|
||||
return 'Date'
|
||||
return self._translate('Date')
|
||||
elif self.sort_selection == 'ref':
|
||||
return 'Reference Number'
|
||||
return 'Date'
|
||||
return self._translate('Reference Number')
|
||||
return self._translate('Date')
|
||||
|
||||
report_sxw.report_sxw('report.account.journal.period.print', 'account.journal.period', 'addons/account/report/account_journal.rml', parser=journal_print, header='external')
|
||||
report_sxw.report_sxw('report.account.journal.period.print.sale.purchase', 'account.journal.period', 'addons/account/report/account_journal_sale_purchase.rml', parser=journal_print, header='external')
|
||||
|
|
|
@ -186,8 +186,8 @@
|
|||
</para>
|
||||
<blockTable colWidths="85.0,80.0,80.0,120.0,70.0,100.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre"> [[ data['model']=='account.journal.period'and 'Company' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre">[[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Company[[ data['model']=='account.journal.period'and ' ' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre">Chart of Accounts[[ data['model']=='ir.ui.menu' and ' ' or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journal</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Period</para></td>
|
||||
|
@ -199,8 +199,10 @@
|
|||
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ o.journal_id.name ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ o.period_id.name ]] </para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_sortby(data) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_target_move(data) ]] </para></td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">Date[[ data['form'].get('sort_selection', 'date') == 'date' and ' ' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_8">Reference Number[[ data['form'].get('sort_selection', 'date') == 'ref' and ' ' or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
|
|
|
@ -239,7 +239,7 @@
|
|||
<td><para style="terp_default_8">[[ line.account_id.code ]]</para></td>
|
||||
<td><para style="terp_default_8">[[ line.partner_id and strip_name(line.partner_id.name,15) ]]</para></td>
|
||||
<td><para style="terp_default_8">[[ strip_name(line.name,25) ]]</para></td>
|
||||
<td><para style="P8">[[ line.tax_code_id and (line.tax_code_id.code + ':') ]]</para></td>
|
||||
<td><para style="P8">[[ line.tax_code_id and line.tax_code_id.code and (line.tax_code_id.code + ':') ]]</para></td>
|
||||
<td><para style="terp_default_8">[[ line.tax_amount and formatLang(line.tax_amount, currency_obj=company.currency_id) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.debit, currency_obj=company.currency_id) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.credit, currency_obj=company.currency_id) ]]</para></td>
|
||||
|
@ -292,7 +292,7 @@
|
|||
<td><para style="terp_default_8">[[ line.account_id.code ]]</para></td>
|
||||
<td><para style="terp_default_8">[[ line.partner_id and strip_name(line.partner_id.name,12) ]]</para></td>
|
||||
<td><para style="terp_default_8">[[ strip_name(line.name,16) ]]</para></td>
|
||||
<td><para style="terp_default_8">[[ line.tax_code_id and (line.tax_code_id.code + ':') ]]</para></td>
|
||||
<td><para style="terp_default_8">[[ line.tax_code_id and line.tax_code_id.code and (line.tax_code_id.code + ':') ]]</para></td>
|
||||
<td><para style="P8">[[ line.tax_amount and formatLang(line.tax_amount, currency_obj=company.currency_id) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.debit, currency_obj=company.currency_id) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.credit, currency_obj=company.currency_id) ]]</para></td>
|
||||
|
|
|
@ -267,12 +267,13 @@ class third_party_ledger(report_sxw.rml_parse, common_report_header):
|
|||
return result_tmp + result_init
|
||||
|
||||
def _get_partners(self):
|
||||
# TODO: deprecated, to remove in trunk
|
||||
if self.result_selection == 'customer':
|
||||
return 'Receivable Accounts'
|
||||
return _('Receivable Accounts')
|
||||
elif self.result_selection == 'supplier':
|
||||
return 'Payable Accounts'
|
||||
return _('Payable Accounts')
|
||||
elif self.result_selection == 'customer_supplier':
|
||||
return 'Receivable and Payable Accounts'
|
||||
return _('Receivable and Payable Accounts')
|
||||
return ''
|
||||
|
||||
def _sum_currency_amount_account(self, account, form):
|
||||
|
|
|
@ -423,7 +423,9 @@
|
|||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_partners() ]]</para>
|
||||
<para style="terp_default_Centre_8">Receivable Accounts[[ data['form'].get('result_selection', 'customer') == 'customer' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_8">Payable Accounts[[ data['form'].get('result_selection', 'customer') == 'supplier' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_8">Receivable and Payable Accounts[[ data['form'].get('result_selection', 'customer') == 'customer_supplier' or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_target_move(data) ]]</para>
|
||||
|
|
|
@ -99,42 +99,39 @@
|
|||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer" fontName="Helvetica"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
|
||||
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Table" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0" fontName="Helvetica"/>
|
||||
<paraStyle name="Preformatted Text" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard"/>
|
||||
<paraStyle name="Text body" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index"/>
|
||||
|
||||
<paraStyle name="terp_header" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer"/>
|
||||
<paraStyle name="Horizontal Line" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
|
||||
<paraStyle name="terp_tblheader_General" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
|
||||
<paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
|
||||
|
||||
<paraStyle name="Table" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0"/>
|
||||
<paraStyle name="Preformatted Text" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
|
@ -144,12 +141,12 @@
|
|||
<pto_header><!-- Must be after setLang() -->
|
||||
<blockTable colWidths="202.0,87.0,71.0,57.0,42.0,71.0" style="Table7">
|
||||
<tr>
|
||||
<td> <para style="terp_tblheader_Details">Description</para> </td>
|
||||
<td> <para style="terp_tblheader_Details_Centre">Taxes</para> </td>
|
||||
<td> <para style="terp_tblheader_Details_Centre">Quantity</para> </td>
|
||||
<td> <para style="terp_tblheader_Details_Right">Unit Price </para> </td>
|
||||
<td> <para style="terp_tblheader_Details_Right">Disc.(%)</para> </td>
|
||||
<td> <para style="terp_tblheader_Details_Right">Price</para> </td>
|
||||
<td><para style="terp_tblheader_Details"><b>Description</b></para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre"><b>Taxes</b></para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre"><b>Quantity</b></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right"><b>Unit Price</b></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right"><b>Disc.(%)</b></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right"><b>Price</b></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</pto_header>
|
||||
|
@ -172,29 +169,29 @@
|
|||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_header">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="terp_header">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="terp_header">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header"><b>Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||
<para style="terp_header"><b>PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</b></para>
|
||||
<para style="terp_header"><b>Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</b></para>
|
||||
<para style="terp_header"><b>Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||
<para style="terp_header"><b>Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||
<para style="terp_header"><b>Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||
<para style="terp_header"><b>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Description</para>
|
||||
<para style="terp_tblheader_General_Centre"><b>Description</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Invoice Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Source</para>
|
||||
<para style="terp_tblheader_General_Centre"><b>Invoice Date</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Customer Code</para>
|
||||
<para style="terp_tblheader_General_Centre"><b>Source</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>Customer Code</b></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -220,22 +217,22 @@
|
|||
<blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General">Description</para>
|
||||
<para style="terp_tblheader_General"><b>Description</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Taxes</para>
|
||||
<para style="terp_tblheader_General_Centre"><b>Taxes</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Right">Quantity</para>
|
||||
<para style="terp_tblheader_General_Right"><b>Quantity</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Right">Unit Price</para>
|
||||
<para style="terp_tblheader_General_Right"><b>Unit Price</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Right">Disc.(%)</para>
|
||||
<para style="terp_tblheader_General_Right"><b>Disc.(%)</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Right">Price</para>
|
||||
<para style="terp_tblheader_General_Right"><b>Price</b></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -298,10 +295,10 @@
|
|||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Total:</para>
|
||||
<para style="terp_tblheader_Details"><b>Total:</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_Right_9">[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
|
||||
<para style="terp_default_Bold_Right_9"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</b></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -311,13 +308,13 @@
|
|||
<blockTable colWidths="205.0,71.0,71.0,183.0" style="Table9">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</para>
|
||||
<para style="terp_tblheader_Details"><b>Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Base </para>
|
||||
<para style="terp_tblheader_Details_Right"><b>Base </b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Amount </para>
|
||||
<para style="terp_tblheader_Details_Right"><b>Amount </b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
|
@ -361,7 +358,7 @@
|
|||
<blockTable colWidths="120.0,410.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Fiscal Position Remark : </para>
|
||||
<para style="terp_default_Bold_9"><b>Fiscal Position Remark : </b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (o.fiscal_position and o.fiscal_position.note and format(o.fiscal_position.note)) or removeParentNode('blockTable') ]]</para>
|
||||
|
|
|
@ -25,6 +25,7 @@ from dateutil.relativedelta import relativedelta
|
|||
from operator import itemgetter
|
||||
from os.path import join as opj
|
||||
|
||||
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT as DF
|
||||
from openerp.tools.translate import _
|
||||
from openerp.osv import fields, osv
|
||||
from openerp import tools
|
||||
|
@ -132,12 +133,43 @@ class account_config_settings(osv.osv_memory):
|
|||
count = self.pool.get('res.company').search_count(cr, uid, [], context=context)
|
||||
return bool(count == 1)
|
||||
|
||||
def _get_default_fiscalyear_data(self, cr, uid, company_id, context=None):
|
||||
"""Compute default period, starting and ending date for fiscalyear
|
||||
- if in a fiscal year, use its period, starting and ending date
|
||||
- if past fiscal year, use its period, and new dates [ending date of the latest +1 day ; ending date of the latest +1 year]
|
||||
- if no fiscal year, use monthly, 1st jan, 31th dec of this year
|
||||
:return: (date_start, date_stop, period) at format DEFAULT_SERVER_DATETIME_FORMAT
|
||||
"""
|
||||
fiscalyear_ids = self.pool.get('account.fiscalyear').search(cr, uid,
|
||||
[('date_start', '<=', time.strftime(DF)), ('date_stop', '>=', time.strftime(DF)),
|
||||
('company_id', '=', company_id)])
|
||||
if fiscalyear_ids:
|
||||
# is in a current fiscal year, use this one
|
||||
fiscalyear = self.pool.get('account.fiscalyear').browse(cr, uid, fiscalyear_ids[0], context=context)
|
||||
if len(fiscalyear.period_ids) == 5: # 4 periods of 3 months + opening period
|
||||
period = '3months'
|
||||
else:
|
||||
period = 'month'
|
||||
return (fiscalyear.date_start, fiscalyear.date_stop, period)
|
||||
else:
|
||||
past_fiscalyear_ids = self.pool.get('account.fiscalyear').search(cr, uid,
|
||||
[('date_stop', '<=', time.strftime(DF)), ('company_id', '=', company_id)])
|
||||
if past_fiscalyear_ids:
|
||||
# use the latest fiscal, sorted by (start_date, id)
|
||||
latest_year = self.pool.get('account.fiscalyear').browse(cr, uid, past_fiscalyear_ids[-1], context=context)
|
||||
latest_stop = datetime.datetime.strptime(latest_year.date_stop, DF)
|
||||
if len(latest_year.period_ids) == 5:
|
||||
period = '3months'
|
||||
else:
|
||||
period = 'month'
|
||||
return ((latest_stop+datetime.timedelta(days=1)).strftime(DF), latest_stop.replace(year=latest_stop.year+1).strftime(DF), period)
|
||||
else:
|
||||
return (time.strftime('%Y-01-01'), time.strftime('%Y-12-31'), 'month')
|
||||
|
||||
|
||||
_defaults = {
|
||||
'company_id': _default_company,
|
||||
'has_default_company': _default_has_default_company,
|
||||
'date_start': lambda *a: time.strftime('%Y-01-01'),
|
||||
'date_stop': lambda *a: time.strftime('%Y-12-31'),
|
||||
'period': 'month',
|
||||
}
|
||||
|
||||
def create(self, cr, uid, values, context=None):
|
||||
|
@ -161,6 +193,7 @@ class account_config_settings(osv.osv_memory):
|
|||
fiscalyear_count = self.pool.get('account.fiscalyear').search_count(cr, uid,
|
||||
[('date_start', '<=', time.strftime('%Y-%m-%d')), ('date_stop', '>=', time.strftime('%Y-%m-%d')),
|
||||
('company_id', '=', company_id)])
|
||||
date_start, date_stop, period = self._get_default_fiscalyear_data(cr, uid, company_id, context=context)
|
||||
values = {
|
||||
'expects_chart_of_accounts': company.expects_chart_of_accounts,
|
||||
'currency_id': company.currency_id.id,
|
||||
|
@ -170,6 +203,9 @@ class account_config_settings(osv.osv_memory):
|
|||
'has_fiscal_year': bool(fiscalyear_count),
|
||||
'chart_template_id': False,
|
||||
'tax_calculation_rounding_method': company.tax_calculation_rounding_method,
|
||||
'date_start': date_start,
|
||||
'date_stop': date_stop,
|
||||
'period': period,
|
||||
}
|
||||
# update journals and sequences
|
||||
for journal_type in ('sale', 'sale_refund', 'purchase', 'purchase_refund'):
|
||||
|
@ -302,4 +338,10 @@ class account_config_settings(osv.osv_memory):
|
|||
dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
|
||||
dp.write({'digits': config.decimal_precision})
|
||||
|
||||
def onchange_analytic_accounting(self, cr, uid, ids, analytic_accounting, context=None):
|
||||
if analytic_accounting:
|
||||
return {'value': {
|
||||
'module_account_accountant': True,
|
||||
}}
|
||||
return {}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
<label for="module_account_accountant"/>
|
||||
</div>
|
||||
<div>
|
||||
<field name="group_analytic_accounting" class="oe_inline"/>
|
||||
<field name="group_analytic_accounting" class="oe_inline" on_change="onchange_analytic_accounting(group_analytic_accounting, context)"/>
|
||||
<label for="group_analytic_accounting"/>
|
||||
</div>
|
||||
<div>
|
||||
|
|
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 143 KiB |
|
@ -0,0 +1,205 @@
|
|||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<h2 class="oe_slogan">Accounting Made Easy</h2>
|
||||
<h3 class="oe_slogan">Beautiful, easy, full featured</h3>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_demo oe_picture oe_screenshot">
|
||||
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=account">
|
||||
<img src="account_sc_00.png" alt="Online Demo">
|
||||
</a>
|
||||
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class='oe_mt32'>
|
||||
By far the most beautiful and full featured accounting software. OpenERP Accounting allows a better way to collaborate with your accountants, your customers and control your suppliers.</p>
|
||||
<p>
|
||||
Activate features on demand, from integrated analytic accounting to budget, assets and multiple companies consolidation.
|
||||
</p>
|
||||
<div class="oe_centeralign oe_websiteonly">
|
||||
<a href="http://www.openerp.com/start?app=account" class="oe_button oe_big oe_tacky">Start your <span class="oe_emph">free</span> trial</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container oe_dark">
|
||||
<div class="oe_row">
|
||||
<h2 class="oe_slogan">A Smart User Interface</h2>
|
||||
<div class="oe_span6">
|
||||
<p class='oe_mt32'>
|
||||
Record transactions in a few clicks and easily manage all financial activities
|
||||
in one place. OpenERP's user interface is designed with productivity in mind.
|
||||
</p>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<img class="oe_picture oe_screenshot" src="account_sc_01.png">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row">
|
||||
<h2 class="oe_slogan">A Better Way To Work – Together</h2>
|
||||
<div class="oe_span6">
|
||||
<img class="oe_picture oe_screenshot" src="account_sc_02.png">
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class='oe_mt32'>
|
||||
Share access to your latest business numbers with your team and your accountant – so everyone is up to speed. From work, home or on the go.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container oe_dark">
|
||||
<div class="oe_row">
|
||||
<h2 class="oe_slogan">Connect Your Bank Accounts</h2>
|
||||
<div class="oe_span6">
|
||||
<p class='oe_mt32'>
|
||||
Import your bank statements and reconcile them in just a few clicks. Prepare payment orders based on your supplier invoices and payment terms.
|
||||
</p>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<img class="oe_picture" src="account_illu_01.png">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<h2 class="oe_slogan">Get Paid Faster</h2>
|
||||
<h3 class="oe_slogan">Electronic invoicing and automated follow-ups</h3>
|
||||
<div class="oe_row">
|
||||
<div class="oe_span6">
|
||||
<img class="oe_picture oe_screenshot" src="account_sc_03.png">
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class='oe_mt32'>
|
||||
Create and send professional invoices & get paid online. Get rid of the stress of having to constantly remind your debtors. Simply set-up and automate follow-ups to get paid quickly.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container oe_dark">
|
||||
<div class="oe_row">
|
||||
<h2 class="oe_slogan">Sales Integration</h2>
|
||||
<div class="oe_span6">
|
||||
<p class='oe_mt32'>
|
||||
Automatically create invoices from sales orders, delivery orders or base them on time and material. Re-invoice expenses on projects to your customer in just a few clicks.
|
||||
</p>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<img class="oe_picture oe_screenshot" src="account_sc_04.png">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row">
|
||||
<div class="oe_span6">
|
||||
<img class="oe_picture oe_screenshot" src="account_sc_05.png">
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<h2 class="oe_slogan">Purchase Integration</h2>
|
||||
<p class='oe_mt32'>
|
||||
Control supplier invocies based on purchase orders. Get real-time inventory valuation reports automatically posted in your accounts.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container oe_dark">
|
||||
<div class="oe_row">
|
||||
<h2 class="oe_slogan">Multi-Level Analytic Accounting</h2>
|
||||
<div class="oe_span6">
|
||||
<p class='oe_mt32'>
|
||||
Integrate your analytic accounting operations with timesheets, projects, invoices, expenses, etc. No need to record transactions, all analytic entries are posted automatically following your business rules.
|
||||
</p>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<img class="oe_picture oe_screenshot" src="account_sc_06.png">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row">
|
||||
<h2 class="oe_slogan">Everything you need to grow</h2>
|
||||
<div class="oe_span6">
|
||||
<img src="account_illu_02.png">
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class='oe_mt32'>
|
||||
Manage your assets, track expenses, control budgets, multi-level analytic accounting; OpenERP has all the features you need to sustain all your business activities.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="oe_container oe_dark">
|
||||
<div class="oe_row">
|
||||
<h2 class="oe_slogan">Scale With Your Organization</h2>
|
||||
<h3 class="oe_slogan">Used by very small to very large organizations</h3>
|
||||
<div class="oe_span6">
|
||||
<p class='oe_mt32'>
|
||||
OpenERP supports multiple currencies, multiple users with different access rights, multiple companies with real time consolidation and unlimited analytic plans.
|
||||
</p>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<img class="oe_picture oe_screenshot" src="account_illu_03.png">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row">
|
||||
<h2 class="oe_slogan">Dashboard & KPIs</h2>
|
||||
<div class="oe_span6">
|
||||
<img class="oe_picture oe_screenshot" src="account_sc_06.png">
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class='oe_mt32'>
|
||||
Get direct access to key information with dynamic and customizable dashboards. Analyse your financial activities with the drill-up, drill-down, drill-across and filter features.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="oe_container oe_dark">
|
||||
<div class="oe_row">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Many companies already enjoy it</h2>
|
||||
<h3 class="oe_slogan">Hear what they have to say !</h3>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_quote">
|
||||
<q>
|
||||
OpenERP Accounting is a great way to record all business transactions
|
||||
right when they happen. Awesome and cost-effective!
|
||||
</q>
|
||||
<cite class="oe_cite oe_clearfix oe_ml64">
|
||||
<div class="oe_author">Wolfgang Taferner</div>
|
||||
<div class="oe_job"><a href="http://tapo-it.at/en/" target="_blank">Tapo</a>, Austria.</div>
|
||||
</cite>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_quote">
|
||||
<q>
|
||||
We have found accounting module of OpenERP to be user
|
||||
friendly and highly customizable. It proved to be an accounting gem.
|
||||
</q>
|
||||
<cite class="oe_cite oe_clearfix">
|
||||
<img class="oe_photo" src="testimonial_sunil.jpg">
|
||||
<div class="oe_author">Col. Sunil Prem.</div>
|
||||
<div class="oe_job">Director of <a href="http://www.navyuginfo.com" target="_blank">Navyug Infosolutions Pvt. Ltd</a>.</div>
|
||||
</cite>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 2.9 KiB |
|
@ -84,7 +84,7 @@ openerp.account.quickadd = function (instance) {
|
|||
},
|
||||
search_by_journal_period: function() {
|
||||
var self = this;
|
||||
var domain = [];
|
||||
var domain = ['|',['debit', '!=', 0], ['credit', '!=', 0]];
|
||||
if (self.current_journal !== null) domain.push(["journal_id", "=", self.current_journal]);
|
||||
if (self.current_period !== null) domain.push(["period_id", "=", self.current_period]);
|
||||
self.last_context["journal_id"] = self.current_journal === null ? false : self.current_journal;
|
||||
|
|
|
@ -26,7 +26,7 @@ openerp.account = function (instance) {
|
|||
if (this.partners) {
|
||||
this.$el.prepend(QWeb.render("AccountReconciliation", {widget: this}));
|
||||
this.$(".oe_account_recon_previous").click(function() {
|
||||
self.current_partner = (self.current_partner - 1) % self.partners.length;
|
||||
self.current_partner = (((self.current_partner - 1) % self.partners.length) + self.partners.length) % self.partners.length;
|
||||
self.search_by_partner();
|
||||
});
|
||||
this.$(".oe_account_recon_next").click(function() {
|
||||
|
|
|
@ -38,7 +38,7 @@ class account_fiscalyear_close(osv.osv_memory):
|
|||
'report_name': fields.char('Name of new entries',size=64, required=True, help="Give name of the new entries"),
|
||||
}
|
||||
_defaults = {
|
||||
'report_name': _('End of Fiscal Year Entry'),
|
||||
'report_name': lambda self, cr, uid, context: _('End of Fiscal Year Entry'),
|
||||
}
|
||||
|
||||
def data_save(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -148,7 +148,6 @@ class account_move_line_reconcile_writeoff(osv.osv_memory):
|
|||
context['analytic_id'] = data['analytic_id'][0]
|
||||
if context['date_p']:
|
||||
date = context['date_p']
|
||||
|
||||
ids = period_obj.find(cr, uid, dt=date, context=context)
|
||||
if ids:
|
||||
period_id = ids[0]
|
||||
|
|
|
@ -175,7 +175,7 @@ class account_common_report(osv.osv_memory):
|
|||
data['form'][field] = data['form'][field][0]
|
||||
used_context = self._build_contexts(cr, uid, ids, data, context=context)
|
||||
data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or []
|
||||
data['form']['used_context'] = used_context
|
||||
data['form']['used_context'] = dict(used_context, lang=context.get('lang', 'en_US'))
|
||||
return self._print_report(cr, uid, ids, data, context=context)
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class account_tax_chart(osv.osv_memory):
|
|||
|
||||
def _get_period(self, cr, uid, context=None):
|
||||
"""Return default period value"""
|
||||
period_ids = self.pool.get('account.period').find(cr, uid)
|
||||
period_ids = self.pool.get('account.period').find(cr, uid, context=context)
|
||||
return period_ids and period_ids[0] or False
|
||||
|
||||
def account_tax_chart_open_window(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -57,7 +57,7 @@ class validate_account_move_lines(osv.osv_memory):
|
|||
move_ids.append(line.move_id.id)
|
||||
move_ids = list(set(move_ids))
|
||||
if not move_ids:
|
||||
raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move enties in draft state.'))
|
||||
raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move entries in draft state.'))
|
||||
obj_move.button_validate(cr, uid, move_ids, context)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#!/usr/bin/env python
|
||||
from openerp.osv import fields, osv
|
||||
import openerp.addons.decimal_precision as dp
|
||||
from openerp.tools.translate import _
|
||||
|
@ -23,7 +22,7 @@ class CashBox(osv.osv_memory):
|
|||
|
||||
records = self.pool[active_model].browse(cr, uid, active_ids, context=context)
|
||||
|
||||
return self._run(cr, uid, ids, records, context=None)
|
||||
return self._run(cr, uid, ids, records, context=context)
|
||||
|
||||
def _run(self, cr, uid, ids, records, context=None):
|
||||
for box in self.browse(cr, uid, ids, context=context):
|
||||
|
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -259,17 +259,14 @@ class account_analytic_account(osv.osv):
|
|||
return res
|
||||
|
||||
if child_ids:
|
||||
cr.execute("SELECT account_analytic_line.account_id, COALESCE(SUM(amount), 0.0) \
|
||||
FROM account_analytic_line \
|
||||
JOIN account_analytic_journal \
|
||||
ON account_analytic_line.journal_id = account_analytic_journal.id \
|
||||
WHERE account_analytic_line.account_id IN %s \
|
||||
AND account_analytic_journal.type = 'sale' \
|
||||
GROUP BY account_analytic_line.account_id", (child_ids,))
|
||||
for account_id, sum in cr.fetchall():
|
||||
res[account_id] = round(sum,2)
|
||||
#Search all invoice lines not in cancelled state that refer to this analytic account
|
||||
inv_line_obj = self.pool.get("account.invoice.line")
|
||||
inv_lines = inv_line_obj.search(cr, uid, ['&', ('account_analytic_id', 'in', child_ids), ('invoice_id.state', '!=', 'cancel')], context=context)
|
||||
for line in inv_line_obj.browse(cr, uid, inv_lines, context=context):
|
||||
res[line.account_analytic_id.id] += line.price_subtotal
|
||||
for acc in self.browse(cr, uid, res.keys(), context=context):
|
||||
res[acc.id] = res[acc.id] - (acc.timesheet_ca_invoiced or 0.0)
|
||||
|
||||
res_final = res
|
||||
return res_final
|
||||
|
||||
|
@ -481,7 +478,7 @@ class account_analytic_account(osv.osv):
|
|||
'remaining_hours': fields.function(_remaining_hours_calc, type='float', string='Remaining Time',
|
||||
help="Computed using the formula: Maximum Time - Total Worked Time"),
|
||||
'remaining_hours_to_invoice': fields.function(_remaining_hours_to_invoice_calc, type='float', string='Remaining Time',
|
||||
help="Computed using the formula: Maximum Time - Total Invoiced Time"),
|
||||
help="Computed using the formula: Expected on timesheets - Total invoiced on timesheets"),
|
||||
'fix_price_to_invoice': fields.function(_fix_price_to_invoice_calc, type='float', string='Remaining Time',
|
||||
help="Sum of quotations for this contract."),
|
||||
'timesheet_ca_invoiced': fields.function(_timesheet_ca_invoiced_calc, type='float', string='Remaining Time',
|
||||
|
@ -633,6 +630,21 @@ class account_analytic_account(osv.osv):
|
|||
pass
|
||||
return result
|
||||
|
||||
|
||||
def hr_to_invoice_timesheets(self, cr, uid, ids, context=None):
|
||||
domain = [('invoice_id','=',False),('to_invoice','!=',False), ('journal_id.type', '=', 'general'), ('account_id', 'in', ids)]
|
||||
names = [record.name for record in self.browse(cr, uid, ids, context=context)]
|
||||
name = _('Timesheets to Invoice of %s') % ','.join(names)
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': name,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'domain' : domain,
|
||||
'res_model': 'account.analytic.line',
|
||||
'nodestroy': True,
|
||||
}
|
||||
|
||||
def _prepare_invoice(self, cr, uid, contract, context=None):
|
||||
context = context or {}
|
||||
|
||||
|
@ -641,7 +653,7 @@ class account_analytic_account(osv.osv):
|
|||
fpos_obj = self.pool.get('account.fiscal.position')
|
||||
|
||||
if not contract.partner_id:
|
||||
raise osv.except_osv(_('No Customer Defined !'),_("You must first select a Customer for Contract %s!") % contract.name )
|
||||
raise osv.except_osv(_('No Customer Defined!'),_("You must first select a Customer for Contract %s!") % contract.name )
|
||||
|
||||
fpos = contract.partner_id.property_account_position.id or False
|
||||
journal_ids = journal_obj.search(cr, uid, [('type', '=','sale'),('company_id', '=', contract.company_id.id or False)], limit=1)
|
||||
|
|
|
@ -98,8 +98,8 @@
|
|||
<field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
|
||||
</td><td class="oe_timesheet_action" attrs="{'invisible': ['|',('invoice_on_timesheets','=',False),('type','=','template')]}">
|
||||
<span attrs="{'invisible': [('ca_to_invoice','=',0.0)]}" class="oe_grey">
|
||||
<button name="%(hr_timesheet_invoice.action_hr_timesheet_invoice_create_final)d"
|
||||
type="action"
|
||||
<button name="hr_to_invoice_timesheets"
|
||||
type="object"
|
||||
class="oe_link"
|
||||
string="⇒ Invoice"/>
|
||||
or view
|
||||
|
@ -213,7 +213,7 @@
|
|||
<search string="Contracts">
|
||||
<field name="name" filter_domain="['|', ('name','ilike',self),('code','ilike',self)]" string="Contract"/>
|
||||
<field name="date"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
|
||||
<field name="manager_id"/>
|
||||
<field name="parent_id"/>
|
||||
<filter name="open" string="In Progress" domain="[('state','in',('open','draft'))]" help="Contracts in progress (open, draft)"/>
|
||||
|
|
|
@ -7,19 +7,19 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 6.0dev_rc3\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
||||
"PO-Revision-Date: 2011-02-19 12:16+0000\n"
|
||||
"PO-Revision-Date: 2013-06-19 13:43+0000\n"
|
||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-03-16 05:25+0000\n"
|
||||
"X-Generator: Launchpad (build 16532)\n"
|
||||
"X-Launchpad-Export-Date: 2013-06-20 05:17+0000\n"
|
||||
"X-Generator: Launchpad (build 16673)\n"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
msgid "No order to invoice, create"
|
||||
msgstr ""
|
||||
msgstr "Нет заказа для счета, создать"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
|
@ -39,7 +39,7 @@ msgstr "Остаётся"
|
|||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
msgid "Contracts in progress"
|
||||
msgstr ""
|
||||
msgstr "Незавершенные контракты"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,last_worked_invoiced_date:0
|
||||
|
@ -73,7 +73,7 @@ msgstr ""
|
|||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
msgid "⇒ Invoice"
|
||||
msgstr ""
|
||||
msgstr "⇒ Счет"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,ca_invoiced:0
|
||||
|
@ -88,7 +88,7 @@ msgstr "Дата последнего счета расходов"
|
|||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,fix_price_to_invoice:0
|
||||
msgid "Sum of quotations for this contract."
|
||||
msgstr ""
|
||||
msgstr "Сумма предложений по этому контракту."
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,ca_invoiced:0
|
||||
|
@ -98,18 +98,18 @@ msgstr "Итого сумма к оплате заказчику для этог
|
|||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,timesheet_ca_invoiced:0
|
||||
msgid "Sum of timesheet lines invoiced for this contract."
|
||||
msgstr ""
|
||||
msgstr "Сумма позиций табеля выставленная в счет за этот контракт ."
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: code:addons/account_analytic_analysis/account_analytic_analysis.py:466
|
||||
#: code:addons/account_analytic_analysis/account_analytic_analysis.py:464
|
||||
#, python-format
|
||||
msgid "Sales Order Lines of %s"
|
||||
msgstr ""
|
||||
msgstr "Позиции заказа продаж %s"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,revenue_per_hour:0
|
||||
msgid "Computed using the formula: Invoiced Amount / Total Time"
|
||||
msgstr ""
|
||||
msgstr "Рассчитанный по формуле: Сумма по счетам / Итоговое время"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account_analytic_analysis.summary.month,account_id:0
|
||||
|
@ -126,7 +126,7 @@ msgstr "Партнёр"
|
|||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
msgid "Contracts that are not assigned to an account manager."
|
||||
msgstr ""
|
||||
msgstr "Контракты, которые не назначены бухгалтеру."
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.actions.act_window,help:account_analytic_analysis.action_account_analytic_overdue
|
||||
|
@ -161,6 +161,7 @@ msgstr "Управляющий счётом"
|
|||
#: help:account.analytic.account,remaining_hours_to_invoice:0
|
||||
msgid "Computed using the formula: Maximum Time - Total Invoiced Time"
|
||||
msgstr ""
|
||||
"Рассчитанный по формуле: Максимальное время - Всё время выставленное в счетах"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
|
@ -170,12 +171,12 @@ msgstr "Ожидается"
|
|||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
msgid "Contracts not assigned"
|
||||
msgstr ""
|
||||
msgstr "Контракты не назначены"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,theorical_margin:0
|
||||
msgid "Computed using the formula: Theoretical Revenue - Total Costs"
|
||||
msgstr ""
|
||||
msgstr "Рассчитанный по формуле: теоретическая выручка - общие издержки"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,hours_qtt_invoiced:0
|
||||
|
@ -196,6 +197,8 @@ msgid ""
|
|||
"{'required': [('type','=','contract')], 'invisible': [('type','in',['view', "
|
||||
"'normal','template'])]}"
|
||||
msgstr ""
|
||||
"{'required': [('type','=','contract')], 'invisible': [('type','in',['view', "
|
||||
"'normal','template'])]}"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,real_margin_rate:0
|
||||
|
@ -217,17 +220,17 @@ msgstr ""
|
|||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
msgid "Nothing to invoice, create"
|
||||
msgstr ""
|
||||
msgstr "Нечего выставить в счете, создать"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:res.groups,name:account_analytic_analysis.group_template_required
|
||||
msgid "Mandatory use of templates in contracts"
|
||||
msgstr ""
|
||||
msgstr "Обязательное использование шаблонов в контрактах"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,hours_quantity:0
|
||||
msgid "Total Worked Time"
|
||||
msgstr ""
|
||||
msgstr "Всё отработанное время"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,real_margin:0
|
||||
|
@ -247,12 +250,12 @@ msgstr "Вычисляется по формуле: (Реальная маржа
|
|||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
msgid "or view"
|
||||
msgstr ""
|
||||
msgstr "или вид"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
msgid "Customer Contracts"
|
||||
msgstr ""
|
||||
msgstr "Контакты заказчика"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
|
@ -269,7 +272,7 @@ msgstr "Месяц"
|
|||
#: model:ir.actions.act_window,name:account_analytic_analysis.action_hr_tree_invoiced_all
|
||||
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_hr_tree_invoiced_all
|
||||
msgid "Time & Materials to Invoice"
|
||||
msgstr ""
|
||||
msgstr "Время и материалы в счет"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
|
@ -335,15 +338,16 @@ msgstr "Теоретическая выручка"
|
|||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
msgid "To Renew"
|
||||
msgstr ""
|
||||
msgstr "К продлению"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
msgid ""
|
||||
"A contract in OpenERP is an analytic account having a partner set on it."
|
||||
msgstr ""
|
||||
msgstr "Контракт в OpenERP это аналитический счет с установленным партнером."
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
#: model:ir.actions.act_window,name:account_analytic_analysis.action_sales_order
|
||||
msgid "Sales Orders"
|
||||
msgstr "Заказы продаж"
|
||||
|
@ -410,7 +414,7 @@ msgstr ""
|
|||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,revenue_per_hour:0
|
||||
msgid "Revenue per Time (real)"
|
||||
msgstr ""
|
||||
msgstr "Выручка за время (реальная)"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.actions.act_window,help:account_analytic_analysis.action_account_analytic_overdue_all
|
||||
|
@ -431,7 +435,7 @@ msgstr ""
|
|||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,toinvoice_total:0
|
||||
msgid "Total to Invoice"
|
||||
msgstr ""
|
||||
msgstr "Всего в счет"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
|
@ -546,18 +550,18 @@ msgstr "Дата последней операции по этому счету.
|
|||
#. module: account_analytic_analysis
|
||||
#: model:ir.model,name:account_analytic_analysis.model_sale_config_settings
|
||||
msgid "sale.config.settings"
|
||||
msgstr ""
|
||||
msgstr "sale.config.settings"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:sale.config.settings,group_template_required:0
|
||||
msgid "Mandatory use of templates."
|
||||
msgstr ""
|
||||
msgstr "Обязательное использование шаблонов."
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.actions.act_window,name:account_analytic_analysis.template_of_contract_action
|
||||
#: model:ir.ui.menu,name:account_analytic_analysis.menu_template_of_contract_action
|
||||
msgid "Contract Template"
|
||||
msgstr ""
|
||||
msgstr "Шаблон контракта"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
|
@ -576,7 +580,7 @@ msgstr ""
|
|||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,est_total:0
|
||||
msgid "Total Estimation"
|
||||
msgstr ""
|
||||
msgstr "Общая оценка"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,remaining_ca:0
|
||||
|
@ -612,7 +616,7 @@ msgstr ""
|
|||
#. module: account_analytic_analysis
|
||||
#: view:account.analytic.account:0
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
msgstr "Итого"
|
||||
|
||||
#~ msgid "Hours summary by user"
|
||||
#~ msgstr "Итого часов по пользователям"
|
||||
|
|
|
@ -72,8 +72,8 @@ class account_invoice_line(osv.osv):
|
|||
_inherit = "account.invoice.line"
|
||||
_description = "Invoice Line"
|
||||
|
||||
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
|
||||
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id=currency_id, context=context, company_id=company_id)
|
||||
def product_id_change(self, cr, uid, ids, product, uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
|
||||
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom_id, qty, name, type, partner_id, fposition_id, price_unit, currency_id=currency_id, context=context, company_id=company_id)
|
||||
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
|
||||
if rec:
|
||||
res_prod['value'].update({'account_analytic_id': rec.analytic_id.id})
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<record id="analytic_default_comp_rule" model="ir.rule">
|
||||
<field name="name">Analytic Default multi company rule</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_analytic_default"/>
|
||||
<field name="model_id" ref="model_account_analytic_default"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
|
|
@ -332,7 +332,7 @@ class account_move_line(osv.osv):
|
|||
for line in self.browse(cr, uid, ids, context=context):
|
||||
if line.analytics_id:
|
||||
if not line.journal_id.analytic_journal_id:
|
||||
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal.") % (line.journal_id.name,))
|
||||
raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal.") % (line.journal_id.name,))
|
||||
|
||||
toremove = analytic_line_obj.search(cr, uid, [('move_id','=',line.id)], context=context)
|
||||
if toremove:
|
||||
|
@ -471,7 +471,7 @@ class account_bank_statement(osv.osv):
|
|||
for st_line in st.line_ids:
|
||||
if st_line.analytics_id:
|
||||
if not st.journal_id.analytic_journal_id:
|
||||
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal.") % (st.journal_id.name,))
|
||||
raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal.") % (st.journal_id.name,))
|
||||
if not st_line.amount:
|
||||
continue
|
||||
return True
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<field name="inherit_id" ref="account.view_account_journal_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="centralisation" position="before">
|
||||
<field name="plan_id" />
|
||||
<field name="plan_id" groups="analytic.group_analytic_accounting"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -248,9 +248,12 @@
|
|||
<field name="model">account.analytic.default</field>
|
||||
<field name="inherit_id" ref="account_analytic_default.view_account_analytic_default_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="analytic_id" required="1" position="replace">
|
||||
<xpath expr="//field[@name='analytic_id']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='analytic_id']" position="after">
|
||||
<field name="analytics_id" required="1"/>
|
||||
</field>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -7,14 +7,14 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||
"PO-Revision-Date: 2012-12-28 10:00+0000\n"
|
||||
"PO-Revision-Date: 2013-05-31 07:41+0000\n"
|
||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-03-16 05:26+0000\n"
|
||||
"X-Generator: Launchpad (build 16532)\n"
|
||||
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build 16660)\n"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.instance,account4_ids:0
|
||||
|
@ -48,7 +48,7 @@ msgstr "Ставка (%)"
|
|||
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
|
||||
#, python-format
|
||||
msgid "The total should be between %s and %s."
|
||||
msgstr ""
|
||||
msgstr "Итог должен быть между %s и %s."
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: view:account.analytic.plan:0
|
||||
|
@ -131,7 +131,7 @@ msgstr "Не показывать пустые строки"
|
|||
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:61
|
||||
#, python-format
|
||||
msgid "There are no analytic lines related to account %s."
|
||||
msgstr ""
|
||||
msgstr "Нет позиций аналитики относящихся к счету %s."
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.instance,account3_ids:0
|
||||
|
@ -315,7 +315,7 @@ msgstr "Журнал аналитики"
|
|||
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
|
||||
#, python-format
|
||||
msgid "Please put a name and a code before saving the model."
|
||||
msgstr ""
|
||||
msgstr "Пожалуйста, введите имя и код перед сохранением модели."
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: report:account.analytic.account.crossovered.analytic:0
|
||||
|
@ -347,7 +347,7 @@ msgstr "Журнал"
|
|||
#: code:addons/account_analytic_plans/account_analytic_plans.py:486
|
||||
#, python-format
|
||||
msgid "You have to define an analytic journal on the '%s' journal."
|
||||
msgstr ""
|
||||
msgstr "Вы должны определить журнал аналитики для журнала '%s'"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: code:addons/account_analytic_plans/account_analytic_plans.py:342
|
||||
|
@ -375,7 +375,7 @@ msgstr "Позиция счета"
|
|||
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
|
||||
#, python-format
|
||||
msgid "There is no analytic plan defined."
|
||||
msgstr ""
|
||||
msgstr "Аналитический план счетов не определен."
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement
|
||||
|
@ -402,7 +402,7 @@ msgstr "Разнесение аналитики"
|
|||
#: code:addons/account_analytic_plans/account_analytic_plans.py:221
|
||||
#, python-format
|
||||
msgid "A model with this name and code already exists."
|
||||
msgstr ""
|
||||
msgstr "Модель с таким названием и кодом уже существует."
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: help:account.analytic.plan.line,root_analytic_id:0
|
||||
|
|
|
@ -43,7 +43,8 @@ account.""",
|
|||
'depends': ['product', 'purchase'],
|
||||
'category': 'Accounting & Finance',
|
||||
'demo': [],
|
||||
'data': ['product_view.xml',],
|
||||
'data': ['product_view.xml'],
|
||||
'test': ['test/anglo_saxon.yml', 'test/anglo_saxon_avg_fifo.yml'],
|
||||
'auto_install': False,
|
||||
'installable': True,
|
||||
}
|
||||
|
|
|
@ -117,28 +117,34 @@ class account_invoice_line(osv.osv):
|
|||
for line in res:
|
||||
if a == line['account_id'] and i_line.product_id.id == line['product_id']:
|
||||
uom = i_line.product_id.uos_id or i_line.product_id.uom_id
|
||||
standard_price = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.product_id.standard_price, i_line.uos_id.id)
|
||||
if standard_price != i_line.price_unit and line['price_unit'] == i_line.price_unit and acc:
|
||||
price_diff = i_line.price_unit - standard_price
|
||||
line.update({'price':standard_price * line['quantity']})
|
||||
valuation_price_unit = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.product_id.standard_price, i_line.uos_id.id)
|
||||
if i_line.product_id.cost_method != 'standard' and i_line.purchase_line_id:
|
||||
#for average/fifo/lifo costing method, fetch real cost price from incomming moves
|
||||
stock_move_obj = self.pool.get('stock.move')
|
||||
valuation_stock_move = stock_move_obj.search(cr, uid, [('purchase_line_id', '=', i_line.purchase_line_id.id)], limit=1, context=context)
|
||||
if valuation_stock_move:
|
||||
valuation_price_unit = stock_move_obj.browse(cr, uid, valuation_stock_move[0], context=context).price_unit
|
||||
if valuation_price_unit != i_line.price_unit and line['price_unit'] == i_line.price_unit and acc:
|
||||
price_diff = i_line.price_unit - valuation_price_unit
|
||||
line.update({'price': valuation_price_unit * line['quantity']})
|
||||
diff_res.append({
|
||||
'type':'src',
|
||||
'type': 'src',
|
||||
'name': i_line.name[:64],
|
||||
'price_unit':price_diff,
|
||||
'quantity':line['quantity'],
|
||||
'price_unit': price_diff,
|
||||
'quantity': line['quantity'],
|
||||
'price': price_diff * line['quantity'],
|
||||
'account_id':acc,
|
||||
'product_id':line['product_id'],
|
||||
'uos_id':line['uos_id'],
|
||||
'account_analytic_id':line['account_analytic_id'],
|
||||
'taxes':line.get('taxes',[]),
|
||||
'account_id': acc,
|
||||
'product_id': line['product_id'],
|
||||
'uos_id': line['uos_id'],
|
||||
'account_analytic_id': line['account_analytic_id'],
|
||||
'taxes': line.get('taxes', []),
|
||||
})
|
||||
res += diff_res
|
||||
return res
|
||||
|
||||
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
|
||||
def product_id_change(self, cr, uid, ids, product, uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
|
||||
fiscal_pool = self.pool.get('account.fiscal.position')
|
||||
res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context, company_id)
|
||||
res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom_id, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context, company_id)
|
||||
if not product:
|
||||
return res
|
||||
if type in ('in_invoice','in_refund'):
|
||||
|
|
|
@ -24,27 +24,21 @@ class product_category(osv.osv):
|
|||
_inherit = "product.category"
|
||||
_columns = {
|
||||
'property_account_creditor_price_difference_categ': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Price Difference Account",
|
||||
view_load=True,
|
||||
help="This account will be used to value price difference between purchase price and cost price."),
|
||||
|
||||
#Redefine fields to change help text for anglo saxon methodology.
|
||||
'property_account_income_categ': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Income Account",
|
||||
view_load=True,
|
||||
help="This account will be used to value outgoing stock using sale price."),
|
||||
'property_account_expense_categ': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Expense Account",
|
||||
view_load=True,
|
||||
help="This account will be used to value outgoing stock using cost price."),
|
||||
|
||||
}
|
||||
|
@ -53,27 +47,21 @@ class product_template(osv.osv):
|
|||
_inherit = "product.template"
|
||||
_columns = {
|
||||
'property_account_creditor_price_difference': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Price Difference Account",
|
||||
view_load=True,
|
||||
help="This account will be used to value price difference between purchase price and cost price."),
|
||||
|
||||
#Redefine fields to change help text for anglo saxon methodology.
|
||||
'property_account_income': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Income Account",
|
||||
view_load=True,
|
||||
help="This account will be used to value outgoing stock using sale price."),
|
||||
'property_account_expense': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Expense Account",
|
||||
view_load=True,
|
||||
help="This account will be used to value outgoing stock using cost price."),
|
||||
|
||||
}
|
||||
|
|
|
@ -26,16 +26,15 @@ class purchase_order(osv.osv):
|
|||
_inherit = "purchase.order"
|
||||
_description = "Purchase Order"
|
||||
|
||||
def _prepare_inv_line(self, cr, uid, account_id, order_line, context=None):
|
||||
line = super(purchase_order, self)._prepare_inv_line(cr, uid, account_id, order_line, context=context)
|
||||
def _choose_account_from_po_line(self, cr, uid, order_line, context=None):
|
||||
account_id = super(purchase_order, self)._choose_account_from_po_line(cr, uid, order_line, context=context)
|
||||
if order_line.product_id and not order_line.product_id.type == 'service':
|
||||
acc_id = order_line.product_id.property_stock_account_input and order_line.product_id.property_stock_account_input.id
|
||||
if not acc_id:
|
||||
acc_id = order_line.product_id.categ_id.property_stock_account_input_categ and order_line.product_id.categ_id.property_stock_account_input_categ.id
|
||||
if acc_id:
|
||||
fpos = order_line.order_id.fiscal_position or False
|
||||
new_account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, acc_id)
|
||||
line.update({'account_id': new_account_id})
|
||||
return line
|
||||
account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, acc_id)
|
||||
return account_id
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -0,0 +1,299 @@
|
|||
-
|
||||
In order to test anglo_saxon Configure Different Accounts.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_stock_valuation}:
|
||||
code: X3000
|
||||
name: Stock Valuation Account- (test)
|
||||
parent_id: account.cas
|
||||
type: other
|
||||
user_type: account.data_account_type_asset
|
||||
-
|
||||
Configure Stock Interim account (Received).
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_stock_input}:
|
||||
code: X2800
|
||||
name: Stock Interim account (Received)
|
||||
parent_id: account.cos
|
||||
type: other
|
||||
user_type: account.data_account_type_expense
|
||||
-
|
||||
Configure Stock Interim account (Delivered).
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_stock_output}:
|
||||
code: X2801
|
||||
name: Stock Interim account (Delivered)
|
||||
parent_id: account.rev
|
||||
type: other
|
||||
user_type: account.data_account_type_income
|
||||
-
|
||||
Configure Price difference creditor Account.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_price_difference}:
|
||||
code: X7095
|
||||
name: Price difference creditor Account
|
||||
parent_id: account.cos
|
||||
type: other
|
||||
user_type: account.data_account_type_expense
|
||||
-
|
||||
Configure Cash Bank Account.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_cash}:
|
||||
code: X5000
|
||||
name: Cash/Bank Account
|
||||
parent_id: account.cash
|
||||
type: other
|
||||
user_type: account.data_account_type_asset
|
||||
-
|
||||
Configure Creditor Account Payable.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_payable}:
|
||||
code: X440001
|
||||
name: Creditor Account Payable
|
||||
parent_id: account.a_pay
|
||||
type: other
|
||||
user_type: account.data_account_type_payable
|
||||
-
|
||||
Configure Debtor Account Receivable.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_receivable}:
|
||||
code: X400001
|
||||
name: Debtor Account Receivable
|
||||
parent_id: account.a_recv
|
||||
type: other
|
||||
user_type: account.data_account_type_receivable
|
||||
-
|
||||
Configure Cost of Good sale Account.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_cogs}:
|
||||
code: X7000
|
||||
name: Cost of goods sale account
|
||||
parent_id: account.o_expense
|
||||
type: other
|
||||
user_type: account.data_account_type_expense
|
||||
-
|
||||
Configure Income Account.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_income}:
|
||||
code: X8000
|
||||
name: Income Account
|
||||
parent_id: account.o_income
|
||||
type: other
|
||||
user_type: account.data_account_type_income
|
||||
-
|
||||
I configure the account receivable of supplier
|
||||
-
|
||||
!record {model: res.partner, id: base.res_partner_3}:
|
||||
property_account_payable: account_anglo_payable
|
||||
property_account_receivable: account_anglo_receivable
|
||||
-
|
||||
I configure the account receivable of Customer.
|
||||
-
|
||||
!record {model: res.partner, id: base.res_partner_13}:
|
||||
property_account_payable: account_anglo_payable
|
||||
property_account_receivable: account_anglo_receivable
|
||||
-
|
||||
I configure the product category with stock valuation account.
|
||||
-
|
||||
!record {model: product.category, id: product.product_category_4}:
|
||||
property_stock_valuation_account_id: account_anglo_stock_valuation
|
||||
-
|
||||
I configure the product with required accounts, and cost method = standard
|
||||
-
|
||||
!python {model: product.product}: |
|
||||
self.write(cr, uid, [ref('product.product_product_3')], {'list_price': 20.00,'standard_price': 9,'categ_id': ref('product.product_category_4'),'valuation': 'real_time',
|
||||
'property_account_income': ref('account_anglo_income'),'property_account_expense': ref('account_anglo_cogs'),
|
||||
'property_account_creditor_price_difference': ref('account_anglo_price_difference'),'property_stock_account_input': ref('account_anglo_stock_input'),
|
||||
'property_stock_account_output': ref('account_anglo_stock_output'), 'cost_method': 'standard'})
|
||||
-
|
||||
I create a draft Purchase Order.
|
||||
-
|
||||
!record {model: purchase.order, id: purchase_order_001}:
|
||||
partner_id: base.res_partner_3
|
||||
location_id: stock.stock_location_stock
|
||||
pricelist_id: 1
|
||||
order_line:
|
||||
- product_id: product.product_product_3
|
||||
product_qty: 1
|
||||
price_unit: 10
|
||||
date_planned: '2013-08-31'
|
||||
-
|
||||
I confirm the purchase order.
|
||||
-
|
||||
!workflow {model: purchase.order, ref: purchase_order_001, action: purchase_confirm}
|
||||
-
|
||||
Reception is ready for process so now done the reception.
|
||||
-
|
||||
!python {model: stock.partial.picking}: |
|
||||
pick_ids = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001")).picking_ids
|
||||
partial_id = self.create(cr, uid, {},context={'active_model': 'stock.picking','active_ids': [pick_ids[0].id]})
|
||||
self.do_partial(cr, uid, [partial_id])
|
||||
-
|
||||
I check the Stock Interim account (Received) is credited successfully.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_stock_input, string : Stock Interim account (Received) is not credited successfully.}:
|
||||
- credit == 9
|
||||
-
|
||||
I check the Stock valuation account is debited sucessfully.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_stock_valuation, string : Stock valuation account is not debited successfully.}:
|
||||
- debit == 9
|
||||
-
|
||||
I Validate Invoice of Purchase Order.
|
||||
-
|
||||
!python {model: purchase.order}: |
|
||||
invoice_ids = [x.id for x in self.browse(cr, uid, ref("purchase_order_001")).invoice_ids]
|
||||
self.pool.get('account.invoice').signal_invoice_open(cr, uid, invoice_ids)
|
||||
-
|
||||
I check the Stock Interim account (Received) is debited sucessfully when Invoice validated.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_stock_input, string : Stock Interim account (Received) is not debited successfully.}:
|
||||
- debit == 9
|
||||
-
|
||||
I check the Price difference creditor Account is debited sucessfully when Invoice validated.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_price_difference, string : Price difference creditor Account is not debited successfully.}:
|
||||
- debit == 1
|
||||
-
|
||||
I check Payable(creditor) Account is Credited sucessfully when Invoice validated.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_payable, string : Payable(creditor) Account is not Credited successfully.}:
|
||||
- credit == 10
|
||||
-
|
||||
I open the Invoice.
|
||||
-
|
||||
!python {model: purchase.order}: |
|
||||
po = self.browse(cr, uid, ref("purchase_order_001"))
|
||||
for invoice in po.invoice_ids:
|
||||
self.pool.get('account.invoice').signal_invoice_open(cr, uid, [invoice.id])
|
||||
-
|
||||
I pay the invoice.
|
||||
-
|
||||
!python {model: purchase.order}: |
|
||||
invoice_ids = self.browse(cr, uid, ref("purchase_order_001")).invoice_ids
|
||||
order = self.browse(cr, uid, ref("purchase_order_001"))
|
||||
journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', order.company_id.id)], limit=1)
|
||||
for invoice in invoice_ids:
|
||||
invoice.pay_and_reconcile(invoice.amount_total, ref('account_anglo_cash'), ref('account.period_8'), journal_ids[0], ref('account_anglo_cash'), ref('account.period_8'), journal_ids[0], name='test')
|
||||
-
|
||||
I check Payable(Creditors) Account is Debited sucessfully after invoice paid.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_payable, string : Payable(Creditors) Account is not Debited successfully.}:
|
||||
- debit == 10
|
||||
-
|
||||
I check Bank/Cash account is credited sucessfully after invoice paid.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_cash, string: Bank/Cash account is not credited successfully.}:
|
||||
- credit == 10
|
||||
-
|
||||
I create an Outgoing Picking order
|
||||
-
|
||||
!record {model: stock.picking, id: stock_picking_out001}:
|
||||
partner_id: base.res_partner_13
|
||||
invoice_state: 2binvoiced
|
||||
move_lines:
|
||||
- company_id: base.main_company
|
||||
location_id: stock.stock_location_stock
|
||||
product_id: product.product_product_3
|
||||
product_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
location_dest_id: stock.stock_location_customers
|
||||
move_type: direct
|
||||
type: out
|
||||
-
|
||||
I need to check the availability of the product, So I make my picking order for processing later.
|
||||
-
|
||||
!python {model: stock.picking}: |
|
||||
self.draft_force_assign(cr, uid, [ref("stock_picking_out001")], {"lang": "en_US", "search_default_available":
|
||||
1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner",
|
||||
"active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"),
|
||||
})
|
||||
-
|
||||
I check the product availability, Product is available in the stock and ready to be sent.
|
||||
-
|
||||
!python {model: stock.picking}: |
|
||||
self.action_assign(cr, uid, [ref("stock_picking_out001")], {"lang": "en_US", "search_default_available":
|
||||
1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner",
|
||||
"active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"),
|
||||
})
|
||||
-
|
||||
I process the delivery.
|
||||
-
|
||||
!python {model: stock.partial.picking}: |
|
||||
partial_id = self.create(cr, uid, {}, context={'active_model':'stock.picking','active_ids':[ref('stock_picking_out001')]})
|
||||
self.do_partial(cr, uid, [partial_id])
|
||||
-
|
||||
I check Stock Interim account (Delivery) is debited successfully.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_stock_output, string : Stock Interim account (Delivery) is not debited successfully.}:
|
||||
- debit == 9
|
||||
-
|
||||
I check the Stock valuation account is credited sucessfully.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_stock_valuation, string : Stock valuation account is not credited successfully.}:
|
||||
- credit == 9
|
||||
-
|
||||
As the Invoice state of the picking order is To be invoiced. I create invoice for my outgoing picking order.
|
||||
-
|
||||
!python {model: stock.invoice.onshipping}: |
|
||||
wiz_id = self.create(cr, uid, {'invoice_date': '2013-03-04', 'journal_id': ref('account.sales_journal')},
|
||||
{'active_ids': [ref("stock_picking_out001")], "active_model": "stock.picking"})
|
||||
self.create_invoice(cr, uid, [wiz_id], {"lang": "en_US",
|
||||
"search_default_available": 1, "tz": False, "active_model": "stock.picking",
|
||||
"contact_display": "partner", "active_ids": [ref("stock_picking_out001")], "active_id": ref("stock_picking_out001")})
|
||||
-
|
||||
I check that the customer invoice is created successfully.
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
partner_id = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001')).partner_id.id
|
||||
inv_ids = self.search(cr, uid, [('type','=','out_invoice'),('partner_id','=',partner_id)])
|
||||
assert inv_ids, 'No Invoice is generated!'
|
||||
-
|
||||
I open the Invoice.
|
||||
-
|
||||
!python {model: stock.picking}: |
|
||||
move_name = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001')).name
|
||||
account_invoice = self.pool.get('account.invoice').search(cr, uid, [('origin', '=', move_name)])
|
||||
self.pool.get('account.invoice').signal_invoice_open(cr, uid, account_invoice)
|
||||
-
|
||||
I check Income Account is Credited sucessfully when Invoice validated.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_income, string : Income Account is not Credited successfully.}:
|
||||
- credit == 20
|
||||
-
|
||||
I check Cost of goods sold account for debit.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_cogs, string : Cost of goods sale is not Debited successfully.}:
|
||||
- debit == 9
|
||||
-
|
||||
I check Stock Interim account (Delivery)
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_stock_output, string : Stock Interim account (Delivery) is not credited successfully.}:
|
||||
- credit == 9
|
||||
-
|
||||
I check Receivable(Debtor) Account for debit.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_receivable, string : Receivable(Debtors) Account is not Debited successfully.}:
|
||||
- debit == 20
|
||||
-
|
||||
I pay the invoice.
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
move_name = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001')).name
|
||||
account_invoice= self.pool.get('account.invoice').search(cr, uid, [('origin', '=', move_name)])
|
||||
journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash')], limit=1)
|
||||
pay = self.pay_and_reconcile(cr, uid, account_invoice,
|
||||
20.0, ref('account_anglo_cash'), ref('account.period_8'),
|
||||
journal_ids[0], ref('account_anglo_cash'),
|
||||
ref('account.period_8'), journal_ids[0],
|
||||
name='Payment for test customer invoice')
|
||||
assert (pay == True), "Incorrect Payment."
|
||||
-
|
||||
I check Receivable(Debtor) Account for credit.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_receivable, string : Receivable(Debtors) Account is not Credited successfully.}:
|
||||
- credit == 20
|
||||
-
|
||||
I check Bank/Cash account is debited sucessfully after invoice paid.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_cash, string: Bank/Cash account is not successfully credited.}:
|
||||
- debit == 20
|
|
@ -0,0 +1,304 @@
|
|||
-
|
||||
In order to test anglo_saxon Configure Different Accounts.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_stock_valuation_fifo}:
|
||||
code: X3000f
|
||||
name: Stock Valuation Account- (test)
|
||||
parent_id: account.cas
|
||||
type: other
|
||||
user_type: account.data_account_type_asset
|
||||
-
|
||||
Configure Stock Interim account (Received).
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_stock_input_fifo}:
|
||||
code: X2800f
|
||||
name: Stock Interim account (Received)
|
||||
parent_id: account.cos
|
||||
type: other
|
||||
user_type: account.data_account_type_expense
|
||||
-
|
||||
Configure Stock Interim account (Delivered).
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_stock_output_fifo}:
|
||||
code: X2801f
|
||||
name: Stock Interim account (Delivered)
|
||||
parent_id: account.rev
|
||||
type: other
|
||||
user_type: account.data_account_type_income
|
||||
-
|
||||
Configure Price difference creditor Account.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_price_difference_fifo}:
|
||||
code: X7095f
|
||||
name: Price difference creditor Account
|
||||
parent_id: account.cos
|
||||
type: other
|
||||
user_type: account.data_account_type_expense
|
||||
-
|
||||
Configure Cash Bank Account.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_cash_fifo}:
|
||||
code: X5000f
|
||||
name: Cash/Bank Account
|
||||
parent_id: account.cash
|
||||
type: other
|
||||
user_type: account.data_account_type_asset
|
||||
-
|
||||
Configure Creditor Account Payable.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_payable_fifo}:
|
||||
code: X440001f
|
||||
name: Creditor Account Payable
|
||||
parent_id: account.a_pay
|
||||
type: other
|
||||
user_type: account.data_account_type_payable
|
||||
-
|
||||
Configure Debtor Account Receivable.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_receivable_fifo}:
|
||||
code: X400001f
|
||||
name: Debtor Account Receivable
|
||||
parent_id: account.a_recv
|
||||
type: other
|
||||
user_type: account.data_account_type_receivable
|
||||
-
|
||||
Configure Cost of Good sale Account.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_cogs_fifo}:
|
||||
code: X7000f
|
||||
name: Cost of goods sale account
|
||||
parent_id: account.o_expense
|
||||
type: other
|
||||
user_type: account.data_account_type_expense
|
||||
-
|
||||
Configure Income Account.
|
||||
-
|
||||
!record {model: account.account, id: account_anglo_income_fifo}:
|
||||
code: X8000f
|
||||
name: Income Account
|
||||
parent_id: account.o_income
|
||||
type: other
|
||||
user_type: account.data_account_type_income
|
||||
-
|
||||
I configure the account receivable of supplier
|
||||
-
|
||||
!record {model: res.partner, id: base.res_partner_3}:
|
||||
property_account_payable: account_anglo_payable_fifo
|
||||
property_account_receivable: account_anglo_receivable_fifo
|
||||
-
|
||||
I configure the account receivable of Customer.
|
||||
-
|
||||
!record {model: res.partner, id: base.res_partner_13}:
|
||||
property_account_payable: account_anglo_payable_fifo
|
||||
property_account_receivable: account_anglo_receivable_fifo
|
||||
-
|
||||
I configure the product category with stock valuation account.
|
||||
-
|
||||
!record {model: product.category, id: product.product_category_4}:
|
||||
property_stock_valuation_account_id: account_anglo_stock_valuation_fifo
|
||||
-
|
||||
I create a product with required accounts, and cost method average (but same applies for fifo)
|
||||
-
|
||||
!record {model: product.product, id: product_fifo_anglo_saxon}:
|
||||
name: 'FIFO product for anglo saxon tests'
|
||||
list_price: 20.00
|
||||
standard_price: 0
|
||||
categ_id: product.product_category_4
|
||||
valuation: 'real_time'
|
||||
property_account_income: account_anglo_income_fifo
|
||||
property_account_expense: account_anglo_cogs_fifo
|
||||
property_account_creditor_price_difference: account_anglo_price_difference_fifo
|
||||
property_stock_account_input: account_anglo_stock_input_fifo
|
||||
property_stock_account_output: account_anglo_stock_output_fifo
|
||||
cost_method: 'average'
|
||||
-
|
||||
I create a draft Purchase Order.
|
||||
-
|
||||
!record {model: purchase.order, id: purchase_order_001_fifo}:
|
||||
partner_id: base.res_partner_3
|
||||
location_id: stock.stock_location_stock
|
||||
pricelist_id: 1
|
||||
order_line:
|
||||
- product_id: product_fifo_anglo_saxon
|
||||
product_qty: 1
|
||||
price_unit: 9
|
||||
date_planned: '2013-08-31'
|
||||
taxes_id: []
|
||||
-
|
||||
I confirm the purchase order.
|
||||
-
|
||||
!workflow {model: purchase.order, ref: purchase_order_001_fifo, action: purchase_confirm}
|
||||
-
|
||||
Reception is ready for process so now done the reception.
|
||||
-
|
||||
!python {model: stock.partial.picking}: |
|
||||
pick_ids = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001_fifo")).picking_ids
|
||||
partial_id = self.create(cr, uid, {},context={'active_model': 'stock.picking','active_ids': [pick_ids[0].id]})
|
||||
self.do_partial(cr, uid, [partial_id])
|
||||
-
|
||||
I check the Stock Interim account (Received) is credit successfully.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_stock_input_fifo, string : Stock Interim account (Received) is not credited successfully.}:
|
||||
- credit == 9
|
||||
-
|
||||
I check the Stock valuation account is debit sucessfully.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_stock_valuation_fifo, string : Stock valuation account is not debited successfully.}:
|
||||
- debit == 9
|
||||
-
|
||||
I Validate Invoice of Purchase Order after having changed the price to 10.
|
||||
-
|
||||
!python {model: purchase.order}: |
|
||||
invoice_ids = [x.id for x in self.browse(cr, uid, ref("purchase_order_001_fifo")).invoice_ids]
|
||||
line_ids = self.pool.get('account.invoice.line').search(cr, uid, [('invoice_id', 'in', invoice_ids)])
|
||||
self.pool.get('account.invoice.line').write(cr, uid, line_ids, {'price_unit': 10})
|
||||
self.pool.get('account.invoice').signal_invoice_open(cr, uid, invoice_ids)
|
||||
-
|
||||
I check the Stock Interim account (Received) is debited sucessfully when Invoice validated.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_stock_input_fifo, string : Stock Interim account (Received) is not debited successfully.}:
|
||||
- debit == 9
|
||||
-
|
||||
I check the Price difference creditor Account is debited sucessfully when Invoice validated.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_price_difference_fifo, string : Price difference creditor Account is not debited successfully.}:
|
||||
- debit == 1
|
||||
-
|
||||
I check Payable(creditor) Account is Credited sucessfully when Invoice validated.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_payable_fifo, string : Payable(creditor) Account is not Credited successfully.}:
|
||||
- credit == 10
|
||||
-
|
||||
I pay the invoice.
|
||||
-
|
||||
!python {model: purchase.order}: |
|
||||
invoice_ids = self.browse(cr, uid, ref("purchase_order_001_fifo")).invoice_ids
|
||||
order = self.browse(cr, uid, ref("purchase_order_001_fifo"))
|
||||
journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', order.company_id.id)], limit=1)
|
||||
for invoice in invoice_ids:
|
||||
invoice.pay_and_reconcile(invoice.amount_total, ref('account_anglo_cash_fifo'), ref('account.period_8'), journal_ids[0], ref('account_anglo_cash_fifo'), ref('account.period_8'), journal_ids[0], name='test')
|
||||
-
|
||||
I check Payable(Creditors) Account is Debited sucessfully after invoice paid.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_payable_fifo, string : Payable(Creditors) Account is not Debited successfully.}:
|
||||
- debit == 10
|
||||
-
|
||||
I check Bank/Cash account is credited sucessfully after invoice paid.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_cash_fifo, string: Bank/Cash account is not credited successfully.}:
|
||||
- credit == 10
|
||||
-
|
||||
I create an Outgoing Picking order
|
||||
-
|
||||
!record {model: stock.picking, id: stock_picking_out001_fifo}:
|
||||
partner_id: base.res_partner_13
|
||||
invoice_state: 2binvoiced
|
||||
move_lines:
|
||||
- company_id: base.main_company
|
||||
location_id: stock.stock_location_stock
|
||||
product_id: product_fifo_anglo_saxon
|
||||
product_qty: 1.0
|
||||
location_dest_id: stock.stock_location_customers
|
||||
move_type: direct
|
||||
type: out
|
||||
-
|
||||
I need to check the availability of the product, So I make my picking order for processing later.
|
||||
-
|
||||
!python {model: stock.picking}: |
|
||||
self.draft_force_assign(cr, uid, [ref("stock_picking_out001_fifo")], {"lang": "en_US", "search_default_available":
|
||||
1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner",
|
||||
"active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"),
|
||||
})
|
||||
-
|
||||
I check the product availability, Product is available in the stock and ready to be sent.
|
||||
-
|
||||
!python {model: stock.picking}: |
|
||||
self.action_assign(cr, uid, [ref("stock_picking_out001_fifo")], {"lang": "en_US", "search_default_available":
|
||||
1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner",
|
||||
"active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"),
|
||||
})
|
||||
-
|
||||
I process the delivery.
|
||||
-
|
||||
!python {model: stock.partial.picking}: |
|
||||
partial_id = self.create(cr, uid, {}, context={'active_model':'stock.picking','active_ids':[ref('stock_picking_out001_fifo')]})
|
||||
self.do_partial(cr, uid, [partial_id])
|
||||
-
|
||||
I check Stock Interim account (Delivery) is debited successfully.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_stock_output_fifo, string : Stock Interim account (Delivery) is not debited successfully.}:
|
||||
- debit == 9
|
||||
-
|
||||
I check the Stock valuation account is credited sucessfully.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_stock_valuation_fifo, string : Stock valuation account is not credited successfully.}:
|
||||
- credit == 9
|
||||
-
|
||||
As the Invoice state of the picking order is To be invoiced. I create invoice for my outgoing picking order.
|
||||
-
|
||||
!python {model: stock.invoice.onshipping}: |
|
||||
wiz_id = self.create(cr, uid, {'invoice_date': '2013-03-04', 'journal_id': ref('account.sales_journal')},
|
||||
{'active_ids': [ref("stock_picking_out001_fifo")], "active_model": "stock.picking"})
|
||||
self.create_invoice(cr, uid, [wiz_id], {"lang": "en_US",
|
||||
"search_default_available": 1, "tz": False, "active_model": "stock.picking",
|
||||
"contact_display": "partner", "active_ids": [ref("stock_picking_out001_fifo")], "active_id": ref("stock_picking_out001_fifo")})
|
||||
-
|
||||
I check that the customer invoice is created successfully.
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
partner_id = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001_fifo')).partner_id.id
|
||||
inv_ids = self.search(cr, uid, [('type','=','out_invoice'),('partner_id','=',partner_id)])
|
||||
assert inv_ids, 'No Invoice is generated!'
|
||||
-
|
||||
I open the Invoice.
|
||||
-
|
||||
!python {model: stock.picking}: |
|
||||
move_name = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001_fifo')).name
|
||||
account_invoice = self.pool.get('account.invoice').search(cr, uid, [('origin', '=', move_name)])
|
||||
account_invoice_line = self.pool.get('account.invoice.line').search(cr, uid, [('invoice_id', 'in', account_invoice)])
|
||||
self.pool.get('account.invoice.line').write(cr, uid, account_invoice_line, {'invoice_line_tax_id': [(6, 0, [])]})
|
||||
self.pool.get('account.invoice').button_reset_taxes(cr, uid, account_invoice)
|
||||
self.pool.get('account.invoice').signal_invoice_open(cr, uid, account_invoice)
|
||||
-
|
||||
I check Income Account is Credited sucessfully when Invoice validated.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_income_fifo, string : Income Account is not Credited successfully.}:
|
||||
- credit == 20
|
||||
-
|
||||
I check Cost of goods sold account for debit.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_cogs_fifo, string : Cost of goods sale is not Debited successfully.}:
|
||||
- debit == 9
|
||||
-
|
||||
I check Stock Interim account (Delivery)
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_stock_output_fifo, string : Stock Interim account (Delivery) is not credited successfully.}:
|
||||
- credit == 9
|
||||
-
|
||||
I check Receivable(Debtor) Account for debit.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_receivable_fifo, string : Receivable(Debtors) Account is not Debited successfully.}:
|
||||
- debit == 20
|
||||
-
|
||||
I pay the invoice.
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
move_name = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001_fifo')).name
|
||||
account_invoice= self.pool.get('account.invoice').search(cr, uid, [('origin', '=', move_name)])
|
||||
journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash')], limit=1)
|
||||
pay = self.pay_and_reconcile(cr, uid, account_invoice,
|
||||
20.0, ref('account_anglo_cash_fifo'), ref('account.period_8'),
|
||||
journal_ids[0], ref('account_anglo_cash_fifo'),
|
||||
ref('account.period_8'), journal_ids[0],
|
||||
name='Payment for test customer invoice')
|
||||
assert (pay == True), "Incorrect Payment."
|
||||
-
|
||||
I check Receivable(Debtor) Account for credit.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_receivable_fifo, string : Receivable(Debtors) Account is not Credited successfully.}:
|
||||
- credit == 20
|
||||
-
|
||||
I check Bank/Cash account is debited sucessfully after invoice paid.
|
||||
-
|
||||
!assert {model: account.account, id : account_anglo_cash_fifo, string: Bank/Cash account is not successfully credited.}:
|
||||
- debit == 20
|
|
@ -82,7 +82,7 @@ class account_asset_asset(osv.osv):
|
|||
return super(account_asset_asset, self).unlink(cr, uid, ids, context=context)
|
||||
|
||||
def _get_period(self, cr, uid, context=None):
|
||||
periods = self.pool.get('account.period').find(cr, uid)
|
||||
periods = self.pool.get('account.period').find(cr, uid, context=context)
|
||||
if periods:
|
||||
return periods[0]
|
||||
else:
|
||||
|
|
|
@ -13,6 +13,17 @@
|
|||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_invoice_asset_category">
|
||||
<field name="name">account.invoice.supplier.form</field>
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit_id" ref="account.invoice_supplier_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='invoice_line']/tree/field[@name='quantity']" position="before">
|
||||
<field name="asset_category_id"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -223,7 +223,7 @@
|
|||
<filter icon="terp-check" string="Current" domain="[('state','in', ('draft','open'))]" help="Assets in draft and open states"/>
|
||||
<filter icon="terp-dialog-close" string="Closed" domain="[('state','=', 'close')]" help="Assets in closed state"/>
|
||||
<field name="category_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
||||
"PO-Revision-Date: 2011-07-12 12:04+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2013-05-31 08:06+0000\n"
|
||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||
"Language-Team: Russian <ru@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-03-16 05:50+0000\n"
|
||||
"X-Generator: Launchpad (build 16532)\n"
|
||||
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build 16660)\n"
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
|
@ -148,7 +148,7 @@ msgstr ""
|
|||
#. module: account_asset
|
||||
#: help:account.asset.asset,method_period:0
|
||||
msgid "The amount of time between two depreciations, in months"
|
||||
msgstr ""
|
||||
msgstr "Количество времени между амортизациями, в месяцах"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,depreciation_date:0
|
||||
|
@ -160,7 +160,7 @@ msgstr "Дата амортизации"
|
|||
#. module: account_asset
|
||||
#: constraint:account.asset.asset:0
|
||||
msgid "Error ! You cannot create recursive assets."
|
||||
msgstr ""
|
||||
msgstr "Ошибка! Нельзя создавать рекурсивные активы."
|
||||
|
||||
#. module: account_asset
|
||||
#: field:asset.asset.report,posted_value:0
|
||||
|
@ -205,7 +205,7 @@ msgstr "# позиций амортизации"
|
|||
#. module: account_asset
|
||||
#: field:account.asset.asset,method_period:0
|
||||
msgid "Number of Months in a Period"
|
||||
msgstr ""
|
||||
msgstr "Количество месяцев в периоде"
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
|
@ -234,7 +234,7 @@ msgstr "Счет активов"
|
|||
#: model:ir.actions.act_window,name:account_asset.action_asset_depreciation_confirmation_wizard
|
||||
#: model:ir.ui.menu,name:account_asset.menu_asset_depreciation_confirmation_wizard
|
||||
msgid "Compute Assets"
|
||||
msgstr ""
|
||||
msgstr "Вычислить активы"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,method_period:0
|
||||
|
@ -265,12 +265,12 @@ msgstr "Изменить длительность"
|
|||
#: help:account.asset.category,method_number:0
|
||||
#: help:account.asset.history,method_number:0
|
||||
msgid "The number of depreciations needed to depreciate your asset"
|
||||
msgstr ""
|
||||
msgstr "Количество амортизаций необходимых для обесценивания актива"
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.category:0
|
||||
msgid "Analytic Information"
|
||||
msgstr ""
|
||||
msgstr "Аналитическая информация"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,account_analytic_id:0
|
||||
|
@ -293,7 +293,7 @@ msgstr ""
|
|||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,remaining_value:0
|
||||
msgid "Next Period Depreciation"
|
||||
msgstr ""
|
||||
msgstr "Следующий период амортизации"
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.history,method_period:0
|
||||
|
@ -344,7 +344,7 @@ msgstr "Поиск категории актива"
|
|||
#. module: account_asset
|
||||
#: view:asset.modify:0
|
||||
msgid "months"
|
||||
msgstr ""
|
||||
msgstr "месяцы"
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.model,name:account_asset.model_account_invoice_line
|
||||
|
@ -372,7 +372,7 @@ msgstr ""
|
|||
#: view:asset.depreciation.confirmation.wizard:0
|
||||
#: view:asset.modify:0
|
||||
msgid "or"
|
||||
msgstr ""
|
||||
msgstr "или"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,note:0
|
||||
|
@ -406,7 +406,7 @@ msgstr ""
|
|||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
msgid "Assets in running state"
|
||||
msgstr ""
|
||||
msgstr "Активы в рабочем состоянии"
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
|
@ -427,7 +427,7 @@ msgstr ""
|
|||
#: field:account.asset.asset,state:0
|
||||
#: field:asset.asset.report,state:0
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
msgstr "Статус"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,partner_id:0
|
||||
|
@ -474,12 +474,12 @@ msgstr "Вычислить"
|
|||
#. module: account_asset
|
||||
#: view:account.asset.history:0
|
||||
msgid "Asset History"
|
||||
msgstr ""
|
||||
msgstr "История актива"
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.model,name:account_asset.model_asset_depreciation_confirmation_wizard
|
||||
msgid "asset.depreciation.confirmation.wizard"
|
||||
msgstr ""
|
||||
msgstr "asset.depreciation.confirmation.wizard"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,active:0
|
||||
|
@ -505,7 +505,7 @@ msgstr "История"
|
|||
#. module: account_asset
|
||||
#: view:asset.depreciation.confirmation.wizard:0
|
||||
msgid "Compute Asset"
|
||||
msgstr ""
|
||||
msgstr "Вычислить актив"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:asset.depreciation.confirmation.wizard,period_id:0
|
||||
|
@ -521,7 +521,7 @@ msgstr "Общий"
|
|||
#: field:account.asset.asset,prorata:0
|
||||
#: field:account.asset.category,prorata:0
|
||||
msgid "Prorata Temporis"
|
||||
msgstr ""
|
||||
msgstr "По истечении срока"
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.model,name:account_asset.model_account_invoice
|
||||
|
@ -553,7 +553,7 @@ msgstr "Элементы журнала"
|
|||
#. module: account_asset
|
||||
#: view:asset.modify:0
|
||||
msgid "Asset Durations to Modify"
|
||||
msgstr ""
|
||||
msgstr "Актив - интервал времени для изменения"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,purchase_date:0
|
||||
|
@ -574,6 +574,8 @@ msgid ""
|
|||
"Choose the period for which you want to automatically post the depreciation "
|
||||
"lines of running assets"
|
||||
msgstr ""
|
||||
"Выберите период, за который вы хотите автоматически создавать записи "
|
||||
"амортизации для актива"
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
|
@ -588,12 +590,12 @@ msgstr "Метод амортизации"
|
|||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,amount:0
|
||||
msgid "Current Depreciation"
|
||||
msgstr ""
|
||||
msgstr "Текущая аммортизация"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,name:0
|
||||
msgid "Asset Name"
|
||||
msgstr ""
|
||||
msgstr "Название актива"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,open_asset:0
|
||||
|
@ -618,7 +620,7 @@ msgstr "Журнал"
|
|||
#. module: account_asset
|
||||
#: field:account.asset.history,name:0
|
||||
msgid "History name"
|
||||
msgstr ""
|
||||
msgstr "Название истории"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,depreciated_value:0
|
||||
|
@ -657,7 +659,7 @@ msgstr ""
|
|||
#. module: account_asset
|
||||
#: field:account.asset.asset,purchase_value:0
|
||||
msgid "Gross Value"
|
||||
msgstr ""
|
||||
msgstr "Валовая стоимость"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,name:0
|
||||
|
@ -703,12 +705,12 @@ msgstr ""
|
|||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr ""
|
||||
msgstr "Нумерация"
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.category,method_period:0
|
||||
msgid "State here the time between 2 depreciations, in months"
|
||||
msgstr ""
|
||||
msgstr "Время между двумя амортизациями в месяцах"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.history,date:0
|
||||
|
@ -729,7 +731,7 @@ msgstr "Число амортизаций"
|
|||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Create Move"
|
||||
msgstr ""
|
||||
msgstr "Создать перемещение"
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
|
|
|
@ -0,0 +1,741 @@
|
|||
# Thai translation for openobject-addons
|
||||
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
||||
"PO-Revision-Date: 2013-05-15 10:09+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Thai <th@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-16 05:12+0000\n"
|
||||
"X-Generator: Launchpad (build 16626)\n"
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Assets in draft and open states"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,method_end:0
|
||||
#: field:account.asset.history,method_end:0
|
||||
#: field:asset.modify,method_end:0
|
||||
msgid "Ending date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,value_residual:0
|
||||
msgid "Residual Value"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,account_expense_depreciation_id:0
|
||||
msgid "Depr. Expense Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
msgid "Group By..."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:asset.asset.report,gross_value:0
|
||||
msgid "Gross Amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
#: field:account.asset.depreciation.line,asset_id:0
|
||||
#: field:account.asset.history,asset_id:0
|
||||
#: field:account.move.line,asset_id:0
|
||||
#: view:asset.asset.report:0
|
||||
#: field:asset.asset.report,asset_id:0
|
||||
#: model:ir.model,name:account_asset.model_account_asset_asset
|
||||
msgid "Asset"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.asset,prorata:0
|
||||
#: help:account.asset.category,prorata:0
|
||||
msgid ""
|
||||
"Indicates that the first depreciation entry for this asset have to be done "
|
||||
"from the purchase date instead of the first January"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: selection:account.asset.asset,method:0
|
||||
#: selection:account.asset.category,method:0
|
||||
msgid "Linear"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,company_id:0
|
||||
#: field:account.asset.category,company_id:0
|
||||
#: view:asset.asset.report:0
|
||||
#: field:asset.asset.report,company_id:0
|
||||
msgid "Company"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.modify:0
|
||||
msgid "Modify"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: selection:account.asset.asset,state:0
|
||||
#: view:asset.asset.report:0
|
||||
#: selection:asset.asset.report,state:0
|
||||
msgid "Running"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Set to Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
#: model:ir.actions.act_window,name:account_asset.action_asset_asset_report
|
||||
#: model:ir.model,name:account_asset.model_asset_asset_report
|
||||
#: model:ir.ui.menu,name:account_asset.menu_action_asset_asset_report
|
||||
msgid "Assets Analysis"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:asset.modify,name:0
|
||||
msgid "Reason"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,method_progress_factor:0
|
||||
#: field:account.asset.category,method_progress_factor:0
|
||||
msgid "Degressive Factor"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_list_normal
|
||||
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_list_normal
|
||||
msgid "Asset Categories"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
#: field:account.asset.asset,account_move_line_ids:0
|
||||
#: field:account.move.line,entry_ids:0
|
||||
#: model:ir.actions.act_window,name:account_asset.act_entries_open
|
||||
msgid "Entries"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
#: field:account.asset.asset,depreciation_line_ids:0
|
||||
msgid "Depreciation Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.asset,salvage_value:0
|
||||
msgid "It is the amount you plan to have that you cannot depreciate."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.asset,method_period:0
|
||||
msgid "The amount of time between two depreciations, in months"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,depreciation_date:0
|
||||
#: view:asset.asset.report:0
|
||||
#: field:asset.asset.report,depreciation_date:0
|
||||
msgid "Depreciation Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: constraint:account.asset.asset:0
|
||||
msgid "Error ! You cannot create recursive assets."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:asset.asset.report,posted_value:0
|
||||
msgid "Posted Amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
#: view:asset.asset.report:0
|
||||
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_form
|
||||
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_form
|
||||
#: model:ir.ui.menu,name:account_asset.menu_finance_assets
|
||||
#: model:ir.ui.menu,name:account_asset.menu_finance_config_assets
|
||||
msgid "Assets"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,account_depreciation_id:0
|
||||
msgid "Depreciation Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
#: view:account.asset.category:0
|
||||
#: view:account.asset.history:0
|
||||
#: view:asset.modify:0
|
||||
#: field:asset.modify,note:0
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,move_id:0
|
||||
msgid "Depreciation Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
#: field:asset.asset.report,nbr:0
|
||||
msgid "# of Depreciation Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,method_period:0
|
||||
msgid "Number of Months in a Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
msgid "Assets in draft state"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,method_end:0
|
||||
#: selection:account.asset.asset,method_time:0
|
||||
#: selection:account.asset.category,method_time:0
|
||||
#: selection:account.asset.history,method_time:0
|
||||
msgid "Ending Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,code:0
|
||||
msgid "Reference"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Account Asset"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.actions.act_window,name:account_asset.action_asset_depreciation_confirmation_wizard
|
||||
#: model:ir.ui.menu,name:account_asset.menu_asset_depreciation_confirmation_wizard
|
||||
msgid "Compute Assets"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,method_period:0
|
||||
#: field:account.asset.history,method_period:0
|
||||
#: field:asset.modify,method_period:0
|
||||
msgid "Period Length"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: selection:account.asset.asset,state:0
|
||||
#: view:asset.asset.report:0
|
||||
#: selection:asset.asset.report,state:0
|
||||
msgid "Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
msgid "Date of asset purchase"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Change Duration"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.asset,method_number:0
|
||||
#: help:account.asset.category,method_number:0
|
||||
#: help:account.asset.history,method_number:0
|
||||
msgid "The number of depreciations needed to depreciate your asset"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.category:0
|
||||
msgid "Analytic Information"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,account_analytic_id:0
|
||||
msgid "Analytic account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,method:0
|
||||
#: field:account.asset.category,method:0
|
||||
msgid "Computation Method"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: constraint:account.asset.asset:0
|
||||
msgid ""
|
||||
"Prorata temporis can be applied only for time method \"number of "
|
||||
"depreciations\"."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,remaining_value:0
|
||||
msgid "Next Period Depreciation"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.history,method_period:0
|
||||
msgid "Time in month between two depreciations"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.modify:0
|
||||
#: model:ir.actions.act_window,name:account_asset.action_asset_modify
|
||||
#: model:ir.model,name:account_asset.model_asset_modify
|
||||
msgid "Modify Asset"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,salvage_value:0
|
||||
msgid "Salvage Value"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,category_id:0
|
||||
#: view:account.asset.category:0
|
||||
#: field:account.invoice.line,asset_category_id:0
|
||||
#: view:asset.asset.report:0
|
||||
msgid "Asset Category"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Assets in closed state"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,parent_id:0
|
||||
msgid "Parent Asset"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.history:0
|
||||
#: model:ir.model,name:account_asset.model_account_asset_history
|
||||
msgid "Asset history"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.category:0
|
||||
msgid "Search Asset Category"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.modify:0
|
||||
msgid "months"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.model,name:account_asset.model_account_invoice_line
|
||||
msgid "Invoice Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Depreciation Board"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:asset.asset.report,unposted_value:0
|
||||
msgid "Unposted Amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,method_time:0
|
||||
#: field:account.asset.category,method_time:0
|
||||
#: field:account.asset.history,method_time:0
|
||||
msgid "Time Method"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.depreciation.confirmation.wizard:0
|
||||
#: view:asset.modify:0
|
||||
msgid "or"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,note:0
|
||||
#: field:account.asset.category,note:0
|
||||
#: field:account.asset.history,note:0
|
||||
msgid "Note"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.history,method_time:0
|
||||
msgid ""
|
||||
"The method to use to compute the dates and number of depreciation lines.\n"
|
||||
"Number of Depreciations: Fix the number of depreciation lines and the time "
|
||||
"between 2 depreciations.\n"
|
||||
"Ending Date: Choose the time between 2 depreciations and the date the "
|
||||
"depreciations won't go beyond."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.asset,method_time:0
|
||||
#: help:account.asset.category,method_time:0
|
||||
msgid ""
|
||||
"Choose the method to use to compute the dates and number of depreciation "
|
||||
"lines.\n"
|
||||
" * Number of Depreciations: Fix the number of depreciation lines and the "
|
||||
"time between 2 depreciations.\n"
|
||||
" * Ending Date: Choose the time between 2 depreciations and the date the "
|
||||
"depreciations won't go beyond."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
msgid "Assets in running state"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Closed"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.asset,state:0
|
||||
msgid ""
|
||||
"When an asset is created, the status is 'Draft'.\n"
|
||||
"If the asset is confirmed, the status goes in 'Running' and the depreciation "
|
||||
"lines can be posted in the accounting.\n"
|
||||
"You can manually close an asset when the depreciation is over. If the last "
|
||||
"line of depreciation is posted, the asset automatically goes in that status."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,state:0
|
||||
#: field:asset.asset.report,state:0
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,partner_id:0
|
||||
#: field:asset.asset.report,partner_id:0
|
||||
msgid "Partner"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
msgid "Posted depreciation lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,child_ids:0
|
||||
msgid "Children Assets"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
msgid "Date of depreciation"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.history,user_id:0
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,account_asset_id:0
|
||||
msgid "Asset Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
msgid "Extended Filters..."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
#: view:asset.depreciation.confirmation.wizard:0
|
||||
msgid "Compute"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.history:0
|
||||
msgid "Asset History"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.model,name:account_asset.model_asset_depreciation_confirmation_wizard
|
||||
msgid "asset.depreciation.confirmation.wizard"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,active:0
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,parent_state:0
|
||||
msgid "State of Asset"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,name:0
|
||||
msgid "Depreciation Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
#: field:account.asset.asset,history_ids:0
|
||||
msgid "History"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.depreciation.confirmation.wizard:0
|
||||
msgid "Compute Asset"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:asset.depreciation.confirmation.wizard,period_id:0
|
||||
msgid "Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,prorata:0
|
||||
#: field:account.asset.category,prorata:0
|
||||
msgid "Prorata Temporis"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.model,name:account_asset.model_account_invoice
|
||||
msgid "Invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Set to Close"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.depreciation.confirmation.wizard:0
|
||||
#: view:asset.modify:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: selection:account.asset.asset,state:0
|
||||
#: selection:asset.asset.report,state:0
|
||||
msgid "Close"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.model,name:account_asset.model_account_move_line
|
||||
msgid "Journal Items"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.modify:0
|
||||
msgid "Asset Durations to Modify"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,purchase_date:0
|
||||
#: view:asset.asset.report:0
|
||||
#: field:asset.asset.report,purchase_date:0
|
||||
msgid "Purchase Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: selection:account.asset.asset,method:0
|
||||
#: selection:account.asset.category,method:0
|
||||
msgid "Degressive"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: help:asset.depreciation.confirmation.wizard,period_id:0
|
||||
msgid ""
|
||||
"Choose the period for which you want to automatically post the depreciation "
|
||||
"lines of running assets"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Current"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.category:0
|
||||
msgid "Depreciation Method"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,amount:0
|
||||
msgid "Current Depreciation"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,name:0
|
||||
msgid "Asset Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,open_asset:0
|
||||
msgid "Skip Draft State"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.category:0
|
||||
msgid "Depreciation Dates"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,currency_id:0
|
||||
msgid "Currency"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,journal_id:0
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.history,name:0
|
||||
msgid "History name"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,depreciated_value:0
|
||||
msgid "Amount Already Depreciated"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.asset,method:0
|
||||
#: help:account.asset.category,method:0
|
||||
msgid ""
|
||||
"Choose the method to use to compute the amount of depreciation lines.\n"
|
||||
" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n"
|
||||
" * Degressive: Calculated on basis of: Residual Value * Degressive Factor"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,move_check:0
|
||||
#: view:asset.asset.report:0
|
||||
#: field:asset.asset.report,move_check:0
|
||||
msgid "Posted"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.actions.act_window,help:account_asset.action_asset_asset_report
|
||||
msgid ""
|
||||
"<p>\n"
|
||||
" From this report, you can have an overview on all depreciation. "
|
||||
"The\n"
|
||||
" tool search can also be used to personalise your Assets reports "
|
||||
"and\n"
|
||||
" so, match this analysis to your needs;\n"
|
||||
" </p>\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,purchase_value:0
|
||||
msgid "Gross Value"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.category,name:0
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.category,open_asset:0
|
||||
msgid ""
|
||||
"Check this if you want to automatically confirm the assets of this category "
|
||||
"when created by invoices."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:asset.asset.report,name:0
|
||||
msgid "Year"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.model,name:account_asset.model_account_asset_depreciation_line
|
||||
msgid "Asset depreciation line"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.category:0
|
||||
#: field:asset.asset.report,asset_category_id:0
|
||||
#: model:ir.model,name:account_asset.model_account_asset_category
|
||||
msgid "Asset category"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
#: field:asset.asset.report,depreciation_value:0
|
||||
msgid "Amount of Depreciation Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: code:addons/account_asset/wizard/wizard_asset_compute.py:49
|
||||
#, python-format
|
||||
msgid "Created Asset Moves"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: help:account.asset.category,method_period:0
|
||||
msgid "State here the time between 2 depreciations, in months"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.history,date:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.asset,method_number:0
|
||||
#: selection:account.asset.asset,method_time:0
|
||||
#: field:account.asset.category,method_number:0
|
||||
#: selection:account.asset.category,method_time:0
|
||||
#: field:account.asset.history,method_number:0
|
||||
#: selection:account.asset.history,method_time:0
|
||||
#: field:asset.modify,method_number:0
|
||||
msgid "Number of Depreciations"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Create Move"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Confirm Asset"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_tree
|
||||
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_tree
|
||||
msgid "Asset Hierarchy"
|
||||
msgstr ""
|
|
@ -49,7 +49,7 @@
|
|||
<field name="asset_id"/>
|
||||
<field name="asset_category_id"/>
|
||||
<group expand="0" string="Extended Filters...">
|
||||
<field name="partner_id"/>
|
||||
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group expand="1" string="Group By...">
|
||||
|
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
@ -30,7 +30,7 @@ class asset_depreciation_confirmation_wizard(osv.osv_memory):
|
|||
}
|
||||
|
||||
def _get_period(self, cr, uid, context=None):
|
||||
periods = self.pool.get('account.period').find(cr, uid)
|
||||
periods = self.pool.get('account.period').find(cr, uid, context=context)
|
||||
if periods:
|
||||
return periods[0]
|
||||
return False
|
||||
|
|
|
@ -0,0 +1,362 @@
|
|||
# Hungarian translation for openobject-addons
|
||||
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||
"PO-Revision-Date: 2013-05-05 23:08+0000\n"
|
||||
"Last-Translator: krnkris <Unknown>\n"
|
||||
"Language-Team: Hungarian <hu@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-06 05:40+0000\n"
|
||||
"X-Generator: Launchpad (build 16598)\n"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: help:account.bank.statement.line.global,name:0
|
||||
msgid "Originator to Beneficiary Information"
|
||||
msgstr "Kezdeményezőtől a kedvezményezetthez intézett információ"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
#: selection:account.bank.statement.line,state:0
|
||||
msgid "Confirmed"
|
||||
msgstr "Jóváhagyott"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement:0
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Glob. Id"
|
||||
msgstr "Globális ID azonosító"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: selection:account.bank.statement.line.global,type:0
|
||||
msgid "CODA"
|
||||
msgstr "CODA"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,parent_id:0
|
||||
msgid "Parent Code"
|
||||
msgstr "Szülő kód"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Debit"
|
||||
msgstr "Tartozik"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:cancel.statement.line:0
|
||||
#: model:ir.actions.act_window,name:account_bank_statement_extensions.action_cancel_statement_line
|
||||
#: model:ir.model,name:account_bank_statement_extensions.model_cancel_statement_line
|
||||
msgid "Cancel selected statement lines"
|
||||
msgstr "Kiválasztott számlakivonat sorok visszavonása"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,val_date:0
|
||||
msgid "Value Date"
|
||||
msgstr "Értéknap"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Group By..."
|
||||
msgstr "Csoportosítás ezzel..."
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
#: selection:account.bank.statement.line,state:0
|
||||
msgid "Draft"
|
||||
msgstr "Tervezet"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Statement"
|
||||
msgstr "Kivonat"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:confirm.statement.line:0
|
||||
#: model:ir.actions.act_window,name:account_bank_statement_extensions.action_confirm_statement_line
|
||||
#: model:ir.model,name:account_bank_statement_extensions.model_confirm_statement_line
|
||||
msgid "Confirm selected statement lines"
|
||||
msgstr "Kiválasztott bankszámla kivonat sorok jóváhagyása"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: report:bank.statement.balance.report:0
|
||||
#: model:ir.actions.report.xml,name:account_bank_statement_extensions.bank_statement_balance_report
|
||||
msgid "Bank Statement Balances Report"
|
||||
msgstr "Bank kivonat egyenleg kimutatás"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:cancel.statement.line:0
|
||||
msgid "Cancel Lines"
|
||||
msgstr "Sorok elvetése"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line.global:0
|
||||
#: model:ir.model,name:account_bank_statement_extensions.model_account_bank_statement_line_global
|
||||
msgid "Batch Payment Info"
|
||||
msgstr "Köptegelt fizetés információ"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,state:0
|
||||
msgid "Status"
|
||||
msgstr "Állapot"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:129
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Delete operation not allowed. Please go to the associated bank "
|
||||
"statement in order to delete and/or modify bank statement line."
|
||||
msgstr ""
|
||||
"A törlés végrehajtás nem engedélyezett. Kérem menjen az ide vonatkozó banki "
|
||||
"kivonathoz, hogy azt törölhesse és/vagy módosíthassa."
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:confirm.statement.line:0
|
||||
msgid "or"
|
||||
msgstr "vagy"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:confirm.statement.line:0
|
||||
msgid "Confirm Lines"
|
||||
msgstr "Jóváhagyott sorok5"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line.global:0
|
||||
msgid "Transactions"
|
||||
msgstr "Tranzakciók"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,type:0
|
||||
msgid "Type"
|
||||
msgstr "Típus"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
#: report:bank.statement.balance.report:0
|
||||
msgid "Journal"
|
||||
msgstr "Napló"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Confirmed Statement Lines."
|
||||
msgstr "Jóváhagyott kivonat sorok"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Credit Transactions."
|
||||
msgstr "Jóváírási tranzakció"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: model:ir.actions.act_window,help:account_bank_statement_extensions.action_cancel_statement_line
|
||||
msgid "cancel selected statement lines."
|
||||
msgstr "kiválasztott kivonat sorok visszavonása"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,counterparty_number:0
|
||||
msgid "Counterparty Number"
|
||||
msgstr "Ellanoldali szám"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: report:bank.statement.balance.report:0
|
||||
msgid "Closing Balance"
|
||||
msgstr "Záró egyenleg"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: report:bank.statement.balance.report:0
|
||||
msgid "Date"
|
||||
msgstr "Dátum"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
#: field:account.bank.statement.line,globalisation_amount:0
|
||||
msgid "Glob. Amount"
|
||||
msgstr "Globális összeg"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Debit Transactions."
|
||||
msgstr "Terhelés tranzakciók"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Extended Filters..."
|
||||
msgstr "Kiterjesztett szűrők…"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:confirm.statement.line:0
|
||||
msgid "Confirmed lines cannot be changed anymore."
|
||||
msgstr "Jóváhagyott sorokat enm lehet többé megváltoztatni."
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:cancel.statement.line:0
|
||||
msgid "Are you sure you want to cancel the selected Bank Statement lines ?"
|
||||
msgstr ""
|
||||
"Biztos benne, hogy vissza akarja vonni a kijelölt banki kivonat sorokat?"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: report:bank.statement.balance.report:0
|
||||
msgid "Name"
|
||||
msgstr "Név"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,name:0
|
||||
msgid "OBI"
|
||||
msgstr "OBI"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: selection:account.bank.statement.line.global,type:0
|
||||
msgid "ISO 20022"
|
||||
msgstr "ISO 20022"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Notes"
|
||||
msgstr "Jegyzetek"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: selection:account.bank.statement.line.global,type:0
|
||||
msgid "Manual"
|
||||
msgstr "Kézi"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Bank Transaction"
|
||||
msgstr "Banki tranzakciók"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Credit"
|
||||
msgstr "Jóváírás"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,amount:0
|
||||
msgid "Amount"
|
||||
msgstr "Összeg"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Fin.Account"
|
||||
msgstr "Főkönyvi számla"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,counterparty_currency:0
|
||||
msgid "Counterparty Currency"
|
||||
msgstr "Ellenoldal pénzneme"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,counterparty_bic:0
|
||||
msgid "Counterparty BIC"
|
||||
msgstr "Ellenoldali BIC"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,child_ids:0
|
||||
msgid "Child Codes"
|
||||
msgstr "Alárendelt kódok"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Search Bank Transactions"
|
||||
msgstr "Banki tranzakciók keresése"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:confirm.statement.line:0
|
||||
msgid "Are you sure you want to confirm the selected Bank Statement lines ?"
|
||||
msgstr "Biztos, hogy jóvá akarja hagyni a kiválasztott banki kivonat sorait?"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: help:account.bank.statement.line,globalisation_id:0
|
||||
msgid ""
|
||||
"Code to identify transactions belonging to the same globalisation level "
|
||||
"within a batch payment"
|
||||
msgstr ""
|
||||
"Ugynahhoz, a kötegelt utaláson belüli, globalizált szinthez tartozó "
|
||||
"tranzakció azonosító kód"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Draft Statement Lines."
|
||||
msgstr "Tervezet kivonat sorok."
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Glob. Am."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: model:ir.model,name:account_bank_statement_extensions.model_account_bank_statement_line
|
||||
msgid "Bank Statement Line"
|
||||
msgstr "Bankkivonat sor"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,code:0
|
||||
msgid "Code"
|
||||
msgstr "Kód"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,counterparty_name:0
|
||||
msgid "Counterparty Name"
|
||||
msgstr "Ellenoldal megnevezése"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: model:ir.model,name:account_bank_statement_extensions.model_res_partner_bank
|
||||
msgid "Bank Accounts"
|
||||
msgstr "Bankszámlák"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: model:ir.model,name:account_bank_statement_extensions.model_account_bank_statement
|
||||
msgid "Bank Statement"
|
||||
msgstr "Bankszámlakivonat"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Statement Line"
|
||||
msgstr "Kivonat sor"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: sql_constraint:account.bank.statement.line.global:0
|
||||
msgid "The code must be unique !"
|
||||
msgstr "A kódnak egyedinek kell lennie !"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,bank_statement_line_ids:0
|
||||
#: model:ir.actions.act_window,name:account_bank_statement_extensions.action_bank_statement_line
|
||||
#: model:ir.ui.menu,name:account_bank_statement_extensions.bank_statement_line
|
||||
msgid "Bank Statement Lines"
|
||||
msgstr "Bankkivonat sorai"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:129
|
||||
#, python-format
|
||||
msgid "Warning!"
|
||||
msgstr "Figyelem!"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line.global:0
|
||||
msgid "Child Batch Payments"
|
||||
msgstr "Alárendelt kötegelt utalások"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:confirm.statement.line:0
|
||||
msgid "Cancel"
|
||||
msgstr "Mégse"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Statement Lines"
|
||||
msgstr "Kivonat sorai"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Total Amount"
|
||||
msgstr "Teljes érték"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,globalisation_id:0
|
||||
msgid "Globalisation ID"
|
||||
msgstr "Globalizált ID azonosító"
|
|
@ -203,7 +203,9 @@
|
|||
<field name="view_id" ref="crossovered_budget_view_tree"/>
|
||||
<field name="search_view_id" ref="view_crossovered_budget_search"/>
|
||||
<field name="help" type="html">
|
||||
<p>
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to create a new budget.
|
||||
</p><p>
|
||||
A budget is a forecast of your company's income and/or expenses
|
||||
expected for a period in the future. A budget is defined on some
|
||||
financial accounts and/or analytic accounts (that may represent
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
# Thai translation for openobject-addons
|
||||
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||
"PO-Revision-Date: 2013-05-15 07:04+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Thai <th@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-16 05:12+0000\n"
|
||||
"X-Generator: Launchpad (build 16626)\n"
|
||||
|
||||
#. module: account_cancel
|
||||
#: view:account.invoice:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
|
@ -8,19 +8,19 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||
"PO-Revision-Date: 2010-12-21 14:22+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"PO-Revision-Date: 2013-06-30 16:08+0000\n"
|
||||
"Last-Translator: Hung Tran <vanda6688@yahoo.com>\n"
|
||||
"Language-Team: Vietnamese <vi@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-03-16 05:42+0000\n"
|
||||
"X-Generator: Launchpad (build 16532)\n"
|
||||
"X-Launchpad-Export-Date: 2013-07-01 05:14+0000\n"
|
||||
"X-Generator: Launchpad (build 16692)\n"
|
||||
|
||||
#. module: account_cancel
|
||||
#: view:account.invoice:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Hủy bỏ"
|
||||
|
||||
#~ msgid "Account Cancel"
|
||||
#~ msgstr "Hủy bỏ Tài khoản"
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||
"PO-Revision-Date: 2012-12-11 13:00+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2013-06-03 07:47+0000\n"
|
||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||
"Language-Team: Russian <ru@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n"
|
||||
"X-Generator: Launchpad (build 16532)\n"
|
||||
"X-Launchpad-Export-Date: 2013-06-04 05:20+0000\n"
|
||||
"X-Generator: Launchpad (build 16660)\n"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: selection:res.company,check_layout:0
|
||||
|
@ -25,13 +25,13 @@ msgstr ""
|
|||
#. module: account_check_writing
|
||||
#: report:account.print.check.top:0
|
||||
msgid "Open Balance"
|
||||
msgstr ""
|
||||
msgstr "Открытый баланс"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: view:account.check.write:0
|
||||
#: view:account.voucher:0
|
||||
msgid "Print Check"
|
||||
msgstr ""
|
||||
msgstr "Напечатать чек"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: selection:res.company,check_layout:0
|
||||
|
@ -82,7 +82,7 @@ msgstr "Описание"
|
|||
#. module: account_check_writing
|
||||
#: model:ir.model,name:account_check_writing.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
msgstr "Журнал"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: model:ir.actions.act_window,name:account_check_writing.action_write_check
|
||||
|
@ -95,14 +95,14 @@ msgstr ""
|
|||
#: report:account.print.check.middle:0
|
||||
#: report:account.print.check.top:0
|
||||
msgid "Discount"
|
||||
msgstr ""
|
||||
msgstr "Скидка"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: report:account.print.check.bottom:0
|
||||
#: report:account.print.check.middle:0
|
||||
#: report:account.print.check.top:0
|
||||
msgid "Original Amount"
|
||||
msgstr ""
|
||||
msgstr "Первоначальная сумма"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: field:res.company,check_layout:0
|
||||
|
@ -119,7 +119,7 @@ msgstr ""
|
|||
#: report:account.print.check.middle:0
|
||||
#: report:account.print.check.top:0
|
||||
msgid "Payment"
|
||||
msgstr ""
|
||||
msgstr "Платеж"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: field:account.journal,use_preprint_check:0
|
||||
|
@ -153,7 +153,7 @@ msgstr ""
|
|||
#: report:account.print.check.middle:0
|
||||
#: report:account.print.check.top:0
|
||||
msgid "Due Date"
|
||||
msgstr ""
|
||||
msgstr "Дата исполнения"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_middle
|
||||
|
@ -163,13 +163,13 @@ msgstr ""
|
|||
#. module: account_check_writing
|
||||
#: model:ir.model,name:account_check_writing.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr ""
|
||||
msgstr "Компании"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: code:addons/account_check_writing/wizard/account_check_batch_printing.py:59
|
||||
#, python-format
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
msgstr "Ошибка!"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: help:account.check.write,check_number:0
|
||||
|
@ -202,12 +202,12 @@ msgstr ""
|
|||
#. module: account_check_writing
|
||||
#: view:account.check.write:0
|
||||
msgid "or"
|
||||
msgstr ""
|
||||
msgstr "или"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: field:account.voucher,amount_in_word:0
|
||||
msgid "Amount in Word"
|
||||
msgstr ""
|
||||
msgstr "Сумма прописью"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: model:ir.model,name:account_check_writing.model_account_check_write
|
||||
|
@ -217,7 +217,7 @@ msgstr ""
|
|||
#. module: account_check_writing
|
||||
#: view:account.check.write:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Отмена"
|
||||
|
||||
#. module: account_check_writing
|
||||
#: field:account.check.write,check_number:0
|
||||
|
|
|
@ -165,9 +165,8 @@ class res_partner(osv.osv):
|
|||
else:
|
||||
action_text = partner.latest_followup_level_id_without_lit.manual_action_note or ''
|
||||
|
||||
#Check date: put the minimum date if it existed already
|
||||
action_date = (partner.payment_next_action_date and min(partner.payment_next_action_date, fields.date.context_today(self, cr, uid, context=context))
|
||||
) or fields.date.context_today(self, cr, uid, context=context)
|
||||
#Check date: only change when it did not exist already
|
||||
action_date = partner.payment_next_action_date or fields.date.context_today(self, cr, uid, context=context)
|
||||
|
||||
# Check responsible: if partner has not got a responsible already, take from follow-up
|
||||
responsible_id = False
|
||||
|
|
|
@ -9,11 +9,12 @@
|
|||
<field name="model">res.partner</field>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Customer Followup">
|
||||
<field name="name"/>
|
||||
<tree string="Customer Followup" create="false" delete="false">
|
||||
<field name="display_name"/>
|
||||
<field name="payment_next_action_date"/>
|
||||
<field name="payment_next_action"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="country_id" invisible="1"/>
|
||||
<field name="parent_id" invisible="1"/>
|
||||
<field name="payment_responsible_id"/>
|
||||
<field name="payment_earliest_due_date"/>
|
||||
|
@ -29,7 +30,7 @@
|
|||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="after">
|
||||
<field name="display_name" position="after">
|
||||
<field name="payment_responsible_id" invisible="1"/>
|
||||
</field>
|
||||
</field>
|
||||
|
@ -97,7 +98,7 @@
|
|||
<button name="action_done" type="object" string="⇾ Mark as Done"
|
||||
help="Click to mark the action as done." class="oe_link"
|
||||
attrs="{'invisible':[('payment_next_action_date','=', False)]}"
|
||||
groups="base.group_partner_manager"/>
|
||||
groups="account.group_account_user"/>
|
||||
<field name="payment_next_action" placeholder="Action to be taken e.g. Give a phonecall, Check if it's paid, ..."/>
|
||||
</div>
|
||||
</group>
|
||||
|
|
|
@ -7,14 +7,14 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||
"PO-Revision-Date: 2011-11-11 15:21+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"PO-Revision-Date: 2013-05-31 10:28+0000\n"
|
||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-03-16 05:11+0000\n"
|
||||
"X-Generator: Launchpad (build 16532)\n"
|
||||
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build 16660)\n"
|
||||
|
||||
#. module: account_followup
|
||||
#: model:email.template,subject:account_followup.email_template_account_followup_default
|
||||
|
@ -22,7 +22,7 @@ msgstr ""
|
|||
#: model:email.template,subject:account_followup.email_template_account_followup_level1
|
||||
#: model:email.template,subject:account_followup.email_template_account_followup_level2
|
||||
msgid "${user.company_id.name} Payment Reminder"
|
||||
msgstr ""
|
||||
msgstr "${user.company_id.name} напоминание о платеже"
|
||||
|
||||
#. module: account_followup
|
||||
#: help:res.partner,latest_followup_level_id:0
|
||||
|
@ -43,12 +43,12 @@ msgstr "Дальнейшие действия"
|
|||
#. module: account_followup
|
||||
#: view:account_followup.followup.line:0
|
||||
msgid "%(date)s"
|
||||
msgstr ""
|
||||
msgstr "%(date)s"
|
||||
|
||||
#. module: account_followup
|
||||
#: field:res.partner,payment_next_action_date:0
|
||||
msgid "Next Action Date"
|
||||
msgstr ""
|
||||
msgstr "Дата следующего действия"
|
||||
|
||||
#. module: account_followup
|
||||
#: view:account_followup.followup.line:0
|
||||
|
@ -64,7 +64,7 @@ msgstr ""
|
|||
#. module: account_followup
|
||||
#: view:res.partner:0
|
||||
msgid "⇾ Mark as Done"
|
||||
msgstr ""
|
||||
msgstr "⇾ отметить как сделанное"
|
||||
|
||||
#. module: account_followup
|
||||
#: field:account_followup.followup.line,manual_action_note:0
|
||||
|
@ -94,7 +94,7 @@ msgstr "Тема эл.письма"
|
|||
#. module: account_followup
|
||||
#: view:account_followup.followup.line:0
|
||||
msgid "%(user_signature)s"
|
||||
msgstr ""
|
||||
msgstr "%(user_signature)s"
|
||||
|
||||
#. module: account_followup
|
||||
#: view:account_followup.followup.line:0
|
||||
|
@ -109,19 +109,19 @@ msgstr ""
|
|||
#. module: account_followup
|
||||
#: field:account_followup.print,email_body:0
|
||||
msgid "Email Body"
|
||||
msgstr ""
|
||||
msgstr "Тело эл. письма"
|
||||
|
||||
#. module: account_followup
|
||||
#: model:ir.actions.act_window,name:account_followup.action_account_followup_print
|
||||
msgid "Send Follow-Ups"
|
||||
msgstr ""
|
||||
msgstr "Послать напоминания"
|
||||
|
||||
#. module: account_followup
|
||||
#: report:account_followup.followup.print:0
|
||||
#: code:addons/account_followup/account_followup.py:263
|
||||
#, python-format
|
||||
msgid "Amount"
|
||||
msgstr ""
|
||||
msgstr "Сумма"
|
||||
|
||||
#. module: account_followup
|
||||
#: help:res.partner,payment_next_action:0
|
||||
|
@ -133,7 +133,7 @@ msgstr ""
|
|||
#. module: account_followup
|
||||
#: view:res.partner:0
|
||||
msgid "No Responsible"
|
||||
msgstr ""
|
||||
msgstr "Нет ответственного"
|
||||
|
||||
#. module: account_followup
|
||||
#: model:account_followup.followup.line,description:account_followup.demo_followup_line2
|
||||
|
@ -209,17 +209,17 @@ msgstr "Всего по дебету"
|
|||
#. module: account_followup
|
||||
#: field:res.partner,payment_next_action:0
|
||||
msgid "Next Action"
|
||||
msgstr ""
|
||||
msgstr "Следующее действие"
|
||||
|
||||
#. module: account_followup
|
||||
#: view:account_followup.followup.line:0
|
||||
msgid ": Partner Name"
|
||||
msgstr ""
|
||||
msgstr ": Название партнера"
|
||||
|
||||
#. module: account_followup
|
||||
#: field:account_followup.followup.line,manual_action_responsible_id:0
|
||||
msgid "Assign a Responsible"
|
||||
msgstr ""
|
||||
msgstr "Назначить ответственного"
|
||||
|
||||
#. module: account_followup
|
||||
#: view:account_followup.followup:0
|
||||
|
@ -305,7 +305,7 @@ msgstr ""
|
|||
#. module: account_followup
|
||||
#: view:account_followup.followup.line:0
|
||||
msgid "%(partner_name)s"
|
||||
msgstr ""
|
||||
msgstr "%(partner_name)s"
|
||||
|
||||
#. module: account_followup
|
||||
#: model:email.template,body_html:account_followup.email_template_account_followup_level1
|
||||
|
@ -377,7 +377,7 @@ msgstr "Определяет порядок вывода списка напом
|
|||
#: code:addons/account_followup/wizard/account_followup_print.py:166
|
||||
#, python-format
|
||||
msgid " will be sent"
|
||||
msgstr ""
|
||||
msgstr " будет отправлен"
|
||||
|
||||
#. module: account_followup
|
||||
#: view:account_followup.followup.line:0
|
||||
|
@ -388,7 +388,7 @@ msgstr ""
|
|||
#: view:account_followup.followup.line:0
|
||||
#: field:account_followup.followup.line,send_letter:0
|
||||
msgid "Send a Letter"
|
||||
msgstr ""
|
||||
msgstr "Отправить письмо"
|
||||
|
||||
#. module: account_followup
|
||||
#: model:ir.actions.act_window,name:account_followup.action_account_followup_definition_form
|
||||
|
@ -466,7 +466,7 @@ msgstr "Напечатанное сообщение"
|
|||
#: code:addons/account_followup/wizard/account_followup_print.py:155
|
||||
#, python-format
|
||||
msgid "Anybody"
|
||||
msgstr ""
|
||||
msgstr "Кто угодно"
|
||||
|
||||
#. module: account_followup
|
||||
#: help:account_followup.followup.line,send_email:0
|
||||
|
@ -528,7 +528,7 @@ msgstr ""
|
|||
#. module: account_followup
|
||||
#: view:res.partner:0
|
||||
msgid "Search Partner"
|
||||
msgstr ""
|
||||
msgstr "Поиск партнера"
|
||||
|
||||
#. module: account_followup
|
||||
#: model:ir.ui.menu,name:account_followup.account_followup_print_menu
|
||||
|
@ -554,7 +554,7 @@ msgstr ""
|
|||
#. module: account_followup
|
||||
#: view:account_followup.print:0
|
||||
msgid "or"
|
||||
msgstr ""
|
||||
msgstr "или"
|
||||
|
||||
#. module: account_followup
|
||||
#: view:res.partner:0
|
||||
|
|