[MERGE] Merge

bzr revid: mra@tinyerp.com-20100426054659-vpeofmj5rsp6mhgm
This commit is contained in:
mra (Open ERP) 2010-04-26 11:16:59 +05:30
commit 69e6f9c42a
7 changed files with 28 additions and 26 deletions

View File

@ -46,14 +46,18 @@ module named account_voucherss
'security/account_security.xml',
'security/ir.model.access.csv',
'account_menuitem.xml',
'account_wizard.xml',
'wizard/account_statement_from_invoice_view.xml',
'wizard/account_move_bank_reconcile_view.xml',
'wizard/account_use_model_view.xml',
'account_view.xml',
'account_report.xml',
'wizard/account_invoice_refund_view.xml',
'wizard/account_period_close_view.xml',
'wizard/account_fiscalyear_close_state.xml',
'wizard/account_chart_view.xml',
'wizard/account_move_bank_reconcile_view.xml',
'wizard/account_move_line_reconcile_select_view.xml',
'wizard/account_move_journal_view.xml',
'account_wizard.xml',
'wizard/account_move_line_reconcile_select_view.xml',
'wizard/account_open_closed_fiscalyear_view.xml',
'wizard/account_move_line_unreconcile_select_view.xml',
'wizard/account_vat_view.xml',
@ -66,12 +70,10 @@ module named account_voucherss
'wizard/account_journal_select_view.xml',
'wizard/account_change_currency_view.xml',
'wizard/account_validate_move_view.xml',
'wizard/account_statement_from_invoice_view.xml',
'wizard/account_pay_invoice_view.xml',
'wizard/account_unreconcile_view.xml',
'wizard/account_general_ledger_report_view.xml',
'wizard/account_invoice_state_view.xml',
'wizard/account_use_model_view.xml',
'wizard/account_partner_balance_report_view.xml',
'wizard/account_balance_report_view.xml',
'wizard/account_move_line_select_view.xml',
@ -79,10 +81,8 @@ module named account_voucherss
'wizard/account_compare_account_balance_report_view.xml',
'wizard/account_third_party_ledger.xml',
'project/wizard/project_account_analytic_line_view.xml',
'account_view.xml',
'account_end_fy.xml',
'account_invoice_view.xml',
'account_report.xml',
'partner_view.xml',
'data/account_invoice.xml',
'data/account_data2.xml',

View File

@ -31,9 +31,6 @@
<field name="target">new</field>
</record>
<menuitem id="next_id_20" name="Reconciliation"
parent="menu_finance_periodical_processing" />
<menuitem action="action_account_reconcile_select"
id="menu_reconcile_select" parent="account.next_id_20" />

View File

@ -2,11 +2,6 @@
<openerp>
<data>
<menuitem
id="menu_tax_report"
name="Taxes"
parent="account.menu_finance_generic_reporting" sequence="3"/>
<record id="view_account_vat_declaration" model="ir.ui.view">
<field name="name">Account Vat Declaration</field>
<field name="model">account.vat.declaration</field>

View File

@ -79,7 +79,7 @@ class email_to_document(osv.osv):
if file_ext[1] not in ext:
logger.notifyChannel('document', netsvc.LOG_WARNING, 'file type %s is not allows to process for directory %s' % (file_ext[1], dr.directory_id.name))
continue
data_attach = {
'name': attactment,
'datas':binascii.b2a_base64(str(attachents.get(attactment))),

View File

@ -93,11 +93,11 @@
<field name="domain">[]</field>
</record>
<menuitem
parent="base.menu_document"
id="menu_action_document_email_tree"
name="Email to Documents"
action="action_document_email_form"/>
<!-- <menuitem -->
<!-- parent="base.menu_document"-->
<!-- id="menu_action_document_email_tree" -->
<!-- name="Email to Documents"-->
<!-- action="action_document_email_form"/>-->
</data>
</openerp>

View File

@ -320,12 +320,22 @@ class email_server(osv.osv):
return res_id
def __fetch_mail(self, cr, uid, ids, context={}):
sendmail_thread = threading.Thread(target=self.fetch_mail, args=(cr, uid, ids))
sendmail_thread.start()
return True
def _fetch_mails(self, cr, uid, ids=False, context={}):
if not ids:
ids = self.search(cr, uid, [])
return self.fetch_mail(cr, uid, ids, context)
def fetch_mail(self, cr, uid, ids, context={}):
fp = os.popen('ping www.google.com -c 1 -w 5',"r")
if not fp.read():
logger.notifyChannel('imap', netsvc.LOG_WARNING, 'lost internet connection !')
for server in self.browse(cr, uid, ids, context):
logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail start checking for new emails on %s' % (server.name))
@ -356,7 +366,7 @@ class email_server(osv.osv):
pop_server = POP3_SSL(server.server, int(server.port))
else:
pop_server = POP3(server.server, int(server.port))
#TODO: use this to remove only unread messages
#pop_server.user("recent:"+server.user)
pop_server.user(server.user)
@ -373,9 +383,10 @@ class email_server(osv.osv):
pop_server.quit()
logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail fetch %s email(s) from %s' % (numMsgs, server.name))
self.write(cr, uid, [server.id], {'state':'done'})
except Exception, e:
logger.notifyChannel('IMAP', netsvc.LOG_WARNING, '%s' % (e))
logger.notifyChannel(server.type, netsvc.LOG_WARNING, '%s' % (e))
return True

View File

@ -58,8 +58,7 @@
</notebook>
<group col="6" colspan="4">
<field name="state" select="1"/>
<button string="Verify Server" type="object" name="fetch_mail"/>
<button string="Schedule"/>
<button string="Fetch Emails" type="object" name="__fetch_mail"/>
</group>
</form>
</field>