[MERGE] merge from trunk addons3
bzr revid: pso@tinyerp.com-20101224120913-s178cc65q273xyec
This commit is contained in:
@@ -982,7 +982,7 @@ class account_bank_statement_line(osv.osv):
|
||||
def _check_amount(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.voucher_id:
|
||||
if not (obj.amount == obj.voucher_id.amount):
|
||||
if not (abs(obj.amount) == obj.voucher_id.amount):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -14,14 +14,14 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import time
|
||||
|
||||
from osv import fields,osv
|
||||
from osv import fields, osv
|
||||
import pooler
|
||||
from tools import config
|
||||
import time
|
||||
import tools
|
||||
|
||||
class sale_receipt_report(osv.osv):
|
||||
@@ -107,7 +107,7 @@ class sale_receipt_report(osv.osv):
|
||||
left join res_partner as rp ON (rp.id=av.partner_id)
|
||||
left join account_journal as aj ON (aj.id=av.journal_id)
|
||||
where av.type='sale' and aj.type in ('sale','sale_refund')
|
||||
group by
|
||||
group by
|
||||
av.date,
|
||||
av.id,
|
||||
to_char(av.date, 'YYYY'),
|
||||
@@ -122,8 +122,8 @@ class sale_receipt_report(osv.osv):
|
||||
av.state,
|
||||
av.date_due,
|
||||
av.account_id,
|
||||
av.tax_amount,
|
||||
av.amount,
|
||||
av.tax_amount,
|
||||
av.amount,
|
||||
av.tax_amount,
|
||||
av.pay_now
|
||||
)
|
||||
|
||||
@@ -35,7 +35,7 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
||||
}
|
||||
|
||||
def populate_statement(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
if context is None:
|
||||
context = {}
|
||||
statement_id = context.get('statement_id', False)
|
||||
if not statement_id:
|
||||
@@ -75,7 +75,7 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
||||
statement.currency.id, amount, context=ctx)
|
||||
|
||||
context.update({'move_line_ids': [line.id]})
|
||||
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), context=context)
|
||||
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), date=time.strftime('%Y-%m-%d'), context=context)
|
||||
voucher_res = { 'type':(amount < 0 and 'payment' or 'receipt'),
|
||||
'name': line.name,
|
||||
'partner_id': line.partner_id.id,
|
||||
@@ -135,7 +135,7 @@ class account_statement_from_invoice(osv.osv_memory):
|
||||
}
|
||||
|
||||
def search_invoices(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
if context is None:
|
||||
context = {}
|
||||
line_obj = self.pool.get('account.move.line')
|
||||
statement_obj = self.pool.get('account.bank.statement')
|
||||
|
||||
@@ -11,34 +11,6 @@ that data to calendar clients. That said, the full features that would be
|
||||
accessible through the Gtk or Web OpenERP clients cannot be crammed into
|
||||
the Calendar clients (such as the iPhone).
|
||||
|
||||
OpenERP server Setup
|
||||
--------------------
|
||||
Some modules need to be installed at the OpenERP server. These are:
|
||||
- caldav: Required, has the reference setup and the necessary
|
||||
underlying code. Will also cause document, document_webdav
|
||||
to be installed.
|
||||
- crm_caldav: Optional, will export the CRM Meetings as a calendar.
|
||||
- project_caldav: Optional, will export project tasks as calendar.
|
||||
- http_well_known: Optional, experimental. Will ease bootstrapping,
|
||||
but only when a DNS srv record is also used.
|
||||
|
||||
These will also install a reference setup of the folders, ready to go.
|
||||
The administrator of OpenERP can add more calendars and structure, if
|
||||
needed.
|
||||
|
||||
DNS server setup
|
||||
------------------
|
||||
To be documented.
|
||||
|
||||
SSL setup
|
||||
----------
|
||||
It is highly advisable that you also setup SSL to work for the OpenERP
|
||||
server. HTTPS is a server-wide feature in OpenERP, which means a
|
||||
certificate will be set at the openerp-server.conf and will be the same
|
||||
for XML-RPC, HTTP, WebDAV and CalDAV.
|
||||
The iPhone also supports secure connections with SSL, although it does
|
||||
not expect a self-signed certificate (or one that is not verified by
|
||||
one of the "big" certificate authorities [1] ).
|
||||
|
||||
Phone setup
|
||||
-------------
|
||||
@@ -90,8 +62,7 @@ Now, to setup the calendars, you need to:
|
||||
|
||||
|
||||
|
||||
[1] I remember one guy that made *lots* of money selling his CA business
|
||||
off, and since then uses this money to create a software monopoly.
|
||||
|
||||
[2] This may not happen if the SRV records at DNS and the well-known URIs
|
||||
are setup right. But we appreciate that a default OpenERP installation will
|
||||
not have the DNS server of the company's domain configured.
|
||||
|
||||
@@ -277,7 +277,9 @@ class openerp_dav_handler(dav_interface):
|
||||
ua = self.parent.headers.get('User-Agent', False)
|
||||
ctx = {}
|
||||
if ua:
|
||||
print ua
|
||||
if 'iPhone' in ua:
|
||||
print "iphone"
|
||||
ctx['DAV-client'] = 'iPhone'
|
||||
elif 'Konqueror' in ua:
|
||||
ctx['DAV-client'] = 'GroupDAV'
|
||||
|
||||
Reference in New Issue
Block a user