[MERGE] merge from trunk addons3
bzr revid: ara@tinyerp.com-20101110115524-s8puxeglkjwa73lr
This commit is contained in:
commit
b6f2173069
|
@ -20,7 +20,7 @@
|
|||
##############################################################################
|
||||
|
||||
import time
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import datetime
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from operator import itemgetter
|
||||
|
||||
|
|
|
@ -78,12 +78,9 @@ class account_analytic_line(osv.osv):
|
|||
return {}
|
||||
product_obj = self.pool.get('product.product')
|
||||
analytic_journal_obj =self.pool.get('account.analytic.journal')
|
||||
# company_obj = self.pool.get('res.company')
|
||||
product_price_type_obj = self.pool.get('product.price.type')
|
||||
j_id = analytic_journal_obj.browse(cr, uid, journal_id, context=context)
|
||||
prod = product_obj.browse(cr, uid, prod_id)
|
||||
# if not company_id:
|
||||
# company_id = j_id.company_id.id
|
||||
result = 0.0
|
||||
|
||||
if j_id.type <> 'sale':
|
||||
|
@ -95,7 +92,6 @@ class account_analytic_line(osv.osv):
|
|||
_('There is no expense account defined ' \
|
||||
'for this product: "%s" (id:%d)') % \
|
||||
(prod.name, prod.id,))
|
||||
# amount_unit = prod.price_get('standard_price', context)[prod.id]
|
||||
else:
|
||||
a = prod.product_tmpl_id.property_account_income.id
|
||||
if not a:
|
||||
|
@ -105,36 +101,31 @@ class account_analytic_line(osv.osv):
|
|||
_('There is no income account defined ' \
|
||||
'for this product: "%s" (id:%d)') % \
|
||||
(prod.name, prod_id,))
|
||||
# amount_unit = prod.price_get('list_price', context)[prod_id]
|
||||
|
||||
# if not company_id:
|
||||
# company_id = company_obj._company_default_get(cr, uid, 'account.analytic.line', context=context)
|
||||
# # so what? do we need company_id?
|
||||
if True:
|
||||
flag = False
|
||||
# Compute based on pricetype
|
||||
product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','standard_price')], context=context)
|
||||
pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context)[0]
|
||||
if journal_id:
|
||||
journal = analytic_journal_obj.browse(cr, uid, journal_id)
|
||||
if journal.type == 'sale':
|
||||
product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context)
|
||||
if product_price_type_ids:
|
||||
pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context)[0]
|
||||
# Take the company currency as the reference one
|
||||
if pricetype.field == 'list_price':
|
||||
flag = True
|
||||
ctx = context.copy()
|
||||
if unit:
|
||||
# price_get() will respect a 'uom' in its context, in order
|
||||
# to return a default price for those units
|
||||
ctx['uom'] = unit
|
||||
amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id]
|
||||
prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
|
||||
amount = amount_unit * quantity or 1.0
|
||||
result = round(amount, prec)
|
||||
if not flag:
|
||||
result *= -1
|
||||
flag = False
|
||||
# Compute based on pricetype
|
||||
product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','standard_price')], context=context)
|
||||
pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context)[0]
|
||||
if journal_id:
|
||||
journal = analytic_journal_obj.browse(cr, uid, journal_id)
|
||||
if journal.type == 'sale':
|
||||
product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context)
|
||||
if product_price_type_ids:
|
||||
pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context)[0]
|
||||
# Take the company currency as the reference one
|
||||
if pricetype.field == 'list_price':
|
||||
flag = True
|
||||
ctx = context.copy()
|
||||
if unit:
|
||||
# price_get() will respect a 'uom' in its context, in order
|
||||
# to return a default price for those units
|
||||
ctx['uom'] = unit
|
||||
amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id]
|
||||
prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
|
||||
amount = amount_unit * quantity or 1.0
|
||||
result = round(amount, prec)
|
||||
if not flag:
|
||||
result *= -1
|
||||
|
||||
return {'value': {
|
||||
'amount': result,
|
||||
|
@ -165,4 +156,4 @@ class res_partner(osv.osv):
|
|||
|
||||
res_partner()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -46,26 +46,6 @@ class account_bank_statement(osv.osv):
|
|||
account_bank_statement_line_obj.write(cr, uid, [line.id], {'sequence': seq}, context=context)
|
||||
return res
|
||||
|
||||
def button_import_invoice(self, cr, uid, ids, context=None):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
if context is None:
|
||||
context = {}
|
||||
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_statement_from_invoice')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
context.update({'statement_id': ids[0]})
|
||||
|
||||
return {
|
||||
'name': _('Import Invoice'),
|
||||
'context': context,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'account.statement.from.invoice',
|
||||
'views': [(resource_id,'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
'nodestroy': True
|
||||
}
|
||||
|
||||
def _default_journal_id(self, cr, uid, context={}):
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
journal_type = context.get('journal_type', False)
|
||||
|
@ -423,8 +403,6 @@ account_bank_statement()
|
|||
class account_bank_statement_line(osv.osv):
|
||||
|
||||
def onchange_type(self, cr, uid, line_id, partner_id, type, context=None):
|
||||
res_users_obj = self.pool.get('res.users')
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
res = {'value': {}}
|
||||
obj_partner = self.pool.get('res.partner')
|
||||
if context is None:
|
||||
|
|
|
@ -1065,8 +1065,8 @@
|
|||
<separator string="Narration" colspan="4"/>
|
||||
<field name="narration" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Analytic Lines" groups="base.group_extended">
|
||||
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}" groups="base.group_extended"/>
|
||||
<page string="Analytic Lines" groups="base.group_analytic_accounting">
|
||||
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
@ -1112,8 +1112,8 @@
|
|||
<field name="reconcile_partial_id"/>
|
||||
<field name="state"/>
|
||||
</page>
|
||||
<page string="Analytic Lines" groups="base.group_extended">
|
||||
<field colspan="4" name="analytic_lines" nolabel="1" groups="base.group_extended"/>
|
||||
<page string="Analytic Lines" groups="base.group_analytic_accounting">
|
||||
<field colspan="4" name="analytic_lines" nolabel="1" />
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
@ -1358,8 +1358,8 @@
|
|||
<separator string="Narration" colspan="4"/>
|
||||
<field name="narration" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Analytic Lines" groups="base.group_extended">
|
||||
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}" groups="base.group_extended"/>
|
||||
<page string="Analytic Lines" groups="base.group_analytic_accounting">
|
||||
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
|
|
@ -353,7 +353,7 @@
|
|||
</record>
|
||||
<record id="refund_sales_journal" model="account.journal">
|
||||
<field name="name">Sales Credit Note Journal - (test)</field>
|
||||
<field name="code">SCNJ- (test)</field>
|
||||
<field name="code">SCNJ - (test)</field>
|
||||
<field name="type">sale_refund</field>
|
||||
<field eval="True" name="refund_journal"/>
|
||||
<field name="view_id" ref="account_sp_refund_journal_view"/>
|
||||
|
@ -366,7 +366,7 @@
|
|||
|
||||
<record id="expenses_journal" model="account.journal">
|
||||
<field name="name">Expenses Journal - (test)</field>
|
||||
<field name="code">EXJ- (test)</field>
|
||||
<field name="code">EXJ - (test)</field>
|
||||
<field name="type">purchase</field>
|
||||
<field name="view_id" ref="account_sp_journal_view"/>
|
||||
<field name="sequence_id" ref="sequence_purchase_journal"/>
|
||||
|
@ -377,7 +377,7 @@
|
|||
</record>
|
||||
<record id="refund_expenses_journal" model="account.journal">
|
||||
<field name="name">Expenses Credit Notes Journal - (test)</field>
|
||||
<field name="code">ECNJ- (test)</field>
|
||||
<field name="code">ECNJ - (test)</field>
|
||||
<field name="type">purchase_refund</field>
|
||||
<field eval="True" name="refund_journal"/>
|
||||
<field name="view_id" ref="account_sp_refund_journal_view"/>
|
||||
|
@ -390,7 +390,7 @@
|
|||
|
||||
<record id="bank_journal" model="account.journal">
|
||||
<field name="name">Bank Journal - (test)</field>
|
||||
<field name="code">BNK- (test)</field>
|
||||
<field name="code">BNK - (test)</field>
|
||||
<field name="type">bank</field>
|
||||
<field name="view_id" ref="account_journal_bank_view"/>
|
||||
<field name="sequence_id" ref="sequence_bank_journal"/>
|
||||
|
@ -401,7 +401,7 @@
|
|||
</record>
|
||||
<record id="check_journal" model="account.journal">
|
||||
<field name="name">Checks Journal - (test)</field>
|
||||
<field name="code">CHK- (test)</field>
|
||||
<field name="code">CHK - (test)</field>
|
||||
<field name="type">bank</field>
|
||||
<field name="view_id" ref="account_journal_bank_view"/>
|
||||
<field name="sequence_id" ref="sequence_check_journal"/>
|
||||
|
@ -412,7 +412,7 @@
|
|||
</record>
|
||||
<record id="cash_journal" model="account.journal">
|
||||
<field name="name">Cash Journal - (test)</field>
|
||||
<field name="code">CSH- (test)</field>
|
||||
<field name="code">CSH - (test)</field>
|
||||
<field name="type">cash</field>
|
||||
<field name="view_id" ref="account_journal_bank_view"/>
|
||||
<field name="sequence_id" ref="sequence_cash_journal"/>
|
||||
|
|
|
@ -8778,5 +8778,5 @@ msgstr ""
|
|||
#: model:ir.actions.act_window,name:action_account_balance_menu
|
||||
#: model:ir.actions.report.xml,name:account.account_account_balance
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
|
|
@ -40,7 +40,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -40,7 +40,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -40,7 +40,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -42,7 +42,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -41,7 +41,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -57,7 +57,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -50,7 +50,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -50,7 +50,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -51,7 +51,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -50,7 +50,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -50,7 +50,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -50,7 +50,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -50,7 +50,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -51,7 +51,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -51,7 +51,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -40,7 +40,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -50,7 +50,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -41,7 +41,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -39,7 +39,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -51,7 +51,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -50,7 +50,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -50,7 +50,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -44,7 +44,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_general_Balance_report
|
||||
msgid "Trail Balance"
|
||||
msgid "Trial Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -45,7 +45,6 @@ class account_aged_trial_balance(osv.osv_memory):
|
|||
}
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
res = super(account_aged_trial_balance, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
|
||||
doc = etree.XML(res['arch'])
|
||||
nodes = doc.xpath("//field[@name='journal_ids']")
|
||||
|
|
|
@ -20,10 +20,8 @@
|
|||
##############################################################################
|
||||
|
||||
import time
|
||||
import ir
|
||||
|
||||
import pooler
|
||||
from osv import osv
|
||||
from report import report_sxw
|
||||
|
||||
class report_rappel(report_sxw.rml_parse):
|
||||
|
|
|
@ -56,7 +56,6 @@ class account_followup_stat(osv.osv):
|
|||
context=context, count=count)
|
||||
|
||||
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None):
|
||||
todel=[]
|
||||
for arg in domain:
|
||||
if arg[0] == 'period_id' and arg[2] == 'current_year':
|
||||
current_year = self.pool.get('account.fiscalyear').find(cr, uid)
|
||||
|
@ -91,7 +90,7 @@ class account_followup_stat(osv.osv):
|
|||
l.reconcile_id is NULL AND
|
||||
l.partner_id IS NOT NULL
|
||||
GROUP BY
|
||||
l.id, l.partner_id, l.company_id, l.blocked, l.period_id
|
||||
l.id, l.partner_id, l.company_id, l.blocked, l.period_id
|
||||
)""")
|
||||
account_followup_stat()
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ class account_followup_stat_by_partner(osv.osv):
|
|||
l.reconcile_id is NULL AND
|
||||
l.partner_id IS NOT NULL
|
||||
GROUP BY
|
||||
l.partner_id, l.company_id
|
||||
l.partner_id, l.company_id
|
||||
)""")
|
||||
account_followup_stat_by_partner()
|
||||
|
||||
|
@ -212,10 +212,8 @@ class account_followup_print_all(osv.osv_memory):
|
|||
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all_msg')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
if data['email_conf']:
|
||||
mail_notsent = ''
|
||||
msg_sent = ''
|
||||
msg_unsent = ''
|
||||
count = 0
|
||||
data_user = user_obj.browse(cr, uid, uid)
|
||||
move_lines = line_obj.browse(cr, uid, data['partner_ids'])
|
||||
partners = []
|
||||
|
|
|
@ -100,7 +100,7 @@ class payment_order_create(osv.osv_memory):
|
|||
context = {}
|
||||
data = self.read(cr, uid, ids, [], context=context)[0]
|
||||
search_due_date = data['duedate']
|
||||
payment = order_obj.browse(cr, uid, context['active_id'], context=context)
|
||||
# payment = order_obj.browse(cr, uid, context['active_id'], context=context)
|
||||
|
||||
# Search for move line to pay:
|
||||
domain = [('reconcile_id', '=', False), ('account_id.type', '=', 'payable'), ('amount_to_pay', '>', 0)]
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
##############################################################################
|
||||
|
||||
{
|
||||
'name': 'Sequence Numbering',
|
||||
'name': 'Entries Sequence Numbering',
|
||||
'version': '1.1',
|
||||
'category': 'Generic Modules/Accounting',
|
||||
'description': """
|
||||
|
@ -36,4 +36,5 @@
|
|||
'active': False,
|
||||
'certificate': '',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -24,29 +24,30 @@ from osv import osv, fields
|
|||
|
||||
class account_move(osv.osv):
|
||||
_inherit = 'account.move'
|
||||
|
||||
|
||||
_columns = {
|
||||
'internal_sequence_number': fields.char('Internal Sequence Number', size=64, readonly=True),
|
||||
}
|
||||
|
||||
|
||||
def post(self, cr, uid, ids, context=None):
|
||||
obj_sequence = self.pool.get('ir.sequence')
|
||||
res = super(account_move, self).post(cr, uid, ids, context)
|
||||
res = super(account_move, self).post(cr, uid, ids, context=context)
|
||||
seq_no = False
|
||||
for line in self.browse(cr, uid, ids):
|
||||
if line.journal_id.internal_sequence:
|
||||
c = {'fiscalyear_id': line.period_id.fiscalyear_id.id}
|
||||
seq_no = obj_sequence.get_id(cr, uid, line.journal_id.internal_sequence.id, context=c)
|
||||
seq_no = obj_sequence.get_id(cr, uid, line.journal_id.internal_sequence.id, context=context)
|
||||
if seq_no:
|
||||
self.write(cr, uid, [line.id], {'internal_sequence_number':seq_no})
|
||||
self.write(cr, uid, [line.id], {'internal_sequence_number': seq_no})
|
||||
return res
|
||||
|
||||
|
||||
account_move()
|
||||
|
||||
class account_journal(osv.osv):
|
||||
_inherit = "account.journal"
|
||||
|
||||
|
||||
_columns = {
|
||||
'internal_sequence': fields.many2one('ir.sequence', 'Internal Sequence'),
|
||||
}
|
||||
account_journal()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -101,7 +101,7 @@ class rml_parse(report_sxw.rml_parse):
|
|||
return Stringer
|
||||
|
||||
def explode_this(self, chaine, length):
|
||||
chaine = chaine.rstrip(chaine)
|
||||
chaine = chaine.rstrip()
|
||||
ast = list(chaine)
|
||||
i = length
|
||||
while i <= len(ast):
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
import string
|
||||
|
||||
from osv import osv, fields
|
||||
from tools.func import partial
|
||||
from tools.translate import _
|
||||
|
||||
_ref_vat = {
|
||||
|
|
|
@ -81,7 +81,7 @@ class event_make_invoice(osv.osv_memory):
|
|||
tree_res = tree_id and tree_id[1] or False
|
||||
return {
|
||||
'domain': "[('id', 'in', %s)]" % res,
|
||||
'name': 'Customer Invoices',
|
||||
'name': _('Customer Invoices'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'account.invoice',
|
||||
|
@ -93,4 +93,4 @@ class event_make_invoice(osv.osv_memory):
|
|||
|
||||
event_make_invoice()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -147,7 +147,7 @@ class hr_holidays(osv.osv):
|
|||
'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'user_id':fields.many2one('res.users', 'User', states={'draft':[('readonly',False)]}, select=True, readonly=True),
|
||||
'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'holiday_status_id': fields.many2one("hr.holidays.status", " Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'holiday_status_id': fields.many2one("hr.holidays.status", "Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'employee_id': fields.many2one('hr.employee', "Employee", select=True, invisible=False, readonly=True, states={'draft':[('readonly',False)]}, help='Leave Manager can let this field empty if this leave request/allocation is for every employee'),
|
||||
#'manager_id': fields.many2one('hr.employee', 'Leave Manager', invisible=False, readonly=True, help='This area is automaticly filled by the user who validate the leave'),
|
||||
#'notes': fields.text('Notes',readonly=True, states={'draft':[('readonly',False)]}),
|
||||
|
@ -472,4 +472,4 @@ class resource_calendar_leaves(osv.osv):
|
|||
|
||||
resource_calendar_leaves()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
import time
|
||||
|
||||
from osv import osv, fields
|
||||
from tools.translate import _
|
||||
|
||||
class hr_holidays_summary_employee(osv.osv_memory):
|
||||
_name = 'hr.holidays.summary.employee'
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
import time
|
||||
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
class hr_payroll_employees_detail(osv.osv_memory):
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
import time
|
||||
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
class hr_payroll_year_salary(osv.osv_memory):
|
||||
_name = "hr.payroll.year.salary"
|
||||
|
|
Loading…
Reference in New Issue