- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_id.name ]] [[ o.partner_id.title or '' ]][[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]][[ o.address_invoice_id.street ]][[ o.address_invoice_id.street2 or '' ]]
diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml
index e8f1cee42f3..950a84fc637 100644
--- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml
+++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml
@@ -191,7 +191,7 @@
- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_id.name ]] [[ o.partner_id.title or '' ]] [[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]][[ o.address_invoice_id.street ]][[ o.address_invoice_id.street2 or '' ]]
diff --git a/addons/account_invoice_layout/report/special_message_invoice.rml b/addons/account_invoice_layout/report/special_message_invoice.rml
index 133fffe5c0f..7eaae14497f 100644
--- a/addons/account_invoice_layout/report/special_message_invoice.rml
+++ b/addons/account_invoice_layout/report/special_message_invoice.rml
@@ -195,7 +195,7 @@
- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_id.name ]] [[ o.partner_id.title or '' ]][[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]][[ o.address_invoice_id.street ]][[ o.address_invoice_id.street2 or '' ]]
diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml
index 7a6d61a0e08..3b1a98f4d05 100644
--- a/addons/base_setup/base_setup_installer.xml
+++ b/addons/base_setup/base_setup_installer.xml
@@ -31,7 +31,6 @@ If you don't think you need any of these right now, you can easily install them
-
diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py
index 2c1ba113e47..d86e5f61796 100644
--- a/addons/base_setup/installer.py
+++ b/addons/base_setup/installer.py
@@ -78,10 +78,6 @@ class base_setup_installer(osv.osv_memory):
help="Installs a preselected set of OpenERP "
"applications which will help you manage your association "
"more efficiently."),
- 'profile_training':fields.boolean('Training Centers',
- help="Helps you manage your training sessions and "
- "centers, from the conception of a training project to the "
- "gathering of trainee feedback."),
'profile_auction':fields.boolean('Auction Houses',
help="Installs a preselected set of OpenERP "
"applications selected to help you manage your auctions "
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py
index b3e45a33978..f9ec0e7d315 100644
--- a/addons/crm/__openerp__.py
+++ b/addons/crm/__openerp__.py
@@ -75,6 +75,7 @@ between mails and Open ERP.""",
'wizard/crm_opportunity_to_phonecall_view.xml',
'wizard/crm_partner_to_opportunity_view.xml',
+ 'wizard/crm_forward_to_partner_view.xml',
'wizard/crm_send_email_view.xml',
'wizard/crm_email_add_cc_view.xml',
'crm_view.xml',
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 85a27bb5d55..b0515a3fa13 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -34,15 +34,15 @@ AVAILABLE_STATES = [
('open', 'Open'),
('cancel', 'Cancelled'),
('done', 'Closed'),
- ('pending', 'Pending')
+ ('pending', 'Pending'),
]
AVAILABLE_PRIORITIES = [
- ('5', 'Lowest'),
- ('4', 'Low'),
- ('3', 'Normal'),
+ ('1', 'Highest'),
('2', 'High'),
- ('1', 'Highest')
+ ('3', 'Normal'),
+ ('4', 'Low'),
+ ('5', 'Lowest'),
]
class crm_case_section(osv.osv):
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 03318270e9b..f89c558fee4 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -174,15 +174,20 @@
icon="gtk-undo" type="action" />
-
-
+
+
+
+
-
+
diff --git a/addons/crm/wizard/__init__.py b/addons/crm/wizard/__init__.py
index f3d92447acd..a9067d9fa0b 100644
--- a/addons/crm/wizard/__init__.py
+++ b/addons/crm/wizard/__init__.py
@@ -20,6 +20,7 @@
##############################################################################
import crm_send_email
+import crm_forward_to_partner
import crm_email_add_cc
import crm_lead_to_partner
diff --git a/addons/crm/wizard/crm_forward_to_partner.py b/addons/crm/wizard/crm_forward_to_partner.py
new file mode 100644
index 00000000000..3af1e592a9f
--- /dev/null
+++ b/addons/crm/wizard/crm_forward_to_partner.py
@@ -0,0 +1,160 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (). All Rights Reserved
+# $Id$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+from osv import osv, fields
+
+from tools.translate import _
+import tools
+
+class crm_lead_forward_to_partner(osv.osv_memory):
+ _name = 'crm.lead.forward.to.partner'
+
+ _columns = {
+ 'partner_id' : fields.many2one('res.partner', 'Partner'),
+ 'address_id' : fields.many2one('res.partner.address', 'Address'),
+ 'email_from' : fields.char('From', required=True, size=128),
+ 'email_to' : fields.char('To', required=True, size=128),
+ 'subject' : fields.char('Subject', required=True, size=128),
+ 'message' : fields.text('Message', required=True),
+ }
+
+ def on_change_partner(self, cr, uid, ids, partner_id):
+ return {
+ 'domain' : {
+ 'address_id' : partner_id and "[('partner_id', '=', partner_id)]" or "[]",
+ }
+ }
+
+ def on_change_address(self, cr, uid, ids, address_id):
+ email = ''
+ if address_id:
+ email = self.pool.get('res.partner.address').browse(cr, uid, address_id).email
+
+ return {
+ 'value' : {
+ 'email_to' : email,
+ }
+ }
+
+ def action_cancel(self, cr, uid, ids, context=None):
+ return {'type' : 'ir.actions.act_window_close'}
+
+ def action_forward(self, cr, uid, ids, context=None):
+ """
+ Forward the lead to a partner
+ """
+ if context is None:
+ context = {}
+
+ res_id = context.get('active_id', False)
+
+ if not res_id:
+ return {}
+
+ this = self.browse(cr, uid, ids[0], context=context)
+
+ hist_obj = self.pool.get('crm.case.history')
+ smtp_pool = self.pool.get('email.smtpclient')
+ case_pool = self.pool.get('crm.lead')
+ case = case_pool.browse(cr, uid, res_id, context=context)
+
+ emails = [this.email_to]
+ body = case_pool.format_body(this.message)
+ email_from = this.email_from or False
+ case_pool._history(cr, uid, [case], _('Forward'), history=True, email=this.email_to, details=body, email_from=email_from)
+
+ flag = False
+ if case.section_id and case.section_id.server_id:
+ flag = smtp_pool.send_email(
+ cr=cr,
+ uid=uid,
+ server_id=case.section_id.server_id.id,
+ emailto=emails,
+ subject=this.subject,
+ body="
%s
" % body,
+ )
+ else:
+ flag = tools.email_send(
+ email_from,
+ emails,
+ this.subject,
+ body,
+ )
+
+ return {}
+
+ def default_get(self, cr, uid, fields, context=None):
+ """
+ This function gets default values
+ """
+ if context is None:
+ context = {}
+
+ active_ids = context.get('active_ids')
+ if not active_ids:
+ return {}
+
+ lead_proxy = self.pool.get('crm.lead')
+
+ lead = lead_proxy.browse(cr, uid, active_ids[0], context=context)
+
+ field_names = [
+ 'partner_name', 'title', 'function_name', 'street', 'street2',
+ 'zip', 'city', 'country_id', 'state_id', 'email_from',
+ 'phone', 'fax', 'mobile'
+ ]
+
+ message = []
+
+ for field_name in field_names:
+ field_definition = lead_proxy._columns[field_name]
+ value = None
+
+ if field_definition._type == 'selection':
+ if hasattr(field_definition.selection, '__call__'):
+ key = field_definition.selection(lead_proxy, cr, uid, context=context)
+ else:
+ key = field.definition.selection
+ value = dict(key).get(lead[field_name], lead[field_name])
+ elif field_definition._type == 'many2one':
+ if lead[field_name]:
+ value = lead[field_name].name_get()[0][1]
+ else:
+ value = lead[field_name]
+
+ message.append("%s: %s" % (field_definition.string, value or ''))
+
+ user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
+ email_from = ''
+ if user.address_id and user.address_id.email:
+ email_from = "%s <%s>" % (user.name, user.address_id.email)
+
+ res = {
+ 'email_from' : email_from,
+ 'subject' : '[Lead-Forward:%06d] %s' % (lead.id, lead.name),
+ 'message' : "\n".join(message + ['---']),
+ }
+
+ return res
+
+crm_lead_forward_to_partner()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_forward_to_partner_view.xml b/addons/crm/wizard/crm_forward_to_partner_view.xml
new file mode 100644
index 00000000000..15a75ca3551
--- /dev/null
+++ b/addons/crm/wizard/crm_forward_to_partner_view.xml
@@ -0,0 +1,38 @@
+
+
+
+
+ crm_lead_forward_to_partner
+ crm.lead.forward.to.partner
+ form
+
+
+
+
+
+
+ Forward to Partner
+ crm.lead.forward.to.partner
+ form
+ form
+ new
+
+
+
diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py
index a0f91fb2ae5..b0d20cd6e55 100644
--- a/addons/crm/wizard/crm_send_email.py
+++ b/addons/crm/wizard/crm_send_email.py
@@ -76,7 +76,8 @@ class crm_send_new_email(osv.osv_memory):
case = case_pool.browse(cr, uid, res_id)
if context.get('mail', 'new') == 'new':
- message_id = case.history_line[0].message_id
+ if len(case.history_line):
+ message_id = case.history_line[0].message_id
else:
hist = hist_obj.browse(cr, uid, res_id)
message_id = hist.message_id
@@ -92,9 +93,11 @@ class crm_send_new_email(osv.osv_memory):
case_pool._history(cr, uid, [case], _('Send'), history=True, email=data['email_to'], details=body, email_from=email_from, message_id=message_id)
x_headers = {
- 'References':"%s" % (message_id),
'Reply-To':"%s" % case.section_id.reply_to,
}
+ if message_id:
+ x_headers['References'] = "%s" % (message_id)
+
flag = False
if case.section_id and case.section_id.server_id:
flag = smtp_pool.send_email(
@@ -159,13 +162,15 @@ class crm_send_new_email(osv.osv_memory):
if 'email_from' in fields:
res.update({'email_from': (case.section_id and case.section_id.reply_to) or \
(case.user_id and case.user_id.address_id and \
- case.user_id.address_id.email) or tools.config.get('email_from',False)})
+ case.user_id.address_id.email and \
+ "%s <%s>" % (case.user_id.name, case.user_id.address_id.email)) or \
+ tools.config.get('email_from',False)})
if 'subject' in fields:
res.update({'subject': '[%s] %s' %(str(case.id), case.name or '')})
if 'email_cc' in fields:
res.update({'email_cc': case.email_cc or ''})
if 'text' in fields:
- res.update({'text': '\n\n'+(case.user_id.signature or '') + '\n\n' + (case.description or '')})
+ res.update({'text': '\n\n'+(case.user_id.signature or '')})
if 'state' in fields:
res.update({'state': 'pending'})
return res
diff --git a/addons/crm/wizard/crm_send_email_view.xml b/addons/crm/wizard/crm_send_email_view.xml
index 4db670de61f..49758245eb0 100644
--- a/addons/crm/wizard/crm_send_email_view.xml
+++ b/addons/crm/wizard/crm_send_email_view.xml
@@ -20,11 +20,11 @@
-
+
-
+
-
+
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py
index 3639decf3dc..598ed4aad6f 100644
--- a/addons/fetchmail/fetchmail.py
+++ b/addons/fetchmail/fetchmail.py
@@ -339,10 +339,6 @@ class email_server(osv.osv):
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))
diff --git a/addons/l10n_ch/report/bvr.rml b/addons/l10n_ch/report/bvr.rml
index caaa585d835..a3eed479be9 100755
--- a/addons/l10n_ch/report/bvr.rml
+++ b/addons/l10n_ch/report/bvr.rml
@@ -81,7 +81,7 @@
- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_id.name ]] [[ o.partner_id.title or '' ]][[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]][[ o.address_invoice_id.street ]][[ o.address_invoice_id.street2 or '' ]]
@@ -164,4 +164,4 @@
[[mod10r('01'+str('%.2f' % o.amount_total).replace('.','').rjust(10,'0'))]]>[[ _get_ref(o) ]]+ [[o.partner_bank.bvr_number.split('-')[0]+(str(o.partner_bank.bvr_number.split('-')[1])).rjust(6,'0')+o.partner_bank.bvr_number.split('-')[2] ]]>
-
\ No newline at end of file
+
diff --git a/addons/l10n_ch/report/invoice.rml b/addons/l10n_ch/report/invoice.rml
index ce5ef808f2a..104fbf2a367 100755
--- a/addons/l10n_ch/report/invoice.rml
+++ b/addons/l10n_ch/report/invoice.rml
@@ -155,7 +155,7 @@
- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_id.name ]] [[ o.partner_id.title or '' ]][[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]][[ o.address_invoice_id.street ]][[ o.address_invoice_id.street2 or '' ]]
@@ -380,4 +380,4 @@
-
\ No newline at end of file
+
diff --git a/addons/olap_sale/i18n/es.po b/addons/olap_sale/i18n/es.po
new file mode 100644
index 00000000000..320a945f712
--- /dev/null
+++ b/addons/olap_sale/i18n/es.po
@@ -0,0 +1,34 @@
+# Spanish translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-11-26 05:29+0000\n"
+"PO-Revision-Date: 2010-04-28 19:27+0000\n"
+"Last-Translator: Shay \n"
+"Language-Team: Spanish \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-04-29 03:52+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: olap_sale
+#: model:ir.module.module,description:olap_sale.module_meta_information
+msgid ""
+"\n"
+" Sale module will load the data in olap tables\n"
+" "
+msgstr ""
+"\n"
+" El módulo de ventas cargará los datos en una tabla olap\n"
+" "
+
+#. module: olap_sale
+#: model:ir.module.module,shortdesc:olap_sale.module_meta_information
+msgid "olap_sale"
+msgstr ""
diff --git a/addons/point_of_sale/__init__.py b/addons/point_of_sale/__init__.py
index 1a83d3f3b44..ddd7dc3c01f 100644
--- a/addons/point_of_sale/__init__.py
+++ b/addons/point_of_sale/__init__.py
@@ -21,11 +21,13 @@
##############################################################################
import pos
+import account_bank_statement
+import pos_account_bank_statement
import stock
import wizard
import report
-import pos_account_bank_statement
-import account_bank_statement
+
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py
index 95228bb044c..111702c2e74 100644
--- a/addons/point_of_sale/__openerp__.py
+++ b/addons/point_of_sale/__openerp__.py
@@ -37,7 +37,6 @@ Main features :
""",
'author': 'Tiny',
'depends': ['sale', 'delivery'],
-# 'depends': ['sale', 'purchase', 'account', 'account_tax_include','board','mrp','board_manufacturing','delivery','profile_manufacturing','account','multi_company'],
'init_xml': [],
'update_xml': [
@@ -63,8 +62,9 @@ Main features :
'wizard/pos_payment_report.xml',
'wizard/pos_payment.xml',
'wizard/pos_scan_product_view.xml',
+ 'wizard/pos_return_view.xml',
'pos_report.xml',
- 'pos_wizard.xml',
+ # 'pos_wizard.xml',
'pos_view.xml',
'pos_sequence.xml',
'posrule_data.xml',
@@ -73,7 +73,6 @@ Main features :
'statement_view.xml',
'statement_report.xml',
'statement_data.xml',
- 'statement_wizard.xml',
],
'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml'],
'installable': True,
diff --git a/addons/point_of_sale/multi_company_demo.xml b/addons/point_of_sale/multi_company_demo.xml
index dfc59cc09c8..e0e58ad75d7 100644
--- a/addons/point_of_sale/multi_company_demo.xml
+++ b/addons/point_of_sale/multi_company_demo.xml
@@ -2,11 +2,10 @@
- Tiny Editor
+ OpenERP Editor
-
- Tiny Editor
+ OpenERP EditorFree Business Solutions
@@ -15,24 +14,19 @@
-
- Tiny Integrator
+ OpenERP Integrator
- Tiny Integrator
+ OpenERP IntegratorFree Business SolutionsWeb: http://tiny.be - Tel: (+32).81.81.37.00 - Bank: CPH 126-2013269-07IBAN: BE74 1262 0132 6907 - SWIFT: GKCCBEBB - VAT: BE0477.472.701
-
-
-
-
diff --git a/addons/point_of_sale/multi_company_stock_data.xml b/addons/point_of_sale/multi_company_stock_data.xml
index 539a27ff1a2..a74ea0a56e9 100644
--- a/addons/point_of_sale/multi_company_stock_data.xml
+++ b/addons/point_of_sale/multi_company_stock_data.xml
@@ -2,104 +2,6 @@
-
-
-
- property_product_pricelist
-
-
-
-
-
-
property_stock_account_output
diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py
index c87efa486b3..7c872bda845 100644
--- a/addons/point_of_sale/pos.py
+++ b/addons/point_of_sale/pos.py
@@ -28,7 +28,7 @@ from tools.translate import _
from decimal import Decimal
import tools
import re
-
+import decimal_precision as dp
class pos_config_journal(osv.osv):
@@ -43,40 +43,14 @@ class pos_config_journal(osv.osv):
}
pos_config_journal()
-
-class res_mode_contact(osv.osv):
-
- """ Contact mode for Partner """
-
- _name = "res.mode.contact"
- _description = "Contact mode"
-
- _columns={
- 'name': fields.char('Mode', size=64, select=1),
- 'active': fields.boolean('Active', select=2),
- }
-res_mode_contact()
-
-class contact_mode_partner(osv.osv):
-
-
- _inherit = 'res.partner'
- _columns = {
- 'contact_mode_id': fields.many2one('res.mode.contact','Contact Mode'),
- }
-contact_mode_partner()
-
-
class pos_company_discount(osv.osv):
""" Company Discount and Cashboxes """
_inherit = 'res.company'
_columns = {
- 'company_discount': fields.float('Max Discount(%)', digits=(16,2)),
- 'max_diff': fields.float('Max Difference for Cashboxes', digits=(16,2)),
- 'account_receivable': fields.many2one('account.account',
- 'Default Receivable', states={'draft': [('readonly', False)]}),
+ 'company_discount': fields.float('Max Discount(%)', digits_compute= dp.get_precision('Point Of Sale')),
+ 'max_diff': fields.float('Max Difference for Cashboxes', digits_compute= dp.get_precision('Point Of Sale Discount')),
}
pos_company_discount()
@@ -149,7 +123,7 @@ class pos_order(osv.osv):
tot =0.0
val=None
for order in self.browse(cr, uid, ids):
- cr.execute("select date_payment2 from pos_order where id=%d"%(order.id))
+ cr.execute("select date_payment from pos_order where id=%d"%(order.id))
date_p=cr.fetchone()
date_p=date_p and date_p[0] or None
if date_p:
@@ -176,7 +150,7 @@ class pos_order(osv.osv):
tot =0.0
val=None
for order in self.browse(cr, uid, ids):
- cr.execute("select date_payment from pos_order where id=%d"%(order.id))
+ cr.execute("select date_validation from pos_order where id=%d"%(order.id))
date_p=cr.fetchone()
date_p=date_p and date_p[0] or None
if date_p:
@@ -199,65 +173,35 @@ class pos_order(osv.osv):
res[order.id]=val
return res
- def _amount_tax(self, cr, uid, ids, field_name, arg, context):
-
- """ Calculates Taxes of order
- @return: Dictionary of values """
-
- res = {}
- tax_obj = self.pool.get('account.tax')
+ def _amount_all(self, cr, uid, ids, name, args, context=None):
+ tax_obj = self.pool.get('account.tax')
+ res={}
for order in self.browse(cr, uid, ids):
- val = 0.0
+ res[order.id] = {
+ 'amount_paid': 0.0,
+ 'amount_return':0.0,
+ 'amount_tax':0.0,
+ }
+ for payment in order.statement_ids:
+ res[order.id]['amount_paid'] += payment.amount
+ for payment in order.payments:
+ res[order.id]['amount_return'] += (payment.amount < 0 and payment.amount or 0)
for line in order.lines:
if order.price_type!='tax_excluded':
- val = reduce(lambda x, y: x+round(y['amount'], 2),
+ res[order.id]['amount_tax'] = reduce(lambda x, y: x+round(y['amount'], 2),
tax_obj.compute_inv(cr, uid, line.product_id.taxes_id,
line.price_unit * \
(1-(line.discount or 0.0)/100.0), line.qty),
- val)
+ res[order.id]['amount_tax'])
else:
- val = reduce(lambda x, y: x+round(y['amount'], 2),
+ res[order.id]['amount_tax'] = reduce(lambda x, y: x+round(y['amount'], 2),
tax_obj.compute(cr, uid, line.product_id.taxes_id,
line.price_unit * \
(1-(line.discount or 0.0)/100.0), line.qty),
- val)
-
- res[order.id] = val
+ res[order.id]['amount_tax'])
return res
-
- def _total_payment(self, cr, uid, ids, field_name, arg, context):
- """ Calculates Total payment of order
- @return: Dictionary of values """
-
- res = {}
- i=0
- for order in self.browse(cr, uid, ids):
- val = 0.0
- for payment in order.statement_ids:
- val += payment.amount
- res[order.id] = val
- return res
- return {order.id:val}
- def _total_return(self, cr, uid, ids, field_name, arg, context):
-
- """ Calculates Total Returned from the order
- @return: Dictionary of values """
-
- res = {}
- for order in self.browse(cr, uid, ids):
- val = 0.0
- for payment in order.payments:
- val += (payment.amount < 0 and payment.amount or 0)
- res[order.id] = val
- return res
-
-# def payment_get(self, cr, uid, ids, context=None):
-# """ Calculates Total Returned from the order
-# @return: Dictionary of values """
-# cr.execute("select id from pos_payment where order_id =ANY(%s)",(ids,))
-# return [i[0] for i in cr.fetchall()]
def _sale_journal_get(self, cr, uid, context):
@@ -279,13 +223,10 @@ class pos_order(osv.osv):
company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id
res = self.pool.get('sale.shop').search(cr, uid, [])
- # res = self.pool.get('sale.shop').search(cr, uid, [('company_id', '=', company.id)])
if res:
return res[0]
else:
return False
-
-
def copy(self, cr, uid, id, default=None, context={}):
if not default:
@@ -342,16 +283,16 @@ class pos_order(osv.osv):
'shop_id': fields.many2one('sale.shop', 'Shop', required=True,
states={'draft': [('readonly', False)]}, readonly=True),
'date_order': fields.datetime('Date Ordered', readonly=True),
- 'date_payment': fields.function(_get_date_payment, method=True, string='Validation Date', type='date', store=True),
- 'date_payment2': fields.function(_get_date_payment2, method=True, string='Payment Date', type='date', store=True),
+ 'date_validation': fields.function(_get_date_payment, method=True, string='Validation Date', type='date', store=True),
+ 'date_payment': fields.function(_get_date_payment2, method=True, string='Payment Date', type='date', store=True),
'date_validity': fields.date('Validity Date', required=True),
'user_id': fields.many2one('res.users', 'Connected Salesman', readonly=True),
- 'user_id1': fields.many2one('res.users', 'Salesman', required=True),
- 'user_id2': fields.many2one('res.users', 'Salesman Manager'),
- 'amount_tax': fields.function(_amount_tax, method=True, string='Taxes'),
+ 'user_saleman': fields.many2one('res.users', 'Salesman', required=True),
+ 'sale_manager': fields.many2one('res.users', 'Salesman Manager'),
+ 'amount_tax': fields.function(_amount_all, method=True, string='Taxes',digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
'amount_total': fields.function(_amount_total, method=True, string='Total'),
- 'amount_paid': fields.function(_total_payment, 'Paid', states={'draft': [('readonly', False)]}, readonly=True, method=True),
- 'amount_return': fields.function(_total_return, 'Returned', method=True),
+ 'amount_paid': fields.function(_amount_all, 'Paid', states={'draft': [('readonly', False)]}, readonly=True, method=True,digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
+ 'amount_return': fields.function(_amount_all, 'Returned', method=True,digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True),
'price_type': fields.selection([
('tax_excluded','Tax excluded')
@@ -371,19 +312,9 @@ class pos_order(osv.osv):
'first_name': fields.char('First Name', size=64),
'state_2': fields.function(_get_v,type='selection',selection=[('to_verify', 'To Verify'), ('accepted', 'Accepted'),
('refused', 'Refused')], string='State', readonly=True, method=True, store=True),
-
- # 'last_name': fields.char('Last Name', size=64),
- # 'street': fields.char('Street', size=64),
- # 'zip2': fields.char('Zip', size=64),
- # 'city': fields.char('City', size=64),
- # 'mobile': fields.char('Mobile', size=64),
- # 'email': fields.char('Email', size=64),
'note': fields.text('Internal Notes'),
'nb_print': fields.integer('Number of Print', readonly=True),
'sale_journal': fields.many2one('account.journal', 'Journal', required=True, states={'draft': [('readonly', False)]}, readonly=True, ),
- # 'account_receivable': fields.many2one('account.account',
- # 'Default Receivable', required=True, states={'draft': [('readonly', False)]},
- # readonly=True, ),
'invoice_wanted': fields.boolean('Create Invoice'),
'note_2': fields.char('Customer Note',size=64),
'type_rec': fields.char('Type of Receipt',size=64),
@@ -419,7 +350,7 @@ class pos_order(osv.osv):
_defaults = {
'user_id': lambda self, cr, uid, context: uid,
- 'user_id2': lambda self, cr, uid, context: uid,
+ 'sale_manager': lambda self, cr, uid, context: uid,
'state': lambda *a: 'draft',
'price_type': lambda *a: 'tax_excluded',
'state_2': lambda *a: 'to_verify',
@@ -626,7 +557,7 @@ class pos_order(osv.osv):
def button_validate(self, cr, uid, ids, *args):
- """ Check the access for the sale order and update the date_payment
+ """ Check the access for the sale order and update the date_validation
@return: True
"""
res_obj = self.pool.get('res.company')
@@ -637,12 +568,12 @@ class pos_order(osv.osv):
if part_company:
raise osv.except_osv(_('Error'), _('You don\'t have enough access to validate this sale!'))
for order in self.browse(cr, uid, ids):
- if not order.date_payment:
+ if not order.date_validation:
cr.execute("select max(date) from account_bank_statement_line where pos_statement_id=%d"%(order.id))
val=cr.fetchone()
val=val and val[0] or None
if val:
- cr.execute("Update pos_order set date_payment='%s' where id = %d"%(val, order.id))
+ cr.execute("Update pos_order set date_validation='%s' where id = %d"%(val, order.id))
return True
@@ -772,7 +703,7 @@ class pos_order(osv.osv):
inv_ids = []
for order in self.browse(cr, uid, ids, context):
- curr_c = order.user_id1.company_id
+ curr_c = order.user_saleman.company_id
if order.invoice_id:
inv_ids.append(order.invoice_id.id)
continue
@@ -780,9 +711,7 @@ class pos_order(osv.osv):
if not order.partner_id:
raise osv.except_osv(_('Error'), _('Please provide a partner for the sale.'))
- cr.execute('select a.id from account_account a, res_company p where p.account_receivable=a.id and p.id=%s', (curr_c.id, ))
- res=cr.fetchone()
- acc=res and res[0] or None
+ acc= order.partner_id.property_account_receivable.id
inv = {
'name': 'Invoice from POS: '+order.name,
'origin': order.name,
@@ -834,15 +763,17 @@ class pos_order(osv.osv):
account_move_line_obj = self.pool.get('account.move.line')
account_period_obj = self.pool.get('account.period')
account_tax_obj = self.pool.get('account.tax')
+ res_obj=self.pool.get('res.users')
+ property_obj=self.pool.get('ir.property')
period = account_period_obj.find(cr, uid, context=context)[0]
for order in self.browse(cr, uid, ids, context=context):
- curr_c = self.pool.get('res.users').browse(cr, uid, uid).company_id
- comp_id = self.pool.get('res.users').browse(cr, order.user_id.id, order.user_id.id).company_id
+ curr_c =res_obj.browse(cr, uid, uid).company_id
+ comp_id = res_obj.browse(cr, order.user_id.id, order.user_id.id).company_id
comp_id=comp_id and comp_id.id or False
to_reconcile = []
group_tax = {}
- account_def = self.pool.get('ir.property').get(cr, uid, 'property_account_receivable', 'res.partner', context=context)
+ account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context)
order_account = order.partner_id and order.partner_id.property_account_receivable and order.partner_id.property_account_receivable.id or account_def or curr_c.account_receivable.id
# Create an entry for the sale
@@ -1028,9 +959,8 @@ class pos_order(osv.osv):
'statement_id': False,
'account_id':order_account
})
- # account_move_obj.button_validate(cr, uid, [move_id, payment_move_id], context=context)
+
self.write(cr,uid,order.id,{'state':'done'})
- # account_move_line_obj.reconcile(cr, uid, to_reconcile, type='manual', context=context)
return True
def cancel_picking(self, cr, uid, ids, context=None):
@@ -1042,6 +972,7 @@ class pos_order(osv.osv):
def action_payment(self, cr, uid, ids, context=None):
vals = {'state': 'payment'}
+ sequence_obj=self.pool.get('ir.sequence')
for pos in self.browse(cr, uid, ids):
create_contract_nb = False
for line in pos.lines:
@@ -1049,8 +980,8 @@ class pos_order(osv.osv):
create_contract_nb = True
break
if create_contract_nb:
- seq = self.pool.get('ir.sequence').get(cr, uid, 'pos.user_%s' % pos.user_id1.login)
- vals['contract_number'] ='%s-%s' % (pos.user_id1.login, seq)
+ seq = sequence_obj.get(cr, uid, 'pos.user_%s' % pos.user_saleman.login)
+ vals['contract_number'] ='%s-%s' % (pos.user_saleman.login, seq)
self.write(cr, uid, ids, vals)
def action_paid(self, cr, uid, ids, context=None):
@@ -1071,7 +1002,6 @@ class pos_order(osv.osv):
for order in self.browse(cr, uid, ids, context=context):
if not order.journal_entry:
self.create_account_move(cr, uid, ids, context={})
- #self.write(cr, uid, ids, {'state': 'done'})
return True
def compute_state(self, cr, uid, id):
@@ -1145,7 +1075,6 @@ class pos_order_line(osv.osv):
price = self.price_by_product(cr, uid, ids, line.order_id.pricelist_id.id, line.product_id.id, line.qty, line.order_id.partner_id.id)
if line.discount!=0.0:
res[line.id] = line.price_unit * line.qty * (1 - (line.discount or 0.0) / 100.0)
-# res[line.id] = price * line.qty * (1 - (line.discount or 0.0) / 100.0)
else:
res[line.id]=line.price_unit*line.qty
return res
@@ -1181,7 +1110,7 @@ class pos_order_line(osv.osv):
disc=0.0
if (disc != 0.0 or prod_id) and price_f>0:
disc=100-(price/price_f*100)
- return {'value':{'discount':disc, 'price_unit':price_f}}#,'notice':''}}#, 'price_subtotal':(price_f*qty*(1-disc))}}
+ return {'value':{'discount':disc, 'price_unit':price_f}}
return {}
def onchange_ded(self, cr, uid,ids, val_ded,price_u,*a):
@@ -1218,11 +1147,9 @@ class pos_order_line(osv.osv):
'company_id':fields.many2one('res.company', 'Company', required=True),
'notice': fields.char('Discount Notice', size=128, required=True),
'serial_number': fields.char('Serial Number', size=128),
-# 'contract_number': fields.char('Contract Number', size=512),
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True, change_default=True),
-# 'price_unit': fields.float('Unit Price'),
'price_unit': fields.function(_get_amount, method=True, string='Unit Price', store=True),
- 'price_ded': fields.float('Discount(Amount)'),
+ 'price_ded': fields.float('Discount(Amount)',digits_compute=dp.get_precision('Point Of Sale')),
'qty': fields.float('Quantity'),
'qty_rfd': fields.float('Refunded Quantity'),
'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal w/o Tax'),
@@ -1283,7 +1210,7 @@ class pos_order_line(osv.osv):
}
line_id = self.create(cr, uid, vals)
if not line_id:
- raise wizard.except_wizard(_('Error'), _('Create line failed !'))
+ raise osv.except_osv(_('Error'), _('Create line failed !'))
else:
vals = {
'qty': qty,
@@ -1348,226 +1275,8 @@ class pos_payment(osv.osv):
pos_payment()
-
-class report_transaction_pos(osv.osv):
- _name = "report.transaction.pos"
- _description = "transaction for the pos"
- _auto = False
- _columns = {
- 'date_create': fields.char('Date', size=16, readonly=True),
- 'journal_id': fields.many2one('account.journal', 'Sales Journal', readonly=True),
- 'jl_id': fields.many2one('account.journal', 'Cash Journals', readonly=True),
- 'user_id': fields.many2one('res.users', 'User', readonly=True),
- 'no_trans': fields.float('Number of Transaction', readonly=True),
- 'amount': fields.float('Amount', readonly=True),
- 'invoice_id': fields.float('Nbr Invoice', readonly=True),
- 'invoice_am': fields.float('Invoice Amount', readonly=True),
- 'product_nb': fields.float('Product Nb.', readonly=True),
- 'disc': fields.float('Disc.', readonly=True),
- }
-
- def init(self, cr):
- tools.drop_view_if_exists(cr, 'report_transaction_pos')
- cr.execute("""
- create or replace view report_transaction_pos as (
- select
- min(absl.id) as id,
- count(absl.id) as no_trans,
- sum(absl.amount) as amount,
- sum(line.price_ded) as disc,
- to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')::text as date_create,
- po.user_id as user_id,
- po.sale_journal as journal_id,
- abs.journal_id as jl_id,
- count(po.invoice_id) as invoice_id,
- count(p.id) as product_nb
- from
- account_bank_statement_line as absl,
- account_bank_statement as abs,
- product_product as p,
- pos_order_line as line,
- pos_order as po
- where
- absl.pos_statement_id = po.id and
- line.order_id=po.id and
- line.product_id=p.id and
- absl.statement_id=abs.id
-
- group by
- po.user_id,po.sale_journal, abs.journal_id,
- to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')::text
- )
- """)
- #to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')
- #to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')::text as date_create,
-report_transaction_pos()
-
-class report_sales_by_user_pos(osv.osv):
- _name = "report.sales.by.user.pos"
- _description = "Sales by user"
- _auto = False
- _columns = {
- 'date_order': fields.date('Order Date',required=True, select=True),
- 'amount': fields.float('Total', readonly=True, select=True),
- 'qty': fields.float('Quantity', readonly=True, select=True),
- 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
- }
-
- def init(self, cr):
- tools.drop_view_if_exists(cr, 'report_sales_by_user_pos')
- cr.execute("""
- create or replace view report_sales_by_user_pos as (
- select
- min(po.id) as id,
- to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text as date_order,
- po.user_id as user_id,
- sum(pol.qty)as qty,
- sum((pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))) as amount
- from
- pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt
- where
- pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id
- group by
- to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text,
- po.user_id
-
- )
- """)
-report_sales_by_user_pos()
-
-class report_sales_by_user_pos_month(osv.osv):
- _name = "report.sales.by.user.pos.month"
- _description = "Sales by user monthly"
- _auto = False
- _columns = {
- 'date_order': fields.date('Order Date',required=True, select=True),
- 'amount': fields.float('Total', readonly=True, select=True),
- 'qty': fields.float('Quantity', readonly=True, select=True),
- 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
- }
-
- def init(self, cr):
- tools.drop_view_if_exists(cr, 'report_sales_by_user_pos_month')
- cr.execute("""
- create or replace view report_sales_by_user_pos_month as (
- select
- min(po.id) as id,
- to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text as date_order,
- po.user_id as user_id,
- sum(pol.qty)as qty,
- sum((pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))) as amount
- from
- pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt
- where
- pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id
- group by
- to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text,
- po.user_id
-
- )
- """)
-report_sales_by_user_pos_month()
-
-class report_sales_by_margin_pos(osv.osv):
- _name = "report.sales.by.margin.pos"
- _description = "Sales by margin"
- _auto = False
- _columns = {
-# 'pos_name': fields.char('POS Order', size=64, readonly=True),
- 'product_name':fields.char('Product Name', size=64, readonly=True),
- 'date_order': fields.date('Order Date',required=True, select=True),
- # 'amount': fields.float('Total', readonly=True, select=True),
- 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
- 'qty': fields.float('Qty', readonly=True, select=True),
- 'net_margin_per_qty':fields.float('Net margin per Qty', readonly=True, select=True),
- 'total':fields.float('Margin', readonly=True, select=True),
-
- }
-
- def init(self, cr):
- tools.drop_view_if_exists(cr, 'report_sales_by_margin_pos')
- cr.execute("""
- create or replace view report_sales_by_margin_pos as (
- select
- min(pol.id) as id,
- po.user_id as user_id,
- pt.name as product_name,
- to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text as date_order,
- sum(pol.qty) as qty,
- pt.list_price-pt.standard_price as net_margin_per_qty,
- (pt.list_price-pt.standard_price) *sum(pol.qty) as total
- from
- product_template as pt,
- product_product as pp,
- pos_order_line as pol,
- pos_order as po
- where
- pol.product_id = pp.product_tmpl_id and
- pp.product_tmpl_id = pt.id and
- po.id = pol.order_id
-
- group by
- pt.name,
- pt.list_price,
- pt.standard_price,
- po.user_id,
- to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text
-
- )
- """)
-report_sales_by_margin_pos()
-
-class report_sales_by_margin_pos_month(osv.osv):
- _name = "report.sales.by.margin.pos.month"
- _description = "Sales by margin monthly"
- _auto = False
- _columns = {
-# 'pos_name': fields.char('POS Order', size=64, readonly=True),
- 'product_name':fields.char('Product Name', size=64, readonly=True),
- 'date_order': fields.date('Order Date',required=True, select=True),
- #'amount': fields.float('Total', readonly=True, select=True),
- 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
- 'qty': fields.float('Qty', readonly=True, select=True),
- 'net_margin_per_qty':fields.float('Net margin per Qty', readonly=True, select=True),
- 'total':fields.float('Margin', readonly=True, select=True),
-
- }
-
- def init(self, cr):
- tools.drop_view_if_exists(cr, 'report_sales_by_margin_pos_month')
- cr.execute("""
- create or replace view report_sales_by_margin_pos_month as (
- select
- min(pol.id) as id,
- po.user_id as user_id,
- pt.name as product_name,
- to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text as date_order,
- sum(pol.qty) as qty,
- pt.list_price-pt.standard_price as net_margin_per_qty,
- (pt.list_price-pt.standard_price) *sum(pol.qty) as total
- from
- product_template as pt,
- product_product as pp,
- pos_order_line as pol,
- pos_order as po
- where
- pol.product_id = pp.product_tmpl_id and
- pp.product_tmpl_id = pt.id and
- po.id = pol.order_id
-
- group by
- pt.name,
- pt.list_price,
- pt.standard_price,
- po.user_id,
- to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text
-
- )
- """)
-report_sales_by_margin_pos_month()
-
-
class account_move_line(osv.osv):
+
_inherit = 'account.move.line'
def create(self, cr, user, vals, context={}):
pos_obj = self.pool.get('pos.order')
@@ -1587,7 +1296,9 @@ account_move_line()
class account_move(osv.osv):
+
_inherit = 'account.move'
+
def create(self, cr, user, vals, context={}):
pos_obj = self.pool.get('pos.order')
val_name = vals.get('name', '')
@@ -1617,4 +1328,4 @@ class product_product(osv.osv):
'disc_controle': lambda *a: True,
}
product_product()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/point_of_sale/pos_account_bank_statement.py b/addons/point_of_sale/pos_account_bank_statement.py
index ccce315fe36..60924350014 100644
--- a/addons/point_of_sale/pos_account_bank_statement.py
+++ b/addons/point_of_sale/pos_account_bank_statement.py
@@ -65,4 +65,3 @@ class account_bank_statement_line(osv.osv):
account_bank_statement_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/point_of_sale/pos_data.xml b/addons/point_of_sale/pos_data.xml
index 8ff4697804e..b36bd0827c2 100644
--- a/addons/point_of_sale/pos_data.xml
+++ b/addons/point_of_sale/pos_data.xml
@@ -11,7 +11,6 @@
0.00.0
-
@@ -22,7 +21,6 @@
100.0100.0
-
diff --git a/addons/point_of_sale/pos_demo.xml b/addons/point_of_sale/pos_demo.xml
index 789d96b897d..f3573abc791 100644
--- a/addons/point_of_sale/pos_demo.xml
+++ b/addons/point_of_sale/pos_demo.xml
@@ -57,8 +57,8 @@
-
-
+
+
@@ -93,8 +93,8 @@
-
-
+
+
@@ -135,8 +135,8 @@
-
-
+
+
@@ -144,16 +144,6 @@
-
-
@@ -194,12 +184,6 @@ do black box testing on entries on this chart of account, without modifying
your own chart of account.
-
diff --git a/addons/point_of_sale/pos_report.xml b/addons/point_of_sale/pos_report.xml
index 2e9ff5e6107..9123502d288 100644
--- a/addons/point_of_sale/pos_report.xml
+++ b/addons/point_of_sale/pos_report.xml
@@ -1,39 +1,6 @@
-
-
-
-
-
+
@@ -58,28 +58,14 @@
states="paid, draft"
attrs="{'invisible':[('state_2','=','accepted')]}"/>
-
-
-
-
-
-
-
-
-
-
-
+
@@ -90,14 +76,14 @@
-
+
-
-
+
+
@@ -122,7 +108,6 @@
-
@@ -135,8 +120,6 @@
-
-
Point of Saleir.actions.act_window
@@ -145,8 +128,6 @@
[['date_order','>=',time.strftime('%Y-%m-%d')]]
-
-
Salespos.order
@@ -155,8 +136,8 @@
+
-
@@ -165,6 +146,32 @@
+
+ pos.order.list.select
+ pos.order
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -176,10 +183,12 @@
ir.actions.act_windowpos.orderform
+ tree,form['|',('state_2','=','to_verify'),('state','=','advance')]
+
+
-invoiced
Sales to Invoice
@@ -189,6 +198,8 @@ invoiced
tree,form[('state','!=', 'invoiced')]
+
+
@@ -198,8 +209,8 @@ invoiced
pos.orderformtree,form
- [('state','=', 'paid')]
+ Point of Sale
@@ -207,29 +218,25 @@ invoiced
pos.orderformtree,form
- [('date_order','<=', time.strftime('%Y-%m-%d 23:59:59'))]
+
-
-
Point of Saleir.actions.act_windowpos.orderformtree,form
-
+
-
-
Opened Salesir.actions.act_windowpos.orderformform,tree
-
+
@@ -663,59 +670,11 @@ invoiced
-
-
-
- Contact Mode
- res.mode.contact
- form
-
-
-
-
-
-
- Contact Mode
- res.mode.contact
- tree
-
-
-
-
-
-
-
-
-
- Contact Mode
- ir.actions.act_window
- res.mode.contact
- form
- tree,form
-
-
-
-
-
- view.partner.contact
- res.partner
- form
-
-
-
-
-
-
-
-
product.normal.form.inheritproduct.product
@@ -748,7 +707,6 @@ invoiced
-
@@ -829,13 +787,6 @@ invoiced
parent="menu_point_config_product"
action="action_product_output"
id="products_for_output_operations"/>
-
-
@@ -845,22 +796,12 @@ invoiced
action="action_box_entries"
id="menu_wizard_enter_jrnl" sequence="3" />
-
-
-
-
-
POS Salespos.order
@@ -870,8 +811,8 @@ invoiced
+
-
@@ -888,8 +829,6 @@ invoiced
form
-
-
POS Sales Linespos.order.line
@@ -912,7 +851,6 @@ invoiced
form
-
@@ -926,8 +864,6 @@ invoiced
id="menu_action_sale_of_day_tree2" action="action_trans_pos_tree_today"/>
-
@@ -975,11 +911,6 @@ invoiced
-
-
-
diff --git a/addons/point_of_sale/pos_wizard.xml b/addons/point_of_sale/pos_wizard.xml
index 50e3630c4d7..4a321d7787f 100644
--- a/addons/point_of_sale/pos_wizard.xml
+++ b/addons/point_of_sale/pos_wizard.xml
@@ -1,74 +1,3 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/point_of_sale/pos_workflow.xml b/addons/point_of_sale/pos_workflow.xml
index d3f1313c13f..11cd9481343 100644
--- a/addons/point_of_sale/pos_workflow.xml
+++ b/addons/point_of_sale/pos_workflow.xml
@@ -66,7 +66,6 @@
done
-
diff --git a/addons/point_of_sale/posrule_data.xml b/addons/point_of_sale/posrule_data.xml
index b536e2a25b7..f5839cfd216 100644
--- a/addons/point_of_sale/posrule_data.xml
+++ b/addons/point_of_sale/posrule_data.xml
@@ -1,61 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -575,11 +520,6 @@
id="stock.next_id_61"
name="Reporting"
parent="stock.menu_stock_root" groups="base.group_user"/>
-
-
-
-
-
diff --git a/addons/point_of_sale/report/__init__.py b/addons/point_of_sale/report/__init__.py
index a5798add7b4..4af503ff9da 100644
--- a/addons/point_of_sale/report/__init__.py
+++ b/addons/point_of_sale/report/__init__.py
@@ -36,5 +36,6 @@ import pos_payment_report_user
import pos_sales_user_today_current_user
import pos_receipt_with_remboursment
import pos_receipt_without_remboursment
+import point_of_sale_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/point_of_sale/report/point_of_sale_report.py b/addons/point_of_sale/report/point_of_sale_report.py
new file mode 100644
index 00000000000..10ba94662a2
--- /dev/null
+++ b/addons/point_of_sale/report/point_of_sale_report.py
@@ -0,0 +1,242 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# 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 .
+#
+##############################################################################
+
+from osv import osv, fields
+import time
+import netsvc
+import tools
+
+class report_transaction_pos(osv.osv):
+ _name = "report.transaction.pos"
+ _description = "transaction for the pos"
+ _auto = False
+ _columns = {
+ 'date_create': fields.char('Date', size=16, readonly=True),
+ 'journal_id': fields.many2one('account.journal', 'Sales Journal', readonly=True),
+ 'jl_id': fields.many2one('account.journal', 'Cash Journals', readonly=True),
+ 'user_id': fields.many2one('res.users', 'User', readonly=True),
+ 'no_trans': fields.float('Number of Transaction', readonly=True),
+ 'amount': fields.float('Amount', readonly=True),
+ 'invoice_id': fields.float('Nbr Invoice', readonly=True),
+ 'invoice_am': fields.float('Invoice Amount', readonly=True),
+ 'product_nb': fields.float('Product Nb.', readonly=True),
+ 'disc': fields.float('Disc.', readonly=True),
+ }
+
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'report_transaction_pos')
+ cr.execute("""
+ create or replace view report_transaction_pos as (
+ select
+ min(absl.id) as id,
+ count(absl.id) as no_trans,
+ sum(absl.amount) as amount,
+ sum(line.price_ded) as disc,
+ to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')::text as date_create,
+ po.user_id as user_id,
+ po.sale_journal as journal_id,
+ abs.journal_id as jl_id,
+ count(po.invoice_id) as invoice_id,
+ count(p.id) as product_nb
+ from
+ account_bank_statement_line as absl,
+ account_bank_statement as abs,
+ product_product as p,
+ pos_order_line as line,
+ pos_order as po
+ where
+ absl.pos_statement_id = po.id and
+ line.order_id=po.id and
+ line.product_id=p.id and
+ absl.statement_id=abs.id
+
+ group by
+ po.user_id,po.sale_journal, abs.journal_id,
+ to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')::text
+ )
+ """)
+ #to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')
+ #to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')::text as date_create,
+report_transaction_pos()
+
+class report_sales_by_user_pos(osv.osv):
+ _name = "report.sales.by.user.pos"
+ _description = "Sales by user"
+ _auto = False
+ _columns = {
+ 'date_order': fields.date('Order Date',required=True, select=True),
+ 'amount': fields.float('Total', readonly=True, select=True),
+ 'qty': fields.float('Quantity', readonly=True, select=True),
+ 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
+ }
+
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'report_sales_by_user_pos')
+ cr.execute("""
+ create or replace view report_sales_by_user_pos as (
+ select
+ min(po.id) as id,
+ to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text as date_order,
+ po.user_id as user_id,
+ sum(pol.qty)as qty,
+ sum((pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))) as amount
+ from
+ pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt
+ where
+ pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id
+ group by
+ to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text,
+ po.user_id
+
+ )
+ """)
+report_sales_by_user_pos()
+
+class report_sales_by_user_pos_month(osv.osv):
+ _name = "report.sales.by.user.pos.month"
+ _description = "Sales by user monthly"
+ _auto = False
+ _columns = {
+ 'date_order': fields.date('Order Date',required=True, select=True),
+ 'amount': fields.float('Total', readonly=True, select=True),
+ 'qty': fields.float('Quantity', readonly=True, select=True),
+ 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
+ }
+
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'report_sales_by_user_pos_month')
+ cr.execute("""
+ create or replace view report_sales_by_user_pos_month as (
+ select
+ min(po.id) as id,
+ to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text as date_order,
+ po.user_id as user_id,
+ sum(pol.qty)as qty,
+ sum((pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))) as amount
+ from
+ pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt
+ where
+ pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id
+ group by
+ to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text,
+ po.user_id
+
+ )
+ """)
+report_sales_by_user_pos_month()
+
+class report_sales_by_margin_pos(osv.osv):
+ _name = "report.sales.by.margin.pos"
+ _description = "Sales by margin"
+ _auto = False
+ _columns = {
+# 'pos_name': fields.char('POS Order', size=64, readonly=True),
+ 'product_name':fields.char('Product Name', size=64, readonly=True),
+ 'date_order': fields.date('Order Date',required=True, select=True),
+ # 'amount': fields.float('Total', readonly=True, select=True),
+ 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
+ 'qty': fields.float('Qty', readonly=True, select=True),
+ 'net_margin_per_qty':fields.float('Net margin per Qty', readonly=True, select=True),
+ 'total':fields.float('Margin', readonly=True, select=True),
+
+ }
+
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'report_sales_by_margin_pos')
+ cr.execute("""
+ create or replace view report_sales_by_margin_pos as (
+ select
+ min(pol.id) as id,
+ po.user_id as user_id,
+ pt.name as product_name,
+ to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text as date_order,
+ sum(pol.qty) as qty,
+ pt.list_price-pt.standard_price as net_margin_per_qty,
+ (pt.list_price-pt.standard_price) *sum(pol.qty) as total
+ from
+ product_template as pt,
+ product_product as pp,
+ pos_order_line as pol,
+ pos_order as po
+ where
+ pol.product_id = pp.product_tmpl_id and
+ pp.product_tmpl_id = pt.id and
+ po.id = pol.order_id
+
+ group by
+ pt.name,
+ pt.list_price,
+ pt.standard_price,
+ po.user_id,
+ to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text
+
+ )
+ """)
+report_sales_by_margin_pos()
+
+class report_sales_by_margin_pos_month(osv.osv):
+ _name = "report.sales.by.margin.pos.month"
+ _description = "Sales by margin monthly"
+ _auto = False
+ _columns = {
+
+ 'product_name':fields.char('Product Name', size=64, readonly=True),
+ 'date_order': fields.date('Order Date',required=True, select=True),
+ 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
+ 'qty': fields.float('Qty', readonly=True, select=True),
+ 'net_margin_per_qty':fields.float('Net margin per Qty', readonly=True, select=True),
+ 'total':fields.float('Margin', readonly=True, select=True),
+
+ }
+
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'report_sales_by_margin_pos_month')
+ cr.execute("""
+ create or replace view report_sales_by_margin_pos_month as (
+ select
+ min(pol.id) as id,
+ po.user_id as user_id,
+ pt.name as product_name,
+ to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text as date_order,
+ sum(pol.qty) as qty,
+ pt.list_price-pt.standard_price as net_margin_per_qty,
+ (pt.list_price-pt.standard_price) *sum(pol.qty) as total
+ from
+ product_template as pt,
+ product_product as pp,
+ pos_order_line as pol,
+ pos_order as po
+ where
+ pol.product_id = pp.product_tmpl_id and
+ pp.product_tmpl_id = pt.id and
+ po.id = pol.order_id
+
+ group by
+ pt.name,
+ pt.list_price,
+ pt.standard_price,
+ po.user_id,
+ to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text
+
+ )
+ """)
+report_sales_by_margin_pos_month()
+
diff --git a/addons/point_of_sale/report/pos_receipt.rml b/addons/point_of_sale/report/pos_receipt.rml
index 1d2e6edc9d0..807d9e497d6 100644
--- a/addons/point_of_sale/report/pos_receipt.rml
+++ b/addons/point_of_sale/report/pos_receipt.rml
@@ -103,7 +103,7 @@
Tel : [[ address and address.phone ]]E-mail : [[ address and address.email ]]Shop : [[ o.shop_id.name ]]
- Vendeur : [[ o.user_id1.name ]]
+ Vendeur : [[ o.user_saleman.name ]]Date : [[ formatLang(o.date_order,date = True) ]]
diff --git a/addons/point_of_sale/sale_wizard.xml b/addons/point_of_sale/sale_wizard.xml
deleted file mode 100644
index ca741e2c808..00000000000
--- a/addons/point_of_sale/sale_wizard.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/addons/point_of_sale/security/ir.model.access.csv b/addons/point_of_sale/security/ir.model.access.csv
index 0cfc0fae9b7..599df9581ee 100644
--- a/addons/point_of_sale/security/ir.model.access.csv
+++ b/addons/point_of_sale/security/ir.model.access.csv
@@ -13,7 +13,6 @@
"access_sale_shop_pos_user","sale.shop pos_user","sale.model_sale_shop","point_of_sale.group_pos_user",1,0,0,0
"access_pos_order_stock_worker","pos.order stock_worker","model_pos_order","stock.group_stock_user",1,0,0,0
"access_stock_move_pos_user","stock.move pos_user","stock.model_stock_move","point_of_sale.group_pos_user",1,1,1,1
-"access_res_mode_contact","res.mode.contact","model_res_mode_contact","point_of_sale.group_pos_user",1,0,0,0
"access_report_sales_by_user_pos","report.sales.by.user.pos","model_report_sales_by_user_pos","point_of_sale.group_pos_user",1,0,0,0
"access_report_sales_by_user_pos_month","report.sales.by.user.pos.month","model_report_sales_by_user_pos_month","point_of_sale.group_pos_user",1,0,0,0
"access_report_sales_by_margin_pos","report.sales.by.margin.pos","model_report_sales_by_margin_pos","point_of_sale.group_pos_user",1,0,0,0
diff --git a/addons/point_of_sale/singer_statement_demo.xml b/addons/point_of_sale/singer_statement_demo.xml
index edc8299c609..68f889cddee 100644
--- a/addons/point_of_sale/singer_statement_demo.xml
+++ b/addons/point_of_sale/singer_statement_demo.xml
@@ -316,17 +316,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/point_of_sale/statement_view.xml b/addons/point_of_sale/statement_view.xml
index 80b2b1ec756..cef2748b5e4 100644
--- a/addons/point_of_sale/statement_view.xml
+++ b/addons/point_of_sale/statement_view.xml
@@ -434,7 +434,11 @@
string="Close Register"
action="action_pos_close_statement"
id="menu_close_statement" sequence="2" />
-
+
+
diff --git a/addons/point_of_sale/stock.py b/addons/point_of_sale/stock.py
index 95630569a7c..9d2b24d69b8 100644
--- a/addons/point_of_sale/stock.py
+++ b/addons/point_of_sale/stock.py
@@ -30,7 +30,6 @@ class stock_picking(osv.osv):
_inherit = 'stock.picking'
_columns = {
'pos_order': fields.many2one('pos.order', 'Pos order'),
- # 'company_id':fields.many2one('res.company', 'Company', required=True),
}
stock_picking()
diff --git a/addons/point_of_sale/wizard/__init__.py b/addons/point_of_sale/wizard/__init__.py
index cdfd3f9fb20..d8a4b93e3a2 100644
--- a/addons/point_of_sale/wizard/__init__.py
+++ b/addons/point_of_sale/wizard/__init__.py
@@ -19,7 +19,7 @@
# along with this program. If not, see .
#
##############################################################################
-import wizard_return
+
import pos_add_product
import pos_confirm
import pos_discount
@@ -39,6 +39,7 @@ import pos_payment_report_date
import pos_payment_report
import pos_payment
import pos_scan_product
+import pos_return
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/point_of_sale/wizard/pos_add_product.py b/addons/point_of_sale/wizard/pos_add_product.py
index 34769be78e9..b977f901eec 100644
--- a/addons/point_of_sale/wizard/pos_add_product.py
+++ b/addons/point_of_sale/wizard/pos_add_product.py
@@ -61,7 +61,27 @@ class add_product(osv.osv_memory):
'views': False,
'type': 'ir.actions.act_window',
}
+ def close_action(self, cr, uid, ids, context):
+ record_id = context and context.get('record_id', False)
+ order_obj= self.pool.get('pos.order')
+ order_line_obj= self.pool.get('pos.order.line')
+ obj=order_obj.browse(cr,uid, record_id)
+ order_obj.write(cr,uid,[record_id],{'state':'done'})
+ if obj.amount_total != obj.amount_paid:
+ return {
+ 'name': _('Make Payment'),
+ 'context ':context and context.get('record_id', False),
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'pos.make.payment',
+ 'view_id': False,
+ 'target': 'new',
+ 'views': False,
+ 'type': 'ir.actions.act_window',
+
+ }
+ return {}
add_product()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/point_of_sale/wizard/pos_add_product.xml b/addons/point_of_sale/wizard/pos_add_product.xml
index 5d380624f0d..f465f97f097 100644
--- a/addons/point_of_sale/wizard/pos_add_product.xml
+++ b/addons/point_of_sale/wizard/pos_add_product.xml
@@ -12,8 +12,8 @@
-
+
diff --git a/addons/point_of_sale/wizard/pos_payment.py b/addons/point_of_sale/wizard/pos_payment.py
index 8e25f3f0797..3c608e452fa 100644
--- a/addons/point_of_sale/wizard/pos_payment.py
+++ b/addons/point_of_sale/wizard/pos_payment.py
@@ -43,7 +43,7 @@ class pos_make_payment(osv.osv_memory):
@return: A dictionary which of fields with values.
"""
res = super(pos_make_payment, self).default_get(cr, uid, fields, context=context)
- record_id = context and context.get('active_id',False)
+ record_id = context and context.get('record_id',False)
j_obj = self.pool.get('account.journal')
company_id = self.pool.get('res.users').browse(cr,uid,uid).company_id.id
journal = j_obj.search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', company_id)])
@@ -81,7 +81,7 @@ class pos_make_payment(osv.osv_memory):
def view_init(self, cr, uid, fields_list, context=None):
res = super(pos_make_payment, self).view_init(cr, uid, fields_list, context=context)
- record_id = context and context.get('active_id', False) or False
+ record_id = context and context.get('record_id', False) or False
order = self.pool.get('pos.order').browse(cr, uid, record_id)
if not order.lines:
raise osv.except_osv('Error!','No order lines defined for this sale ')
@@ -103,8 +103,7 @@ class pos_make_payment(osv.osv_memory):
res = super(pos_make_payment, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
if record_id:
order = self.pool.get('pos.order').browse(cr, uid, record_id)
- amount = order.amount_total - order.amount_paid
- if amount==0.0:
+ if order.amount_total == order.amount_paid:
res['arch'] = """
diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml
index a9713776b4f..cd3e0dfb8fa 100644
--- a/addons/purchase/report/order.rml
+++ b/addons/purchase/report/order.rml
@@ -155,7 +155,7 @@
[[ repeatIn(o.dest_address_id and [o.dest_address_id] or [],'addr') ]]Shipping address :
- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_id.name ]] [[ o.partner_id.title or '' ]][[ addr.title or '' ]] [[ addr.name ]][[ addr.street ]][[ addr.street2 or '' ]]
@@ -175,7 +175,7 @@
- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_id.name ]] [[ o.partner_id.title or '' ]][[ o.partner_address_id.title or '' ]] [[ o.partner_address_id.name ]][[ o.partner_address_id.street ]][[ o.partner_address_id.street2 or '' ]]
diff --git a/addons/purchase/report/request_quotation.rml b/addons/purchase/report/request_quotation.rml
index c5f083bbf05..961ce8239b4 100644
--- a/addons/purchase/report/request_quotation.rml
+++ b/addons/purchase/report/request_quotation.rml
@@ -88,7 +88,7 @@
- [[ (order.partner_id and order.partner_id.title) or '' ]] [[ order.partner_id.name ]]
+ [[ order.partner_id.name ]] [[ order.partner_id.title or '' ]][[ (order.partner_address_id and order.partner_address_id.title) or '' ]] [[ order.partner_address_id.name ]] [[ (order.partner_address_id and order.partner_address_id.street) or '']] [[ order.partner_address_id.street2 ]][[ (order.partner_address_id and order.partner_address_id.zip) or '' ]] [[ (order.partner_address_id and order.partner_address_id.city) or '' ]]
diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py
index 8e4b4bc194c..14ff085a4c4 100644
--- a/addons/purchase_requisition/purchase_requisition.py
+++ b/addons/purchase_requisition/purchase_requisition.py
@@ -122,7 +122,7 @@ class purchase_order(osv.osv):
if order.id<>po.id:
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'purchase.order', order.id, 'purchase_cancel', cr)
- self.pool.get('purchase.requisition').write(cr, uid, [po.requisition_id.id], {'state':'close','date_end':time.strftime('%Y-%m-%d %H:%M:%S')})
+ self.pool.get('purchase.requisition').write(cr, uid, [po.requisition_id.id], {'state':'done','date_end':time.strftime('%Y-%m-%d %H:%M:%S')})
return res
diff --git a/addons/report_intrastat/report/invoice.rml b/addons/report_intrastat/report/invoice.rml
index 89b6448072e..4c3bfd5d2c4 100644
--- a/addons/report_intrastat/report/invoice.rml
+++ b/addons/report_intrastat/report/invoice.rml
@@ -245,7 +245,7 @@
- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_id.name ]] [[ o.partner_id.title or '' ]][[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]][[ o.address_invoice_id.street ]][[ o.address_invoice_id.street2 or '' ]]
diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml
index fa03eb1624b..1c205b6c256 100644
--- a/addons/sale/report/order.rml
+++ b/addons/sale/report/order.rml
@@ -134,7 +134,7 @@
Shipping address :
- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_id.name ]] [[ o.partner_id.title or '' ]][[ o.partner_shipping_id.title or '' ]] [[ o.partner_shipping_id.name ]][[ o.partner_shipping_id.street ]][[ o.partner_shipping_id.street2 or '' ]]
@@ -155,7 +155,7 @@
- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_id.name ]] [[ o.partner_id.title or '' ]][[ o.partner_order_id.title or '' ]] [[ o.partner_order_id.name ]][[ o.partner_order_id.street ]][[ o.partner_order_id.street2 or '' ]]
diff --git a/addons/smtpclient/i18n/ca.po b/addons/smtpclient/i18n/ca.po
index 5bbd228f8ba..5caaa7b3da4 100644
--- a/addons/smtpclient/i18n/ca.po
+++ b/addons/smtpclient/i18n/ca.po
@@ -1,20 +1,20 @@
-# Translation of OpenERP Server.
-# This file containt the translation of the following modules:
-# * smtpclient
+# Catalan translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
#
msgid ""
msgstr ""
-"Project-Id-Version: OpenERP Server 5.0.0-rc1\n"
-"Report-Msgid-Bugs-To: support@openerp.com\n"
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-11-26 06:00+0000\n"
-"PO-Revision-Date: 2010-01-19 05:22+0000\n"
-"Last-Translator: Jordi Esteve - http://www.zikzakmedia.com "
-"\n"
-"Language-Team: \n"
+"PO-Revision-Date: 2010-04-28 15:19+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Catalan \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-02-25 05:00+0000\n"
+"X-Launchpad-Export-Date: 2010-04-29 03:52+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: smtpclient
@@ -854,15 +854,3 @@ msgstr "res.company.address"
#: field:email.smtpclient.queue,state:0
msgid "Message Status"
msgstr ""
-
-#~ msgid "The Email is sent successfully to corresponding address"
-#~ msgstr "El correu ha estat enviat correctament a la direcció corresponent"
-
-#~ msgid "Servers"
-#~ msgstr "Servidors"
-
-#~ msgid "Verification Information"
-#~ msgstr "Informació de verificació"
-
-#~ msgid "Report name and Resources ids are required!"
-#~ msgstr "Nom d'informe i ids de registres són necessaris!"
diff --git a/addons/smtpclient/i18n/es.po b/addons/smtpclient/i18n/es.po
index d3bee99f6f5..bee10094fe6 100644
--- a/addons/smtpclient/i18n/es.po
+++ b/addons/smtpclient/i18n/es.po
@@ -1,20 +1,20 @@
-# Translation of OpenERP Server.
-# This file containt the translation of the following modules:
-# * smtpclient
+# Spanish translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
#
msgid ""
msgstr ""
-"Project-Id-Version: OpenERP Server 5.0.0-rc1\n"
-"Report-Msgid-Bugs-To: support@openerp.com\n"
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-11-26 06:00+0000\n"
-"PO-Revision-Date: 2010-01-19 05:21+0000\n"
-"Last-Translator: Jordi Esteve - http://www.zikzakmedia.com "
-"\n"
-"Language-Team: \n"
+"PO-Revision-Date: 2010-04-28 15:19+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Spanish \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-02-25 05:00+0000\n"
+"X-Launchpad-Export-Date: 2010-04-29 03:52+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: smtpclient
@@ -855,16 +855,3 @@ msgstr "res.company.address"
#: field:email.smtpclient.queue,state:0
msgid "Message Status"
msgstr ""
-
-#~ msgid "The Email is sent successfully to corresponding address"
-#~ msgstr ""
-#~ "El correo ha sido enviado correctamente a la dirección correspondiente"
-
-#~ msgid "Servers"
-#~ msgstr "Servidores"
-
-#~ msgid "Verification Information"
-#~ msgstr "Información de verificación"
-
-#~ msgid "Report name and Resources ids are required!"
-#~ msgstr "¡Nombre de informe y ids de registros son necesarios!"
diff --git a/addons/smtpclient/i18n/fr.po b/addons/smtpclient/i18n/fr.po
index 59083df5805..ef3aa9624d6 100644
--- a/addons/smtpclient/i18n/fr.po
+++ b/addons/smtpclient/i18n/fr.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-11-26 06:00+0000\n"
-"PO-Revision-Date: 2010-04-07 13:57+0000\n"
+"PO-Revision-Date: 2010-04-28 15:19+0000\n"
"Last-Translator: FULL NAME \n"
"Language-Team: French \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-13 03:42+0000\n"
+"X-Launchpad-Export-Date: 2010-04-29 03:52+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: smtpclient
diff --git a/addons/stock/report/__init__.py b/addons/stock/report/__init__.py
index 6b7f36a69fc..8fd64d9f112 100644
--- a/addons/stock/report/__init__.py
+++ b/addons/stock/report/__init__.py
@@ -27,6 +27,7 @@ import picking
import lot_overview
import lot_overview_all
import report_stock
+import report_stock_move
import report_stock_picking
import report_stock_move
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 9d1a1d46d29..4cee95a16c2 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1214,7 +1214,7 @@ class stock_move(osv.osv):
'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Origin"),
'move_stock_return_history': fields.many2many('stock.move', 'stock_move_return_history', 'move_id', 'return_move_id', 'Move Return History',readonly=True),
'delivered_id': fields.many2one('stock.delivery', 'Product delivered'),
- 'scraped': fields.related('location_dest_id','scraped',type='boolean',relation='stock.location',string='Scraped'),
+ 'scraped': fields.boolean('Scraped'),
}
_constraints = [
(_check_tracking,
@@ -1252,6 +1252,7 @@ class stock_move(osv.osv):
'state': lambda *a: 'draft',
'priority': lambda *a: '1',
'product_qty': lambda *a: 1.0,
+ 'scraped' : lambda *a: False,
'date_planned': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.move', context=c)
diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py
index 500b0bdc372..ea592bf86fa 100644
--- a/addons/stock/wizard/stock_move.py
+++ b/addons/stock/wizard/stock_move.py
@@ -87,8 +87,7 @@ class stock_move_consume(osv.osv_memory):
res.update({'product_uom': move.product_uom.id})
if 'product_qty' in fields:
res.update({'product_qty': move.product_qty})
- if 'location_id' in fields:
- res.update({'location_id': move.location_id.id})
+
return res
def do_move_consume(self, cr, uid, ids, context={}):
diff --git a/addons/thunderbird/i18n/en_GB.po b/addons/thunderbird/i18n/en_GB.po
new file mode 100644
index 00000000000..5d51db5a9a1
--- /dev/null
+++ b/addons/thunderbird/i18n/en_GB.po
@@ -0,0 +1,86 @@
+# English (United Kingdom) translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-11-26 06:05+0000\n"
+"PO-Revision-Date: 2010-04-28 19:32+0000\n"
+"Last-Translator: Shay \n"
+"Language-Team: English (United Kingdom) \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-04-29 03:52+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,copy_to:0
+msgid "Copy To"
+msgstr "Copy To"
+
+#. module: thunderbird
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"The Object name must start with x_ and not contain any special characters!"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,description:0
+msgid "Description"
+msgstr "Description"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,reference:0
+msgid "Reference"
+msgstr "Reference"
+
+#. module: thunderbird
+#: model:ir.model,name:thunderbird.model_tinythunderbird_partner
+msgid "Thunderbid mails"
+msgstr "Thunderbid mails"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,attachments:0
+msgid "Attached Files"
+msgstr "Attached Files"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,res_user_id:0
+msgid "User"
+msgstr "User"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,receiver:0
+msgid "Receiver"
+msgstr "Receiver"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,date:0
+msgid "Date"
+msgstr "Date"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,title:0
+msgid "Subject"
+msgstr "Subject"
+
+#. module: thunderbird
+#: code:addons/thunderbird/partner/partner.py:0
+#, python-format
+msgid "Archive"
+msgstr "Archive"
+
+#. module: thunderbird
+#: model:ir.module.module,shortdesc:thunderbird.module_meta_information
+msgid "Thunderbird Interface"
+msgstr "Thunderbird Interface"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,sender:0
+msgid "Sender"
+msgstr "Sender"
diff --git a/addons/thunderbird/i18n/es.po b/addons/thunderbird/i18n/es.po
new file mode 100644
index 00000000000..fa718bb8456
--- /dev/null
+++ b/addons/thunderbird/i18n/es.po
@@ -0,0 +1,86 @@
+# Spanish translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-11-26 06:05+0000\n"
+"PO-Revision-Date: 2010-04-28 19:31+0000\n"
+"Last-Translator: Shay \n"
+"Language-Team: Spanish \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-04-29 03:52+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,copy_to:0
+msgid "Copy To"
+msgstr "Copiar a"
+
+#. module: thunderbird
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"¡El objeto debe empezar con x_ y no puede contener ningún carácter especial!"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,description:0
+msgid "Description"
+msgstr "Descripción"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,reference:0
+msgid "Reference"
+msgstr "Referencia"
+
+#. module: thunderbird
+#: model:ir.model,name:thunderbird.model_tinythunderbird_partner
+msgid "Thunderbid mails"
+msgstr "Correo Thunderbid"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,attachments:0
+msgid "Attached Files"
+msgstr "Archivos Adjuntos"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,res_user_id:0
+msgid "User"
+msgstr "Usuario"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,receiver:0
+msgid "Receiver"
+msgstr "Destinatario"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,date:0
+msgid "Date"
+msgstr "Fecha"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,title:0
+msgid "Subject"
+msgstr "Asunto"
+
+#. module: thunderbird
+#: code:addons/thunderbird/partner/partner.py:0
+#, python-format
+msgid "Archive"
+msgstr "Archivar"
+
+#. module: thunderbird
+#: model:ir.module.module,shortdesc:thunderbird.module_meta_information
+msgid "Thunderbird Interface"
+msgstr "Interfaz Thunderbird"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,sender:0
+msgid "Sender"
+msgstr "Remitente"
diff --git a/addons/thunderbird/i18n/zh_CN.po b/addons/thunderbird/i18n/zh_CN.po
new file mode 100644
index 00000000000..265639d5f98
--- /dev/null
+++ b/addons/thunderbird/i18n/zh_CN.po
@@ -0,0 +1,85 @@
+# Chinese (Simplified) translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-11-26 06:05+0000\n"
+"PO-Revision-Date: 2010-04-28 19:35+0000\n"
+"Last-Translator: Shay \n"
+"Language-Team: Chinese (Simplified) \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-04-29 03:52+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,copy_to:0
+msgid "Copy To"
+msgstr "复制到"
+
+#. module: thunderbird
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr "对象名必须是以x_开头并且不能含有特殊字符"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,description:0
+msgid "Description"
+msgstr "描述"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,reference:0
+msgid "Reference"
+msgstr "参考"
+
+#. module: thunderbird
+#: model:ir.model,name:thunderbird.model_tinythunderbird_partner
+msgid "Thunderbid mails"
+msgstr "Thunderbid邮件"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,attachments:0
+msgid "Attached Files"
+msgstr "添加附件"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,res_user_id:0
+msgid "User"
+msgstr "用户"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,receiver:0
+msgid "Receiver"
+msgstr "收件人"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,date:0
+msgid "Date"
+msgstr "日期"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,title:0
+msgid "Subject"
+msgstr "主题"
+
+#. module: thunderbird
+#: code:addons/thunderbird/partner/partner.py:0
+#, python-format
+msgid "Archive"
+msgstr "存档"
+
+#. module: thunderbird
+#: model:ir.module.module,shortdesc:thunderbird.module_meta_information
+msgid "Thunderbird Interface"
+msgstr "Thunderbird接口"
+
+#. module: thunderbird
+#: field:tinythunderbird.partner,sender:0
+msgid "Sender"
+msgstr "发件人"