bzr revid: rvo@tinyerp.co.in-20100813065808-1luhk2tw4dd437th
This commit is contained in:
Rvo (Open ERP) 2010-08-13 12:28:08 +05:30
commit 535e21cc06
282 changed files with 11953 additions and 1402 deletions

View File

@ -1027,6 +1027,33 @@ class account_move(osv.osv):
_description = "Account Entry"
_order = 'id desc'
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
"""
Returns a list of tupples containing id, name, as internally it is called {def name_get}
result format : {[(id, name), (id, name), ...]}
@param cr: A database cursor
@param user: ID of the user currently logged in
@param name: name to search
@param args: other arguments
@param operator: default operator is 'ilike', it can be changed
@param context: context arguments, like lang, time zone
@param limit: Returns first 'n' ids of complete result, default is 80.
@return: Returns a list of tupples containing id and name
"""
if not args:
args=[]
if not context:
context={}
ids = []
if name:
ids += self.search(cr, user, [('state','=','draft'), ('id','=',name)], limit=limit)
return self.name_get(cr, user, ids, context=context)
def name_get(self, cursor, user, ids, context=None):
if not len(ids):
return []
@ -2205,7 +2232,6 @@ class account_add_tmpl_wizard(osv.osv_memory):
def _get_def_cparent(self, cr, uid, context):
acc_obj=self.pool.get('account.account')
tmpl_obj=self.pool.get('account.account.template')
#print "Searching for ",context
tids=tmpl_obj.read(cr, uid, [context['tmpl_ids']], ['parent_id'])
if not tids or not tids[0]['parent_id']:
return False
@ -2247,7 +2273,6 @@ class account_add_tmpl_wizard(osv.osv_memory):
# 'tax_ids': [(6,0,tax_ids)], todo!!
'company_id': company_id,
}
# print "Creating:", vals
new_account = acc_obj.create(cr, uid, vals)
return {'type':'state', 'state': 'end' }

View File

@ -1,14 +1,14 @@
<openerp>
<data>
<record id="view_account_installer" model="ir.ui.view">
<field name="name">account.installer.view</field>
<record id="view_account_configuration_installer" model="ir.ui.view">
<field name="name">account.installer.form</field>
<field name="model">account.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Accounting Modules Installation</attribute>
<attribute name="string">Accounting System Configuration</attribute>
</form>
<separator string="title" position="attributes">
@ -54,37 +54,79 @@
<field name="sale_tax" colspan="2" on_change="on_change_tax(sale_tax)"/>
<field name="purchase_tax" colspan="2" />
</group>
<group colspan="4" groups="base.group_extended">
<separator col="4" colspan="4" string="Install Extra Account Module"/>
<field name="account_analytic_plans"/>
<field name="account_payment"/>
<field name="account_followup"/>
<field name="account_asset"/>
<field name="account_voucher"/>
<field name="account_voucher_payment"/>
</group>
</group>
</group>
</data>
</field>
</record>
<record id="action_account_installer" model="ir.actions.act_window">
<field name="name">Accounting Modules Installation</field>
<record id="view_account_modules_installer" model="ir.ui.view">
<field name="name">account.installer.modules.form</field>
<field name="model">account.installer.modules</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Extra Accounting Modules Installation</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string"
>Install Extra Accounting Modules In Your Accounting System</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">From this screen, you can install extra accounting modules in your accounting system. Select the modules to directly install them. If you do not think you need any of these right now, you can easily install them later.</attribute>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='rowspan'>23</attribute>
<attribute name='string'></attribute>
</xpath>
<group colspan="8">
<group colspan="4" height="450" width="600">
<group colspan="4">
<field name="account_analytic_plans"/>
<field name="account_payment"/>
<field name="account_followup"/>
</group>
</group>
</group>
</data>
</field>
</record>
<record id="action_account_configuration_installer" model="ir.actions.act_window">
<field name="name">Accounting Chart Configuration</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.installer</field>
<field name="view_id" ref="view_account_installer"/>
<field name="view_id" ref="view_account_configuration_installer"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="account_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_installer"/>
<record id="action_account_installer" model="ir.actions.act_window">
<field name="name">Accounting Modules Installation</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.installer.modules</field>
<field name="view_id" ref="view_account_modules_installer"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="account_configuration_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_configuration_installer"/>
<field name="sequence">3</field>
<field name="restart">onskip</field>
</record>
<record id="account_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_installer"/>
<field name="sequence">5</field>
<field name="restart">always</field>
</record>
<record id="account_ir_actions_todo_tree" model="ir.ui.view">
<field name="model">ir.actions.todo</field>
<field name="name">account_installer_action_replace</field>
@ -92,7 +134,7 @@
<field name="inherit_id" ref="base.ir_actions_todo_tree"/>
<field name="arch" type="xml">
<xpath expr="//button[@string='Launch']" position="replace">
<button name="%(action_account_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
<button name="%(action_account_configuration_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
</xpath>
</field>
</record>

View File

@ -7,14 +7,14 @@
<menuitem id="menu_finance_payables" name="Payables" parent="menu_finance" sequence="2" groups="group_account_user,group_account_manager,base.group_system"/>
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="3"/>
<!-- <menuitem id="menu_accounting" name="Accounting" parent="menu_finance" sequence="5"/>-->
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user,group_account_manager,base.group_system"/>
<menuitem id="periodical_processing_journal_entries_validation" name="Entries to Review" parent="menu_finance_periodical_processing"/>
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8"/>
<menuitem id="periodical_processing_journal_entries_validation" name="Entries to Review" parent="menu_finance_periodical_processing" groups="group_account_user,group_account_manager,base.group_system"/>
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
<!-- <menuitem id="periodical_processing_end_of_period" name="End of Period" parent="menu_finance_periodical_processing"/>-->
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="5" groups="base.group_system"/>
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12" groups="base.group_system"/>
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12" groups="base.group_system,group_account_invoice,group_account_manager,group_account_user"/>
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
@ -31,17 +31,17 @@
<!-- <menuitem id="menu_analytic_accounting1" name="Analytic Accounting" parent="menu_finance_configuration" sequence="80"/>-->
<!-- <menuitem id="menu_finance_reporting11" name="Reporting" parent="account.menu_finance" sequence="80"/>-->
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100"/>
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100" groups="base.group_system,group_account_manager"/>
<!-- <menuitem id="menu_finance_legal_statement1" name="Legal Statements" parent="account.menu_finance_reporting" sequence="200"/>-->
<menuitem id="menu_finance_entries" name="Accounting" parent="menu_finance" sequence="4"
groups="group_account_user,group_account_manager,base.group_system"/>
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15"/>
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15" groups="group_account_user,group_account_manager,base.group_system"/>
<!-- <menuitem id="menu_finance_periodical_processing11" name="Periodical Processing" parent="account.menu_finance"-->
<!-- sequence="3"-->
<!-- groups="group_account_user"/>-->
<menuitem id="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing"/>
<menuitem id="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing" groups="group_account_user,group_account_manager,base.group_system"/>
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300" groups="account.group_account_manager"/>

View File

@ -407,7 +407,7 @@ class account_move_line(osv.osv):
'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),
'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),
'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade", domain=[('type','<>','view'), ('type', '<>', 'closed')], select=2),
'move_id': fields.many2one('account.move', 'Move', ondelete="cascade", states={'valid':[('readonly',True)]}, help="The move of this entry line.", select=2),
'move_id': fields.many2one('account.move', 'Move', ondelete="cascade", help="The move of this entry line.", select=2),
'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Narration'),
'ref': fields.char('Ref.', size=64),
'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1),
@ -560,7 +560,7 @@ class account_move_line(osv.osv):
#if jt in ('sale', 'purchase_refund', 'bank', 'cash'):
if jt in ('sale', 'purchase_refund'):
val['account_id'] = self.pool.get('account.fiscal.position').map_account(cr, uid, part and part.property_account_position or False, id2)
elif jt in ('purchase', 'sale_refund', 'expense'):
elif jt in ('purchase', 'sale_refund', 'expense', 'bank', 'cash'):
val['account_id'] = self.pool.get('account.fiscal.position').map_account(cr, uid, part and part.property_account_position or False, id1)
if val.get('account_id', False):
@ -798,30 +798,30 @@ class account_move_line(osv.osv):
return j+(p and (':'+p) or '')
return False
# def onchange_date(self, cr, user, ids, date, context={}):
# """
# Returns a dict that contains new values and context
# @param cr: A database cursor
# @param user: ID of the user currently logged in
# @param date: latest value from user input for field date
# @param args: other arguments
# @param context: context arguments, like lang, time zone
# @return: Returns a dict which contains new values, and context
# """
# res = {}
# period_pool = self.pool.get('account.period')
# pids = period_pool.search(cr, user, [('date_start','<=',date), ('date_stop','>=',date)])
# if pids:
# res.update({
# 'period_id':pids[0]
# })
# context.update({
# 'period_id':pids[0]
# })
# return {
# 'value':res,
# 'context':context,
# }
def onchange_date(self, cr, user, ids, date, context={}):
"""
Returns a dict that contains new values and context
@param cr: A database cursor
@param user: ID of the user currently logged in
@param date: latest value from user input for field date
@param args: other arguments
@param context: context arguments, like lang, time zone
@return: Returns a dict which contains new values, and context
"""
res = {}
period_pool = self.pool.get('account.period')
pids = period_pool.search(cr, user, [('date_start','<=',date), ('date_stop','>=',date)])
if pids:
res.update({
'period_id':pids[0]
})
context.update({
'period_id':pids[0]
})
return {
'value':res,
'context':context,
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):
result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
@ -882,20 +882,29 @@ class account_move_line(osv.osv):
attrs = []
if field == 'debit':
attrs.append('sum="Total debit"')
elif field == 'credit':
attrs.append('sum="Total credit"')
elif field == 'account_tax_id':
attrs.append('domain="[(\'parent_id\',\'=\',False)]"')
attrs.append("context=\"{'journal_id':journal_id}\"")
elif field == 'account_id' and journal.id:
attrs.append('domain="[(\'journal_id\', \'=\', '+str(journal.id)+'),(\'type\',\'&lt;&gt;\',\'view\'), (\'type\',\'&lt;&gt;\',\'closed\')]" on_change="onchange_account_id(account_id, partner_id)"')
elif field == 'partner_id':
attrs.append('on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"')
elif field == 'journal_id':
attrs.append("context=\"{'journal_id':journal_id}\"")
elif field == 'statement_id':
attrs.append("domain=\"[('state','!=','confirm'),('journal_id.type','=','bank')]\"")
elif field == 'date':
attrs.append('on_change="onchange_date(date)"')
if field in ('amount_currency', 'currency_id'):
attrs.append('on_change="onchange_currency(account_id, amount_currency,currency_id, date, journal_id)"')

View File

@ -1048,7 +1048,7 @@
<field name="credit" operator="+"/>
</graph>
</field>
</record>
</record>
<record id="view_account_move_line_filter" model="ir.ui.view">
<field name="name">Entry Lines</field>
@ -1058,9 +1058,10 @@
<search string="Search Entry Lines">
<group col='10' colspan='4'>
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Entry Lines"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','valid')]" help="Posted Entry Lines"/>
<separator orientation="vertical"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','valid')]" help="Posted Entry Lines"/>
<filter icon="terp-stock_symbol-selection" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Entry Lines"/>
<separator orientation="vertical"/>
<filter icon="terp-stock_symbol-selection" string="Unreconciled" domain="[('reconcile_id','=',False), ('account_id.type','in',['receivable', 'payable'])]" help="Unreconciled Entry Lines"/>
<separator orientation="vertical"/>
<field name="ref" select="1" string="Reference"/>
@ -1073,8 +1074,8 @@
</group>
<newline/>
<group col="10" colspan="4">
<field name="journal_id" required="1" widget="selection" context="{'journal_id':self, 'visible_id':self or 0, 'normal_view':False}"/>
<field name="period_id" required="1" widget="selection" context="{'period_id':self}"/>
<field name="journal_id" widget="selection" context="{'journal_id':self, 'visible_id':self or 0, 'normal_view':False}"/>
<field name="period_id" context="{'period_id':self, 'search_default_period_id':self}"/>
<separator orientation="vertical"/>
<field name="narration" select="1"/>
<field name="date" select='1'/>
@ -1377,29 +1378,29 @@
<menuitem action="action_move_line_form_encode_by_move" id="menu_encode_entries_by_move" parent="menu_finance_entries"/>-->
<record id="action_account_moves_sale" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
<field name="domain">[('journal_id.type', 'in', ['sale', 'purchase_refund'])]</field>
</record>
<!-- <record id="action_account_moves_sale" model="ir.actions.act_window">-->
<!-- <field name="name">Journal Items</field>-->
<!-- <field name="res_model">account.move.line</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form,graph</field>-->
<!-- <field name="view_id" ref="view_move_line_tree"/>-->
<!-- <field name="search_view_id" ref="view_account_move_line_filter"/>-->
<!-- <field name="domain">[('journal_id.type', 'in', ['sale', 'purchase_refund'])]</field>-->
<!-- </record>-->
<menuitem action="action_account_moves_sale" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables"/>
<!-- <menuitem action="action_account_moves_sale" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables"/>-->
<record id="action_account_moves_purchase" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
<field name="domain">[('journal_id.type', 'in', ['purchase', 'sale_refund'])]</field>
</record>
<!-- <record id="action_account_moves_purchase" model="ir.actions.act_window">-->
<!-- <field name="name">Journal Items</field>-->
<!-- <field name="res_model">account.move.line</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form,graph</field>-->
<!-- <field name="view_id" ref="view_move_line_tree"/>-->
<!-- <field name="search_view_id" ref="view_account_move_line_filter"/>-->
<!-- <field name="domain">[('journal_id.type', 'in', ['purchase', 'sale_refund'])]</field>-->
<!-- </record>-->
<menuitem action="action_account_moves_purchase" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables"/>
<!-- <menuitem action="action_account_moves_purchase" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables"/>-->
<record id="action_move_line_search" model="ir.actions.act_window">
<field name="name">Entry Lines</field>
@ -2416,22 +2417,22 @@
id="menu_action_account_fiscal_position_form_template"
parent="account_template_folder" sequence="20"/>
<record id="action_account_moves_all" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
</record>
<!-- <record id="action_account_moves_all" model="ir.actions.act_window">-->
<!-- <field name="name">Journal Items</field>-->
<!-- <field name="res_model">account.move.line</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form,graph</field>-->
<!-- <field name="view_id" ref="view_move_line_tree"/>-->
<!-- <field name="search_view_id" ref="view_account_move_line_filter"/>-->
<!-- </record>-->
<menuitem
action="action_account_moves_all"
icon="STOCK_JUSTIFY_FILL"
id="menu_eaction_account_moves_all"
parent="account.menu_finance_entries"
sequence="4"
/>
<!-- <menuitem-->
<!-- action="action_account_moves_all"-->
<!-- icon="STOCK_JUSTIFY_FILL"-->
<!-- id="menu_eaction_account_moves_all"-->
<!-- parent="account.menu_finance_entries"-->
<!-- sequence="4"-->
<!-- />-->
<!-- Cash Statement -->
<record id="view_cash_statement_tree" model="ir.ui.view">

View File

