[MERGE] merge from trunk addons

bzr revid: mra@mra-laptop-20100917034632-unckize2zdjdrnki
This commit is contained in:
Mustufa Rangwala
2010-09-17 09:16:32 +05:30
14 changed files with 49 additions and 48 deletions
@@ -21,6 +21,7 @@
import tools
from osv import fields,osv
import decimal_precision as dp
class account_entries_report(osv.osv):
_name = "account.entries.report"
@@ -39,6 +40,8 @@ class account_entries_report(osv.osv):
'day': fields.char('Day', size=128, readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'date': fields.date('Date', size=128, readonly=True),
'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
'amount_currency': fields.float('Amount Currency', digits_compute=dp.get_precision('Account'), readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
@@ -68,6 +71,7 @@ class account_entries_report(osv.osv):
"partners accounts (for debit/credit computations), closed for depreciated accounts."),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
}
_order = 'date desc'
def search(self, cr, uid, args, offset=0, limit=None, order=None,
@@ -133,6 +137,8 @@ class account_entries_report(osv.osv):
a.user_type as user_type,
1 as nbr,
l.quantity as quantity,
l.currency_id as currency_id,
l.amount_currency as amount_currency,
l.debit as debit,
l.credit as credit,
l.debit-l.credit as balance
@@ -13,6 +13,8 @@
<field name="ref" invisible="1"/>
<field name="nbr" sum="# of Entries "/>
<field name="quantity" sum="# of Products Qty "/>
<field name="amount_currency" invisible="not context.get('amount_currency_visible', False)"/>
<field name="currency_id" invisible="not context.get('currency_id_visible', False)"/>
<field name="debit"/>
<field name="credit"/>
<field name="balance"/>
@@ -77,20 +79,18 @@
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="Currency" name="group_currency" icon="terp-dolar" context="{'group_by':'currency_id', 'currency_id_visible':1, 'amount_currency_visible':1}"/>
<filter string="Journal" name="group_journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<filter string="Account" name="group_account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
<separator orientation="vertical"/>
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'user_type'}"/>
<filter string="Int.Type" icon="terp-stock_symbol-selection" context="{'group_by':'type'}"/>
<separator orientation="vertical"/>
<filter string="Period" icon="terp-go-month" name="group_period" context="{'group_by':'period_id'}"/>
<filter string="Fiscal Year" icon="terp-go-month" context="{'group_by':'fiscalyear_id'}"/>
<separator orientation="vertical"/>
<filter string="Acc.Type" icon="terp-folder-blue" context="{'group_by':'user_type'}"/>
<filter string="Int.Type" icon="terp-folder-yellow" context="{'group_by':'type'}"/>
<separator orientation="vertical" groups="base.group_multi_company"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<newline/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
<separator orientation="vertical"/>
<filter string="Date" icon="terp-go-today" context="{'group_by':'date'}"/>
<filter string="Period" icon="terp-go-month" name="group_period" context="{'group_by':'period_id'}"/>
<filter string="Fiscal Year" icon="terp-go-year" context="{'group_by':'fiscalyear_id'}"/>
</group>
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended">
@@ -7,5 +7,11 @@
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="voucher_line_comp_rule" model="ir.rule">
<field name="name">Voucher Line multi-company</field>
<field model="ir.model" name="model_id" ref="model_account_voucher_line"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
</data>
</openerp>
+7 -17
View File
@@ -86,18 +86,12 @@ class account_voucher(osv.osv):
def _get_currency(self, cr, uid, context):
journal_pool = self.pool.get('account.journal')
journal_id = context.get('journal_id', False)
if not journal_id:
ttype = context.get('type', 'bank')
res = journal_pool.search(cr, uid, [('type', '=', ttype)], limit=1)
if not res:
return False
journal_id = res[0]
journal = journal_pool.browse(cr, uid, journal_id)
currency_id = journal.company_id.currency_id.id
if journal.currency:
currency_id = journal.currency.id
return
if journal_id:
journal = journal_pool.browse(cr, uid, journal_id)
currency_id = journal.company_id.currency_id.id
if journal.currency:
currency_id = journal.currency.id
return False
def _get_partner(self, cr, uid, context={}):
return context.get('partner_id', False)
@@ -553,9 +547,6 @@ class account_voucher(osv.osv):
if inv.move_id:
continue
if not inv.line_ids:
raise osv.except_osv(_('Error !'), _('You can not validate a voucher without lines !'))
if inv.journal_id.sequence_id:
name = self.pool.get('ir.sequence').get_id(cr, uid, inv.journal_id.sequence_id.id)
else:
@@ -743,8 +734,7 @@ class account_voucher_line(osv.osv):
'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1),
'amount_original': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Originial Amount', store=True),
'amount_unreconciled': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Open Balance', store=True),
# 'amount_unreconciled': fields.related('move_line_id','amount_unreconciled', type='float', relation='account.move.line', string='Open Balance', store=True, readonly="1"),
'company_id': fields.related('voucher_id','company_id', relation='res.company', string='Company', store=True),
}
_defaults = {
'name': lambda *a: ''
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<data noupdate="1">
<record model="crm.case.section" id="section_sales_department">
<field name="name">Sales Department</field>
<field name="code">Sales</field>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<openerp>
<data>
<data noupdate="1">
<!-- CASE STATUS(stage_id) -->
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<openerp>
<data>
<data noupdate="1">
<record model="crm.case.categ" id="categ_oppor1">
<field name="name">Existing Customer</field>
<field name="section_id" ref="section_sales_department"/>
-2
View File
@@ -1,8 +1,6 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
->
<!--
Phonecall Categories
-->
+2 -2
View File
@@ -47,8 +47,8 @@
holiday_status_id: hr_holidays_status_sick0
name: Sick Leaves for Phil Graves
number_of_days_temp: 12.0
date_from: '05/20/2010 13:59:00'
date_to: '05/22/2010 13:59:00'
date_from: '2010-05-20 13:59:00'
date_to: '2010-05-22 13:59:00'
type: add
-
I confirmed the allocation by clicking on "Confirm" button.
@@ -63,7 +63,7 @@
-
!record {model: hr.recruitment.job2phonecall, id: hr_recruitment_forinterview0}:
user_id: base.user_root
deadline: '05/28/2010 11:51:00'
deadline: '2010-05-28 11:51:00'
note: 'For interview.'
category_id: 'crm_case_categ_employee0'
@@ -93,7 +93,7 @@
!record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
timesheet_ids:
- account_id: account.analytic_sednacom
date: '05/26/2010'
date: '2010-05-26'
name: 'Develop yaml for hr module'
unit_amount: 3.00
amount: -90.00
@@ -124,7 +124,7 @@
!record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
timesheet_ids:
- account_id: account.analytic_sednacom
date: '05/26/2010'
date: '2010-05-26'
name: 'Develop yaml for hr module'
unit_amount: 2.0
amount: -90.00
+1 -1
View File
@@ -11,7 +11,7 @@
-
!record {model: idea.idea, id: idea_idea_0}:
category_id: idea_category_technical0
created_date: '05/13/2010 19:16:26'
created_date: '2010-05-13 19:16:26'
description: I want that Technical presentation are arranged for 1 hours in every
day.\nso, on that presentation, we can know all things what improvement and development
are done in our company.\n\n\n\n\n
@@ -223,7 +223,8 @@ class marketing_campaign_segment(osv.osv):
'name': fields.char('Name', size=64,required=True),
'campaign_id': fields.many2one('marketing.campaign', 'Campaign', required=True, select=1, ondelete="cascade"),
'object_id': fields.related('campaign_id','object_id', type='many2one', relation='ir.model', string='Resource'),
'ir_filter_id': fields.many2one('ir.filters', 'Filter', help="Filter to select the matching resource records that belong to this segment. New filters can be created and saved using the advanced search on the list view of the Resource. If no filter is set, all records are selected without filtering. The synchronization mode may also add a criterion to the filter."),
'ir_filter_id': fields.many2one('ir.filters', 'Filter', ondelete="restrict",
help="Filter to select the matching resource records that belong to this segment. New filters can be created and saved using the advanced search on the list view of the Resource. If no filter is set, all records are selected without filtering. The synchronization mode may also add a criterion to the filter."),
'sync_last_date': fields.datetime('Last Synchronization', help="Date on which this segment was synchronized last time (automatically or manually)"),
'sync_mode': fields.selection([('create_date', 'Only records created after last sync'),
('write_date', 'Only records modified after last sync (no duplicates)'),
@@ -8,35 +8,35 @@
-
!record {model: stock.period, id: stock_period_01}:
date_start: '2010-07-01 00:00:00'
date_stop: '2010/07/06 23:59:00'
date_stop: '2010-07-06 23:59:00'
name: 2010, week 27
-
I create stock period for the second week of July.
-
!record {model: stock.period, id: stock_period_02}:
date_start: '2010/07/07 00:00:00'
date_stop: '2010/07/12 23:59:00'
date_start: '2010-07-07 00:00:00'
date_stop: '2010-07-12 23:59:00'
name: 2010, week 28
-
I create stock period for the third week of July.
-
!record {model: stock.period, id: stock_period_03}:
date_start: '2010/07/15 00:00:00'
date_stop: '2010/07/20 23:59:00'
date_start: '2010-07-15 00:00:00'
date_stop: '2010-07-20 23:59:00'
name: 2010, week 29
-
I create stock period for the fourth week of July.
-
!record {model: stock.period, id: stock_period_04}:
date_start: '2010/07/22 00:00:00'
date_stop: '2010/07/27 23:59:00'
date_start: '2010-07-22 00:00:00'
date_stop: '2010-07-27 23:59:00'
name: 2010, week 30
-
I create stock period for the fifth week of July.
-
!record {model: stock.period, id: stock_period_05}:
date_start: '2010/07/29 00:00:00'
date_stop: '2010/07/31 23:59:00'
date_start: '2010-07-29 00:00:00'
date_stop: '2010-07-31 23:59:00'
name: 2010, week 31
-
Now I create the forecast for this period for all PCs.