@ -18,11 +18,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import datetime
from dateutil.relativedelta import relativedelta
from os.path import join as opj
from operator import itemgetter
from tools.translate import _
from osv import fields, osv
import netsvc
@ -55,25 +57,6 @@ class account_installer(osv.osv_memory):
help="Installs localized accounting charts to match as closely as "
"possible the accounting needs of your company based on your "
"country."),
'account_analytic_plans':fields.boolean('Multiple Analytic Plans',
help="Allows invoice lines to impact multiple analytic accounts "
"simultaneously."),
'account_payment':fields.boolean('Suppliers Payment Management',
help="Streamlines invoice payment and creates hooks to plug "
"automated payment systems in."),
'account_followup':fields.boolean('Followups Management',
help="Helps you generate reminder letters for unpaid invoices, "
"including multiple levels of reminding and customized "
"per-partner policies."),
'account_asset':fields.boolean('Assets Management',
help="Enables asset management in the accounting application, "
"including asset categories and usage periods."),
'account_voucher':fields.boolean('Voucher Management',
help="Account Voucher module includes all the basic requirements of "
"Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc... "),
'account_voucher_payment':fields.boolean('Voucher and Reconcile Management',
help="Extension Account Voucher module includes allows to link payment / receipt "
"entries with voucher, also automatically reconcile during the payment and receipt entries."),
'date_start': fields.date('Start Date', required=True),
'date_stop': fields.date('End Date', required=True),
'period':fields.selection([('month','Monthly'), ('3months','3 Monthly')],
@ -103,11 +86,6 @@ class account_installer(osv.osv_memory):
return {}
def generate_configurable_chart(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'account', 'configurable_chart_template')
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
obj_multi = self.pool.get('account.chart.template').browse(cr, uid, id)
obj_acc = self.pool.get('account.account')
obj_acc_tax = self.pool.get('account.tax')
obj_journal = self.pool.get('account.journal')
@ -116,6 +94,14 @@ class account_installer(osv.osv_memory):
obj_fiscal_position_template = self.pool.get('account.fiscal.position.template')
obj_fiscal_position = self.pool.get('account.fiscal.position')
data_pool = self.pool.get('ir.model.data')
mod_obj = self.pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'account', 'configurable_chart_template')
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
obj_multi = self.pool.get('account.chart.template').browse(cr, uid, id)
if context is None:
context = {}
company_id = self.pool.get('res.users').browse(cr, uid, [uid], context)[0].company_id
seq_journal = True
@ -302,7 +288,7 @@ class account_installer(osv.osv_memory):
data_id = mod_obj.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_sp_journal_view')])
data = mod_obj.browse(cr, uid, data_id[0])
view_id = data.res_id
seq_id = obj_sequence.search(cr,uid,[('name','=','Account Journal')])[0]
if seq_journal:
@ -405,10 +391,12 @@ class account_installer(osv.osv_memory):
obj_ac_fp.create(cr, uid, vals_acc)
def execute(self, cr, uid, ids, context=None):
if context is None:
context = {}
super(account_installer, self).execute(cr, uid, ids, context=context)
record = self.browse(cr, uid, ids, context=context)[0]
company_id = self.pool.get('res.users').browse(cr,uid,[uid],context)[0].company_id
for res in self.read(cr,uid,ids):
company_id = self.pool.get('res.users').browse(cr, uid, [uid], context)[0].company_id
for res in self.read(cr, uid, ids):
if record.charts == 'configurable':
mod_obj = self.pool.get('ir.model.data')
fp = tools.file_open(opj('account','configurable_account_chart.xml'))
@ -501,20 +489,46 @@ class account_installer(osv.osv_memory):
'Installing chart of accounts %s'%chart)
return modules | set([chart])
account_installer()
class account_bank_accounts_wizard(osv.osv_memory):
_name='account.bank.accounts.wizard'
_columns = {
'acc_name':fields.char('Account Name.', size=64, required=True),
'bank_account_id':fields.many2one('wizard.multi.charts.accounts', 'Bank Account', required=True),
'currency_id':fields.many2one('res.currency', 'Currency'),
'account_type':fields.selection([('cash','Cash'),('check','Check'),('bank','Bank')], 'Type', size=32),
'acc_name': fields.char('Account Name.', size=64, required=True),
'bank_account_id': fields.many2one('wizard.multi.charts.accounts', 'Bank Account', required=True),
'currency_id': fields.many2one('res.currency', 'Currency'),
'account_type': fields.selection([('cash','Cash'),('check','Check'),('bank','Bank')], 'Type', size=32),
}
_defaults = {
'currency_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.currency_id.id,
}
account_bank_accounts_wizard()
class account_installer_modules(osv.osv_memory):
_name = 'account.installer.modules'
_inherit = 'res.config.installer'
_columns = {
# Accounting
'account_analytic_plans':fields.boolean('Multiple Analytic Plans',
help="Allows invoice lines to impact multiple analytic accounts "
"simultaneously."),
'account_payment':fields.boolean('Suppliers Payment Management',
help="Streamlines invoice payment and creates hooks to plug "
"automated payment systems in."),
'account_followup':fields.boolean('Followups Management',
help="Helps you generate reminder letters for unpaid invoices, "
"including multiple levels of reminding and customized "
"per-partner policies."),
'account_voucher':fields.boolean('Voucher Management',
help="Account Voucher module includes all the basic requirements of "
"Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc... "),
'account_voucher_payment':fields.boolean('Voucher and Reconcile Management',
help="Extension Account Voucher module includes allows to link payment / receipt "
"entries with voucher, also automatically reconcile during the payment and receipt entries."),
}
account_installer_modules()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -393,21 +393,23 @@ class account_invoice(osv.osv):
p = self.pool.get('res.partner').browse(cr, uid, partner_id)
if company_id:
if p.property_account_receivable.company_id.id != company_id and p.property_account_payable.company_id.id != company_id:
rec_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(partner_id)+''),('company_id','=',company_id)])
pay_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_payable'),('res_id','=','res.partner,'+str(partner_id)+''),('company_id','=',company_id)])
property_obj = self.pool.get('ir.property')
rec_pro_id = property_obj.search(cr,uid,[('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(partner_id)+''),('company_id','=',company_id)])
pay_pro_id = property_obj.search(cr,uid,[('name','=','property_account_payable'),('res_id','=','res.partner,'+str(partner_id)+''),('company_id','=',company_id)])
if not rec_pro_id:
rec_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_receivable'),('company_id','=',company_id)])
rec_pro_id = property_obj.search(cr,uid,[('name','=','property_account_receivable'),('company_id','=',company_id)])
if not pay_pro_id:
pay_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_payable'),('company_id','=',company_id)])
rec_line_data = self.pool.get('ir.property').read(cr,uid,rec_pro_id,['name','value','res_id'])
pay_line_data = self.pool.get('ir.property').read(cr,uid,pay_pro_id,['name','value','res_id'])
pay_pro_id = property_obj.search(cr,uid,[('name','=','property_account_payable'),('company_id','=',company_id)])
rec_line_data = property_obj.read(cr,uid,rec_pro_id,['name','value','res_id'])
pay_line_data = property_obj.read(cr,uid,pay_pro_id,['name','value','res_id'])
rec_res_id = rec_line_data and int(rec_line_data[0]['value'].split(',')[1]) or False
pay_res_id = pay_line_data and int(pay_line_data[0]['value'].split(',')[1]) or False
if not rec_res_id and not pay_res_id:
raise osv.except_osv(_('Configration Error !'),
_('Can not find account chart for this company, Please Create account.'))
rec_obj_acc=self.pool.get('account.account').browse(cr, uid, [rec_res_id])
pay_obj_acc=self.pool.get('account.account').browse(cr, uid, [pay_res_id])
account_obj = self.pool.get('account.account')
rec_obj_acc = account_obj.browse(cr, uid, [rec_res_id])
pay_obj_acc = account_obj.browse(cr, uid, [pay_res_id])
p.property_account_receivable = rec_obj_acc[0]
p.property_account_payable = pay_obj_acc[0]
@ -487,17 +489,18 @@ class account_invoice(osv.osv):
partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id)
if partner_obj.property_account_payable and partner_obj.property_account_receivable:
if partner_obj.property_account_payable.company_id.id != company_id and partner_obj.property_account_receivable.company_id.id != company_id:
rec_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
pay_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_payable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
property_obj = self.pool.get('ir.property')
rec_pro_id = property_obj.search(cr, uid, [('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
pay_pro_id = property_obj.search(cr, uid, [('name','=','property_account_payable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
if not rec_pro_id:
rec_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_receivable'),('company_id','=',company_id)])
rec_pro_id = property_obj.search(cr, uid, [('name','=','property_account_receivable'),('company_id','=',company_id)])
if not pay_pro_id:
pay_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_payable'),('company_id','=',company_id)])
rec_line_data = self.pool.get('ir.property').read(cr, uid, rec_pro_id, ['name','value','res_id'])
pay_line_data = self.pool.get('ir.property').read(cr, uid, pay_pro_id, ['name','value','res_id'])
pay_pro_id = property_obj.search(cr, uid, [('name','=','property_account_payable'),('company_id','=',company_id)])
rec_line_data = property_obj.read(cr, uid, rec_pro_id, ['name','value','res_id'])
pay_line_data = property_obj.read(cr, uid, pay_pro_id, ['name','value','res_id'])
rec_res_id = rec_line_data and int(rec_line_data[0]['value'].split(',')[1]) or False
pay_res_id = pay_line_data and int(pay_line_data[0]['value'].split(',')[1]) or False
if not rec_res_id and not rec_res_id:
if not rec_res_id and not pay_res_id:
raise osv.except_osv(_('Configration Error !'),
_('Can not find account chart for this company, Please Create account.'))
if type in ('out_invoice', 'out_refund'):
@ -505,13 +508,14 @@ class account_invoice(osv.osv):
else:
acc_id = pay_res_id
val= {'account_id': acc_id}
account_obj = self.pool.get('account.account')
if ids:
if company_id:
inv_obj = self.browse(cr,uid,ids)
for line in inv_obj[0].invoice_line:
if line.account_id:
if line.account_id.company_id.id != company_id:
result_id = self.pool.get('account.account').search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)])
result_id = account_obj.search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)])
if not result_id:
raise osv.except_osv(_('Configration Error !'),
_('Can not find account chart for this company in invoice line account, Please Create account.'))
@ -519,7 +523,7 @@ class account_invoice(osv.osv):
else:
if invoice_line:
for inv_line in invoice_line:
obj_l = self.pool.get('account.account').browse(cr, uid, inv_line[2]['account_id'])
obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id'])
if obj_l.company_id.id != company_id:
raise osv.except_osv(_('Configration Error !'),
_('invoice line account company is not match with invoice company.'))
@ -1281,20 +1285,23 @@ class account_invoice_line(osv.osv):
else:
return {'value': {'price_unit': 0.0, 'categ_id': False}, 'domain':{'product_uom':[]}}
part = self.pool.get('res.partner').browse(cr, uid, partner_id)
fpos = fposition_id and self.pool.get('account.fiscal.position').browse(cr, uid, fposition_id) or False
fpos_obj = self.pool.get('account.fiscal.position')
fpos = fposition_id and fpos_obj.browse(cr, uid, fposition_id) or False
if part.lang:
context.update({'lang': part.lang})
result = {}
res = self.pool.get('product.product').browse(cr, uid, product, context=context)
if company_id:
in_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_income'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
property_obj = self.pool.get('ir.property')
account_obj = self.pool.get('account.account')
in_pro_id = property_obj.search(cr, uid, [('name','=','property_account_income'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
if not in_pro_id:
in_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_income_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
exp_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_expense'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
in_pro_id = property_obj.search(cr, uid, [('name','=','property_account_income_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
exp_pro_id = property_obj.search(cr, uid, [('name','=','property_account_expense'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
if not exp_pro_id:
exp_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_expense_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
exp_pro_id = property_obj.search(cr, uid, [('name','=','property_account_expense_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
if not in_pro_id:
in_acc = res.product_tmpl_id.property_account_income
@ -1304,7 +1311,7 @@ class account_invoice_line(osv.osv):
else:
app_acc_in = in_acc_cate
else:
app_acc_in = self.pool.get('account.account').browse(cr, uid, in_pro_id)[0]
app_acc_in = account_obj.browse(cr, uid, in_pro_id)[0]
if not exp_pro_id:
ex_acc = res.product_tmpl_id.property_account_expense
ex_acc_cate = res.categ_id.property_account_expense_categ
@ -1313,7 +1320,7 @@ class account_invoice_line(osv.osv):
else:
app_acc_exp = ex_acc_cate
else:
app_acc_exp = self.pool.get('account.account').browse(cr, uid, exp_pro_id)[0]
app_acc_exp = account_obj.browse(cr, uid, exp_pro_id)[0]
if not in_pro_id and not exp_pro_id:
in_acc = res.product_tmpl_id.property_account_income
in_acc_cate = res.categ_id.property_account_income_categ
@ -1329,13 +1336,13 @@ class account_invoice_line(osv.osv):
# app_acc_in = self.pool.get('account.account').browse(cr,uid,in_pro_id)[0]
# app_acc_exp = self.pool.get('account.account').browse(cr,uid,exp_pro_id)[0]
if app_acc_in.company_id.id != company_id and app_acc_exp.company_id.id != company_id:
in_res_id=self.pool.get('account.account').search(cr, uid, [('name','=',app_acc_in.name),('company_id','=',company_id)])
exp_res_id=self.pool.get('account.account').search(cr, uid, [('name','=',app_acc_exp.name),('company_id','=',company_id)])
in_res_id = account_obj.search(cr, uid, [('name','=',app_acc_in.name),('company_id','=',company_id)])
exp_res_id = account_obj.search(cr, uid, [('name','=',app_acc_exp.name),('company_id','=',company_id)])
if not in_res_id and not exp_res_id:
raise osv.except_osv(_('Configration Error !'),
_('Can not find account chart for this company, Please Create account.'))
in_obj_acc=self.pool.get('account.account').browse(cr, uid, in_res_id)
exp_obj_acc=self.pool.get('account.account').browse(cr, uid, exp_res_id)
in_obj_acc = account_obj.browse(cr, uid, in_res_id)
exp_obj_acc = account_obj.browse(cr, uid, exp_res_id)
if in_acc or ex_acc:
res.product_tmpl_id.property_account_income = in_obj_acc[0]
res.product_tmpl_id.property_account_expense = exp_obj_acc[0]
@ -1344,26 +1351,26 @@ class account_invoice_line(osv.osv):
res.categ_id.property_account_expense_categ = exp_obj_acc[0]
if type in ('out_invoice','out_refund'):
a = res.product_tmpl_id.property_account_income.id
a = res.product_tmpl_id.property_account_income.id
if not a:
a = res.categ_id.property_account_income_categ.id
else:
a = res.product_tmpl_id.property_account_expense.id
a = res.product_tmpl_id.property_account_expense.id
if not a:
a = res.categ_id.property_account_expense_categ.id
a = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, a)
a = fpos_obj.map_account(cr, uid, fpos, a)
if a:
result['account_id'] = a
taxep=None
taxep = None
tax_obj = self.pool.get('account.tax')
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).tax_ids or False)
tax_id = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
else:
taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a).tax_ids or False)
tax_id = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
if type in ('in_invoice', 'in_refund'):
to_update = self.product_id_change_unit_price_inv(cr, uid, tax_id, price_unit or res.standard_price, qty, address_invoice_id, product, partner_id, context=context)
result.update(to_update)
@ -1380,11 +1387,10 @@ class account_invoice_line(osv.osv):
if res2 :
domain = {'uos_id':[('category_id','=',res2 )]}
prod_pool=self.pool.get('product.product')
result['categ_id'] = res.categ_id.id
res_final = {'value':result, 'domain':domain}
if not company_id and not currency_id:
if not company_id or not currency_id:
return res_final
company = self.pool.get('res.company').browse(cr, uid, company_id)

View File

@ -38,7 +38,6 @@
"access_account_invoice_uinvoice","account.invoice","model_account_invoice","account.group_account_invoice",1,1,1,1
"access_account_invoice_line_uinvoice","account.invoice.line","model_account_invoice_line","account.group_account_invoice",1,1,1,1
"access_account_invoice_tax_uinvoice","account.invoice.tax","model_account_invoice_tax","account.group_account_invoice",1,1,1,1
"access_account_analytic_line_uinvoice","account.analytic.line","model_account_analytic_line","account.group_account_manager",1,0,0,0
"access_account_move_uinvoice","account.move","model_account_move","account.group_account_invoice",1,0,0,0
"access_account_move_line_uinvoice","account.move.line invoice","model_account_move_line","account.group_account_invoice",1,1,1,1
"access_account_move_reconcile_uinvoice","account.move.reconcile","model_account_move_reconcile","account.group_account_invoice",1,1,1,1
@ -155,3 +154,7 @@
"access_res_partner_address_invoice","res.partner.address invoice","base.model_res_partner_address","account.group_account_invoice",1,1,1,1
"access_account_invoice_line_system","account.invoice.line system","model_account_invoice_line","base.group_system",1,0,0,0
"access_account_analytic_accountant","account.analytic.account accountant","analytic.model_account_analytic_account","account.group_account_user",1,1,1,1
"access_account_account_type_invoice","account.account.type invoice","model_account_account_type","account.group_account_invoice",1,1,1,1
"access_report_account_receivable_invoice","report.account.receivable.invoice","model_report_account_receivable","account.group_account_invoice",1,1,1,1
"access_report_account_receivable_user","report.account.receivable.user","model_report_account_receivable","account.group_account_user",1,1,1,1
"access_account_sequence_fiscal_year_invoice","account.sequence.fiscalyear invoice","model_account_sequence_fiscalyear","account.group_account_invoice",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
38 access_account_invoice_uinvoice account.invoice model_account_invoice account.group_account_invoice 1 1 1 1
39 access_account_invoice_line_uinvoice account.invoice.line model_account_invoice_line account.group_account_invoice 1 1 1 1
40 access_account_invoice_tax_uinvoice account.invoice.tax model_account_invoice_tax account.group_account_invoice 1 1 1 1
access_account_analytic_line_uinvoice account.analytic.line model_account_analytic_line account.group_account_manager 1 0 0 0
41 access_account_move_uinvoice account.move model_account_move account.group_account_invoice 1 0 0 0
42 access_account_move_line_uinvoice account.move.line invoice model_account_move_line account.group_account_invoice 1 1 1 1
43 access_account_move_reconcile_uinvoice account.move.reconcile model_account_move_reconcile account.group_account_invoice 1 1 1 1
154 access_res_partner_address_invoice res.partner.address invoice base.model_res_partner_address account.group_account_invoice 1 1 1 1
155 access_account_invoice_line_system account.invoice.line system model_account_invoice_line base.group_system 1 0 0 0
156 access_account_analytic_accountant account.analytic.account accountant analytic.model_account_analytic_account account.group_account_user 1 1 1 1
157 access_account_account_type_invoice account.account.type invoice model_account_account_type account.group_account_invoice 1 1 1 1
158 access_report_account_receivable_invoice report.account.receivable.invoice model_report_account_receivable account.group_account_invoice 1 1 1 1
159 access_report_account_receivable_user report.account.receivable.user model_report_account_receivable account.group_account_user 1 1 1 1
160 access_account_sequence_fiscal_year_invoice account.sequence.fiscalyear invoice model_account_sequence_fiscalyear account.group_account_invoice 1 1 1 1

View File

@ -48,7 +48,6 @@
-
!record {model: account.move.journal, id: account_move_journal_0}:
journal_id: account.sales_journal
period_id: account_period_jan11
-
I clicked on Open Journal Button to check the entries

View File

@ -8,11 +8,11 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Journal Select">
<label string="Are you sure you want to open Journal Entries?" colspan="4"/>
<separator string="" colspan="4" />
<label string="Are you sure you want to open Journal Entries?" colspan="4"/>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="action_open_window" type="object"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="action_open_window" type="object"/>
</group>
</form>
</field>

View File

@ -26,23 +26,82 @@ import tools
class account_move_journal(osv.osv_memory):
_name = "account.move.journal"
_description = "Move journal"
_columns = {
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
'period_id': fields.many2one('account.period', 'Period', required=True),
}
def _get_period(self, cr, uid, context={}):
"""Return default account period value"""
"""
Return default account period value
"""
ids = self.pool.get('account.period').find(cr, uid, context=context)
period_id = False
if len(ids):
period_id = ids[0]
return period_id
_defaults = {
'period_id': _get_period
}
def _get_journal(self, cr, uid, context={}):
"""
Return journal based on the journal type
"""
journal_id = False
journal_pool = self.pool.get('account.journal')
if context.get('journal_type', False):
jids = journal_pool.search(cr, uid, [('type','=', context.get('journal_type'))])
journal_id = jids[0]
return journal_id
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
"""
Returns views and fields for current model where view will depend on {view_type}.
@param cr: A database cursor
@param user: ID of the user currently logged in
@param view_id: list of fields, which required to read signatures
@param view_type: defines a view type. it can be one of (form, tree, graph, calender, gantt, search, mdx)
@param context: context arguments, like lang, time zone
@param toolbar: contains a list of reports, wizards, and links related to current model
@return: Returns a dict that contains definition for fields, views, and toolbars
"""
res = super(account_move_journal, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu)
if not view_id:
return res
period_pool = self.pool.get('account.period')
journal_pool = self.pool.get('account.journal')
journal_id = self._get_journal(cr, uid, context)
period_id = self._get_period(cr, uid, context)
journal = False
if journal_id:
journal = journal_pool.read(cr, uid, [journal_id], ['name'])[0]['name']
else:
journal = "All"
period = False
if period_id:
period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name']
view = """<?xml version="1.0" encoding="utf-8"?>
<form string="Standard entries">
<separator string="Open a Journal Items" colspan="4"/>
<group colspan="4" >
<label width="300" string="Going to open a %s Journal(s) for %s Period"/>
</group>
<group colspan="4" col="4">
<label string ="" colspan="2"/>
<button icon="terp-gtk-go-back-rtl" string="Ok" name="action_open_window" type="object"/>
</group>
</form>""" % (str(journal), str(period))
res.update({
'arch':view
})
return res
def action_open_window(self, cr, uid, ids, context=None):
"""
This function Open action move line window on given period and Journal/Payment Mode
@ -50,48 +109,60 @@ class account_move_journal(osv.osv_memory):
@param uid: the current users ID for security checks,
@param ids: account move journals ID or list of IDs
@return: dictionary of Open action move line window on given period and Journal/Payment Mode
"""
jp = self.pool.get('account.journal.period')
mod_obj = self.pool.get('ir.model.data')
period_pool = self.pool.get('account.journal.period')
data_pool = self.pool.get('ir.model.data')
journal_pool = self.pool.get('account.journal')
if context is None:
context = {}
data = self.read(cr, uid, ids, ['journal_id', 'period_id'], context=context)[0]
cr.execute('select id,name from ir_ui_view where model=%s and type=%s', ('account.move.line', 'form'))
view_res = cr.fetchone()
journal_id = data['journal_id']
period_id = data['period_id']
ids = jp.search(cr, uid, [('journal_id', '=', journal_id), \
('period_id', '=', period_id)],context=context)
if not len(ids):
name = self.pool.get('account.journal').read(cr, uid, [journal_id])[0]['name']
state = self.pool.get('account.period').read(cr, uid, [period_id])[0]['state']
if state == 'done':
raise osv.except_osv(_('UserError'), _('This period is already closed !'))
company = self.pool.get('account.period').read(cr, uid, [period_id])[0]['company_id'][0]
jp.create(cr, uid, {'name': name, 'period_id': period_id, 'journal_id': journal_id, 'company_id': company},context=context)
ids = jp.search(cr, uid, [('journal_id', '=', journal_id), ('period_id', '=', period_id)],context=context)
jp = jp.browse(cr, uid, ids, context=context)[0]
name = (jp.journal_id.code or '') + ':' + (jp.period_id.code or '')
result = mod_obj._get_id(cr, uid, 'account', 'view_account_move_line_filter')
res = mod_obj.read(cr, uid, result, ['res_id'],context=context)
journal_id = self._get_journal(cr, uid, context)
period_id = self._get_period(cr, uid, context)
name = _("Journal Items")
if journal_id:
ids = period_pool.search(cr, uid, [('journal_id', '=', journal_id), ('period_id', '=', period_id)], context=context)
if not len(ids):
journal = journal_pool.browse(cr, uid, journal_id)
period = self.pool.get('account.period').browse(cr, uid, period_id)
name = journal.name
state = period.state
if state == 'done':
raise osv.except_osv(_('UserError'), _('This period is already closed !'))
company = period.company_id.id
res = {
'name': name,
'period_id': period_id,
'journal_id': journal_id,
'company_id': company
}
period_pool.create(cr, uid, res,context=context)
ids = period_pool.search(cr, uid, [('journal_id', '=', journal_id), ('period_id', '=', period_id)],context=context)
period = period_pool.browse(cr, uid, ids[0], context=context)
name = (period.journal_id.code or '') + ':' + (period.period_id.code or '')
result = data_pool._get_id(cr, uid, 'account', 'view_account_move_line_filter')
res_id = data_pool.browse(cr, uid, result, context=context).res_id
return {
'domain': "[('journal_id','=',%d), ('period_id','=',%d)]" % (journal_id, period_id),
# 'domain': str([('journal_id', '=', journal_id), ('period_id', '=', period_id)]),
'name': name,
'view_type': 'form',
'view_mode': 'tree,form',
'view_mode': 'tree,form,graph',
'res_model': 'account.move.line',
'view_id': view_res,
'context': "{'journal_id': %d, 'period_id': %d}" % (journal_id, period_id),
'view_id': False,
'context': "{'journal_id': %d, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (journal_id, journal_id, period_id),
'type': 'ir.actions.act_window',
'search_view_id': res['res_id']
}
'search_view_id': res_id
}
account_move_journal()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -2,40 +2,72 @@
<openerp>
<data>
<record id="view_account_move_journal_form" model="ir.ui.view">
<record id="view_account_move_journal_form" model="ir.ui.view">
<field name="name">account.move.journal.form</field>
<field name="model">account.move.journal</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Standard entries">
<group colspan="4" >
<field name="journal_id"/>
<newline/>
<field name="period_id" />
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-gtk-go-back-rtl" string="Open Journal" name="action_open_window" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_account_move_journal_line_form" model="ir.actions.act_window">
<field name="name">Entries by Line</field>
<record id="action_account_moves_sale" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.journal</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_move_journal_form"/>
<field name="target">new</field>
<field name="view_id" ref="view_account_move_journal_form"/>
<field name="context">{'journal_type':'sale'}</field>
<field name="target">new</field>
</record>
<menuitem action="action_account_moves_sale" sequence="4" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables" icon="STOCK_JUSTIFY_FILL"/>
<record id="action_account_moves_purchase_refund" model="ir.actions.act_window">
<field name="name">Journal Refund Items</field>
<field name="res_model">account.move.journal</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_account_move_journal_form"/>
<field name="context">{'journal_type':'purchase_refund'}</field>
<field name="target">new</field>
</record>
<menuitem action="action_account_moves_purchase_refund" sequence="5" id="menu_eaction_account_moves_purchase_refund" parent="menu_finance_receivables" icon="STOCK_JUSTIFY_FILL"/>
<record id="action_account_moves_purchase" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.journal</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_account_move_journal_form"/>
<field name="context">{'journal_type':'purchase'}</field>
<field name="target">new</field>
</record>
<menuitem action="action_account_moves_purchase" sequence="4" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables" icon="STOCK_JUSTIFY_FILL"/>
<record id="action_account_moves_sale_refund" model="ir.actions.act_window">
<field name="name">Journal Refund Items</field>
<field name="res_model">account.move.journal</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_account_move_journal_form"/>
<field name="context">{'journal_type':'sale_refund'}</field>
<field name="target">new</field>
</record>
<menuitem action="action_account_moves_sale_refund" sequence="5" id="menu_eaction_account_moves_sale_refund" parent="menu_finance_payables" icon="STOCK_JUSTIFY_FILL"/>
<record id="action_account_moves_all" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.journal</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_account_move_journal_form"/>
<field name="context">{'journal_type':'bank'}</field>
<field name="target">new</field>
</record>
<!-- <menuitem icon="STOCK_JUSTIFY_FILL"-->
<!-- action="action_account_move_journal_line_form"-->
<!-- id="menu_action_move_journal_line_form"-->
<!-- parent="account.menu_finance_entries" sequence="5" />-->
<menuitem
action="action_account_moves_all"
icon="STOCK_JUSTIFY_FILL"
id="menu_eaction_account_moves_all"
parent="account.menu_finance_entries"
sequence="4"
/>
</data>
</openerp>
</openerp>

View File

@ -37,7 +37,7 @@
<field name="view_id" ref="account_aged_balance_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
<field name="help">Aged Partner Balance is a more detailed report of your receivables by intervals. When opening that report, Open ERP asks for the name of the company, the fiscal period and the size of the interval to be analyzed (in days). Open ERP then calculates a table of credit balance by period. So if you request an interval of 30 days OpenERP generates an analysis of creditors for the past month, past two months, and so on. </field>
<field name="help">Aged Partner Balance is a more detailed report of your receivables by intervals. When opening that report, OpenERP asks for the name of the company, the fiscal period and the size of the interval to be analyzed (in days). OpenERP then calculates a table of credit balance by period. So if you request an interval of 30 days OpenERP generates an analysis of creditors for the past month, past two months, and so on. </field>
</record>
<menuitem icon="STOCK_PRINT"

View File

@ -8,14 +8,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Period">
<field name="company_id" groups="base.group_multi_company" widget='selection'/>
<newline/>
<field name="based_on"/>
<newline/>
<field name="periods"/>
<field name="company_id" groups="base.group_multi_company" widget='selection'/>
<newline/>
<field name="based_on"/>
<newline/>
<separator string="Select Period(s)" colspan="4"/>
<field name="periods" nolabel="1" colspan="2"/>
<group col="2" colspan="4">
<button icon='gtk-cancel' special="cancel" string="Cancel" />
<button name="create_vat" string="Print VAT Decl." colspan="1" type="object" icon="gtk-ok"/>
<button icon='gtk-cancel' special="cancel" string="Cancel" />
<button name="create_vat" string="Print VAT Decl." colspan="1" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
@ -28,7 +29,7 @@
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="help">This menu print a VAT declaration based on invoices or payments. You can select one or several periods of the fiscal year. Information required for a tax declaration is automatically generated by Open ERP from invoices (or payments, in some countries). This data is updated in real time. Thats very useful because it enables you to preview at any time the tax that you owe at the start and end of the month or quarter.</field>
<field name="help">This menu print a VAT declaration based on invoices or payments. You can select one or several periods of the fiscal year. Information required for a tax declaration is automatically generated by OpenERP from invoices (or payments, in some countries). This data is updated in real time. Thats very useful because it enables you to preview at any time the tax that you owe at the start and end of the month or quarter.</field>
</record>
<menuitem

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 10:07+0000\n"
"PO-Revision-Date: 2010-08-12 06:37+0000\n"
"Last-Translator: ub121 <ubs121@gmail.com>\n"
"Language-Team: Mongolian <mn@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: 2010-08-12 03:59+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_default

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 04:36+0000\n"
"PO-Revision-Date: 2010-08-12 05:19+0000\n"
"Last-Translator: OpenERP Administrators <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: 2010-08-12 04:05+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_budget

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 05:34+0000\n"
"PO-Revision-Date: 2010-08-12 05:26+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.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: 2010-08-12 03:50+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_followup

View File

@ -1,5 +1,4 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_account_followup_stat","account_followup.stat","model_account_followup_stat","account.group_account_user",1,0,0,0
"access_account_followup_followup","account_followup.followup","model_account_followup_followup","base.group_system",1,1,1,1
"access_account_followup_followup_line","account_followup.followup.line","model_account_followup_followup_line","account.group_account_user",1,0,0,0
"access_account_followup_stat_manager","account_followup.stat.manager","model_account_followup_stat","account.group_account_manager",1,1,1,1
@ -7,3 +6,4 @@
"access_account_followup_followup_line_manager","account_followup.followup.line.manager","model_account_followup_followup_line","account.group_account_manager",1,1,1,1
"access_account_followup_followup_line_system","account_followup.followup.line system","model_account_followup_followup_line","base.group_system",1,1,1,1
"access_account_followup_followup_accountant","account_followup.followup user","model_account_followup_followup","account.group_account_user",1,0,0,0
"access_account_followup_stat_invoice","account_followup.stat.invoice","model_account_followup_stat","account.group_account_invoice",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
access_account_followup_stat account_followup.stat model_account_followup_stat account.group_account_user 1 0 0 0
2 access_account_followup_followup account_followup.followup model_account_followup_followup base.group_system 1 1 1 1
3 access_account_followup_followup_line account_followup.followup.line model_account_followup_followup_line account.group_account_user 1 0 0 0
4 access_account_followup_stat_manager account_followup.stat.manager model_account_followup_stat account.group_account_manager 1 1 1 1
6 access_account_followup_followup_line_manager account_followup.followup.line.manager model_account_followup_followup_line account.group_account_manager 1 1 1 1
7 access_account_followup_followup_line_system account_followup.followup.line system model_account_followup_followup_line base.group_system 1 1 1 1
8 access_account_followup_followup_accountant account_followup.followup user model_account_followup_followup account.group_account_user 1 0 0 0
9 access_account_followup_stat_invoice account_followup.stat.invoice model_account_followup_stat account.group_account_invoice 1 1 1 1

View File

@ -11,3 +11,5 @@
"access_payment_order_system","payment.order system","model_payment_order","base.group_system",1,0,0,0
"access_payment_mode_system","payment.mode system","model_payment_mode","base.group_system",1,1,1,1
"access_payment_type_system","payment.type system","model_payment_type","base.group_system",1,1,1,1
"access_payment_order_invoice","payment.order invoice","model_payment_order","account.group_account_invoice",1,1,1,1
"access_payment_line_invoice","payment.line invoice","model_payment_line","account.group_account_invoice",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
11 access_payment_order_system payment.order system model_payment_order base.group_system 1 0 0 0
12 access_payment_mode_system payment.mode system model_payment_mode base.group_system 1 1 1 1
13 access_payment_type_system payment.type system model_payment_type base.group_system 1 1 1 1
14 access_payment_order_invoice payment.order invoice model_payment_order account.group_account_invoice 1 1 1 1
15 access_payment_line_invoice payment.line invoice model_payment_line account.group_account_invoice 1 1 1 1

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 05:27+0000\n"
"PO-Revision-Date: 2010-08-12 05:19+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.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: 2010-08-12 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_report

View File

@ -58,7 +58,7 @@
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<field name="product_id" position="replace">
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id,{'price_type':parent.price_type})"/>
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id,{'company_id': parent.company_id, 'price_type':parent.price_type})"/>
</field>
</field>
</record>

View File

@ -9,7 +9,7 @@
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Install Extra Modules</attribute>
<attribute name="string">Association Profile Configuration</attribute>
</form>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='string'></attribute>

View File

@ -378,7 +378,6 @@ property or property parameter."),
}
_defaults = {
'state': 'needs-action',
'user_id': lambda self, cr, uid, ctx: uid,
'role': 'req-participant',
'rsvp': True,
'cutype': 'individual',
@ -419,7 +418,11 @@ property or property parameter."),
event.add('location').value = event_obj.location
if event_obj.rrule:
event.add('rrule').value = event_obj.rrule
if event_obj.user_id or event_obj.organizer_id:
if event_obj.organizer:
event_org = event.add('organizer')
event_org.params['CN'] = [event_obj.organizer]
event_org.value = 'MAILTO:' + (event_obj.organizer)
elif event_obj.user_id or event_obj.organizer_id:
event_org = event.add('organizer')
organizer = event_obj.organizer_id
if not organizer:
@ -1111,6 +1114,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'vtimezone': fields.related('user_id', 'context_tz', type='char', size=24, \
string='Timezone', store=True),
'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}),
'organizer': fields.char("Organizer", size=256, states={'done': [('readonly', True)]}), # Map with Organizer Attribure of VEvent.
'organizer_id': fields.many2one('res.users', 'Organizer', states={'done': [('readonly', True)]}),
'freq': fields.selection([('None', 'No Repeat'), \
('secondly', 'Secondly'), \
@ -1147,6 +1151,14 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'active': fields.boolean('Active', help="If the active field is set to \
true, it will allow you to hide the event alarm information without removing it.")
}
def default_organizer(self, cr, uid, context=None):
user_pool = self.pool.get('res.users')
user = user_pool.browse(cr, uid, uid, context=context)
res = user.name
if user.user_email:
res += " <%s>" %(user.user_email)
return res
_defaults = {
'state': 'tentative',
'class': 'public',
@ -1156,7 +1168,7 @@ true, it will allow you to hide the event alarm information without removing it.
'interval': 1,
'active': 1,
'user_id': lambda self, cr, uid, ctx: uid,
'organizer_id': lambda self, cr, uid, ctx: uid,
'organizer': default_organizer,
}
def open_event(self, cr, uid, ids, context=None):
@ -1199,33 +1211,6 @@ true, it will allow you to hide the event alarm information without removing it.
return value
def modify_this(self, cr, uid, event_id, defaults, real_date, context=None, *args):
"""Modifies only one event record out of virtual recurrent events
and creates new event as a specific instance of a Recurring Event",
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param event_id: Id of Recurring Event
@param real_date: Date of event recurrence that is being modified
@param context: A standard dictionary for contextual values
@param *args: Get Tupple Value
"""
event_id = base_calendar_id2real_id(event_id)
datas = self.read(cr, uid, event_id, context=context)
defaults.update({
'recurrent_uid': base_calendar_id2real_id(datas['id']),
'recurrent_id': defaults.get('date') or real_date,
'rrule_type': 'none',
'rrule': ''
})
exdate = datas['exdate'] and datas['exdate'].split(',') or []
if real_date and defaults.get('date'):
exdate.append(real_date)
self.write(cr, uid, event_id, {'exdate': ','.join(exdate)}, context=context)
new_id = self.copy(cr, uid, event_id, default=defaults, context=context)
return new_id
def modify_all(self, cr, uid, event_ids, defaults, context=None, *args):
"""
Modifies the recurring event
@ -1235,7 +1220,6 @@ true, it will allow you to hide the event alarm information without removing it.
@param context: A standard dictionary for contextual values
@return: True
"""
for event_id in event_ids:
event_id = base_calendar_id2real_id(event_id)
@ -1270,9 +1254,10 @@ true, it will allow you to hide the event alarm information without removing it.
else:
ids = select
result = []
recur_dict = []
if ids and (base_start_date or base_until_date):
cr.execute("select m.id, m.rrule, m.date, m.date_deadline, \
m.exdate, m.exrule from " + self._table + \
cr.execute("select m.id, m.rrule, m.date, m.date_deadline, m.duration, \
m.exdate, m.exrule, m.recurrent_id, m.recurrent_uid from " + self._table + \
" m where m.id in ("\
+ ','.join(map(lambda x: str(x), ids))+")")
@ -1293,8 +1278,16 @@ true, it will allow you to hide the event alarm information without removing it.
if until_date and (event_date > until_date):
continue
idval = real_id2base_calendar_id(data['id'], data['date'])
result.append(idval)
count += 1
if not data['recurrent_id']:
result.append(idval)
count += 1
else:
ex_id = real_id2base_calendar_id(data['recurrent_uid'], data['recurrent_id'])
ls = base_calendar_id2real_id(ex_id, with_date=data and data.get('duration', 0) or 0)
if not isinstance(ls, (str, int, long)) and len(ls) >= 2:
if ls[1] == data['recurrent_id']:
result.append(idval)
recur_dict.append(ex_id)
else:
exdate = data['exdate'] and data['exdate'].split(',') or []
rrule_str = data['rrule']
@ -1329,7 +1322,7 @@ true, it will allow you to hide the event alarm information without removing it.
result.append(idval)
count += 1
if result:
ids = result
ids = list(set(result)-set(recur_dict))
if isinstance(select, (str, int, long)):
return ids and ids[0] or False
return ids
@ -1390,7 +1383,6 @@ true, it will allow you to hide the event alarm information without removing it.
return rrule_string
def search(self, cr, uid, args, offset=0, limit=100, order=None,
context=None, count=False):
"""
@ -1424,8 +1416,6 @@ true, it will allow you to hide the event alarm information without removing it.
return self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit)
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
"""
Overrides orm write method.
@ -1444,22 +1434,27 @@ true, it will allow you to hide the event alarm information without removing it.
else:
select = ids
new_ids = []
res = False
for event_id in select:
real_event_id = base_calendar_id2real_id(event_id)
if len(str(event_id).split('-')) > 1:
data = self.read(cr, uid, event_id, ['date', 'date_deadline', \
'rrule', 'duration'])
if data.get('rrule'):
real_date = data.get('date')
data.update(vals)
new_id = self.modify_this(cr, uid, event_id, data, \
real_date, context)
vals.update({
'recurrent_uid': real_event_id,
'recurrent_id': data.get('date'),
'rrule_type': 'none',
'rrule': ''
})
new_id = self.copy(cr, uid, real_event_id, default=vals, context=context)
context.update({'active_id': new_id, 'active_ids': [new_id]})
continue
event_id = base_calendar_id2real_id(event_id)
if not event_id in new_ids:
new_ids.append(event_id)
if not real_event_id in new_ids:
new_ids.append(real_event_id)
res = super(calendar_event, self).write(cr, uid, new_ids, vals, context=context)
if new_ids:
res = super(calendar_event, self).write(cr, uid, new_ids, vals, context=context)
if (vals.has_key('alarm_id') or vals.has_key('base_calendar_alarm_id'))\
or (vals.has_key('date') or vals.has_key('duration') or vals.has_key('date_deadline')):
# change alarm details
@ -1559,13 +1554,12 @@ true, it will allow you to hide the event alarm information without removing it.
continue
event_id, date_new = event_id.split('-')
event_id = [int(event_id)]
for record in self.read(cr, uid, event_id, ['date', 'rrule', 'exdate']):
for record in self.read(cr, uid, event_id, ['date', 'rrule', 'exdate'], context=context):
if record['rrule']:
# Remove one of the recurrent event
date_new = time.strftime("%Y-%m-%d %H:%M:%S", \
date_new = time.strftime("%Y%m%dT%H%M%S", \
time.strptime(date_new, "%Y%m%d%H%M%S"))
exdate = (record['exdate'] and (record['exdate'] + ',') or '') + ''.join((re.compile('\d')).findall(date_new)) + 'Z'
res = self.write(cr, uid, event_id, {'exdate': exdate})
res = self.write(cr, uid, event_id, {'exdate': date_new})
else:
res = super(calendar_event, self).unlink(cr, uid, event_id)
self.pool.get('res.alarm').do_alarm_unlink(cr, uid, event_id, self._name)

View File

@ -10,6 +10,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Invite People">
<separator string="Invite People" colspan="4" />
<field name="type" />
<field name="send_mail" />
<newline />

View File

@ -47,7 +47,7 @@ class base_setup_config_choice(osv.osv_memory):
user_obj = self.pool.get('res.users')
user_ids = user_obj.search(cr, uid, [])
users = user_obj.browse(cr, uid, user_ids)
user_str = '\n'.join(map(lambda x: ' - %s: %s / %s' % (x.name, x.login, x.password), users))
user_str = '\n'.join(map(lambda x: ' - %s:\n\t\tLogin: %s \n\t\tPassword:%s' % (x.name, x.login, x.password), users))
return _('The following users have been installed : \n')+ user_str
_columns = {

View File

@ -6,7 +6,7 @@
<field name="model">base.setup.config</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Setup">
<form string="Information about your new database">
<group colspan="4" col="8">
<group colspan="3" width="220">
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
@ -15,7 +15,7 @@
</group>
<separator string="" orientation="vertical" colspan="1" rowspan="8"/>
<group colspan="4" width="400">
<separator string="Installation Done" colspan="4"/>
<separator string="New Database" colspan="4"/>
<label align="0.0" string="Your database is now created." colspan="4"/>
<field name="installed_users" nolabel= "1" colspan="4"/>
</group>

View File

@ -25,7 +25,7 @@
<group colspan="4" height="450" width="600">
<group colspan="4">
<field name="ebook" nolabel="1"/>
<label align="0.0" string="I want to receive the Open ERP ebook (PDF) by email." colspan="3"/>
<label align="0.0" string="I want to receive the OpenERP ebook (PDF) by email." colspan="3"/>
<field name="updates" nolabel="1"/>
<label align="0.0" string="Yes, I would like to receive information updates from OpenERP." colspan="3"/>
</group>

View File

@ -71,8 +71,8 @@ class node_calendar_collection(nodes.node_dir):
where = [('collection_id','=',self.dir_id)]
ext = False
if name and name.endswith('.ics'):
name = name[-4]
ext = '.ics'
name = name[:-4]
ext = True
if name:
where.append(('name','=',name))
if not domain:
@ -81,15 +81,16 @@ class node_calendar_collection(nodes.node_dir):
fil_obj = dirobj.pool.get('basic.calendar')
ids = fil_obj.search(cr,uid,where,context=ctx)
res = []
for calender in fil_obj.browse(cr, uid, ids, context=ctx):
if not ext:
res.append(node_calendar(calender.name, self, self.context, calender))
else:
res.append(res_node_calendar(name, self, self.context, calender))
for cal in fil_obj.browse(cr, uid, ids, context=ctx):
if (not name) or not ext:
res.append(node_calendar(cal.name, self, self.context, cal))
if (not name) or ext:
res.append(res_node_calendar(cal.name+'.ics', self, self.context, cal))
# May be both of them!
return res
def _get_dav_owner(self, cr):
# Todo?
# Todo?
return False
def _get_ttag(self, cr):
@ -205,7 +206,15 @@ class node_calendar(nodes.node_class):
if name:
if name.endswith('.ics'):
name = name[:-4]
where.append(('id','=',int(name)))
try:
where.append(('id','=',int(name)))
except ValueError:
# if somebody requests any other name than the ones we
# generate (non-numeric), it just won't exist
# FIXME: however, this confuses Evolution (at least), which
# thinks the .ics node hadn't been saved.
return []
if not domain:
domain = []
#for opr1, opt, opr2 in domain:
@ -224,9 +233,21 @@ class node_calendar(nodes.node_class):
Return the node_* created
"""
# we ignore the path, it will be re-generated automatically
fil_obj = self.context._dirobj.pool.get('basic.calendar')
ctx = self.context.context.copy()
ctx.update(self.dctx)
uid = self.context.uid
res = self.set_data(cr, data)
# TODO: use the res to create at least one node
if res and len(res):
# We arbitrarily construct only the first node of the data
# that have been imported. ICS may have had more elements,
# but only one node can be returned here.
assert isinstance(res[0], (int, long))
fnodes = fil_obj.get_calendar_objects(cr, uid, [self.calendar_id], self,
domain=[('id','=',res[0])], context=ctx)
return fnodes[0]
return None

View File

@ -74,37 +74,45 @@
<field name="type"/>
<field name="user_id"/>
<field name="collection_id" required="1"/>
<field name="line_ids" mode="form,tree" colspan="4" nolabel="1">
<form string="Calendar Lines">
<field name="name" required="1" select="1" />
<field name="object_id" required="1" select="1" />
<field name="domain" select="1" />
<field name="mapping_ids" select="1" colspan="4" nolabel="1">
<tree string="Attributes Mapping" editable="bottom">
<field name="name" required="1" domain="[('type', '=', parent.name)]"/>
<field name="fn" select="1" />
<field name="field_id" select="1" required="1" domain="[('model_id', '=', parent.object_id)]" />
<field name="expr" />
</tree>
<form string="Attributes Mapping">
<field name="name" select="1" required="1" domain="[('type', '=', parent.name)]"/>
<field name="field_id" select="1" domain="[('model_id', '=', parent.object_id)]"
required="1" />
<field name="fn" select="1" required="1" />
<field name="expr" />
<separator string="Value Mapping" colspan="4" />
<field name="mapping" select="1" colspan="4" nolabel="1" />
<notebook colspan="4">
<page string="Calendar Lines">
<field name="line_ids" mode="form,tree" colspan="4" nolabel="1">
<form string="Calendar Lines">
<field name="name" required="1" select="1" />
<field name="object_id" required="1" select="1" />
<field name="domain" select="1" />
<field name="mapping_ids" select="1" colspan="4" nolabel="1">
<tree string="Attributes Mapping" editable="bottom">
<field name="name" required="1" domain="[('type', '=', parent.name)]"/>
<field name="fn" select="1" />
<field name="field_id" select="1" required="1" domain="[('model_id', '=', parent.object_id)]" />
<field name="expr" />
</tree>
<form string="Attributes Mapping">
<field name="name" select="1" required="1" domain="[('type', '=', parent.name)]"/>
<field name="field_id" select="1" domain="[('model_id', '=', parent.object_id)]"
required="1" />
<field name="fn" select="1" required="1" />
<field name="expr" />
<separator string="Value Mapping" colspan="4" />
<field name="mapping" select="1" colspan="4" nolabel="1" />
</form>
</field>
</form>
</field>
</form>
<tree string="Calendar Lines" editable="bottom">
<field name="name" select="1" />
<field name="object_id" select="1" />
</tree>
</field>
</form>
</field>
</record>
<tree string="Calendar Lines" editable="bottom">
<field name="name" select="1" />
<field name="object_id" select="1" />
</tree>
</field>
</page>
<page string="Other Info">
<separator string="Description" colspan="4" />
<field name="description" colspan="4" nolabel="1" />
</page>
</notebook>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_caldav_tree">

View File

@ -83,7 +83,61 @@ def openobjectid2uid(cr, uidval, oomodel):
value = 'OpenObject-%s_%s@%s' % (oomodel, uidval, cr.dbname)
return value
def get_attribute_mapping(cr, uid, calname, context={}):
def mailto2str(arg):
"""Take a dict of mail and convert to string.
"""
ret = []
if isinstance(arg, dict):
args = [arg,]
else:
args = arg
for ard in args:
rstr = ard.get('name','')
if ard.get('company',False):
rstr += ' (%s)' % ard.get('company')
if ard.get('email'):
rstr += ' <%s>' % ard.get('email')
ret.append(rstr)
return ', '.join(ret)
def str2mailto(emailstr, multi=False):
"""Split one email string to a dict of name, company, mail parts
@param multi Return an array, recognize comma-sep
"""
# TODO: move to tools or sth.
mege = re.compile(r'([^\(\<]+) *(\((.*?)\))? *(\< ?(.*?) ?\>)? ?(\((.*?)\))? *$')
mailz= [emailstr,]
retz = []
if multi:
mailz = emailstr.split(',')
for mas in mailz:
m = mege.match(mas.strip())
if not m:
# one of the rare non-matching strings is "sad" :(
# retz.append({ 'name': mas.strip() })
# continue
raise ValueError("Invalid email address %r" % mas)
rd = { 'name': m.group(1).strip(),
'email': m.group(5), }
if m.group(2):
rd['company'] = m.group(3).strip()
elif m.group(6):
rd['company'] = m.group(7).strip()
if rd['name'].startswith('"') and rd['name'].endswith('"'):
rd['name'] = rd['name'][1:-1]
retz.append(rd)
if multi:
return retz
else:
return retz[0]
def get_attribute_mapping(cr, uid, calname, context=None):
""" Attribute Mapping with Basic calendar fields and lines
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@ -220,6 +274,10 @@ class CalDAV(object):
self.__attribute__[name][type] = None
return True
def format_date_tz(self, date, tz=None):
format = tools.DEFAULT_SERVER_DATETIME_FORMAT
return tools.server_to_local_timestamp(date, format, format, tz)
def parse_ics(self, cr, uid, child, cal_children=None, context=None):
""" parse calendaring and scheduling information
@param self: The object pointer
@ -228,9 +286,16 @@ class CalDAV(object):
@param context: A standard dictionary for contextual values """
att_data = []
exdates = []
_server_tzinfo = pytz.timezone(tools.get_server_timezone())
for cal_data in child.getChildren():
if cal_data.name.lower() == 'organizer':
self.ical_set(cal_data.name.lower(), {'name': cal_data.params.get('CN') and cal_data.params.get('CN')[0]}, 'value')
dmail = { 'name': cal_data.params.get('CN', ['',])[0],
'email': cal_data.value.replace('MAILTO:',''),
# TODO: company?
}
self.ical_set(cal_data.name.lower(), mailto2str(dmail), 'value')
continue
if cal_data.name.lower() == 'attendee':
ctx = context.copy()
@ -249,13 +314,20 @@ class CalDAV(object):
self.ical_set(cal_data.name.lower(), vals, 'value')
continue
if cal_data.name.lower() == 'exdate':
exval = map(lambda x: str(x), cal_data.value)
self.ical_set(cal_data.name.lower(), ','.join(exval), 'value')
exdates += cal_data.value
exvals = []
for exdate in exdates:
exvals.append(datetime.fromtimestamp(time.mktime(exdate.utctimetuple())).strftime('%Y%m%dT%H%M%S'))
self.ical_set(cal_data.name.lower(), ','.join(exvals), 'value')
continue
if cal_data.name.lower() in self.__attribute__:
if cal_data.params.get('X-VOBJ-ORIGINAL-TZID'):
self.ical_set('vtimezone', cal_data.params.get('X-VOBJ-ORIGINAL-TZID'), 'value')
# since we do convert, do we also need to save the original tzid?
# self.ical_set('vtimezone', cal_data.params.get('X-VOBJ-ORIGINAL-TZID'), 'value')
date_local = cal_data.value.astimezone(_server_tzinfo)
self.ical_set(cal_data.name.lower(), date_local, 'value')
continue
self.ical_set(cal_data.name.lower(), cal_data.value, 'value')
vals = map_data(cr, uid, self, context=context)
return vals
@ -272,6 +344,8 @@ class CalDAV(object):
timezones = []
for data in datas:
tzval = None
exfield = None
exdates = []
vevent = ical.add(name)
for field in self.__attribute__.keys():
map_field = self.ical_get(field, 'field')
@ -305,30 +379,53 @@ class CalDAV(object):
alarm_obj = self.pool.get('basic.calendar.alarm')
vevent = alarm_obj.export_cal(cr, uid, model, \
data[map_field][0], vevent, context=ctx)
elif field == 'vtimezone' and data[map_field] and data[map_field] not in timezones:
elif field == 'vtimezone' and data[map_field]:
tzval = data[map_field]
tz_obj = self.pool.get('basic.calendar.timezone')
ical = tz_obj.export_cal(cr, uid, None, \
data[map_field], ical, context=context)
timezones.append(data[map_field])
if tzval not in timezones:
tz_obj = self.pool.get('basic.calendar.timezone')
ical = tz_obj.export_cal(cr, uid, None, \
data[map_field], ical, context=context)
timezones.append(data[map_field])
if exfield:
exfield.params['TZID'] = [tzval.title()]
exdates_updated = []
for exdate in exdates:
date1 = (datetime.strptime(exdate, "%Y%m%dT%H%M%S")).strftime('%Y-%m-%d %H:%M:%S')
dest_date = self.format_date_tz(date1, tzval.title())
ex_date = (datetime.strptime(dest_date, "%Y-%m-%d %H:%M:%S")).strftime('%Y%m%dT%H%M%S')
exdates_updated.append(ex_date)
exfield.value = map(parser.parse, exdates_updated)
elif field == 'organizer' and data[map_field]:
organizer = str2mailto(data[map_field])
event_org = vevent.add('organizer')
organizer_id = data[map_field][0]
user_obj = self.pool.get('res.users')
organizer = user_obj.browse(cr, uid, organizer_id, context=context)
event_org.params['CN'] = [organizer.name]
event_org.value = 'MAILTO:' + (organizer.user_email or organizer.name)
event_org.params['CN'] = [organizer['name']]
event_org.value = 'MAILTO:' + (organizer.get('email') or '')
# TODO: company?
elif data[map_field]:
if map_type in ("char", "text"):
if field in ('exdate'):
vevent.add(field).value = map(parser.parse, (data[map_field]).split(','))
exfield = vevent.add(field)
exdates = (data[map_field]).split(',')
if tzval:
exfield.params['TZID'] = [tzval.title()]
exdates_updated = []
for exdate in exdates:
date1 = (datetime.strptime(exdate, "%Y%m%dT%H%M%S")).strftime('%Y-%m-%d %H:%M:%S')
dest_date = self.format_date_tz(date1, tzval.title())
ex_date = (datetime.strptime(dest_date, "%Y-%m-%d %H:%M:%S")).strftime('%Y%m%dT%H%M%S')
exdates_updated.append(ex_date)
exdates = exdates_updated
exfield.value = map(parser.parse, exdates)
else:
vevent.add(field).value = tools.ustr(data[map_field])
elif map_type in ('datetime', 'date') and data[map_field]:
dtfield = vevent.add(field)
dtfield.value = parser.parse(data[map_field])
if tzval:
dest_date = self.format_date_tz(data[map_field], tzval.title())
dtfield.params['TZID'] = [tzval.title()]
dtfield.value = parser.parse(dest_date)
else:
dtfield.value = parser.parse(data[map_field])
elif map_type == "timedelta":
vevent.add(field).value = timedelta(hours=data[map_field])
elif map_type == "many2one":
@ -344,7 +441,7 @@ class CalDAV(object):
vevent.add(field).value = key1
return vevent
def check_import(self, cr, uid, vals, context={}):
def check_import(self, cr, uid, vals, context=None):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -352,7 +449,8 @@ class CalDAV(object):
@param vals: Get Values
@param context: A standard dictionary for contextual values
"""
if not context:
context = {}
ids = []
model_obj = self.pool.get(context.get('model'))
recur_pool = {}
@ -379,8 +477,8 @@ class CalDAV(object):
event_id = model_obj.create(cr, uid, val)
recur_pool[u_id] = event_id
ids.append(event_id)
except Exception, e:
raise osv.except_osv(('Error !'), (str(e)))
except Exception:
raise
return ids
def export_cal(self, cr, uid, datas, vobj=None, context=None):
@ -451,6 +549,7 @@ class Calendar(CalDAV, osv.osv):
'line_ids': fields.one2many('basic.calendar.lines', 'calendar_id', 'Calendar Lines'),
'create_date': fields.datetime('Created Date', readonly=True),
'write_date': fields.datetime('Modifided Date', readonly=True),
'description': fields.text("description"),
}
def get_calendar_objects(self, cr, uid, ids, parent=None, domain=None, context=None):
@ -467,7 +566,7 @@ class Calendar(CalDAV, osv.osv):
continue
if line.name in ('valarm', 'attendee'):
continue
line_domain = eval(line.domain)
line_domain = eval(line.domain or '[]')
line_domain += domain
if ctx_res_id:
line_domain += [('id','=',ctx_res_id)]
@ -497,7 +596,7 @@ class Calendar(CalDAV, osv.osv):
continue
if line.name in ('valarm', 'attendee'):
continue
domain = eval(line.domain)
domain = eval(line.domain or '[]')
if ctx_res_id:
domain += [('id','=',ctx_res_id)]
mod_obj = self.pool.get(line.object_id.model)
@ -580,7 +679,7 @@ class basic_calendar_line(osv.osv):
'domain': lambda *a: '[]',
}
def create(self, cr, uid, vals, context={}):
def create(self, cr, uid, vals, context=None):
""" create calendar's line
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -662,7 +761,7 @@ class basic_calendar_fields(osv.osv):
raise osv.except_osv(_('Warning !'), _('Please provide proper configuration of "%s" in Calendar Lines' % (name)))
return True
def create(self, cr, uid, vals, context={}):
def create(self, cr, uid, vals, context=None):
""" Create Calendar's fields
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -739,7 +838,7 @@ class Event(CalDAV, osv.osv_memory):
'dtend': None, # Use: O-1, Type: DATE-TIME, Specifies the date and time that a calendar component ends.
}
def export_cal(self, cr, uid, datas, vobj='vevent', context={}):
def export_cal(self, cr, uid, datas, vobj='vevent', context=None):
""" Export calendar
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -792,7 +891,7 @@ class ToDo(CalDAV, osv.osv_memory):
'rrule': None,
}
def export_cal(self, cr, uid, datas, vobj='vevent', context={}):
def export_cal(self, cr, uid, datas, vobj='vevent', context=None):
""" Export Calendar
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -842,7 +941,7 @@ class Timezone(CalDAV, osv.osv_memory):
'x-prop': None, # Use: O-n, Type: Text,
}
def get_name_offset(self, cr, uid, tzid, context={}):
def get_name_offset(self, cr, uid, tzid, context=None):
""" Get Name Offset value
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -859,7 +958,7 @@ class Timezone(CalDAV, osv.osv_memory):
realoffset = (val < 0 and ('-' + realoffset) or ('+' + realoffset))
return (mydt.tzname(), realoffset)
def export_cal(self, cr, uid, model, tzid, ical, context={}):
def export_cal(self, cr, uid, model, tzid, ical, context=None):
""" Export Calendar
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -867,7 +966,8 @@ class Timezone(CalDAV, osv.osv_memory):
@param model: Get Model's name
@param context: A standard dictionary for contextual values
"""
if not context:
context = {}
ctx = context.copy()
ctx.update({'model': model})
cal_tz = ical.add('vtimezone')
@ -876,7 +976,8 @@ class Timezone(CalDAV, osv.osv_memory):
tzname, offset = self.get_name_offset(cr, uid, tzid)
tz_std.add("TZOFFSETFROM").value = offset
tz_std.add("TZOFFSETTO").value = offset
tz_std.add("DTSTART").value = datetime.now() # TODO
#TODO: Get start date for timezone
tz_std.add("DTSTART").value = datetime.strptime('1970-01-01 00:00:00', '%Y-%m-%d %H:%M:%S')
tz_std.add("TZNAME").value = tzname
return ical
@ -915,7 +1016,7 @@ class Alarm(CalDAV, osv.osv_memory):
'x-prop': None,
}
def export_cal(self, cr, uid, model, alarm_id, vevent, context={}):
def export_cal(self, cr, uid, model, alarm_id, vevent, context=None):
""" Export Calendar
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -924,7 +1025,8 @@ class Alarm(CalDAV, osv.osv_memory):
@param alarm_id: Get Alarm's Id
@param context: A standard dictionary for contextual values
"""
if not context:
context = {}
valarm = vevent.add('valarm')
alarm_object = self.pool.get(model)
alarm_data = alarm_object.read(cr, uid, alarm_id, [])
@ -1035,7 +1137,7 @@ class Attendee(CalDAV, osv.osv_memory):
vals = map_data(cr, uid, self, context=context)
return vals
def export_cal(self, cr, uid, model, attendee_ids, vevent, context={}):
def export_cal(self, cr, uid, model, attendee_ids, vevent, context=None):
""" Export Calendar
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -1044,7 +1146,8 @@ class Attendee(CalDAV, osv.osv_memory):
@param attendee_ids: Get Attendee's Id
@param context: A standard dictionary for contextual values
"""
if not context:
context = {}
attendee_object = self.pool.get(model)
ctx = context.copy()
ctx.update({'model': model})

View File

@ -33,19 +33,20 @@ class calendar_event_export(osv.osv_memory):
Export Calendar Event.
"""
def default_get(self, cr, uid, fields, context):
def default_get(self, cr, uid, fields, context=None):
"""
Get Default value for Name field.
"""
if not context:
context = {}
model = context.get('model', 'basic.calendar')
model_obj = self.pool.get(model)
calendar = model_obj.export_cal(cr, uid, context['active_ids'], context)
res = super(calendar_event_export, self).default_get( cr, uid, fields, context=context)
name = 'OpenERP %s.ics' % (model_obj._description)
if 'name' in fields:
res.update({'name': name})
if 'file_path' in fields:
calendar = model_obj.export_cal(cr, uid, context['active_ids'], context)
calendar = model_obj.export_cal(cr, uid, context['active_ids'], context=context)
res.update({'file_path': base64.encodestring(calendar)})
return res

View File

@ -107,7 +107,7 @@
<group col="2" colspan="2">
<separator colspan="2" string="Assignment"/>
<field name="user_id" />
<field name="organizer_id" groups="base.group_extended"/>
<field name="organizer" groups="base.group_extended"/>
<field name="section_id" widget="selection"
groups="base.group_extended"/>
</group><group col="2" colspan="2">

View File

@ -6,6 +6,7 @@
<field name="name">Opportunities</field>
<field name="model">crm.lead</field>
<field name="type">form</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<form string="Opportunities">
<group colspan="4" col="7">

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-01-05 05:59+0000\n"
"PO-Revision-Date: 2010-08-11 05:39+0000\n"
"PO-Revision-Date: 2010-08-12 05:43+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Finnish <fi@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: 2010-08-12 03:47+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-01-05 05:59+0000\n"
"PO-Revision-Date: 2010-08-11 05:13+0000\n"
"PO-Revision-Date: 2010-08-12 05:43+0000\n"
"Last-Translator: OpenERP Administrators <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: 2010-08-12 03:48+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm

View File

@ -27,7 +27,7 @@ from datetime import datetime
class crm_meeting(osv.osv):
_inherit = 'crm.meeting'
def export_cal(self, cr, uid, ids, context={}):
def export_cal(self, cr, uid, ids, context=None):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -35,14 +35,16 @@ class crm_meeting(osv.osv):
@param ids: List of CRM Meetings IDs
@param context: A standard dictionary for contextual values
"""
if not context:
context = {}
ids = map(lambda x: base_calendar.base_calendar_id2real_id(x), ids)
event_data = self.read(cr, uid, ids)
event_data = self.read(cr, uid, ids, context=context)
event_obj = self.pool.get('basic.calendar.event')
ical = event_obj.export_cal(cr, uid, event_data, context={'model': self._name})
context.update({'model': self._name})
ical = event_obj.export_cal(cr, uid, event_data, context=context)
return ical.serialize()
def import_cal(self, cr, uid, data, data_id=None, context={}):
def import_cal(self, cr, uid, data, data_id=None, context=None):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -51,12 +53,13 @@ class crm_meeting(osv.osv):
@param data_id: calendar's Id
@param context: A standard dictionary for contextual values
"""
if not context:
context = {}
event_obj = self.pool.get('basic.calendar.event')
vals = event_obj.import_cal(cr, uid, data, context=context)
return self.check_import(cr, uid, vals, context=context)
def check_import(self, cr, uid, vals, context={}):
def check_import(self, cr, uid, vals, context=None):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -64,6 +67,8 @@ class crm_meeting(osv.osv):
@param vals: Get Values
@param context: A standard dictionary for contextual values
"""
if not context:
context = {}
ids = []
model_obj = self.pool.get(context.get('model'))
recur_pool = {}
@ -96,8 +101,8 @@ class crm_meeting(osv.osv):
event_id = model_obj.create(cr, uid, val)
recur_pool[u_id] = event_id
ids.append(event_id)
except Exception, e:
raise osv.except_osv(('Error !'), (str(e)))
except Exception:
raise
return ids
crm_meeting()

View File

@ -32,7 +32,7 @@
<record model="basic.calendar.fields" id="map_event_0">
<field name="name" ref="caldav.field_event_organizer"/>
<field name="type_id" ref="base_calendar.calendar_lines_event" />
<field name="field_id" search="[('name','=','organizer_id'),('model_id.model','=','calendar.event')]" />
<field name="field_id" search="[('name','=','organizer'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>

View File

@ -98,7 +98,9 @@ class indexer(object):
def _doIndexFile(self,fpath):
raise NhException("Content not handled here")
def __repr__(self):
return "<indexer %s.%s>" %(self.__module__, self.__class__.__name__)
def mime_match(mime, mdict):
@ -128,7 +130,7 @@ class contentIndex(object):
f = True
if f:
self.__logger.debug('Register content indexer: %s', obj)
self.__logger.debug('Register content indexer: %r', obj)
if not f:
raise Exception("Your indexer should at least suport a mimetype or extension")

View File

@ -18,16 +18,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import base64
from osv import osv, fields
from osv.orm import except_orm
import urlparse
import netsvc
import os
# import os
import nodes
import StringIO
# import StringIO
class document_directory_content_type(osv.osv):
_name = 'document.directory.content.type'
@ -83,7 +80,7 @@ class document_directory_content(osv.osv):
tname = ''
if content.include_name:
content_name = node.displayname or ''
obj = node.context._dirobj.pool.get(model)
# obj = node.context._dirobj.pool.get(model)
if content_name:
tname = (content.prefix or '') + content_name + (content.suffix or '') + (content.extension or '')
else:

View File

@ -20,13 +20,7 @@
#
##############################################################################
import base64
from osv import osv, fields
from osv.orm import except_orm
import urlparse
import os
class ir_action_report_xml(osv.osv):
_name="ir.actions.report.xml"

View File

@ -22,16 +22,10 @@
import base64
from osv import osv, fields
import urlparse
import os
import pooler
import netsvc
from osv.orm import except_orm
#import StringIO
from psycopg2 import Binary
# from psycopg2 import Binary
#from tools import config
import tools
from tools.translate import _

View File

@ -19,11 +19,8 @@
#
##############################################################################
import base64
from osv import osv, fields
from osv.orm import except_orm
import urlparse
import os
import nodes
@ -141,30 +138,6 @@ class document_directory(osv.osv):
_parent(dir_id, path)
return path
def ol_get_resource_path(self, cr, uid, dir_id, res_model, res_id):
# this method will be used in process module
# to be need test and Improvement if resource dir has parent resource (link resource)
path=[]
def _parent(dir_id,path):
parent=self.browse(cr, uid, dir_id)
if parent.parent_id and not parent.ressource_parent_type_id:
_parent(parent.parent_id.id,path)
path.append(parent.name)
else:
path.append(parent.name)
return path
directory=self.browse(cr,uid,dir_id)
model_ids=self.pool.get('ir.model').search(cr, uid, [('model','=',res_model)])
if directory:
_parent(dir_id,path)
path.append(self.pool.get(directory.ressource_type_id.model).browse(cr, uid, res_id).name)
#user=self.pool.get('res.users').browse(cr,uid,uid)
#return "ftp://%s:%s@localhost:%s/%s/%s"%(user.login,user.password,config.get('ftp_server_port',8021),cr.dbname,'/'.join(path))
# No way we will return the password!
return "ftp://user:pass@host:port/test/this"
return False
def _check_recursion(self, cr, uid, ids):
level = 100
while len(ids):
@ -178,8 +151,9 @@ class document_directory(osv.osv):
_constraints = [
(_check_recursion, 'Error! You can not create recursive Directories.', ['parent_id'])
]
def __init__(self, *args, **kwargs):
res = super(document_directory, self).__init__(*args, **kwargs)
super(document_directory, self).__init__(*args, **kwargs)
#self._cache = {}
def onchange_content_id(self, cr, uid, ids, ressource_type_id):
@ -223,31 +197,8 @@ class document_directory(osv.osv):
""" try to locate the node in uri,
Return a tuple (node_dir, remaining_path)
"""
return (nodes.node_database(context=ncontext), uri)
return (nodes.node_database(context=ncontext), uri)
def old_code():
if not uri:
return node_database(cr, uid, context=context)
turi = tuple(uri)
node = node_class(cr, uid, '/', False, context=context, type='database')
for path in uri[:]:
if path:
node = node.child(path)
if not node:
return False
oo = node.object and (node.object._name, node.object.id) or False
oo2 = node.object2 and (node.object2._name, node.object2.id) or False
return node
def ol_get_childs(self, cr, uid, uri, context={}):
node = self.get_object(cr, uid, uri, context)
if uri:
children = node.children()
else:
children= [node]
result = map(lambda node: node.path_get(), children)
return result
def copy(self, cr, uid, id, default=None, context=None):
if not default:
default ={}

View File

@ -37,7 +37,6 @@ from osv.orm import except_orm
import random
import string
import pooler
import netsvc
import nodes
from content_index import cntIndex
@ -189,7 +188,7 @@ class nodefd_db(StringIO, nodes.node_descriptor):
# we now open a *separate* cursor, to update the data.
# FIXME: this may be improved, for concurrency handling
par = self._get_parent()
uid = par.context.uid
# uid = par.context.uid
cr = pooler.get_db(par.context.dbname).cursor()
try:
if self.mode in ('w', 'w+', 'r+'):
@ -227,7 +226,7 @@ class nodefd_db(StringIO, nodes.node_descriptor):
" WHERE id = %s",
(out, len(data), par.file_id))
cr.commit()
except Exception, e:
except Exception:
logging.getLogger('document.storage').exception('Cannot update db file #%d for close:', par.file_id)
raise
finally:
@ -262,7 +261,7 @@ class nodefd_db64(StringIO, nodes.node_descriptor):
# we now open a *separate* cursor, to update the data.
# FIXME: this may be improved, for concurrency handling
par = self._get_parent()
uid = par.context.uid
# uid = par.context.uid
cr = pooler.get_db(par.context.dbname).cursor()
try:
if self.mode in ('w', 'w+', 'r+'):
@ -288,18 +287,18 @@ class nodefd_db64(StringIO, nodes.node_descriptor):
cr.execute('UPDATE ir_attachment SET db_datas = %s::bytea, file_size=%s, ' \
'index_content = %s, file_type = %s ' \
'WHERE id = %s',
(base64.encodestring(out), len(out), icont_u, mime, par.file_id))
(base64.encodestring(data), len(data), icont_u, mime, par.file_id))
elif self.mode == 'a':
out = self.getvalue()
data = self.getvalue()
# Yes, we're obviously using the wrong representation for storing our
# data as base64-in-bytea
cr.execute("UPDATE ir_attachment " \
"SET db_datas = encode( (COALESCE(decode(encode(db_datas,'escape'),'base64'),'') || decode(%s, 'base64')),'base64')::bytea , " \
" file_size = COALESCE(file_size, 0) + %s " \
" WHERE id = %s",
(base64.encodestring(out), len(out), par.file_id))
(base64.encodestring(data), len(data), par.file_id))
cr.commit()
except Exception, e:
except Exception:
logging.getLogger('document.storage').exception('Cannot update db file #%d for close:', par.file_id)
raise
finally:
@ -500,7 +499,7 @@ class document_storage(osv.osv):
# try to fix their directory.
if ira.file_size:
self._doclog.warning("ir.attachment #%d does not have a filename, trying the name." %ira.id)
sfname = ira.name
# sfname = ira.name
fpath = os.path.join(boo.path,ira.store_fname or ira.name)
if os.path.exists(fpath):
return file(fpath,'rb').read()
@ -695,7 +694,7 @@ class document_storage(osv.osv):
store_fname = os.path.join(*store_path)
return { 'name': new_name, 'datas_fname': new_name, 'store_fname': store_fname }
else:
raise TypeError("No %s storage" % boo.type)
raise TypeError("No %s storage" % sbro.type)
def simple_move(self, cr, uid, file_node, ndir_bro, context=None):
""" A preparation for a file move.
@ -734,7 +733,7 @@ class document_storage(osv.osv):
fname = fil_bo.store_fname
if not fname:
return ValueError("Tried to rename a non-stored file")
path = storage_bo.path
path = sbro.path
oldpath = os.path.join(path, fname)
for ch in ('*', '|', "\\", '/', ':', '"', '<', '>', '?', '..'):
@ -751,7 +750,7 @@ class document_storage(osv.osv):
os.rename(oldpath, newpath)
return { 'name': new_name, 'datas_fname': new_name, 'store_fname': new_name }
else:
raise TypeError("No %s storage" % boo.type)
raise TypeError("No %s storage" % sbro.type)
document_storage()

View File

@ -19,17 +19,14 @@
#
##############################################################################
# import base64
# import StringIO
from osv import osv, fields
from osv.orm import except_orm
# import urlparse
import pooler
from tools.safe_eval import safe_eval
import errno
import os
# import os
import time
import logging
from StringIO import StringIO
@ -44,6 +41,8 @@ from StringIO import StringIO
# root: if we are at the first directory of a ressource
#
logger = logging.getLogger('doc2.nodes')
def _str2time(cre):
""" Convert a string with time representation (from db) into time (float)
@ -902,9 +901,8 @@ class node_res_obj(node_class):
def get_dav_eprop(self, cr, ns, prop):
if ns != 'http://groupdav.org/' or prop != 'resourcetype':
print "Who asked for %s:%s?" % (ns, prop)
logger.warning("Who asked for %s:%s?" % (ns, prop))
return None
res = {}
cntobj = self.context._dirobj.pool.get('document.directory.content')
uid = self.context.uid
ctx = self.context.context.copy()
@ -1374,11 +1372,11 @@ class nodefd_content(StringIO, node_descriptor):
if self.mode in ('w', 'w+', 'r+'):
data = self.getvalue()
cntobj = par.context._dirobj.pool.get('document.directory.content')
cntobj.process_write(cr, uid, parent, data, ctx)
cntobj.process_write(cr, uid, par, data, par.context.context)
elif self.mode == 'a':
raise NotImplementedError
cr.commit()
except Exception, e:
except Exception:
logging.getLogger('document.content').exception('Cannot update db content #%d for close:', par.cnt_id)
raise
finally:

View File

@ -35,7 +35,7 @@ for fname in args:
for line in res[:5]:
print line
except Exception,e:
import traceback,sys
import traceback
tb_s = reduce(lambda x, y: x+y, traceback.format_exception( sys.exc_type, sys.exc_value, sys.exc_traceback))

View File

@ -1,9 +1,8 @@
# -*- encoding: utf-8 -*-
import os
import time
from tarfile import filemode
import StringIO
import base64
import logging
import errno
@ -12,12 +11,11 @@ import fnmatch
import pooler
import netsvc
import os
from service import security
from osv import osv
#from document.nodes import node_res_dir, node_res_obj
from document.nodes import get_node_context
import stat
def _get_month_name(month):
month=int(month)
@ -165,7 +163,7 @@ class abstracted_fs(object):
return ret
except EnvironmentError:
raise
except Exception,e:
except Exception:
self._log.exception('Cannot create item %s at node %s', objname, repr(node))
raise OSError(1, 'Operation not permited.')
@ -177,7 +175,7 @@ class abstracted_fs(object):
try:
res = node.open_data(cr, mode)
cr.commit()
except TypeError, e:
except TypeError:
raise IOError(errno.EINVAL, "No data")
return res
@ -188,12 +186,11 @@ class abstracted_fs(object):
name. Unlike mkstemp it returns an object with a file-like
interface.
"""
raise NotImplementedError
raise NotImplementedError # TODO
text = not 'b' in mode
# for unique file , maintain version if duplicate file
if dir:
# TODO
cr = dir.cr
uid = dir.uid
pool = pooler.get_pool(node.context.dbname)
@ -234,7 +231,7 @@ class abstracted_fs(object):
cdir = node.create_child_collection(cr, basename)
self._log.debug("Created child dir: %r", cdir)
cr.commit()
except Exception,e:
except Exception:
self._log.exception('Cannot create dir "%s" at node %s', basename, repr(node))
raise OSError(1, 'Operation not permited.')
@ -405,7 +402,7 @@ class abstracted_fs(object):
cr.commit()
except EnvironmentError:
raise
except Exception, err:
except Exception:
self._log.exception('Cannot rename "%s" to "%s" at "%s"', src, datacr[2], datacr[1])
raise OSError(1,'Operation not permited.')

View File

@ -121,15 +121,9 @@ import tempfile
import warnings
import random
import stat
from collections import deque
from tarfile import filemode
try:
import pwd
import grp
except ImportError:
pwd = grp = None
LOG_ACTIVE = True
__all__ = ['proto_cmds', 'Error', 'log', 'logline', 'logerror', 'DummyAuthorizer',
@ -192,24 +186,6 @@ proto_cmds = {
}
# hack around format_exc function of traceback module to grant
# backward compatibility with python < 2.4
if not hasattr(traceback, 'format_exc'):
try:
import cStringIO as StringIO
except ImportError:
import StringIO
def _format_exc():
f = StringIO.StringIO()
traceback.print_exc(file=f)
data = f.getvalue()
f.close()
return data
traceback.format_exc = _format_exc
def _strerror(err):
"""A wrap around os.strerror() which may be not available on all
platforms (e.g. pythonCE).
@ -590,16 +566,6 @@ class ActiveDTP(asyncore.dispatcher):
self.cmd_channel.respond("425 Can't connect to specified address.")
self.close()
try:
from collections import deque
except ImportError:
# backward compatibility with Python < 2.4 by replacing deque with a list
class deque(list):
def appendleft(self, obj):
list.insert(self, 0, obj)
class DTPHandler(asyncore.dispatcher):
"""Class handling server-data-transfer-process (server-DTP, see
RFC-959) managing data-transfer operations involving sending
@ -1227,21 +1193,9 @@ class AbstractedFS:
if not nlinks: # non-posix system, let's use a bogus value
nlinks = 1
size = st.st_size # file size
if pwd and grp:
# get user and group name, else just use the raw uid/gid
try:
uname = pwd.getpwuid(st.st_uid).pw_name
except KeyError:
uname = st.st_uid
try:
gname = grp.getgrgid(st.st_gid).gr_name
except KeyError:
gname = st.st_gid
else:
# on non-posix systems the only chance we use default
# bogus values for owner and group
uname = "owner"
gname = "group"
uname = st.st_uid or "owner"
gname = st.st_gid or "group"
# stat.st_mtime could fail (-1) if last mtime is too old
# in which case we return the local time as last mtime
try:
@ -1438,7 +1392,7 @@ class FTPHandler(asynchat.async_chat):
"""
try:
asynchat.async_chat.__init__(self, conn=conn) # python2.5
except TypeError, e:
except TypeError:
asynchat.async_chat.__init__(self, sock=conn) # python2.6
self.server = server
self.remote_ip, self.remote_port = self.socket.getpeername()[:2]
@ -1469,13 +1423,10 @@ class FTPHandler(asynchat.async_chat):
# mlsx facts attributes
self.current_facts = ['type', 'perm', 'size', 'modify']
if os.name == 'posix':
self.current_facts.append('unique')
self.current_facts.append('unique')
self.available_facts = self.current_facts[:]
if pwd and grp:
self.available_facts += ['unix.mode', 'unix.uid', 'unix.gid']
if os.name == 'nt':
self.available_facts.append('create')
self.available_facts += ['unix.mode', 'unix.uid', 'unix.gid']
self.available_facts.append('create')
# dtp attributes
self.data_server = None
@ -1866,7 +1817,7 @@ class FTPHandler(asynchat.async_chat):
self.respond('%s %s.' % (str(ret_code), why))
raise FTPExceptionSent(why)
except Exception, e:
except Exception, err:
cmdname = function.__name__
try:
logerror(traceback.format_exc())
@ -2003,7 +1954,7 @@ class FTPHandler(asynchat.async_chat):
assert len(octs) == 4
for x in octs:
assert 0 <= x <= 255
except (AssertionError, ValueError, OverflowError), err:
except (AssertionError, ValueError, OverflowError):
self.respond("501 Invalid EPRT format.")
else:
self._make_eport(ip, port)

View File

@ -20,8 +20,9 @@
##############################################################################
from osv import osv, fields
from tools.translate import _
# from tools.translate import _
from document_ftp import ftpserver
class document_ftp_browse(osv.osv_memory):
_name = 'document.ftp.browse'
_description = 'Document FTP Browse'
@ -35,8 +36,8 @@ class document_ftp_browse(osv.osv_memory):
if 'url' in fields:
user_pool = self.pool.get('res.users')
current_user = user_pool.browse(cr, uid, uid, context=context)
dir_pool = self.pool.get('document.directory')
data_pool = self.pool.get('ir.model.data')
# dir_pool = self.pool.get('document.directory')
data_pool = self.pool.get('ir.model.data')
aid = data_pool._get_id(cr, uid, 'document_ftp', 'action_document_browse')
aid = data_pool.browse(cr, uid, aid, context=context).res_id
ftp_url = self.pool.get('ir.actions.url').browse(cr, uid, aid, context=context)
@ -50,12 +51,12 @@ class document_ftp_browse(osv.osv_memory):
def browse_ftp(self, cr, uid, ids, context):
data_id = ids and ids[0] or False
data = self.browse(cr, uid, data_id, context)
data = self.browse(cr, uid, data_id, context)
final_url = data.url
return {
'type': 'ir.actions.act_url',
'url':final_url,
'target': 'new'
}
document_ftp_browse()

View File

@ -19,14 +19,8 @@
#
##############################################################################
import base64
from osv import osv, fields
from osv.orm import except_orm
from tools import config
import urlparse
import os
class document_ftp_configuration(osv.osv_memory):
@ -46,10 +40,10 @@ class document_ftp_configuration(osv.osv_memory):
def execute(self, cr, uid, ids, context=None):
conf = self.browse(cr, uid, ids[0], context)
dir_pool = self.pool.get('document.directory')
data_pool = self.pool.get('ir.model.data')
data_pool = self.pool.get('ir.model.data')
# Update the action for FTP browse.
aid = data_pool._get_id(cr, uid, 'document_ftp', 'action_document_browse')
aid = data_pool.browse(cr, uid, aid, context=context).res_id
self.pool.get('ir.actions.url').write(cr, uid, [aid], {'url': 'ftp://'+(conf.host or 'localhost:8021')+'/'})
document_ftp_configuration()

View File

@ -54,25 +54,16 @@ class document_ics_crm_wizard(osv.osv_memory):
_columns = {
'name':fields.char('Name', size=64),
'meeting': fields.boolean('Calendar of Meetings', help="Manages the calendar \
of meetings of the users."),
'lead': fields.boolean('Leads', help="Allows you to track and manage leads \
which are pre-sales requests or contacts, the very first contact with a customer request."),
'opportunity': fields.boolean('Business Opportunities', help="Tracks identified \
business opportunities for your sales pipeline."),
'jobs': fields.boolean('Jobs Hiring Process', help="Helps you to organise the jobs\
hiring process: evaluation, meetings, email integration..."),
'document_ics':fields.boolean('Shared Calendar', help=" Will allow you to synchronise \
your OpenERP calendars with your phone, outlook, Sunbird, ical, ..."),
'bugs': fields.boolean('Bug Tracking', help="Used by companies to track bugs and \
support requests on software"),
'meeting': fields.boolean('Calendar of Meetings', help="Manages the calendar of meetings of the users."),
'lead': fields.boolean('Leads', help="Allows you to track and manage leads which are pre-sales requests or contacts, the very first contact with a customer request."),
'opportunity': fields.boolean('Business Opportunities', help="Tracks identified business opportunities for your sales pipeline."),
'jobs': fields.boolean('Jobs Hiring Process', help="Helps you to organise the jobs hiring process: evaluation, meetings, email integration..."),
'document_ics':fields.boolean('Shared Calendar', help=" Will allow you to synchronise your Open ERP calendars with your phone, outlook, Sunbird, ical, ..."),
'bugs': fields.boolean('Bug Tracking', help="Used by companies to track bugs and support requests on software"),
'helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."),
'fund': fields.boolean('Fund Raising Operations', help="This may help associations in \
their fund raising process and tracking."),
'claims': fields.boolean('Claims', help="Manages the supplier and customers claims,\
including your corrective or preventive actions."),
'phonecall': fields.boolean('Phone Calls', help="Helps you to encode the result of \
a phone call or to plan a list of phone calls to process."),
'fund': fields.boolean('Fund Raising Operations', help="This may help associations in their fund raising process and tracking."),
'claims': fields.boolean('Claims', help="Manages the supplier and customers claims,including your corrective or preventive actions."),
'phonecall': fields.boolean('Phone Calls', help="Helps you to encode the result of a phone call or to plan a list of phone calls to process."),
}
_defaults = {
'meeting': lambda *args: True,

View File

@ -129,6 +129,7 @@ class openerp_dav_handler(dav_interface):
raise default_exc(err.strerror)
except Exception,e:
import traceback
if cr: cr.close()
self.parent.log_error("Cannot %s: %s", opname, str(e))
self.parent.log_message("Exc: %s",traceback.format_exc())
raise default_exc("Operation failed")
@ -522,7 +523,6 @@ class openerp_dav_handler(dav_interface):
def put(self, uri, data, content_type=None):
""" put the object into the filesystem """
self.parent.log_message('Putting %s (%d), %s'%( misc.ustr(uri), data and len(data) or 0, content_type))
parent='/'.join(uri.split('/')[:-1])
cr, uid, pool,dbname, uri2 = self.get_cr(uri)
if not dbname:
if cr: cr.close()
@ -535,20 +535,44 @@ class openerp_dav_handler(dav_interface):
objname = uri2[-1]
ext = objname.find('.') >0 and objname.split('.')[1] or False
ret = None
if not node:
dir_node = self.uri2object(cr, uid, pool, uri2[:-1])
if not dir_node:
cr.close()
raise DAV_NotFound('Parent folder not found')
self._try_function(dir_node.create_child, (cr, objname, data),
newchild = self._try_function(dir_node.create_child, (cr, objname, data),
"create %s" % objname, cr=cr)
if not newchild:
cr.commit()
cr.close()
raise DAV_Error(400, "Failed to create resource")
uparts=urlparse.urlparse(uri)
fileloc = '/'.join(newchild.full_path())
if isinstance(fileloc, unicode):
fileloc = fileloc.encode('utf-8')
# the uri we get is a mangled one, where the davpath has been removed
davpath = self.parent.get_davpath()
surl = '%s://%s' % (uparts[0], uparts[1])
uloc = urllib.quote(fileloc)
hurl = False
if uri != ('/'+uloc) and uri != (surl + '/' + uloc):
hurl = '%s%s/%s/%s' %(surl, davpath, dbname, uloc)
etag = False
try:
etag = str(newchild.get_etag(cr))
except Exception, e:
self.parent.log_error("Cannot get etag for node: %s" % e)
ret = (hurl, etag)
else:
self._try_function(node.set_data, (cr, data), "save %s" % objname, cr=cr)
cr.commit()
cr.close()
return 201
return ret
def rmcol(self,uri):
""" delete a collection """

View File

@ -24,8 +24,15 @@ import xml.dom.minidom
domimpl = xml.dom.minidom.getDOMImplementation()
import urlparse
import urllib
from DAV import utils
from DAV.propfind import PROPFIND
from osv import osv
try:
from DAV import utils
from DAV.propfind import PROPFIND
except ImportError:
raise osv.except_osv('PyWebDAV Import Error!','Please install PyWebDAV \
from http://code.google.com/p/pywebdav/downloads/detail?name=PyWebDAV-0.9.4.tar.gz&can=2&q=/')
import tools

View File

@ -214,14 +214,21 @@ class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
return self.send_status(ec)
headers = {}
etag = None
if location and isinstance(location, tuple):
etag = location[1]
location = location[0]
# note that we have allowed for > 2 elems
if location:
headers['Location'] = location
try:
etag = dc.get_prop(location or uri, "DAV:", "getetag")
headers['ETag'] = etag
except:
pass
else:
try:
if not etag:
etag = dc.get_prop(location or uri, "DAV:", "getetag")
if etag:
headers['ETag'] = str(etag)
except Exception:
pass
self.send_body(None, '201', 'Created', '', headers=headers)

View File

@ -2,8 +2,8 @@
<openerp>
<data>
<menuitem name="Tools" id="base.menu_tools" icon="STOCK_PREFERENCES" sequence="28"/>
<menuitem name="Emails" id="base.menu_emails" parent="base.menu_tools" sequence="5"/>
<menuitem name="Marketing" icon="terp-crm" id="base.marketing_menu" sequence="17" groups="base.group_system,base.res_groups_email_template_admin"/>
<menuitem name="Emails" id="base.menu_emails" parent="base.marketing_menu" sequence="5"/>
<menuitem name="Email Template" id="menu_email_template" parent="base.menu_emails"/>
<record model="ir.ui.view" id="email_template_account_form">
@ -96,8 +96,8 @@
<field name="search_view_id" ref="view_email_template_account_search"/>
</record>
<menuitem name="Configuration" parent="base.menu_tools"
id="base.menu_lunch_survey_root" sequence="20"/>
<menuitem name="Configuration" parent="base.marketing_menu"
id="base.menu_lunch_survey_root" sequence="20" groups="base.group_system"/>
<menuitem name="Emails" id="menu_email_template_configuration" parent="base.menu_lunch_survey_root" />
<menuitem name="Email Accounts" id="menu_email_template_account_all" parent="menu_email_template_configuration" action="action_email_template_account_tree_all"/>

View File

@ -24,7 +24,7 @@
'name': 'Event',
'version': '0.1',
'category': 'Generic Modules/Association',
'description': """Organization and management of events.
'description': """Oraganization and management of Event.
This module allow you
* to manage your events and their registrations

View File

@ -26,5 +26,4 @@ import installer
import report
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -19,7 +19,6 @@
#
##############################################################################
{
"name": "Human Resources",
"version": "1.1",
@ -34,7 +33,7 @@
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['base', 'process', 'resource','board'],
'depends': ['resource', 'board'],
'init_xml': [],
'update_xml': [
'security/hr_security.xml',
@ -55,4 +54,4 @@
'active': False,
'certificate': '0086710558965',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -129,7 +129,7 @@ class hr_employee(osv.osv):
'parent_id': fields.related('department_id', 'manager_id', relation='hr.employee', string='Manager', type='many2one', store=True, select=True),
'category_ids': fields.many2many('hr.employee.category', 'employee_category_rel','category_id','emp_id','Category'),
'child_ids': fields.one2many('hr.employee', 'parent_id', 'Subordinates'),
'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade'),
'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade', required=True),
'coach_id': fields.many2one('hr.employee', 'Coach'),
'job_id': fields.many2one('hr.job', 'Job'),
'photo': fields.binary('Photo')

View File

@ -19,7 +19,7 @@
#
##############################################################################
from osv import fields,osv
from osv import fields, osv
import tools
class hr_department(osv.osv):

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-07 09:39+0000\n"
"PO-Revision-Date: 2010-08-12 05:47+0000\n"
"Last-Translator: OpenERP Administrators <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: 2010-08-12 04:03+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 05:46+0000\n"
"PO-Revision-Date: 2010-08-12 05:30+0000\n"
"Last-Translator: adsiz_1029@hotmail.com <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: 2010-08-12 04:03+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr

View File

@ -30,10 +30,10 @@
actions(Sign in/Sign out) performed by them.
""",
'author': 'OpenERP SA',
'depends': ['base', 'hr'],
'depends': ['hr'],
'update_xml': [
'security/hr_security.xml',
'security/ir.model.access.csv',
'security/ir.model.access.csv',
'hr_attendance_view.xml',
'hr_attendance_wizard.xml',
'hr_attendance_report.xml',

View File

@ -34,6 +34,7 @@ class hr_action_reason(osv.osv):
_defaults = {
'action_type': 'sign_in',
}
hr_action_reason()
def _employee_get(obj, cr, uid, context=None):
@ -59,7 +60,7 @@ class hr_attendance(osv.osv):
_columns = {
'name': fields.datetime('Date', required=True, select=1),
'action': fields.selection([('sign_in', 'Sign In'), ('sign_out', 'Sign Out'), ('action','Action')], 'Action', required=True),
'action_desc': fields.many2one("hr.action.reason", "Action reason", domain="[('action_type', '=', action)]", help='Specifies the reason for Signing In/Signing Out in case of extra hours.'),
'action_desc': fields.many2one("hr.action.reason", "Action Reason", domain="[('action_type', '=', action)]", help='Specifies the reason for Signing In/Signing Out in case of extra hours.'),
'employee_id': fields.many2one('hr.employee', "Employee's Name", required=True, select=True),
'day': fields.function(_day_compute, method=True, type='char', string='Day', store=True, select=1, size=32),
}
@ -86,6 +87,7 @@ class hr_attendance(osv.osv):
_constraints = [(_altern_si_so, 'Error: Sign in (resp. Sign out) must follow Sign out (resp. Sign in)', ['action'])]
_order = 'name desc'
hr_attendance()
class hr_employee(osv.osv):
@ -144,16 +146,14 @@ class hr_employee(osv.osv):
raise osv.except_osv(_('Warning'), _('You tried to %s with a date anterior to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,))
res = {'action': type, 'employee_id': emp['id']}
if dt:
res['name'] = dt
id = obj_attendance.create(cr, uid, res, context=context)
if type != 'action':
return id
return True
hr_employee()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -29,11 +29,11 @@ class hr_attendance_bymonth(osv.osv_memory):
_columns = {
'month': fields.selection([(1, 'January'), (2, 'February'), (3, 'March'), (4, 'April'), (5, 'May'), (6, 'June'), (7, 'July'), (8, 'August'), (9, 'September'), (10, 'October'), (11, 'November'), (12, 'December')], 'Month', required=True),
'year': fields.integer('Year', required=True)
}
}
_defaults = {
'month': time.gmtime()[1],
'year': time.gmtime()[0],
}
}
def print_report(self, cr, uid, ids, context=None):
if context is None:
@ -42,13 +42,13 @@ class hr_attendance_bymonth(osv.osv_memory):
'ids': [],
'model': 'hr.employee',
'form': self.read(cr, uid, ids)[0]
}
}
return {
'type': 'ir.actions.report.xml',
'report_name': 'hr.attendance.bymonth',
'datas': datas,
}
}
hr_attendance_bymonth()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -28,11 +28,11 @@ class hr_attendance_byweek(osv.osv_memory):
_columns = {
'init_date': fields.date('Starting Date', required=True),
'end_date': fields.date('Ending Date', required=True)
}
}
_defaults = {
'init_date': time.strftime('%Y-%m-%d'),
'end_date': time.strftime('%Y-%m-%d'),
}
}
def print_report(self, cr, uid, ids, context=None):
if context is None:
@ -41,12 +41,12 @@ class hr_attendance_byweek(osv.osv_memory):
'ids': [],
'model': 'hr.employee',
'form': self.read(cr, uid, ids)[0]
}
}
return {
'type': 'ir.actions.report.xml',
'report_name': 'hr.attendance.allweeks',
'datas': datas,
}
}
hr_attendance_byweek()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -31,12 +31,12 @@ class hr_attendance_error(osv.osv_memory):
'init_date': fields.date('Starting Date', required=True),
'end_date': fields.date('Ending Date', required=True),
'max_delay': fields.integer('Max. Delay (Min)', required=True)
}
}
_defaults = {
'init_date': time.strftime('%Y-%m-%d'),
'end_date': time.strftime('%Y-%m-%d'),
'max_delay': 120,
}
}
def print_report(self, cr, uid, ids, context=None):
if context is None:
@ -59,13 +59,13 @@ class hr_attendance_error(osv.osv_memory):
'ids': [],
'model': 'hr.employee',
'form': data_error
}
}
return {
'type': 'ir.actions.report.xml',
'report_name': 'hr.attendance.error',
'datas': datas,
}
}
hr_attendance_error()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -192,4 +192,4 @@ class hr_sign_in_out(osv.osv_memory):
hr_sign_in_out()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -286,7 +286,7 @@ class hr_evaluation_interview(osv.osv):
_inherits = {'survey.request': 'request_id'}
_description = 'Evaluation Interview'
_columns = {
'request_id': fields.many2one('survey.request','Request_id', ondelete='cascade'),
'request_id': fields.many2one('survey.request','Request_id', ondelete='cascade', required=True),
'user_to_review_id': fields.many2one('hr.employee', 'Employee to Interview'),
'evaluation_id': fields.many2one('hr_evaluation.evaluation', 'Evaluation Type'),
}

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 05:42+0000\n"
"PO-Revision-Date: 2010-08-12 05:43+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.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: 2010-08-12 04:01+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_expense

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 05:42+0000\n"
"PO-Revision-Date: 2010-08-12 05:42+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.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: 2010-08-12 04:02+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_holidays

View File

@ -43,7 +43,7 @@ class hr_analytic_timesheet(osv.osv):
_inherits = {'account.analytic.line': 'line_id'}
_order = "id desc"
_columns = {
'line_id' : fields.many2one('account.analytic.line', 'Analytic line', ondelete='cascade'),
'line_id' : fields.many2one('account.analytic.line', 'Analytic line', ondelete='cascade', required=True),
'partner_id': fields.related('account_id', 'partner_id', type='many2one', string='Partner Id', relation='account.analytic.account', store=True),
}
@ -160,4 +160,4 @@ class hr_analytic_timesheet(osv.osv):
}}
hr_analytic_timesheet()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 04:42+0000\n"
"PO-Revision-Date: 2010-08-12 06:09+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.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: 2010-08-12 03:59+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_timesheet_invoice

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 05:14+0000\n"
"PO-Revision-Date: 2010-08-12 05:43+0000\n"
"Last-Translator: OpenERP Administrators <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: 2010-08-12 03:59+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_timesheet_sheet

View File

@ -36,12 +36,13 @@
'depends': ['base'],
'init_xml': [],
'update_xml': [
'security/idea_security.xml',
'security/ir.model.access.csv',
'wizard/idea_post_vote_view.xml',
'idea_view.xml',
'idea_workflow.xml',
'report/report_vote_view.xml',
'security/idea_security.xml',
'security/ir.model.access.csv',
],
'demo_xml': [
"idea_data.xml"

View File

@ -383,7 +383,7 @@
<menuitem name="Idea" parent="base.menu_lunch_reporting" id="menu_idea_reporting" sequence="3"/>
<menuitem name="Vote Statistics" parent="menu_idea_reporting"
id="menu_idea_vote_stat" action="action_idea_vote_stat" />
id="menu_idea_vote_stat" action="action_idea_vote_stat" groups="base.group_tool_manager,base.group_tool_user,base.group_system"/>
<!-- Vote For Idea Action -->
<record model="ir.actions.act_window" id="action_idea_vote">

View File

@ -84,7 +84,7 @@
<field name="context">{'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
</record>
<menuitem action="action_report_vote_all" id="menu_report_vote_all" parent="menu_idea_reporting" sequence="1" groups="base.group_survey_manager"/>
<menuitem action="action_report_vote_all" id="menu_report_vote_all" parent="menu_idea_reporting" sequence="1" groups="base.group_tool_manager,base.group_system"/>
</data>
</openerp>

View File

@ -13,10 +13,10 @@
<field name="name">Sales / User</field>
</record>
<record model="res.groups" id="base.group_survey_manager">
<record model="res.groups" id="base.group_tool_manager">
<field name="name">Tools / Manager</field>
</record>
<record model="res.groups" id="base.group_survey_user">
<record model="res.groups" id="base.group_tool_user">
<field name="name">Tools / User</field>
</record>

View File

@ -9,14 +9,17 @@
"access_report_vote","report.vote","model_report_vote","base.group_user",1,1,1,1
"access_idea_idea_sale_salesman","idea.idea.sale","model_idea_idea","base.group_sale_salesman",1,1,1,1
"access_idea_vote_sale_salesman","idea.vote.sale","model_idea_vote","base.group_sale_salesman",1,1,1,1
"access_idea_category_user","idea.category user","model_idea_category","base.group_survey_user",1,1,1,1
"access_idea_idea_user","idea.idea user","model_idea_idea","base.group_survey_user",1,1,1,1
"access_idea_vote_user","idea.vote user","model_idea_vote","base.group_survey_user",1,1,1,1
"access_idea_category_manager","idea.category manager","model_idea_category","base.group_survey_manager",1,0,0,0
"access_idea_idea_manager","idea.idea manager","model_idea_idea","base.group_survey_manager",1,0,0,0
"access_idea_vote_manager","idea.vote manager","model_idea_vote","base.group_survey_manager",1,0,0,0
"access_idea_vote_stat_user","idea.vote.stat user","model_idea_vote_stat","base.group_survey_user",1,1,1,1
"access_idea_comment_user","idea.comment user","model_idea_comment","base.group_survey_user",1,1,1,1
"access_report_vote_manager","report.vote manager","model_report_vote","base.group_survey_manager",1,1,1,1
"access_idea_category_user","idea.category user","model_idea_category","base.group_tool_user",1,1,1,1
"access_idea_idea_user","idea.idea user","model_idea_idea","base.group_tool_user",1,1,1,1
"access_idea_vote_user","idea.vote user","model_idea_vote","base.group_tool_user",1,1,1,1
"access_idea_category_manager","idea.category manager","model_idea_category","base.group_tool_manager",1,0,0,0
"access_idea_idea_manager","idea.idea manager","model_idea_idea","base.group_tool_manager",1,0,0,0
"access_idea_vote_manager","idea.vote manager","model_idea_vote","base.group_tool_manager",1,0,0,0
"access_idea_vote_stat_user","idea.vote.stat user","model_idea_vote_stat","base.group_tool_user",1,1,1,1
"access_idea_comment_user","idea.comment user","model_idea_comment","base.group_tool_user",1,1,1,1
"access_report_vote_manager","report.vote manager","model_report_vote","base.group_tool_manager",1,1,1,1
"access_idea_idea_system","idea.idea system","model_idea_idea","base.group_system",1,0,0,0
"access_idea_vote_system","idea.vote system","model_idea_vote","base.group_system",1,0,0,0
"access_report_vote_system","report.vote system","model_report_vote","base.group_system",1,0,0,0
"access_idea_vote_stat_manager","idea.vote.stat manager","model_idea_vote_stat","base.group_tool_manager",1,1,1,1
"access_idea_vote_stat_system","idea.vote.stat system","model_idea_vote_stat","base.group_system",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
9 access_report_vote report.vote model_report_vote base.group_user 1 1 1 1
10 access_idea_idea_sale_salesman idea.idea.sale model_idea_idea base.group_sale_salesman 1 1 1 1
11 access_idea_vote_sale_salesman idea.vote.sale model_idea_vote base.group_sale_salesman 1 1 1 1
12 access_idea_category_user idea.category user model_idea_category base.group_survey_user base.group_tool_user 1 1 1 1
13 access_idea_idea_user idea.idea user model_idea_idea base.group_survey_user base.group_tool_user 1 1 1 1
14 access_idea_vote_user idea.vote user model_idea_vote base.group_survey_user base.group_tool_user 1 1 1 1
15 access_idea_category_manager idea.category manager model_idea_category base.group_survey_manager base.group_tool_manager 1 0 0 0
16 access_idea_idea_manager idea.idea manager model_idea_idea base.group_survey_manager base.group_tool_manager 1 0 0 0
17 access_idea_vote_manager idea.vote manager model_idea_vote base.group_survey_manager base.group_tool_manager 1 0 0 0
18 access_idea_vote_stat_user idea.vote.stat user model_idea_vote_stat base.group_survey_user base.group_tool_user 1 1 1 1
19 access_idea_comment_user idea.comment user model_idea_comment base.group_survey_user base.group_tool_user 1 1 1 1
20 access_report_vote_manager report.vote manager model_report_vote base.group_survey_manager base.group_tool_manager 1 1 1 1
21 access_idea_idea_system idea.idea system model_idea_idea base.group_system 1 0 0 0
22 access_idea_vote_system idea.vote system model_idea_vote base.group_system 1 0 0 0
23 access_report_vote_system report.vote system model_report_vote base.group_system 1 0 0 0
24 access_idea_vote_stat_manager idea.vote.stat manager model_idea_vote_stat base.group_tool_manager 1 1 1 1
25 access_idea_vote_stat_system idea.vote.stat system model_idea_vote_stat base.group_system 1 1 1 1

View File

@ -6,14 +6,16 @@
"access_lunch_order","lunch.order","model_lunch_order","base.group_user",1,1,1,1
"access_report_lunch_amount","report.lunch.amount","model_report_lunch_amount","base.group_user",1,1,1,1
"access_lunch_order_sale_salesman","lunch.order.sale","model_lunch_order","base.group_sale_salesman",1,1,1,1
"access_lunch_order_user","lunch.order user","model_lunch_order","base.group_survey_user",1,1,1,1
"access_lunch_order_manager","lunch.order manager","model_lunch_order","base.group_survey_manager",1,0,0,0
"access_lunch_cashmove_user","lunch.cashmove user","model_lunch_cashmove","base.group_survey_user",1,1,1,1
"access_lunch_cashmove_manager","lunch.cashmove manager","model_lunch_cashmove","base.group_survey_manager",1,0,0,0
"access_report_lunch_amount_manager","report.lunch.amount manager","model_report_lunch_amount","base.group_survey_manager",1,1,1,1
"access_lunch_order_user","lunch.order user","model_lunch_order","base.group_tool_user",1,1,1,1
"access_lunch_order_manager","lunch.order manager","model_lunch_order","base.group_tool_manager",1,0,0,0
"access_lunch_cashmove_user","lunch.cashmove user","model_lunch_cashmove","base.group_tool_user",1,1,1,1
"access_lunch_cashmove_manager","lunch.cashmove manager","model_lunch_cashmove","base.group_tool_manager",1,0,0,0
"access_report_lunch_amount_manager","report.lunch.amount manager","model_report_lunch_amount","base.group_tool_manager",1,1,1,1
"access_lunch_category_system","lunch.category system","model_lunch_category","base.group_system",1,1,1,1
"access_lunch_product_system","lunch.product system","model_lunch_product","base.group_system",1,1,1,1
"access_lunch_cashbox_system","lunch.cashbox system","model_lunch_cashbox","base.group_system",1,1,1,1
"access_lunch_order_system","lunch.order system","model_lunch_order","base.group_system",1,0,0,0
"access_lunch_cashmove_system","lunch.cashmove system","model_lunch_cashmove","base.group_system",1,0,0,0
"access_report_lunch_order_manager","report.lunch.order manager","model_report_lunch_order","base.group_survey_manager",1,1,1,1
"access_report_lunch_order_manager","report.lunch.order manager","model_report_lunch_order","base.group_tool_manager",1,1,1,1
"access_lunch_product_user","lunch.product user","model_lunch_product","base.group_tool_user",1,1,1,1
"access_lunch_cashbox_user","lunch.cashbox user","model_lunch_cashbox","base.group_tool_user",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
6 access_lunch_order lunch.order model_lunch_order base.group_user 1 1 1 1
7 access_report_lunch_amount report.lunch.amount model_report_lunch_amount base.group_user 1 1 1 1
8 access_lunch_order_sale_salesman lunch.order.sale model_lunch_order base.group_sale_salesman 1 1 1 1
9 access_lunch_order_user lunch.order user model_lunch_order base.group_survey_user base.group_tool_user 1 1 1 1
10 access_lunch_order_manager lunch.order manager model_lunch_order base.group_survey_manager base.group_tool_manager 1 0 0 0
11 access_lunch_cashmove_user lunch.cashmove user model_lunch_cashmove base.group_survey_user base.group_tool_user 1 1 1 1
12 access_lunch_cashmove_manager lunch.cashmove manager model_lunch_cashmove base.group_survey_manager base.group_tool_manager 1 0 0 0
13 access_report_lunch_amount_manager report.lunch.amount manager model_report_lunch_amount base.group_survey_manager base.group_tool_manager 1 1 1 1
14 access_lunch_category_system lunch.category system model_lunch_category base.group_system 1 1 1 1
15 access_lunch_product_system lunch.product system model_lunch_product base.group_system 1 1 1 1
16 access_lunch_cashbox_system lunch.cashbox system model_lunch_cashbox base.group_system 1 1 1 1
17 access_lunch_order_system lunch.order system model_lunch_order base.group_system 1 0 0 0
18 access_lunch_cashmove_system lunch.cashmove system model_lunch_cashmove base.group_system 1 0 0 0
19 access_report_lunch_order_manager report.lunch.order manager model_report_lunch_order base.group_survey_manager base.group_tool_manager 1 1 1 1
20 access_lunch_product_user lunch.product user model_lunch_product base.group_tool_user 1 1 1 1
21 access_lunch_cashbox_user lunch.cashbox user model_lunch_cashbox base.group_tool_user 1 1 1 1

View File

@ -5,10 +5,10 @@
<record id="base.group_sale_salesman" model="res.groups">
<field name="name">Sales / User</field>
</record>
<record model="res.groups" id="base.group_survey_manager">
<record model="res.groups" id="base.group_tool_manager">
<field name="name">Tools / Manager</field>
</record>
<record model="res.groups" id="base.group_survey_user">
<record model="res.groups" id="base.group_tool_user">
<field name="name">Tools / User</field>
</record>

View File

@ -44,6 +44,28 @@ class mailgate_thread(osv.osv):
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', readonly=True),
}
def copy(self, cr, uid, id, default=None, context=None):
"""
Overrides orm copy method.
@param self: the object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param id: Id of mailgate thread
@param default: Dictionary of default values for copy.
@param context: A standard dictionary for contextual values
"""
if context is None:
context = {}
if default is None:
default = {}
default.update({
'message_ids': [],
'date_closed': False,
'date_open': False
})
return super(mailgate_thread, self).copy(cr, uid, id, default, context=context)
def message_new(self, cr, uid, msg, context):
raise Exception, _('Method is not implemented')
@ -83,7 +105,7 @@ class mailgate_thread(osv.osv):
@param email_cc: Comma-Separated list of Carbon Copy Emails To addresse if any
@param email_bcc: Comma-Separated list of Blind Carbon Copy Emails To addresses if any
@param email_date: Email Date string if different from now, in server Timezone
@param details: Description, Ddtails of case history if any
@param details: Description, Details of case history if any
@param atach: Attachment sent in email
@param context: A standard dictionary for contextual values"""
if context is None:

View File

@ -8,3 +8,6 @@
"access_marketing_campaign_workitem_all","marketing.campaign.workitem","model_marketing_campaign_workitem","base.group_user",1,0,0,0
"access_email_template_user","email.template","model_email_template","base.res_groups_email_template_admin",1,1,1,1
"access_email_template_account_user","email_template.account.user","email_template.model_email_template_account","base.res_groups_email_template_admin",1,1,1,1
"access_marketing_campaign_system","marketing.campaign system","model_marketing_campaign","base.group_system",1,0,0,0
"access_marketing_campaign_segment_system","marketing.campaign.segment system","model_marketing_campaign_segment","base.group_system",1,0,0,0
"access_marketing_campaign_workitem_system","marketing.campaign.workitem system","model_marketing_campaign_workitem","base.group_system",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
8 access_marketing_campaign_workitem_all marketing.campaign.workitem model_marketing_campaign_workitem base.group_user 1 0 0 0
9 access_email_template_user email.template model_email_template base.res_groups_email_template_admin 1 1 1 1
10 access_email_template_account_user email_template.account.user email_template.model_email_template_account base.res_groups_email_template_admin 1 1 1 1
11 access_marketing_campaign_system marketing.campaign system model_marketing_campaign base.group_system 1 0 0 0
12 access_marketing_campaign_segment_system marketing.campaign.segment system model_marketing_campaign_segment base.group_system 1 0 0 0
13 access_marketing_campaign_workitem_system marketing.campaign.workitem system model_marketing_campaign_workitem base.group_system 1 0 0 0

View File

@ -41,13 +41,13 @@
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="object_name" ref="crm.model_crm_lead"/>
<field eval="0" name="use_sign"/>
<field name="def_body_text">Hello,Thanks for generous interest you have shown in the open ERP.Regards,OpenERP Team,</field>
<field name="def_body_text">Hello,Thanks for generous interest you have shown in the openERP.Regards,OpenERP Team,</field>
<field name="template_language">mako</field>
<field name="name">For OpenERP OnDemand Free Trial 2010</field>
<field name="model_int_name">crm.lead</field>
</record>
<record id="email_template_2" model="email.template">
<field name="def_subject">Propose to subscribe to the Open ERP Discovery Day on May 2010</field>
<field name="def_subject">Propose to subscribe to the OpenERP Discovery Day on May 2010</field>
<field name="def_to">info@tinyerp.com</field>
<field eval="[(6,0,[])]" name="allowed_groups"/>
<field model="ir.actions.act_window" name="ref_ir_act_window" search="[('name', '=', u'For OpenERP OnDemand Free Trial 2010 Mail Form')]"/>
@ -55,46 +55,46 @@
<field name="object_name" ref="crm.model_crm_lead"/>
<field eval="0" name="use_sign"/>
<field name="def_body_text">Hello,We have very good offer that might suit you.
We propose you to subscribe to the Open ERP Discovery Day on May 2010.
We propose you to subscribe to the OpenERP Discovery Day on May 2010.
If any further information required kindly revert back.
We really appreciate your co-operation on this.
Regards,OpenERP Team,</field>
<field name="template_language">mako</field>
<field name="name">For Open ERP Discovery Day on May 2010</field>
<field name="name">For OpenERP Discovery Day on May 2010</field>
<field name="model_int_name">crm.lead</field>
</record>
<record id="email_template_3" model="email.template">
<field name="def_subject">Thanks for subscribing to the Open ERP Discovery Day</field>
<field name="def_subject">Thanks for subscribing to the OpenERP Discovery Day</field>
<field name="def_to">info@tinyerp.com</field>
<field eval="[(6,0,[])]" name="allowed_groups"/>
<field model="ir.actions.act_window" name="ref_ir_act_window" search="[('name', '=', u'For OpenERP OnDemand Free Trial 2010 Mail Form')]"/>
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="object_name" ref="crm.model_crm_lead"/>
<field eval="0" name="use_sign"/>
<field name="def_body_text">Hello,Thanks for showing intrest and for subscribing to the Open ERP Discovery Day.
<field name="def_body_text">Hello,Thanks for showing intrest and for subscribing to the OpenERP Discovery Day.
If any further information required kindly revert back.
I really appreciate your co-operation on this.
Regards,OpenERP Team,</field>
<field name="template_language">mako</field>
<field name="name">For Open ERP Discovery Day</field>
<field name="name">For OpenERP Discovery Day</field>
<field name="model_int_name">crm.lead</field>
</record>
<record id="email_template_4" model="email.template">
<field name="def_subject">Thanks for buying the Open ERP book</field>
<field name="def_subject">Thanks for buying the OpenERP book</field>
<field name="def_to">info@tinyerp.com</field>
<field eval="[(6,0,[])]" name="allowed_groups"/>
<field model="ir.actions.act_window" name="ref_ir_act_window" search="[('name', '=', u'For OpenERP OnDemand Free Trial 2010 Mail Form')]"/>
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="object_name" ref="crm.model_crm_lead"/>
<field eval="0" name="use_sign"/>
<field name="def_body_text">Hello,Thanks for showing intrest and buying the Open ERP book.
<field name="def_body_text">Hello,Thanks for showing intrest and buying the OpenERP book.
If any further information required kindly revert back.
I really appreciate your co-operation on this.
Regards,OpenERP Team,</field>
<field name="template_language">mako</field>
<field name="name">For Open ERP book</field>
<field name="name">For OpenERP book</field>
<field name="model_int_name">crm.lead</field>
</record>
@ -203,20 +203,20 @@
</record>
<record id="marketing_campaign_activity_2" model="marketing.campaign.activity">
<field name="name">Propose to subscribe to the Open ERP Discovery Day on May 2010</field>
<field name="name">Propose to subscribe to the OpenERP Discovery Day on May 2010</field>
<field name="server_action_id" ref="action_dummy"/>
<field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_2"/>
</record>
<record id="marketing_campaign_activity_3" model="marketing.campaign.activity">
<field name="name">Thanks for subscribing to the Open ERP Discovery Day</field>
<field name="name">Thanks for subscribing to the OpenERP Discovery Day</field>
<field name="server_action_id" ref="action_dummy"/>
<field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_3"/>
</record>
<record id="marketing_campaign_activity_4" model="marketing.campaign.activity">
<field name="name">Propose to buy the Open ERP Book</field>
<field name="name">Propose to buy the OpenERP Book</field>
<field name="server_action_id" ref="action_dummy"/>
<field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="report_directory_id" ref="document_directory_campaign1"/>
@ -225,7 +225,7 @@
</record>
<record id="marketing_campaign_activity_5" model="marketing.campaign.activity">
<field name="name">Thanks for buying the Open ERP book</field>
<field name="name">Thanks for buying the OpenERP book</field>
<field name="server_action_id" ref="action_dummy"/>
<field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_4"/>

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-03 08:27+0000\n"
"Last-Translator: mga (Open ERP) <Unknown>\n"
"PO-Revision-Date: 2010-08-12 08:01+0000\n"
"Last-Translator: Anders Eriksson (Mobila System) <ae@mobilasystem.se>\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: 2010-08-12 03:44+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp
@ -47,13 +47,13 @@ msgstr "Felaktigt namn för modell i händelsedefinitionen."
#. module: mrp
#: field:mrp.bom.revision,indice:0
msgid "Revision"
msgstr ""
msgstr "Revision"
#. module: mrp
#: model:ir.actions.wizard,name:mrp.wiz_mrp_proc2
#: model:ir.ui.menu,name:mrp.menu_wiz_mrp_proc2
msgid "Compute Stock Minimum Rules Only"
msgstr ""
msgstr "Beräkna minsta lagersaldo regler"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.mrp_procurement_action5
@ -80,7 +80,7 @@ msgstr ""
#. module: mrp
#: field:mrp.production,picking_id:0
msgid "Packing list"
msgstr ""
msgstr "Packlista"
#. module: mrp
#: model:process.node,name:mrp.process_node_stock0
@ -97,7 +97,7 @@ msgstr "Ursprung"
#: model:ir.ui.menu,name:mrp.menu_mrp_configuration
#: view:res.company:0
msgid "Configuration"
msgstr "Konfiguration"
msgstr "Inställningar"
#. module: mrp
#: field:mrp.production,name:0
@ -144,7 +144,7 @@ msgstr ""
#. module: mrp
#: view:mrp.procurement:0
msgid "Product & Location"
msgstr ""
msgstr "Produkt och lagerplats"
#. module: mrp
#: view:res.company:0
@ -166,7 +166,7 @@ msgstr "Be om nya produkter"
#. module: mrp
#: model:ir.ui.menu,name:mrp.menu_mrp_reordering
msgid "Automatic Procurements"
msgstr ""
msgstr "Automatiska anskaffningar"
#. module: mrp
#: wizard_field:change_production_qty,confirm,product_qty:0
@ -174,7 +174,7 @@ msgstr ""
#: field:mrp.production,product_qty:0
#: field:mrp.production.product.line,product_qty:0
msgid "Product Qty"
msgstr "Produktkvantitet"
msgstr "Produkt antal"
#. module: mrp
#: field:mrp.production,move_lines:0
@ -209,12 +209,12 @@ msgstr ""
#. module: mrp
#: view:mrp.workcenter:0
msgid "Analytic Accounting"
msgstr ""
msgstr "Objektsredovisning"
#. module: mrp
#: model:process.node,note:mrp.process_node_servicemts0
msgid "Do nothing"
msgstr "Gör inget"
msgstr "Gör ingenting"
#. module: mrp
#: rml:mrp.production.order:0
@ -229,7 +229,7 @@ msgstr ""
#. module: mrp
#: selection:mrp.workcenter.load,init,measure_unit:0
msgid "Amount in hours"
msgstr ""
msgstr "Antal i timmar"
#. module: mrp
#: field:mrp.production,product_lines:0
@ -254,7 +254,7 @@ msgstr ""
#. module: mrp
#: field:mrp.bom,position:0
msgid "Internal Ref."
msgstr ""
msgstr "Intern ref."
#. module: mrp
#: view:mrp.procurement:0
@ -301,7 +301,7 @@ msgstr ""
#: model:ir.ui.menu,name:mrp.menu_mrp_production_action
#: view:mrp.production:0
msgid "Production Orders"
msgstr ""
msgstr "Tillverkningsorder"
#. module: mrp
#: rml:bom.structure:0
@ -309,7 +309,7 @@ msgstr ""
#: rml:mrp.production.order:0
#: wizard_field:product.product.procurement,init,qty:0
msgid "Quantity"
msgstr "Kvantitet"
msgstr "Antal"
#. module: mrp
#: selection:mrp.procurement,priority:0
@ -351,7 +351,7 @@ msgstr "Detaljer"
#. module: mrp
#: model:process.process,name:mrp.process_process_procurementprocess0
msgid "Procurement Process"
msgstr ""
msgstr "Anskaffningsprocess"
#. module: mrp
#: field:mrp.production,date_planned_date:0
@ -373,7 +373,7 @@ msgstr ""
#. module: mrp
#: rml:mrp.production.order:0
msgid "Bill Of Material"
msgstr ""
msgstr "Materiallista"
#. module: mrp
#: help:mrp.routing,location_id:0
@ -391,7 +391,7 @@ msgstr "Reservation"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.action2
msgid "Bill of Materials Structure"
msgstr ""
msgstr "Materialstruktur"
#. module: mrp
#: wizard_field:product.product.procurement,init,product_id:0
@ -490,12 +490,12 @@ msgstr ""
#. module: mrp
#: field:mrp.procurement,message:0
msgid "Latest error"
msgstr ""
msgstr "Senaste fel"
#. module: mrp
#: field:mrp.bom,bom_lines:0
msgid "BoM Lines"
msgstr ""
msgstr "Materialliste rader"
#. module: mrp
#: field:mrp.workcenter,time_start:0
@ -515,7 +515,7 @@ msgstr ""
#. module: mrp
#: constraint:mrp.bom:0
msgid "Error ! You can not create recursive BoM."
msgstr ""
msgstr "Fel! Du kan inte använda rekursiva materiallistor"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_stockmts0
@ -526,7 +526,7 @@ msgstr ""
#. module: mrp
#: field:res.company,manufacturing_lead:0
msgid "Manufacturity Lead Time"
msgstr ""
msgstr "Tillverkningsledtid"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.mrp_procurement_action4
@ -537,7 +537,7 @@ msgstr ""
#. module: mrp
#: selection:mrp.procurement,state:0
msgid "Ready"
msgstr "Redo"
msgstr "Klar"
#. module: mrp
#: view:mrp.routing:0
@ -656,23 +656,23 @@ msgstr ""
#. module: mrp
#: field:stock.warehouse.orderpoint,product_min_qty:0
msgid "Min Quantity"
msgstr ""
msgstr "Minsta antal"
#. module: mrp
#: view:mrp.production:0
msgid "Production orders"
msgstr ""
msgstr "Tillverkningsorder"
#. module: mrp
#: field:mrp.bom,child_complete_ids:0
#: field:mrp.bom,child_ids:0
msgid "BoM Hyerarchy"
msgstr ""
msgstr "Strukturhierarki"
#. module: mrp
#: view:mrp.procurement:0
msgid "Procurement Lines"
msgstr ""
msgstr "Anskaffningsrader"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_servicemts0
@ -709,7 +709,7 @@ msgstr "Ändring"
#. module: mrp
#: field:mrp.bom,type:0
msgid "BoM Type"
msgstr ""
msgstr "Strukturtyp"
#. module: mrp
#: selection:mrp.procurement,state:0
@ -747,7 +747,7 @@ msgstr ""
#. module: mrp
#: view:mrp.production:0
msgid "Production done"
msgstr ""
msgstr "Produktion avslutad"
#. module: mrp
#: rml:bom.structure:0
@ -772,7 +772,7 @@ msgstr ""
#. module: mrp
#: field:mrp.bom,bom_id:0
msgid "Parent BoM"
msgstr ""
msgstr "Överliggande struktur"
#. module: mrp
#: view:mrp.procurement:0

View File

@ -53,7 +53,7 @@ class mrp_workcenter(osv.osv):
help="Complete this only if you want automatic analytic accounting entries on production orders."),
'costs_journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal'),
'costs_general_account_id': fields.many2one('account.account', 'General Account', domain=[('type','<>','view')]),
'resource_id': fields.many2one('resource.resource','Resource',ondelete='cascade'),
'resource_id': fields.many2one('resource.resource','Resource', ondelete='cascade', required=True),
}
_defaults = {
'capacity_per_cycle': 1.0,

View File

@ -769,7 +769,7 @@
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_mrp_production_filter"/>
<field name="context">{'search_default_Current':1}</field>
<field name="help">Manufacturing Orders describe the operations that need to be carried out and the raw materials usage for each stage of production. You use specifications (bills of materials) to work out the raw material requirements and the manufacturing orders needed for the finished products. Once the bills of materials have been defined, Open ERP becomes capable of automatically deciding on the manufacturing route depending on the needs of the company.</field>
<field name="help">Manufacturing Orders describe the operations that need to be carried out and the raw materials usage for each stage of production. You use specifications (bills of materials) to work out the raw material requirements and the manufacturing orders needed for the finished products. Once the bills of materials have been defined, OpenERP becomes capable of automatically deciding on the manufacturing route depending on the needs of the company.</field>
</record>
<menuitem action="mrp_production_action" id="menu_mrp_production_action" parent="menu_mrp_manufacturing" groups="base.group_system,mrp.group_mrp_user,mrp.group_mrp_manager" sequence="1"/>
@ -780,7 +780,7 @@
<field name="view_type">form</field>
<field name="view_mode">gantt,tree,form,calendar,graph</field>
<field name="domain">[('state','in',('ready','confirmed','in_production'))]</field>
<field name="help">Manufacturing Orders describe the operations that need to be carried out and the raw materials usage for each stage of production. You use specifications (bills of materials or BoM) to work out the raw material requirements and the manufacturing orders needed for the finished products. Once the bills of materials have been defined, Open ERP becomes capable of automatically deciding on the manufacturing route depending on the needs of the company.</field>
<field name="help">Manufacturing Orders describe the operations that need to be carried out and the raw materials usage for each stage of production. You use specifications (bills of materials or BoM) to work out the raw material requirements and the manufacturing orders needed for the finished products. Once the bills of materials have been defined, OpenERP becomes capable of automatically deciding on the manufacturing route depending on the needs of the company.</field>
</record>
<record id="mrp_production_action2" model="ir.actions.act_window">

View File

@ -7,16 +7,16 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-04-10 14:08+0000\n"
"Last-Translator: <>\n"
"PO-Revision-Date: 2010-08-12 07:10+0000\n"
"Last-Translator: Anders Eriksson (Mobila System) <ae@mobilasystem.se>\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: 2010-08-12 04:07+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp_jit
#: model:ir.module.module,shortdesc:mrp_jit.module_meta_information
msgid "MRP JIT"
msgstr ""
msgstr "MRP JIT"

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-03 08:06+0000\n"
"Last-Translator: mga (Open ERP) <Unknown>\n"
"PO-Revision-Date: 2010-08-12 14:06+0000\n"
"Last-Translator: Guilherme Santos <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: 2010-08-12 04:06+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp_repair
@ -25,7 +25,7 @@ msgstr ""
#: field:mrp.repair.fee,repair_id:0
#: field:mrp.repair.line,repair_id:0
msgid "Repair Order Ref"
msgstr ""
msgstr "Referência da Ordem"
#. module: mrp_repair
#: field:mrp.repair.line,move_id:0
@ -45,12 +45,12 @@ msgstr "Valor sem impostos"
#. module: mrp_repair
#: field:mrp.repair,state:0
msgid "Repair State"
msgstr ""
msgstr "Estado do Reparo"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Printing Date"
msgstr ""
msgstr "Data de impressão"
#. module: mrp_repair
#: field:mrp.repair.fee,product_uom_qty:0
@ -61,7 +61,7 @@ msgstr "Quantidade"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Set to Draft"
msgstr ""
msgstr "Definir como Rascunho"
#. module: mrp_repair
#: selection:mrp.repair,state:0
@ -71,40 +71,40 @@ msgstr ""
#. module: mrp_repair
#: field:mrp.repair,address_id:0
msgid "Delivery Address"
msgstr ""
msgstr "Endereço de Entrega"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Make Invoice"
msgstr ""
msgstr "Faturar"
#. module: mrp_repair
#: field:mrp.repair.fee,price_subtotal:0
#: field:mrp.repair.line,price_subtotal:0
msgid "Subtotal"
msgstr "Sub-total"
msgstr "Subtotal"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Invoice address :"
msgstr "Endereço de faturamento"
msgstr "Endereço de Faturamento :"
#. module: mrp_repair
#: field:mrp.repair,guarantee_limit:0
msgid "Guarantee limit"
msgstr ""
msgstr "Limite de garantia"
#. module: mrp_repair
#: field:mrp.repair,amount_tax:0
#: field:mrp.repair.fee,tax_id:0
#: field:mrp.repair.line,tax_id:0
msgid "Taxes"
msgstr ""
msgstr "Impostos"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Net Total :"
msgstr ""
msgstr "Total Líquido"
#. module: mrp_repair
#: rml:repair.order:0
@ -114,27 +114,27 @@ msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Operations"
msgstr ""
msgstr "Operações"
#. module: mrp_repair
#: field:mrp.repair,move_id:0
msgid "Move"
msgstr ""
msgstr "Movimento"
#. module: mrp_repair
#: model:ir.actions.act_window,name:mrp_repair.action_repair_order_tree
msgid "Repair Orders"
msgstr "Ordens de Serviços"
msgstr "Ordens de Reparo"
#. module: mrp_repair
#: model:ir.actions.report.xml,name:mrp_repair.report_mrp_repair
msgid "Quotation / Order"
msgstr ""
msgstr "Cotação / Ordem"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Extra Info"
msgstr ""
msgstr "Info. Extra"
#. module: mrp_repair
#: field:mrp.repair,partner_id:0
@ -145,39 +145,39 @@ msgstr "Parceiro"
#: model:ir.actions.act_window,name:mrp_repair.action_repair_quotation_tree
#: model:ir.ui.menu,name:mrp_repair.menu_repair_quotation
msgid "Repairs in quotation"
msgstr "Ordens de Serviços em Orçamento"
msgstr "Reparos em cotação"
#. module: mrp_repair
#: selection:mrp.repair,state:0
#: selection:mrp.repair.line,state:0
msgid "Confirmed"
msgstr ""
msgstr "Confirmado"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Recreate Invoice"
msgstr ""
msgstr "Recriar Fatura"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Repairs order"
msgstr ""
msgstr "Ordens de Reparo"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Repair Order N° :"
msgstr ""
msgstr "Ordem de Reparo N° :"
#. module: mrp_repair
#: field:mrp.repair,prodlot_id:0
#: rml:repair.order:0
msgid "Lot Number"
msgstr "Numero do Lote"
msgstr "Número do Lote"
#. module: mrp_repair
#: selection:mrp.repair,state:0
msgid "Under Repair"
msgstr ""
msgstr "Em Reparo"
#. module: mrp_repair
#: field:mrp.repair,fees_lines:0
@ -197,33 +197,33 @@ msgstr ""
#. module: mrp_repair
#: selection:mrp.repair,state:0
msgid "To be Invoiced"
msgstr ""
msgstr "Para ser Faturado"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Shipping address :"
msgstr ""
msgstr "Endereço de Entrega :"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Start Repair"
msgstr ""
msgstr "Iniciar Reparo"
#. module: mrp_repair
#: field:mrp.repair.line,product_uom_qty:0
msgid "Quantity (UoM)"
msgstr ""
msgstr "Quantidade (UdM)"
#. module: mrp_repair
#: field:mrp.repair.fee,to_invoice:0
#: field:mrp.repair.line,to_invoice:0
msgid "To Invoice"
msgstr ""
msgstr "Faturar"
#. module: mrp_repair
#: model:ir.ui.menu,name:mrp_repair.menu_repair_order
msgid "Repairs"
msgstr ""
msgstr "Reparos"
#. module: mrp_repair
#: field:mrp.repair,picking_id:0
@ -238,29 +238,29 @@ msgstr "Total :"
#. module: mrp_repair
#: field:mrp.repair,pricelist_id:0
msgid "Pricelist"
msgstr ""
msgstr "Lista de Preços"
#. module: mrp_repair
#: help:mrp.repair,state:0
msgid "Gives the state of the Repair Order"
msgstr ""
msgstr "Dá o estado da Ordem de Reparo"
#. module: mrp_repair
#: view:mrp.repair:0
#: field:mrp.repair,quotation_notes:0
msgid "Quotation Notes"
msgstr ""
msgstr "Observações da Cotação"
#. module: mrp_repair
#: model:ir.actions.act_window,name:mrp_repair.action_repair_progress_tree
#: model:ir.ui.menu,name:mrp_repair.menu_repair_progress
msgid "Repairs in progress"
msgstr ""
msgstr "Reparo em andamento"
#. module: mrp_repair
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML inválido para Arquitetura da View"
msgstr "Invalid XML for View Architecture!"
#. module: mrp_repair
#: help:mrp.repair,guarantee_limit:0
@ -274,7 +274,7 @@ msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Repair Line"
msgstr ""
msgstr "Linha do Reparo"
#. module: mrp_repair
#: rml:repair.order:0
@ -284,12 +284,12 @@ msgstr "N° :"
#. module: mrp_repair
#: field:mrp.repair,invoice_method:0
msgid "Invoice Method"
msgstr ""
msgstr "Método de Faturamento"
#. module: mrp_repair
#: field:mrp.repair,repaired:0
msgid "Repaired"
msgstr "Consertado"
msgstr "Reparado"
#. module: mrp_repair
#: wizard_field:mrp.repair.make_invoice,init,group:0
@ -300,101 +300,100 @@ msgstr ""
#: field:mrp.repair.fee,invoice_line_id:0
#: field:mrp.repair.line,invoice_line_id:0
msgid "Invoice Line"
msgstr ""
msgstr "Linha da Fatura"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Total amount"
msgstr ""
msgstr "Valor total"
#. module: mrp_repair
#: selection:mrp.repair.line,state:0
msgid "Canceled"
msgstr ""
msgstr "Cancelado"
#. module: mrp_repair
#: selection:mrp.repair,invoice_method:0
msgid "Before Repair"
msgstr ""
msgstr "Antes de ser Reparado"
#. module: mrp_repair
#: field:mrp.repair,location_id:0
msgid "Current Location"
msgstr ""
msgstr "Local Atual"
#. module: mrp_repair
#: wizard_button:mrp.repair.cancel,display,yes:0
msgid "Yes"
msgstr ""
msgstr "Sim"
#. module: mrp_repair
#: field:mrp.repair,invoiced:0
#: field:mrp.repair.fee,invoiced:0
#: field:mrp.repair.line,invoiced:0
msgid "Invoiced"
msgstr ""
msgstr "Faturado"
#. module: mrp_repair
#: wizard_button:mrp.repair.cancel,display,end:0
msgid "No"
msgstr ""
msgstr "Não"
#. module: mrp_repair
#: wizard_view:mrp.repair.make_invoice,init:0
#: wizard_button:mrp.repair.make_invoice,init,invoice:0
msgid "Create invoices"
msgstr ""
msgstr "Criar faturas"
#. module: mrp_repair
#: selection:mrp.repair.line,type:0
#: rml:repair.order:0
msgid "Add"
msgstr ""
msgstr "Adicionar"
#. module: mrp_repair
#: selection:mrp.repair.line,state:0
msgid "Draft"
msgstr ""
msgstr "Rascunho"
#. module: mrp_repair
#: model:ir.actions.act_window,name:mrp_repair.action_repair_order_form
#: model:ir.ui.menu,name:mrp_repair.menu_repair_form
msgid "New Repair"
msgstr ""
msgstr "Novo Reparo"
#. module: mrp_repair
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"O nome do objeto precisa iniciar com x_ e não conter nenhum caracter "
"especial!"
"The Object name must start with x_ and not contain any special character !"
#. module: mrp_repair
#: field:mrp.repair,amount_untaxed:0
msgid "Untaxed Amount"
msgstr ""
msgstr "Valor sem Impostos"
#. module: mrp_repair
#: field:mrp.repair.line,state:0
msgid "Status"
msgstr ""
msgstr "Situação"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Guarantee Limit"
msgstr ""
msgstr "Limite de Garantia"
#. module: mrp_repair
#: field:mrp.repair,product_id:0
#: rml:repair.order:0
msgid "Product to Repair"
msgstr ""
msgstr "Produto para Reparar"
#. module: mrp_repair
#: help:mrp.repair,pricelist_id:0
msgid "The pricelist comes from the selected partner, by default."
msgstr ""
msgstr "A tabela de preços vem do parceiro selecionado, por padrão."
#. module: mrp_repair
#: wizard_view:mrp.repair.cancel,display:0
@ -402,69 +401,71 @@ msgid ""
"This operation will cancel the Repair process, but will not cancel it's "
"Invoice. Do you want to continue?"
msgstr ""
"Esta operação irá cancelar o processo de reparação, mas não irá cancelar "
"a(s) fatura(s). Você deseja continuar?"
#. module: mrp_repair
#: selection:mrp.repair,state:0
msgid "Quotation"
msgstr ""
msgstr "Cotação"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Compute"
msgstr ""
msgstr "Calcular"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Confirm Repair"
msgstr ""
msgstr "Confirmar Reparo"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Repair Quotation"
msgstr ""
msgstr "Cotação do Reparo"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "End Repair"
msgstr ""
msgstr "Finalizar Reparo"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "History"
msgstr ""
msgstr "Histórico"
#. module: mrp_repair
#: model:ir.model,name:mrp_repair.model_mrp_repair
msgid "Repairs Order"
msgstr ""
msgstr "Ordens de Reparo"
#. module: mrp_repair
#: model:ir.actions.act_window,name:mrp_repair.action_repair_ready_tree
#: model:ir.ui.menu,name:mrp_repair.menu_repair_ready
msgid "Repairs Ready to Start"
msgstr ""
msgstr "Reparo Pronto para Iniciar"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Qty"
msgstr ""
msgstr "Qtd"
#. module: mrp_repair
#: selection:mrp.repair,state:0
#: selection:mrp.repair.line,state:0
msgid "Done"
msgstr ""
msgstr "Concluído"
#. module: mrp_repair
#: model:ir.actions.act_window,name:mrp_repair.action_repair_2binvoiced_tree
#: model:ir.ui.menu,name:mrp_repair.menu_repair_2binvoiced
msgid "Repairs to be invoiced"
msgstr ""
msgstr "Reparos a serem faturados"
#. module: mrp_repair
#: field:mrp.repair,invoice_id:0
msgid "Invoice"
msgstr ""
msgstr "Nota Fiscal"
#. module: mrp_repair
#: view:mrp.repair:0
@ -475,32 +476,32 @@ msgstr ""
#: selection:mrp.repair,state:0
#: wizard_button:mrp.repair.make_invoice,init,end:0
msgid "Cancel"
msgstr ""
msgstr "Cancelado"
#. module: mrp_repair
#: field:mrp.repair.line,location_dest_id:0
msgid "Dest. Location"
msgstr ""
msgstr "Local de Destino"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Operation Line(s)"
msgstr ""
msgstr "Linhas de Operação(s)"
#. module: mrp_repair
#: model:ir.model,name:mrp_repair.model_mrp_repair_line
msgid "Repair Operations Lines"
msgstr ""
msgstr "Linhas de Operações do Reparo"
#. module: mrp_repair
#: field:mrp.repair,location_dest_id:0
msgid "Delivery Location"
msgstr ""
msgstr "Local de Entrega"
#. module: mrp_repair
#: model:ir.module.module,shortdesc:mrp_repair.module_meta_information
msgid "Products Repairs Module"
msgstr ""
msgstr "Módulo de Reparos de Produtos"
#. module: mrp_repair
#: help:mrp.repair,invoice_method:0
@ -509,41 +510,44 @@ msgid ""
"selected is different from 'No Invoice', it also allow you to select the "
"pricelist and invoicing address."
msgstr ""
"Este campo permite que você mude o fluxo de trabalho(Workflow) da Ordem de "
"Reparo. Se o valor selecionado for diferente de 'Não Faturar', você poderá "
"selecionar a Lista de Preços e o endereço de Faturamento."
#. module: mrp_repair
#: field:mrp.repair.fee,price_unit:0
#: field:mrp.repair.line,price_unit:0
#: rml:repair.order:0
msgid "Unit Price"
msgstr ""
msgstr "Preço Unitário"
#. module: mrp_repair
#: wizard_view:mrp.repair.make_invoice,init:0
msgid "Do you really want to create the invoices ?"
msgstr ""
msgstr "Você realmente deseja criar as faturas ?"
#. module: mrp_repair
#: field:mrp.repair.fee,name:0
#: field:mrp.repair.line,name:0
#: rml:repair.order:0
msgid "Description"
msgstr ""
msgstr "Descrição"
#. module: mrp_repair
#: field:mrp.repair,operations:0
msgid "Operation Lines"
msgstr ""
msgstr "Linhas de Operação"
#. module: mrp_repair
#: field:mrp.repair.fee,product_id:0
#: field:mrp.repair.line,product_id:0
msgid "Product"
msgstr ""
msgstr "Produto"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Invoice Corrected"
msgstr ""
msgstr "Fatura Corrigida"
#. module: mrp_repair
#: help:mrp.repair,deliver_bool:0
@ -553,118 +557,125 @@ msgid ""
"that you can select the locations in the Info tab, if you have the extended "
"view."
msgstr ""
"Marque esta caixa se você deseja gerenciar a entrega uma vez que o produto "
"seja reparado. Se marcado, será criado uma embalagem com o produto "
"selecionado. Observe que você pode selecionar os locais na aba de "
"Informações, se você tiver a interface configurada para 'Visão "
"ampliada(Extended view)'."
#. module: mrp_repair
#: field:mrp.repair.line,type:0
msgid "Type"
msgstr ""
msgstr "Tipo"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Price"
msgstr ""
msgstr "Preço"
#. module: mrp_repair
#: field:mrp.repair,deliver_bool:0
msgid "Deliver"
msgstr ""
msgstr "Entregar"
#. module: mrp_repair
#: view:mrp.repair:0
#: field:mrp.repair,internal_notes:0
msgid "Internal Notes"
msgstr ""
msgstr "Notas Internas"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Taxes:"
msgstr ""
msgstr "Impostos:"
#. module: mrp_repair
#: model:ir.actions.wizard,name:mrp_repair.wizard_mrp_repair_make_invoice
msgid "Make invoices"
msgstr ""
msgstr "Faça faturas"
#. module: mrp_repair
#: field:mrp.repair,name:0
msgid "Repair Ref"
msgstr ""
msgstr "Ref do Reparo"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "UoM"
msgstr ""
msgstr "UdM"
#. module: mrp_repair
#: selection:mrp.repair.line,type:0
#: rml:repair.order:0
msgid "Remove"
msgstr ""
msgstr "Remover"
#. module: mrp_repair
#: wizard_view:mrp.repair.cancel,display:0
msgid "Cancel Repair...??"
msgstr ""
msgstr "Cancelar Reparo...??"
#. module: mrp_repair
#: field:mrp.repair.fee,product_uom:0
#: field:mrp.repair.line,product_uom:0
msgid "Product UoM"
msgstr ""
msgstr "UdM do Produto"
#. module: mrp_repair
#: field:mrp.repair,partner_invoice_id:0
msgid "Invoicing Address"
msgstr ""
msgstr "Endereço de Faturamento"
#. module: mrp_repair
#: selection:mrp.repair,invoice_method:0
msgid "After Repair"
msgstr ""
msgstr "Depois de ser Reparado"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Invoicing"
msgstr ""
msgstr "Faturamento"
#. module: mrp_repair
#: field:mrp.repair.line,location_id:0
msgid "Source Location"
msgstr ""
msgstr "Local de Origem"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Quality"
msgstr ""
msgstr "Qualidade"
#. module: mrp_repair
#: model:ir.actions.wizard,name:mrp_repair.action_cancel_repair
#: view:mrp.repair:0
msgid "Cancel Repair"
msgstr ""
msgstr "Cancelar Reparo"
#. module: mrp_repair
#: selection:mrp.repair,invoice_method:0
msgid "No Invoice"
msgstr ""
msgstr "Não Faturar"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "States"
msgstr ""
msgstr "Status"
#. module: mrp_repair
#: help:mrp.repair,partner_id:0
msgid ""
"This field allow you to choose the parner that will be invoiced and delivered"
msgstr ""
"Este campo permite que você escolha o Parceiro para qual será Faturado e "
"Entregue"
#. module: mrp_repair
#: field:mrp.repair,amount_total:0
msgid "Total"
msgstr ""
msgstr "Total"
#. module: mrp_repair
#: selection:mrp.repair,state:0
msgid "Ready to Repair"
msgstr ""
msgstr "Pronto para Reparar"

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 04:57+0000\n"
"PO-Revision-Date: 2010-08-12 06:10+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.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: 2010-08-12 04:06+0000\n"
"X-Launchpad-Export-Date: 2010-08-13 05:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp_repair

View File

@ -7,7 +7,7 @@ CUSTOM CUBE FOR CRM
-->
<record model="olap.fact.database" id="fact_databases_BI">
<field name="name">Open ERP CRM Database</field>
<field name="name">OpenERP CRM Database</field>
<field name="db_name">crm</field>
<field name="db_login">postgres</field>
<field name="db_password">postgres</field>

31
addons/outlook/README Normal file
View File

@ -0,0 +1,31 @@
OpenERP Outlook PLUG-IN Installation Guide
Pre requirements :
======================================================================================
1.Python 2.6+ . python can be downloaded from http://www.python.org/download/releases/ .
2.Python for Windows extensions - PyWin32 this module for python must be installed for appropriate version of the Python. It can be downloaded from http://sourceforge.net/projects/pywin32/files/ or http://starship.python.net/crew/mhammond/win32/
How to install openerp-outlook plug-in?
======================================================================================
1.Open your Python installation directory (e.g.: C:\Python26).
2.Create folder named “openerp-outlook-plugin”.
3.Extract your zip file “outlook-plugin.zip” to the folder.
4.Open the folder outlook-plugin.
5.And Run “Register-plugin.bat” file.
6.Run Outlook and Check addin has been registered.
7.Tools->OpenERP Configuration and test your connection.
8.See User Guide for More.
How to uninstall openerp-outlook plug-in?
=====================================================================================
1.Open the folder outlook-plugin.
2.And Run “Unregister-plugin.bat” file.
Note : Plug In has been successfully tested with MS Office 2003 and MS Offcie 2007.
Enjoy Archiving your Outlook E-mails to OpenERP.

Some files were not shown because too many files have changed in this diff Show More