[MERGE] : with main

bzr revid: aja@tinyerp.com-20140204072402-ra7u1t0nmyot6j0j
This commit is contained in:
ajay javiya (OpenERP) 2014-02-04 12:54:02 +05:30
commit de2177bb26
207 changed files with 6344 additions and 1977 deletions

View File

@ -3187,11 +3187,14 @@ class wizard_multi_charts_accounts(osv.osv_memory):
def _get_analytic_journal(journal_type):
# Get the analytic journal
data = False
if journal_type in ('sale', 'sale_refund'):
data = obj_data.get_object_reference(cr, uid, 'account', 'analytic_journal_sale')
elif journal_type in ('purchase', 'purchase_refund'):
pass
elif journal_type == 'general':
try:
if journal_type in ('sale', 'sale_refund'):
data = obj_data.get_object_reference(cr, uid, 'account', 'analytic_journal_sale')
elif journal_type in ('purchase', 'purchase_refund'):
data = obj_data.get_object_reference(cr, uid, 'account', 'exp')
elif journal_type == 'general':
pass
except ValueError:
pass
return data and data[1] or False

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2012-06-20 16:14+0000\n"
"Last-Translator: Jiří Hajda <robie@centrum.cz>\n"
"PO-Revision-Date: 2014-02-02 15:35+0000\n"
"Last-Translator: Jakub Drozd <Unknown>\n"
"Language-Team: Czech <openerp-i18n-czech@lists.launchpad.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-01-28 05:54+0000\n"
"X-Generator: Launchpad (build 16914)\n"
"X-Launchpad-Export-Date: 2014-02-03 05:18+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Poedit-Language: Czech\n"
#. module: account
@ -195,7 +195,7 @@ msgstr "Označení sloupce"
#. module: account
#: help:account.config.settings,code_digits:0
msgid "No. of digits to use for account code"
msgstr ""
msgstr "Počet číslic použitých v čísle účtu"
#. module: account
#: help:account.analytic.journal,type:0
@ -258,7 +258,7 @@ msgstr ""
#. module: account
#: field:account.config.settings,sale_refund_sequence_next:0
msgid "Next credit note number"
msgstr ""
msgstr "Další číslo dobropisu"
#. module: account
#: help:account.config.settings,module_account_voucher:0
@ -444,7 +444,7 @@ msgstr ""
#: code:addons/account/static/src/xml/account_move_line_quickadd.xml:8
#, python-format
msgid "Period :"
msgstr ""
msgstr "Období :"
#. module: account
#: field:account.account.template,chart_template_id:0
@ -660,12 +660,12 @@ msgstr "Hlavní číselná řada musí být odlišná od současné!"
#: code:addons/account/wizard/account_change_currency.py:70
#, python-format
msgid "Current currency is not configured properly."
msgstr ""
msgstr "Stávající měna není správně nakonfigurována."
#. module: account
#: field:account.journal,profit_account_id:0
msgid "Profit Account"
msgstr ""
msgstr "Účet zisků"
#. module: account
#: code:addons/account/account_move_line.py:1156
@ -761,6 +761,8 @@ msgid ""
"The date of your Journal Entry is not in the defined period! You should "
"change the date or remove this constraint from the journal."
msgstr ""
"Datum vašeho záznamu deníku není v určeném období! Měli byste změnit datum "
"nebo odstranit omezení z deníku."
#. module: account
#: model:ir.model,name:account.model_account_report_general_ledger
@ -781,7 +783,7 @@ msgstr "Opravdu chcete vytvořit záznamy?"
#: code:addons/account/account_invoice.py:1361
#, python-format
msgid "Invoice partially paid: %s%s of %s%s (%s%s remaining)."
msgstr ""
msgstr "Faktura částečně uhrazena: %s%s z %s%s (%s%s zbývá)."
#. module: account
#: view:account.invoice:0
@ -890,7 +892,7 @@ msgstr "Analytický účet knihy"
#. module: account
#: view:account.invoice:0
msgid "Send by Email"
msgstr ""
msgstr "Odeslat e-mailem"
#. module: account
#: help:account.central.journal,amount_currency:0
@ -992,7 +994,7 @@ msgstr ""
#. module: account
#: model:mail.message.subtype,description:account.mt_invoice_paid
msgid "Invoice paid"
msgstr ""
msgstr "Faktura uhrazena"
#. module: account
#: view:validate.account.move:0
@ -1095,7 +1097,7 @@ msgstr "Kód"
#. module: account
#: view:account.config.settings:0
msgid "Features"
msgstr ""
msgstr "Vlastnosti"
#. module: account
#: code:addons/account/account.py:2346
@ -1162,7 +1164,7 @@ msgstr "Režim na šířku"
#. module: account
#: help:account.fiscalyear.close,fy_id:0
msgid "Select a Fiscal year to close"
msgstr "Vyberte finanční rok k uzavření"
msgstr "Vyberte fiskální rok k uzavření"
#. module: account
#: help:account.account.template,user_type:0
@ -1296,7 +1298,7 @@ msgstr "Kód bude zobrazen na výkazech."
#. module: account
#: view:account.tax.template:0
msgid "Taxes used in Purchases"
msgstr "Daně použité při nákuu"
msgstr "Daně použité při nákupu"
#. module: account
#: field:account.invoice.tax,tax_code_id:0
@ -1310,13 +1312,13 @@ msgstr "Kód daně"
#. module: account
#: field:account.account,currency_mode:0
msgid "Outgoing Currencies Rate"
msgstr "Odchozí měnový poměr"
msgstr "Odchozí měnový kurz"
#. module: account
#: view:account.analytic.account:0
#: field:account.config.settings,chart_template_id:0
msgid "Template"
msgstr ""
msgstr "Šablona"
#. module: account
#: selection:account.analytic.journal,type:0
@ -1389,7 +1391,7 @@ msgstr "Účet"
#. module: account
#: field:account.tax,include_base_amount:0
msgid "Included in base amount"
msgstr "Včetně základu"
msgstr "Zahrnuto v základní částce"
#. module: account
#: view:account.entries.report:0
@ -1457,7 +1459,7 @@ msgstr "Položky vyrovnání"
#: model:ir.actions.report.xml,name:account.account_overdue
#: view:res.company:0
msgid "Overdue Payments"
msgstr "Zpožděné platby"
msgstr "Platby po splatnosti"
#. module: account
#: report:account.third_party_ledger:0
@ -1529,7 +1531,7 @@ msgstr "Účet pohledávek"
#: code:addons/account/account.py:768
#, python-format
msgid "%s (copy)"
msgstr ""
msgstr "%s (kopie)"
#. module: account
#: report:account.account.balance:0
@ -1572,7 +1574,7 @@ msgstr "# z položek"
#. module: account
#: field:account.automatic.reconcile,max_amount:0
msgid "Maximum write-off amount"
msgstr "Max.množství odpisu"
msgstr "Maximální hodnota odpisu"
#. module: account
#. openerp-web
@ -1605,7 +1607,7 @@ msgstr ""
#. module: account
#: view:account.invoice.refund:0
msgid "Credit Note"
msgstr ""
msgstr "Dobropis"
#. module: account
#: view:account.config.settings:0
@ -1615,7 +1617,7 @@ msgstr "Elektronická fakturace a platby"
#. module: account
#: view:account.analytic.cost.ledger.journal.report:0
msgid "Cost Ledger for Period"
msgstr "Kniha nákladových účtu za období"
msgstr "Kniha nákladových účtú za období"
#. module: account
#: view:account.entries.report:0
@ -1690,7 +1692,7 @@ msgstr "Bez daně"
#. module: account
#: view:account.journal:0
msgid "Advanced Settings"
msgstr ""
msgstr "Rozšířená nastavení"
#. module: account
#: view:account.bank.statement:0
@ -1796,7 +1798,7 @@ msgstr "Analytické účtenictví"
#. module: account
#: report:account.overdue:0
msgid "Sub-Total :"
msgstr "Mezisoučet"
msgstr "Mezisoučet :"
#. module: account
#: help:res.company,tax_calculation_rounding_method:0
@ -1826,7 +1828,7 @@ msgstr "15 dnů"
#. module: account
#: model:ir.ui.menu,name:account.periodical_processing_invoicing
msgid "Invoicing"
msgstr "Fakturování"
msgstr "Fakturace"
#. module: account
#: code:addons/account/report/account_partner_balance.py:115
@ -1951,7 +1953,7 @@ msgstr ""
#. module: account
#: help:account.period,special:0
msgid "These periods can overlap."
msgstr "Tyto období se mohou překrývat."
msgstr "Tato období se mohou překrývat."
#. module: account
#: model:process.node,name:account.process_node_draftstatement0
@ -1977,7 +1979,7 @@ msgstr "Částka Dal"
#: field:account.bank.statement,message_ids:0
#: field:account.invoice,message_ids:0
msgid "Messages"
msgstr ""
msgstr "Zprávy"
#. module: account
#: view:account.vat.declaration:0
@ -2075,7 +2077,7 @@ msgstr "Analýza faktur"
#. module: account
#: model:ir.model,name:account.model_mail_compose_message
msgid "Email composition wizard"
msgstr ""
msgstr "Průvodce vytvořením emailu"
#. module: account
#: model:ir.model,name:account.model_account_period_close
@ -7494,7 +7496,7 @@ msgstr "Pro procenta zadejte násobek mezi 0-1."
#: field:account.invoice,date_invoice:0
#: field:report.invoice.created,date_invoice:0
msgid "Invoice Date"
msgstr "Datum vystavení"
msgstr "Datum vystavení faktury"
#. module: account
#: view:account.invoice.report:0

View File

@ -28,11 +28,6 @@ class analytic_entries_report(osv.osv):
_auto = False
_columns = {
'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'user_id': fields.many2one('res.users', 'User',readonly=True),
'name': fields.char('Description', size=64, readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner'),
@ -56,9 +51,6 @@ class analytic_entries_report(osv.osv):
min(a.id) as id,
count(distinct a.id) as nbr,
a.date as date,
to_char(a.date, 'YYYY') as year,
to_char(a.date, 'MM') as month,
to_char(a.date, 'YYYY-MM-DD') as day,
a.user_id as user_id,
a.name as name,
analytic.partner_id as partner_id,

View File

@ -6,7 +6,6 @@
<field name="model">analytic.entries.report</field>
<field name="arch" type="xml">
<search string="Analytic Entries Analysis">
<field name="day" string="Day"/>
<field name="date"/>
<filter string="My Entries" icon="terp-personal" domain="[('user_id','=',uid)]" help="My Entries"/>
<field name="account_id" groups="analytic.group_analytic_accounting"/>
@ -21,9 +20,9 @@
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<filter string="Product Unit of Measure" icon="terp-mrp" context="{'group_by':'product_uom_id'}"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" name="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
<filter string="Date (day)" icon="terp-go-today" context="{'group_by':'date:day'}"/>
<filter string="Date (month)" name="Month" icon="terp-go-month" context="{'group_by':'date:month'}"/>
<filter string="Date (year)" icon="terp-go-year" context="{'group_by':'date:year'}"/>
</group>
</search>
</field>
@ -34,8 +33,9 @@
<field name="arch" type="xml">
<graph string="Analytic Entries Analysis" type="pivot">
<field name="user_id" type="row"/>
<field name="unit_amount" operator="+"/>
<field name="amount" operator="+"/>
<field name="nbr" type="measure"/>
<field name="unit_amount" type="measure"/>
<field name="amount" type="measure"/>
</graph>
</field>
</record>

View File

@ -55,11 +55,6 @@ class account_invoice_report(osv.osv):
_columns = {
'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'month': fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_qty':fields.float('Qty', readonly=True),
'uom_name': fields.char('Reference Unit of Measure', size=128, readonly=True),
@ -105,7 +100,7 @@ class account_invoice_report(osv.osv):
def _select(self):
select_str = """
SELECT sub.id, sub.date, sub.year, sub.month, sub.day, sub.product_id, sub.partner_id, sub.country_id,
SELECT sub.id, sub.date, sub.product_id, sub.partner_id, sub.country_id,
sub.payment_term, sub.period_id, sub.uom_name, sub.currency_id, sub.journal_id,
sub.fiscal_position, sub.user_id, sub.company_id, sub.nbr, sub.type, sub.state,
sub.categ_id, sub.date_due, sub.account_id, sub.account_line_id, sub.partner_bank_id,
@ -118,9 +113,6 @@ class account_invoice_report(osv.osv):
select_str = """
SELECT min(ail.id) AS id,
ai.date_invoice AS date,
to_char(ai.date_invoice::timestamp with time zone, 'YYYY'::text) AS year,
to_char(ai.date_invoice::timestamp with time zone, 'MM'::text) AS month,
to_char(ai.date_invoice::timestamp with time zone, 'YYYY-MM-DD'::text) AS day,
ail.product_id, ai.partner_id, ai.payment_term, ai.period_id,
CASE
WHEN u.uom_type::text <> 'reference'::text
@ -192,9 +184,6 @@ class account_invoice_report(osv.osv):
def _group_by(self):
group_by_str = """
GROUP BY ail.product_id, ai.date_invoice, ai.id,
to_char(ai.date_invoice::timestamp with time zone, 'YYYY'::text),
to_char(ai.date_invoice::timestamp with time zone, 'MM'::text),
to_char(ai.date_invoice::timestamp with time zone, 'YYYY-MM-DD'::text),
ai.partner_id, ai.payment_term, ai.period_id, u.name, ai.currency_id, ai.journal_id,
ai.fiscal_position, ai.user_id, ai.company_id, ai.type, ai.state, pt.categ_id,
ai.date_due, ai.account_id, ail.account_id, ai.partner_bank_id, ai.residual,

View File

@ -6,8 +6,10 @@
<field name="model">account.invoice.report</field>
<field name="arch" type="xml">
<graph string="Invoices Analysis" type="pivot">
<field name="period_id" type="row"/>
<field name="categ_id" type="row"/>
<field name="period_id" type="col"/>
<field name="nbr" type="measure"/>
<field name="product_qty" type="measure"/>
<field name="price_total" type="measure"/>
</graph>
</field>
@ -47,9 +49,9 @@
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<filter string="Account" icon="terp-folder-orange" context="{'group_by':'account_line_id'}"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Day" name="day" icon="terp-go-today" context="{'group_by':'day'}" help="Group by Invoice Date"/>
<filter string="Month" name="month" icon="terp-go-month" context="{'group_by':'month'}" help="Group by month of Invoice Date"/>
<filter string="Year" name="group_year" icon="terp-go-year" context="{'group_by':'year'}" help="Group by year of Invoice Date"/>
<filter string="Invoice Date (day)" name="day" icon="terp-go-today" context="{'group_by':'date:day'}" help="Group by Invoice Date"/>
<filter string="Invoice Date (month)" name="month" icon="terp-go-month" context="{'group_by':'date:month'}" help="Group by month of Invoice Date"/>
<filter string="Invoice Date (year)" name="group_year" icon="terp-go-year" context="{'group_by':'date:year'}" help="Group by year of Invoice Date"/>
</group>
</search>
</field>

View File

@ -24,6 +24,8 @@
<field name="arch" type="xml">
<graph string="Treasury Analysis" type="pivot">
<field name="period_id" type="row"/>
<field name="debit" type="measure"/>
<field name="credit" type="measure"/>
<field name="balance" type="measure"/>
</graph>
</field>

View File

@ -23,6 +23,7 @@ import time
from openerp.osv import fields, osv
from openerp.tools.translate import _
from openerp.tools.float_utils import float_round
import openerp.addons.decimal_precision as dp
class account_move_line_reconcile(osv.osv_memory):
@ -64,7 +65,11 @@ class account_move_line_reconcile(osv.osv_memory):
credit += line.credit
debit += line.debit
account_id = line.account_id.id
return {'trans_nbr': count, 'account_id': account_id, 'credit': credit, 'debit': debit, 'writeoff': debit - credit}
precision = self.pool['decimal.precision'].precision_get(cr, uid, 'Account')
writeoff = float_round(debit-credit, precision_digits=precision)
credit = float_round(credit, precision_digits=precision)
debit = float_round(debit, precision_digits=precision)
return {'trans_nbr': count, 'account_id': account_id, 'credit': credit, 'debit': debit, 'writeoff': writeoff}
def trans_rec_addendum_writeoff(self, cr, uid, ids, context=None):
return self.pool.get('account.move.line.reconcile.writeoff').trans_rec_addendum(cr, uid, ids, context)

View File

@ -17,8 +17,8 @@
</group>
<footer>
<button string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1" attrs="{'invisible':[('writeoff','!=',0)]}" class="oe_highlight"/>
<button string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" attrs="{'invisible':[('writeoff','==',0)]}" class="oe_highlight"/>
<button string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object" attrs="{'invisible':[('writeoff','==',0)]}" class="oe_highlight"/>
<button string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" attrs="{'invisible':[('writeoff','=',0)]}" class="oe_highlight"/>
<button string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object" attrs="{'invisible':[('writeoff','=',0)]}" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>

View File

@ -219,7 +219,7 @@
<filter name="open" string="In Progress" domain="[('state','in',('open','draft'))]" help="Contracts in progress (open, draft)"/>
<filter name="pending" string="To Renew" domain="[('state','=','pending')]" help="Pending contracts"/>
<filter name="closed" string="Closed" domain="[('state','=','close')]" help="Closed contracts"/>
<filter name="cancelled" string="Cancelled" domain="[('state','=','cancel')]" help="Cancelled contracts"/>
<filter name="cancelled" string="Cancelled" domain="[('state','=','cancelled')]" help="Cancelled contracts"/>
<separator/>
<filter
string="Expired or consumed"

View File

@ -35,9 +35,9 @@ class account_asset_category(osv.osv):
'name': fields.char('Name', size=64, required=True, select=1),
'note': fields.text('Note'),
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'),
'account_asset_id': fields.many2one('account.account', 'Asset Account', required=True),
'account_depreciation_id': fields.many2one('account.account', 'Depreciation Account', required=True),
'account_expense_depreciation_id': fields.many2one('account.account', 'Depr. Expense Account', required=True),
'account_asset_id': fields.many2one('account.account', 'Asset Account', required=True, domain=[('type','=','other')]),
'account_depreciation_id': fields.many2one('account.account', 'Depreciation Account', required=True, domain=[('type','=','other')]),
'account_expense_depreciation_id': fields.many2one('account.account', 'Depr. Expense Account', required=True, domain=[('type','=','other')]),
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'method': fields.selection([('linear','Linear'),('degressive','Degressive')], 'Computation Method', required=True, help="Choose the method to use to compute the amount of depreciation lines.\n"\

View File

@ -7,8 +7,11 @@
<field name="model">asset.asset.report</field>
<field name="arch" type="xml">
<graph string="Assets Analysis" type="pivot">
<field name="asset_id"/>
<field name="depreciation_value"/>
<field name="asset_id" type="row"/>
<field name="nbr" type="measure"/>
<field name="gross_value" type="measure"/>
<field name="depreciation_value" type="measure"/>
<field name="posted_value" type="measure"/>
</graph>
</field>
</record>

View File

@ -149,7 +149,7 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_9_followup_id">[[ format(get_text(o,data['form']['followup_id'])) ]]</para>
<pre style="terp_default_9_followup_id">[[ format(get_text(o,data['form']['followup_id'])) ]]</pre>
<para style="terp_default_9">
<font color="white"> </font>
</para>

View File

@ -99,6 +99,9 @@ class CompanyLDAP(osv.osv):
filter = filter_format(conf['ldap_filter'], (login,))
try:
results = self.query(conf, filter)
# Get rid of (None, attrs) for searchResultReference replies
results = [i for i in results if i[0]]
if results and len(results) == 1:
dn = results[0][0]
conn = self.connect(conf)

View File

@ -68,8 +68,6 @@ class OAuthLogin(openerp.addons.web.controllers.main.Home):
@http.route()
def web_login(self, *args, **kw):
http.ensure_db(with_registry=True)
request.disable_db = False
providers = self.list_providers()
response = super(OAuthLogin, self).web_login(*args, **kw)

View File

@ -1,6 +1,6 @@
import logging
import urllib
import werkzeug.urls
import urlparse
import urllib2
import simplejson
@ -25,7 +25,7 @@ class res_users(osv.Model):
]
def _auth_oauth_rpc(self, cr, uid, endpoint, access_token, context=None):
params = urllib.urlencode({'access_token': access_token})
params = werkzeug.url_encode({'access_token': access_token})
if urlparse.urlparse(endpoint)[4]:
url = endpoint + '&' + params
else:

View File

@ -23,7 +23,6 @@ import logging
import os
import tempfile
import getpass
import urllib
import werkzeug.urls
import werkzeug.exceptions
@ -79,7 +78,7 @@ class GoogleAppsAwareConsumer(consumer.GenericConsumer):
# update fields
for attr in ['claimed_id', 'identity']:
value = message.getArg(consumer.OPENID2_NS, attr, '')
value = 'https://www.google.com/accounts/o8/user-xrds?uri=%s' % urllib.quote_plus(value)
value = 'https://www.google.com/accounts/o8/user-xrds?uri=%s' % werkzeug.url_quote_plus(value)
message.setArg(consumer.OPENID2_NS, attr, value)
# now, resign the message

View File

@ -30,12 +30,10 @@ from openerp.tools import exception_to_unicode
_logger = logging.getLogger(__name__)
class Home(openerp.addons.web.controllers.main.Home):
class AuthSignup(openerp.addons.web.controllers.main.Home):
@http.route()
def web_login(self, *args, **kw):
http.ensure_db(with_registry=True)
mode = request.params.get('mode')
qcontext = request.params.copy()
response = webmain.render_bootstrap_template(request.session.db, 'auth_signup.signup', qcontext, lazy=True)
@ -62,7 +60,7 @@ class Home(openerp.addons.web.controllers.main.Home):
qcontext.update(config)
if 'error' in qcontext or mode not in ('reset', 'signup') or (not token and not config[mode]):
response = super(Home, self).web_login(*args, **kw)
response = super(AuthSignup, self).web_login(*args, **kw)
if isinstance(response, LazyResponse):
response.params['values'].update(config)
return response
@ -88,7 +86,7 @@ class Home(openerp.addons.web.controllers.main.Home):
request.cr.commit()
except SignupError, e:
qcontext['error'] = exception_to_unicode(e)
return super(Home, self).web_login(*args, **kw)
return super(AuthSignup, self).web_login(*args, **kw)
return response

View File

@ -1330,13 +1330,13 @@ class calendar_event(osv.Model):
new_id = get_real_ids(arg[2])
new_arg = (arg[0], arg[1], new_id)
new_args.append(new_arg)
#offset, limit and count must be treated separately as we may need to deal with virtual ids
if context.get('virtual_id', True):
res = super(calendar_event, self).search(cr, uid, new_args, offset=0, limit=0, order=None, context=context, count=False)
res = self.get_recurrent_ids(cr, uid, res, args, order=order, context=context)
else:
res = super(calendar_event, self).search(cr, uid, new_args, offset=0, limit=0, order=order, context=context, count=False)
if not context.get('virtual_id', True):
return super(calendar_event, self).search(cr, uid, new_args, offset=offset, limit=limit, order=order, context=context, count=count)
# offset, limit, order and count must be treated separately as we may need to deal with virtual ids
res = super(calendar_event, self).search(cr, uid, new_args, offset=0, limit=0, order=None, context=context, count=False)
res = self.get_recurrent_ids(cr, uid, res, args, order=order, context=context)
if count:
return len(res)
elif limit:

View File

@ -313,7 +313,7 @@
<field name="name">Meetings</field>
<field name="res_model">calendar.event</field>
<field name="view_mode">form,calendar,tree,gantt</field>
<field name="view_id" ref="action_view_calendar_event_form"/>
<field name="view_id" ref="view_calendar_event_form"/>
</record>

View File

@ -40,20 +40,12 @@ class crm_phonecall_report(osv.osv):
_auto = False
_columns = {
'name': fields.char('Year', size=64, required=False, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'nbr': fields.integer('# of Cases', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
'month':fields.selection([('01', 'January'), ('02', 'February'), \
('03', 'March'), ('04', 'April'),\
('05', 'May'), ('06', 'June'), \
('07', 'July'), ('08', 'August'),\
('09', 'September'), ('10', 'October'),\
('11', 'November'), ('12', 'December')], 'Month', readonly=True),
'create_date': fields.datetime('Create Date', readonly=True, select=True),
'day': fields.char('Day', size=128, readonly=True),
'delay_close': fields.float('Delay to close', digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
'duration': fields.float('Duration', digits=(16,2),readonly=True, group_operator="avg"),
'delay_open': fields.float('Delay to open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"),
@ -77,9 +69,6 @@ class crm_phonecall_report(osv.osv):
create or replace view crm_phonecall_report as (
select
id,
to_char(c.date, 'YYYY') as name,
to_char(c.date, 'MM') as month,
to_char(c.date, 'YYYY-MM-DD') as day,
to_char(c.create_date, 'YYYY-MM-DD') as creation_date,
to_char(c.date_open, 'YYYY-MM-DD') as opening_date,
to_char(c.date_closed, 'YYYY-mm-dd') as date_closed,

View File

@ -12,6 +12,7 @@
<field name="user_id" type="row"/>
<!-- <field name="state" type="col"/> -->
<field name="nbr" type="measure"/>
<field name="duration" type="measure"/>
</graph>
</field>
</record>
@ -52,9 +53,9 @@
<filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" />
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Day" icon="terp-go-today" domain="[]" context="{'group_by':'day'}" help="Date of call"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'month'}" help="Month of call"/>
<filter string="Year" icon="terp-go-year" domain="[]" context="{'group_by':'name'}" help="Year of call"/>
<filter string="Creation Date (day)" icon="terp-go-today" domain="[]" context="{'group_by':'create_date:day'}" help="Date of call"/>
<filter string="Creation Date (month)" icon="terp-go-month" domain="[]" context="{'group_by':'create_date:month'}" help="Month of call"/>
<filter string="Creation Date (year)" icon="terp-go-year" domain="[]" context="{'group_by':'create_date:name'}" help="Year of call"/>
</group>
</search>
</field>

View File

@ -30,22 +30,14 @@ class crm_lead_report_assign(osv.osv):
_auto = False
_description = "CRM Lead Report"
_columns = {
'year': fields.char('Year', size=64, required=False, readonly=True),
'partner_assigned_id':fields.many2one('res.partner', 'Partner', readonly=True),
'grade_id':fields.many2one('res.partner.grade', 'Grade', readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'country_id':fields.many2one('res.country', 'Country', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Sales Team', readonly=True),
'month':fields.selection([('01', 'January'), ('02', 'February'), \
('03', 'March'), ('04', 'April'),\
('05', 'May'), ('06', 'June'), \
('07', 'July'), ('08', 'August'),\
('09', 'September'), ('10', 'October'),\
('11', 'November'), ('12', 'December')], 'Month', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'date_assign': fields.date('Partner Date', readonly=True),
'date_assign': fields.date('Assign Date', readonly=True),
'create_date': fields.datetime('Create Date', readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'delay_open': fields.float('Delay to Assign',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"),
'delay_close': fields.float('Delay to Close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
'delay_expected': fields.float('Overpassed Deadline',digits=(16,2),readonly=True, group_operator="avg"),
@ -77,9 +69,6 @@ class crm_lead_report_assign(osv.osv):
CREATE OR REPLACE VIEW crm_lead_report_assign AS (
SELECT
c.id,
to_char(c.date_assign, 'YYYY') as year,
to_char(c.date_assign, 'MM') as month,
to_char(c.date_assign, 'YYYY-MM-DD') as day,
to_char(c.create_date, 'YYYY-MM-DD') as creation_date,
to_char(c.date_open, 'YYYY-MM-DD') as opening_date,
to_char(c.date_closed, 'YYYY-mm-dd') as date_closed,

View File

@ -35,10 +35,9 @@
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" />
<filter string="Assign Month" icon="terp-go-today" domain="[]" name="group_partner_date" context="{'group_by':'date_assign'}"/>
<filter string="Day" icon="terp-go-today" domain="[]" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'month'}" />
<filter string="Year" icon="terp-go-year" domain="[]" context="{'group_by':'year'}" />
<filter string="Assign Date (day)" icon="terp-go-today" domain="[]" context="{'group_by':'date_assign:day'}"/>
<filter string="Assign Date (month)" icon="terp-go-month" domain="[]" context="{'group_by':'date_assign:month'}"/>
<filter string="Assign Date (year)" icon="terp-go-year" domain="[]" context="{'group_by':'date_assign:year'}"/>
</group>
</search>
</field>
@ -50,9 +49,11 @@
<field name="name">crm.lead.assign.graph</field>
<field name="model">crm.lead.report.assign</field>
<field name="arch" type="xml">
<graph orientation="horizontal" string="Lead Assign" type="pivot" stacked="True">
<field name="user_id" type="row"/>
<graph string="Lead Assign" type="pivot" stacked="True">
<field name="grade_id" type="row"/>
<field name="date_assign" interval="month" type="row"/>
<field name="nbr" type="measure"/>
<field name="probable_revenue" type="measure"/>
</graph>
</field>
</record>
@ -63,7 +64,7 @@
<field name="name">Opp. Assignment Analysis</field>
<field name="res_model">crm.lead.report.assign</field>
<field name="view_type">form</field>
<field name="context">{'default_type': 'opportunity', "search_default_group_partner_date": 1, "search_default_group_grade":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{'default_type': 'opportunity', 'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_mode">graph</field>
<field name="domain">[('type', '=', 'opportunity')]</field>
</record>

View File

@ -24,7 +24,7 @@
domain="[]" context="{'group_by':'grade_id'}" />
<filter string="Partner" name="" icon="terp-stock_symbol-selection"
domain="[]" context="{'group_by':'partner_id'}" />
<filter string="Date Invoice" name="group_period_id" icon="terp-stock_symbol-selection"
<filter string="Invoice Period" name="group_period_id" icon="terp-stock_symbol-selection"
domain="[]" context="{'group_by':'period_id'}" />
<filter string="Date Partnership" name="group_date_partnership" icon="terp-stock_symbol-selection"
domain="[]" context="{'group_by':'date_partnership'}" />
@ -35,25 +35,15 @@
</field>
</record>
<!-- Crm Lead Assign report Graph View -->
<record id="view_report_crm_partner_assign_tree" model="ir.ui.view">
<field name="name">crm.partner.assign.report.tree</field>
<record id="view_report_crm_partner_assign_graph" model="ir.ui.view">
<field name="name">crm.partner.assign.report.graph</field>
<field name="model">crm.partner.report.assign</field>
<field name="arch" type="xml">
<tree string="Opportunities Assignment Analysis" create="false">
<field name="partner_id" invisible="1"/>
<field name="country_id" invisible="1"/>
<field name="grade_id" invisible="1"/>
<field name="activation" invisible="1"/>
<field name="date_review" invisible="1"/>
<field name="date_partnership" invisible="1"/>
<field name="period_id" invisible="1"/>
<field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
<field name="user_id" invisible="1"/>
<field name="opp"/>
<field name="turnover"/>
</tree>
<graph string="Opportunities Assignment Analysis" type="pivot" stacked="True">
<field name="grade_id" type="row"/>
<field name="opp" type="measure"/>
<field name="turnover" type="measure"/>
</graph>
</field>
</record>
@ -62,8 +52,8 @@
<record id="action_report_crm_partner_assign" model="ir.actions.act_window">
<field name="name">Partnership Analysis</field>
<field name="res_model">crm.partner.report.assign</field>
<field name="context">{'search_default_group_grade': 1, 'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_mode">tree</field>
<field name="context">{'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_mode">graph</field>
<field name="domain">[('grade_id', '!=', False)]</field>
</record>

View File

@ -50,9 +50,9 @@ class decimal_precision(orm.Model):
self.precision_get.clear_cache(self)
for obj in self.pool.obj_list():
for colname, col in self.pool.get(obj)._columns.items():
if isinstance(col, (fields.float, fields.function)):
if hasattr(col, 'digits_change'):
col.digits_change(cr)
RegistryManager.signal_registry_change(cr.dbname)
RegistryManager.signal_caches_change(cr.dbname)
def create(self, cr, uid, data, context=None):
res = super(decimal_precision, self).create(cr, uid, data, context=context)

View File

@ -110,11 +110,11 @@ class delivery_carrier(osv.osv):
# not using advanced pricing per destination: override grid
grid_id = grid_pool.search(cr, uid, [('carrier_id', '=', record.id)], context=context)
if grid_id and not (record.normal_price or record.free_if_more_than):
grid_pool.unlink(cr, uid, grid_id, context=context)
if not (record.normal_price or record.free_if_more_than):
# Check that float, else 0.0 is False
if not (isinstance(record.normal_price,float) or record.free_if_more_than):
continue
if not grid_id:
@ -141,7 +141,7 @@ class delivery_carrier(osv.osv):
'list_price': 0.0,
}
grid_line_pool.create(cr, uid, line_data, context=context)
if record.normal_price:
if isinstance(record.normal_price,float):
line_data = {
'grid_id': grid_id and grid_id[0],
'name': _('Default price'),
@ -192,7 +192,7 @@ class delivery_grid(osv.osv):
weight = 0
volume = 0
for line in order.order_line:
if not line.product_id:
if not line.product_id or line.is_delivery:
continue
total += line.price_subtotal or 0.0
weight += (line.product_id.weight or 0.0) * line.product_uom_qty
@ -205,9 +205,8 @@ class delivery_grid(osv.osv):
grid = self.browse(cr, uid, id, context=context)
price = 0.0
ok = False
price_dict = {'price': total, 'volume':volume, 'weight': weight, 'wv':volume*weight}
for line in grid.line_ids:
price_dict = {'price': total, 'volume':volume, 'weight': weight, 'wv':volume*weight}
test = eval(line.type+line.operator+str(line.max_value), price_dict)
if test:
if line.price_type=='variable':

View File

@ -35,6 +35,7 @@
<field name="normal_price">20</field>
<field name="partner_id" ref="res_partner_23"/>
<field name="product_id" ref="product_product_delivery"/>
<field name="use_detailed_pricelist" eval="True"/>
</record>
<record id="free_delivery_carrier" model="delivery.carrier">

View File

@ -262,6 +262,7 @@ class abstracted_fs(object):
if path == '/' and mode in ('list', 'cwd'):
return (None, None, None )
if path == '..': path = self.cwd + '/..'
path = _to_unicode(os.path.normpath(path)) # again, for '/db/../ss'
if path == '.': path = ''

View File

@ -1,5 +1,5 @@
import simplejson
import urllib
import werkzeug.urls
import openerp
import openerp.addons.web.controllers.main as webmain
@ -17,7 +17,7 @@ class EDI(openerp.http.Controller):
css = "\n ".join('<link rel="stylesheet" href="%s">' % i for i in webmain.manifest_list(req, modules_str, 'css'))
# `url` may contain a full URL with a valid query string, we basically want to watch out for XML brackets and double-quotes
safe_url = urllib.quote_plus(url,':/?&;=')
safe_url = werkzeug.url_quote_plus(url,':/?&;=')
return webmain.html_template % {
'js': js,

View File

@ -417,8 +417,8 @@ class email_template(osv.osv):
# create a mail_mail based on values, without attachments
values = self.generate_email(cr, uid, template_id, res_id, context=context)
assert values.get('email_from'), 'email_from is missing or empty after template rendering, send_mail() cannot proceed'
if not values.get('email_from'):
raise osv.except_osv(_('Warning!'),_("Sender email is missing or empty after template rendering. Specify one to deliver your message"))
# process partner_to field that is a comma separated list of partner_ids -> recipient_ids
# NOTE: only usable if force_send is True, because otherwise the value is
# not stored on the mail_mail, and therefore lost -> fixed in v8

View File

@ -0,0 +1,515 @@
# Bosnian translation for openobject-addons
# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2014-02-01 22:19+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Bosnian <bs@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: 2014-02-02 05:31+0000\n"
"X-Generator: Launchpad (build 16916)\n"
#. module: email_template
#: field:email.template,email_from:0
#: field:email_template.preview,email_from:0
msgid "From"
msgstr "Od"
#. module: email_template
#: field:mail.compose.message,template_id:0
msgid "Template"
msgstr "Predložak"
#. module: email_template
#: help:email.template,ref_ir_value:0
#: help:email_template.preview,ref_ir_value:0
msgid "Sidebar button to open the sidebar action"
msgstr "Dugme za otvaranje akcije sidebar-a"
#. module: email_template
#: field:res.partner,opt_out:0
msgid "Opt-Out"
msgstr "Isključiti iz masovne e-pošte"
#. module: email_template
#: field:email.template,email_to:0
#: field:email_template.preview,email_to:0
msgid "To (Emails)"
msgstr "Za (E-mailovi)"
#. module: email_template
#: field:email.template,mail_server_id:0
#: field:email_template.preview,mail_server_id:0
msgid "Outgoing Mail Server"
msgstr "Odlazni E-mail server"
#. module: email_template
#: help:email.template,ref_ir_act_window:0
#: help:email_template.preview,ref_ir_act_window:0
msgid ""
"Sidebar action to make this template available on records of the related "
"document model"
msgstr ""
"Akcija sidebar-a za postavljanje ovog prijedloga dostupnog na akcijama "
"povezanog modela dokumenta"
#. module: email_template
#: field:email.template,model_object_field:0
#: field:email_template.preview,model_object_field:0
msgid "Field"
msgstr "Polje"
#. module: email_template
#: help:email.template,email_from:0
#: help:email_template.preview,email_from:0
msgid "Sender address (placeholders may be used here)"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Remove context action"
msgstr "Ukloni kontekstnu akciju"
#. module: email_template
#: help:email.template,mail_server_id:0
#: help:email_template.preview,mail_server_id:0
msgid ""
"Optional preferred server for outgoing mails. If not set, the highest "
"priority one will be used."
msgstr ""
"Opcioni preferirani server za izlaznu poštu. Ako nije podešen koristiti će "
"se onaj sa najvišim prioritetom."
#. module: email_template
#: field:email.template,report_name:0
#: field:email_template.preview,report_name:0
msgid "Report Filename"
msgstr "Naziv fajla izvještaja"
#. module: email_template
#: view:email.template:0
msgid "Preview"
msgstr "Pregled"
#. module: email_template
#: field:email.template,reply_to:0
#: field:email_template.preview,reply_to:0
msgid "Reply-To"
msgstr "Odgovori na"
#. module: email_template
#: view:mail.compose.message:0
msgid "Use template"
msgstr "Koristi predložak"
#. module: email_template
#: field:email.template,body_html:0
#: field:email_template.preview,body_html:0
msgid "Body"
msgstr "Sadržaj"
#. module: email_template
#: code:addons/email_template/email_template.py:247
#, python-format
msgid "%s (copy)"
msgstr "%s (kopija)"
#. module: email_template
#: help:email.template,user_signature:0
#: help:email_template.preview,user_signature:0
msgid ""
"If checked, the user's signature will be appended to the text version of the "
"message"
msgstr ""
"Ako je odabrano, potpis korisnika biti će dodan tekst verziji poruke."
#. module: email_template
#: view:email.template:0
msgid "SMTP Server"
msgstr "SMTP server"
#. module: email_template
#: view:mail.compose.message:0
msgid "Save as new template"
msgstr "Spremi kao novi predložak"
#. module: email_template
#: help:email.template,sub_object:0
#: help:email_template.preview,sub_object:0
msgid ""
"When a relationship field is selected as first field, this field shows the "
"document model the relationship goes to."
msgstr ""
"Kada je relaciono polje odabrano kao prvo polje, ovo polje prikazuje model "
"dokumenta kojem relacija odlazi."
#. module: email_template
#: model:ir.model,name:email_template.model_email_template
msgid "Email Templates"
msgstr "E-mail predlošci"
#. module: email_template
#: help:email.template,report_name:0
#: help:email_template.preview,report_name:0
msgid ""
"Name to use for the generated report file (may contain placeholders)\n"
"The extension can be omitted and will then come from the report type."
msgstr ""
"Naziv za korišćenje generisanog fajla izvještaja(može da sadrži držače "
"mjesta)\n"
"Ekstenzija može biti zanemarena i biće zamjenjena tipom izvještaja."
#. module: email_template
#: field:email.template,ref_ir_act_window:0
#: field:email_template.preview,ref_ir_act_window:0
msgid "Sidebar action"
msgstr "Akcija sidebar-a"
#. module: email_template
#: help:email.template,lang:0
#: help:email_template.preview,lang:0
msgid ""
"Optional translation language (ISO code) to select when sending out an "
"email. If not set, the english version will be used. This should usually be "
"a placeholder expression that provides the appropriate language code, e.g. "
"${object.partner_id.lang.code}."
msgstr ""
"Opcioni jezik prevoda (ISO šifra) za izbor prilikom slanja email-a. Ako nije "
"postavljeno, koristiće se engleska verzija. Ovo bi najčešće treblo biti "
"izraz držača mjesta koja obezbjeđuje odgovarajuću šifru jezika, npr: "
"${object.partner_id.lang.code}."
#. module: email_template
#: field:email_template.preview,res_id:0
msgid "Sample Document"
msgstr "Primjer dokumenta"
#. module: email_template
#: help:email.template,model_object_field:0
#: help:email_template.preview,model_object_field:0
msgid ""
"Select target field from the related document model.\n"
"If it is a relationship field you will be able to select a target field at "
"the destination of the relationship."
msgstr ""
"Odaberite ciljno polje iz povezanog modela dokumenta.\n"
"Ako je ovo relaciono polje moći će te odabrati ciljano polje na odredištu "
"relacije."
#. module: email_template
#: view:email.template:0
msgid "Dynamic Value Builder"
msgstr "Kreator dinamičke vrijednosti"
#. module: email_template
#: model:ir.actions.act_window,name:email_template.wizard_email_template_preview
msgid "Template Preview"
msgstr "Pregled predloška"
#. module: email_template
#: view:mail.compose.message:0
msgid "Save as a new template"
msgstr "Spremi kao novi predložak"
#. module: email_template
#: view:email.template:0
msgid ""
"Display an option on related documents to open a composition wizard with "
"this template"
msgstr ""
"Na povezanim dokumentima prikaži opciju koja poziva čarobnjak sa ovim "
"predloškom"
#. module: email_template
#: help:email.template,email_cc:0
#: help:email_template.preview,email_cc:0
msgid "Carbon copy recipients (placeholders may be used here)"
msgstr "Primaoci kopije(mogu se koristiti držači mjesta)"
#. module: email_template
#: help:email.template,email_to:0
#: help:email_template.preview,email_to:0
msgid "Comma-separated recipient addresses (placeholders may be used here)"
msgstr "Adrese primatelja odvojene zarezom"
#. module: email_template
#: view:email.template:0
msgid "Advanced"
msgstr "Napredno"
#. module: email_template
#: view:email_template.preview:0
msgid "Preview of"
msgstr "Pregled"
#. module: email_template
#: view:email_template.preview:0
msgid "Using sample document"
msgstr "Koristi primjer dokumenta"
#. module: email_template
#: view:email.template:0
#: model:ir.actions.act_window,name:email_template.action_email_template_tree_all
#: model:ir.ui.menu,name:email_template.menu_email_templates
msgid "Templates"
msgstr "Predlošci"
#. module: email_template
#: field:email.template,name:0
#: field:email_template.preview,name:0
msgid "Name"
msgstr "Naziv"
#. module: email_template
#: field:email.template,lang:0
#: field:email_template.preview,lang:0
msgid "Language"
msgstr "Jezik"
#. module: email_template
#: model:ir.model,name:email_template.model_email_template_preview
msgid "Email Template Preview"
msgstr "Pregled e-mail predloška"
#. module: email_template
#: view:email_template.preview:0
msgid "Email Preview"
msgstr "Pregled e-maila"
#. module: email_template
#: view:email.template:0
msgid ""
"Remove the contextual action to use this template on related documents"
msgstr ""
"Ukloni dodatnu akciju da se ovaj predložak koristi na povezanim dokumentima"
#. module: email_template
#: field:email.template,copyvalue:0
#: field:email_template.preview,copyvalue:0
msgid "Placeholder Expression"
msgstr "Izraz držača mjesta"
#. module: email_template
#: field:email.template,sub_object:0
#: field:email_template.preview,sub_object:0
msgid "Sub-model"
msgstr "Podmodel"
#. module: email_template
#: help:email.template,subject:0
#: help:email_template.preview,subject:0
msgid "Subject (placeholders may be used here)"
msgstr "Tema(mogu se koristiti držači mjesta)"
#. module: email_template
#: help:email.template,reply_to:0
#: help:email_template.preview,reply_to:0
msgid "Preferred response address (placeholders may be used here)"
msgstr "Preferirana adresa za odgovor (modu se koristiti držači mjesta)"
#. module: email_template
#: field:email.template,ref_ir_value:0
#: field:email_template.preview,ref_ir_value:0
msgid "Sidebar Button"
msgstr "Dugme sidebar-a"
#. module: email_template
#: field:email.template,report_template:0
#: field:email_template.preview,report_template:0
msgid "Optional report to print and attach"
msgstr "Opcioni izvještaj za ispis i zakačku"
#. module: email_template
#: help:email.template,null_value:0
#: help:email_template.preview,null_value:0
msgid "Optional value to use if the target field is empty"
msgstr "Opciona vrijednost koja će se koristiti ako je ciljano polje prazno"
#. module: email_template
#: view:email.template:0
msgid "Model"
msgstr "Model"
#. module: email_template
#: model:ir.model,name:email_template.model_mail_compose_message
msgid "Email composition wizard"
msgstr "Čarobnjak sastavljanja email-a"
#. module: email_template
#: view:email.template:0
msgid "Add context action"
msgstr "Dodaj kontekstualnu akciju"
#. module: email_template
#: help:email.template,model_id:0
#: help:email_template.preview,model_id:0
msgid "The kind of document with with this template can be used"
msgstr "Vrsta dokumenta koja se može koristiti sa ovi predloškom"
#. module: email_template
#: field:email.template,email_recipients:0
#: field:email_template.preview,email_recipients:0
msgid "To (Partners)"
msgstr "Za (Partneri)"
#. module: email_template
#: field:email.template,auto_delete:0
#: field:email_template.preview,auto_delete:0
msgid "Auto Delete"
msgstr "Auto brisanje"
#. module: email_template
#: help:email.template,copyvalue:0
#: help:email_template.preview,copyvalue:0
msgid ""
"Final placeholder expression, to be copy-pasted in the desired template "
"field."
msgstr ""
"Krajnji izraz držača mjesta, koji će biti kopiran-zalijepljen na željenom "
"polju predloška."
#. module: email_template
#: field:email.template,model:0
#: field:email_template.preview,model:0
msgid "Related Document Model"
msgstr "Povezani model dokumenta"
#. module: email_template
#: view:email.template:0
msgid "Addressing"
msgstr "Adresiranje"
#. module: email_template
#: help:email.template,email_recipients:0
#: help:email_template.preview,email_recipients:0
msgid ""
"Comma-separated ids of recipient partners (placeholders may be used here)"
msgstr ""
"IDovi zarezom odvojeni partnera primatelja(mogu se koristiti držači mjesta)"
#. module: email_template
#: field:email.template,attachment_ids:0
#: field:email_template.preview,attachment_ids:0
msgid "Attachments"
msgstr "Zakačke"
#. module: email_template
#: code:addons/email_template/email_template.py:234
#, python-format
msgid "Deletion of the action record failed."
msgstr "Brisanje zapisa akcije polja."
#. module: email_template
#: field:email.template,email_cc:0
#: field:email_template.preview,email_cc:0
msgid "Cc"
msgstr "Cc"
#. module: email_template
#: field:email.template,model_id:0
#: field:email_template.preview,model_id:0
msgid "Applies to"
msgstr "Odnosi se na"
#. module: email_template
#: field:email.template,sub_model_object_field:0
#: field:email_template.preview,sub_model_object_field:0
msgid "Sub-field"
msgstr "Podpolje"
#. module: email_template
#: view:email.template:0
msgid "Email Details"
msgstr "Detalji e-maila"
#. module: email_template
#: code:addons/email_template/email_template.py:199
#, python-format
msgid "Send Mail (%s)"
msgstr "Pošalji e-mail (%s)"
#. module: email_template
#: help:res.partner,opt_out:0
msgid ""
"If checked, this partner will not receive any automated email notifications, "
"such as the availability of invoices."
msgstr ""
#. module: email_template
#: help:email.template,auto_delete:0
#: help:email_template.preview,auto_delete:0
msgid "Permanently delete this email after sending it, to save space"
msgstr "Trajno obriši ovaj e-mail nakon slanja, radi uštede prostora"
#. module: email_template
#: view:email.template:0
msgid "Group by..."
msgstr "Grupiši po..."
#. module: email_template
#: help:email.template,sub_model_object_field:0
#: help:email_template.preview,sub_model_object_field:0
msgid ""
"When a relationship field is selected as first field, this field lets you "
"select the target field within the destination document model (sub-model)."
msgstr ""
"Kada je relaciono polje izabrano kao prvo polje, ovo polje Vam dozvoljava da "
"odaberete ciljno polje u sklopu odredišnok dokumentnog modela (podmodela)"
#. module: email_template
#: code:addons/email_template/email_template.py:234
#, python-format
msgid "Warning"
msgstr "Upozorenje"
#. module: email_template
#: field:email.template,user_signature:0
#: field:email_template.preview,user_signature:0
msgid "Add Signature"
msgstr "Dodaj potpis"
#. module: email_template
#: model:ir.model,name:email_template.model_res_partner
msgid "Partner"
msgstr "Partner"
#. module: email_template
#: field:email.template,null_value:0
#: field:email_template.preview,null_value:0
msgid "Default Value"
msgstr "Podrazumijevana vrijednost"
#. module: email_template
#: help:email.template,attachment_ids:0
#: help:email_template.preview,attachment_ids:0
msgid ""
"You may attach files to this template, to be added to all emails created "
"from this template"
msgstr ""
"Možete priložiti datoteke ovom predlošku, one će biti dodate svim e-"
"mailovima kreiranim iz ovog predloška"
#. module: email_template
#: help:email.template,body_html:0
#: help:email_template.preview,body_html:0
msgid "Rich-text/HTML version of the message (placeholders may be used here)"
msgstr "Rich-text/HTML verzija poruke"
#. module: email_template
#: view:email.template:0
msgid "Contents"
msgstr "Sadržaj"
#. module: email_template
#: field:email.template,subject:0
#: field:email_template.preview,subject:0
msgid "Subject"
msgstr "Tema"

View File

@ -23,5 +23,3 @@ import event
import wizard
import report
import res_partner
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -60,7 +60,6 @@ Key Features
],
'css': ['static/src/css/event.css'],
'installable': True,
'application': True,
'auto_install': False,
'images': ['images/1_event_type_list.jpeg','images/2_events.jpeg','images/3_registrations.jpeg','images/events_kanban.jpeg'],
}

View File

@ -160,6 +160,8 @@ class event_event(osv.osv):
'email_confirmation_id' : fields.many2one('email.template','Event Confirmation Email', help="If you set an email template, each participant will receive this email announcing the confirmation of the event."),
'reply_to': fields.char('Reply-To Email', size=64, readonly=False, states={'done': [('readonly', True)]}, help="The email address of the organizer is likely to be put here, with the effect to be in the 'Reply-To' of the mails sent automatically at event or registrations confirmation. You can also put the email address of your mail gateway if you use one."),
'address_id': fields.many2one('res.partner','Location', readonly=False, states={'done': [('readonly', True)]}),
'country_id': fields.related('address_id', 'country_id',
type='many2one', relation='res.country', string='Country', readonly=False, states={'done': [('readonly', True)]}, store=True),
'description': fields.html(
'Description', readonly=False,
states={'done': [('readonly', True)]},

View File

@ -22,7 +22,7 @@
from openerp.osv import fields, osv
from openerp.tools.translate import _
class product(osv.osv):
class product_template(osv.osv):
_inherit = 'product.template'
_columns = {
'event_ok': fields.boolean('Event Subscription', help='Determine if a product needs to create automatically an event registration at the confirmation of a sales order line.'),
@ -30,7 +30,18 @@ class product(osv.osv):
}
def onchange_event_ok(self, cr, uid, ids, type, event_ok, context=None):
return {'value': {'type': event_ok and 'service' or type != 'service' and type or False}}
if event_ok:
return {'value': {'type': 'service'}}
return {}
class product(osv.osv):
_inherit = 'product.product'
def onchange_event_ok(self, cr, uid, ids, type, event_ok, context=None):
# cannot directly forward to product.template as the ids are theoretically different
if event_ok:
return {'value': {'type': 'service'}}
return {}
class sale_order_line(osv.osv):

View File

@ -1,22 +1,36 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="event_sale_order">
<field name="name">event.product</field>
<field name="model">product.template</field>
<record model="ir.ui.view" id="event_sale_product_form">
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
<div name="options" position="inside">
<field name="event_ok" on_change="onchange_event_ok(type, event_ok, context)"/>
<label for="event_ok"
attrs="{'readonly': [('is_only_child', '=', False)]}"/>
<field name="event_ok" on_change="onchange_event_ok(type, event_ok, context)"
attrs="{'readonly': [('is_only_child', '=', False)]}"/>
<label for="event_ok"/>
</div>
<div name='ean' position="after">
<field name="event_type_id" attrs="{'readonly': ['|', ('event_ok', '=', False), ('is_only_child', '=', False)]}"/>
<field name="event_type_id" attrs="{'invisible': [('event_ok', '=', False)],
'readonly': [('is_only_child', '=', False)]}"/>
</div>
</field>
</record>
<record model="ir.ui.view" id="event_sale_product_template_form">
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view" />
<field name="arch" type="xml">
<div name="options" position="inside">
<field name="event_ok" on_change="onchange_event_ok(type, event_ok, context)"/>
<label for="event_ok"/>
</div>
<field name='company_id' position="after">
<field name="event_type_id" attrs="{'invisible': [('event_ok', '=', False)]}"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="event_order_line">
<field name="name">event.sale.order</field>
<field name="model">sale.order</field>

View File

@ -54,10 +54,10 @@
<record model="ir.actions.act_window" id="action_fleet_reporting_costs">
<field name="name">Costs Analysis</field>
<field name="res_model">fleet.vehicle.cost</field>
<field name="view_id" ref="fleet_vehicle_costs_tree"></field>
<field name="view_id" ref="fleet_vehicle_costs_report"></field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="context">{"search_default_parent_false" : True,"search_default_groupby_year" : True,"search_default_groupby_cost_type" : True,"search_default_groupby_cost_subtype" : True, "search_default_groupby_vehicle_id" : True,}</field>
<field name="view_mode">graph</field>
<field name="context">{"search_default_parent_false" : True,"search_default_groupby_year" : True, "search_default_groupby_cost_subtype" : True,"search_default_groupby_vehicle_id" : True}</field>
<field name="help" type="html">
<p>
OpenERP helps you managing the costs for your different vehicles
@ -73,10 +73,10 @@
<record model="ir.actions.act_window" id="action_fleet_reporting_costs_non_effective">
<field name="name">Indicative Costs Analysis</field>
<field name="res_model">fleet.vehicle.cost</field>
<field name="view_id" ref="fleet_vehicle_costs_tree"></field>
<field name="view_id" ref="fleet_vehicle_costs_report"></field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="context">{"search_default_parent_true" : True,"search_default_groupby_cost_subtype" : True,"search_default_groupby_cost_type" : True,"search_default_groupby_parent_id" : True,}</field>
<field name="view_mode">graph</field>
<field name="context">{"search_default_parent_true" : True,"search_default_groupby_cost_subtype" : True,"search_default_groupby_parent_id" : True,}</field>
<field name="help" type="html">
<p>
OpenERP helps you managing the costs for your different vehicles

View File

@ -849,19 +849,17 @@
<menuitem action="fleet_vehicle_service_types_act" parent="fleet_configuration" id="fleet_vehicle_service_types_menu" groups="base.group_no_one"/>
<record model='ir.ui.view' id='fleet_vehicle_costs_tree'>
<field name="name">fleet.vehicle.cost.tree</field>
<record model='ir.ui.view' id='fleet_vehicle_costs_report'>
<field name="name">fleet.vehicle.cost.graph</field>
<field name="model">fleet.vehicle.cost</field>
<field name="arch" type="xml">
<tree string="Vehicles costs" >
<field name="date"/>
<field name="vehicle_id" />
<field name="cost_type"/>
<field name="cost_subtype_id"/>
<field name="amount" sum="Total Cost"/>
<field name="parent_id" invisible="1" />
<field name="year" invisible="1"/>
</tree>
<graph string="Vehicles costs" type="pivot">
<field name="date" interval="year" type="row"/>
<field name="vehicle_id" type="row"/>
<field name="cost_type" type="col"/>
<!-- <field name="cost_subtype_id"/> -->
<field name="amount" type="measure"/>
</graph>
</field>
</record>

View File

@ -10,7 +10,7 @@
<field name="monetary">True</field>
<field name="model_id" eval="ref('account.model_account_invoice_report')" />
<field name="field_id" eval="ref('account.field_account_invoice_report_price_total')" />
<field name="field_date_id" eval="ref('account.field_account_invoice_report_day')" />
<field name="field_date_id" eval="ref('account.field_account_invoice_report_date')" />
<field name="domain">[('state','!=','cancel'),('user_id','=',user.id),('type','=','out_invoice')]</field>
</record>
@ -86,7 +86,7 @@
<field name="computation_mode">count</field>
<field name="suffix">orders</field>
<field name="model_id" eval="ref('account.model_account_invoice_report')" />
<field name="field_date_id" eval="ref('account.field_account_invoice_report_day')" />
<field name="field_date_id" eval="ref('account.field_account_invoice_report_date')" />
<field name="domain">[('state','=','paid'),('user_id','=',user.id),('type','=','out_invoice')]</field>
</record>
<record model="gamification.goal.definition" id="definition_crm_tot_paid_sale_order">
@ -96,7 +96,7 @@
<field name="monetary">True</field>
<field name="model_id" eval="ref('account.model_account_invoice_report')" />
<field name="field_id" eval="ref('account.field_account_invoice_report_price_total')" />
<field name="field_date_id" eval="ref('account.field_account_invoice_report_day')" />
<field name="field_date_id" eval="ref('account.field_account_invoice_report_date')" />
<field name="domain">[('state','=','paid'),('user_id','=',user.id),('type','=','out_invoice')]</field>
</record>
@ -108,7 +108,7 @@
<field name="condition">lower</field>
<field name="suffix">invoices</field>
<field name="model_id" eval="ref('account.model_account_invoice_report')" />
<field name="field_date_id" eval="ref('account.field_account_invoice_report_day')" />
<field name="field_date_id" eval="ref('account.field_account_invoice_report_date')" />
<field name="domain">[('state','!=','cancel'),('user_id','=',user.id),('type','=','out_refund')]</field>
</record>
<record model="gamification.goal.definition" id="definition_crm_tot_customer_refunds">
@ -119,7 +119,7 @@
<field name="monetary">True</field>
<field name="model_id" eval="ref('account.model_account_invoice_report')" />
<field name="field_id" eval="ref('account.field_account_invoice_report_price_total')" />
<field name="field_date_id" eval="ref('account.field_account_invoice_report_day')" />
<field name="field_date_id" eval="ref('account.field_account_invoice_report_date')" />
<field name="domain">[('state','!=','cancel'),('user_id','=',user.id),('type','=','out_refund')]</field>
</record>

View File

@ -14,7 +14,7 @@
<field name="user_id" eval="ref('base.user_demo')" />
<field name="line_id" eval="ref('line_crm_sale1')" />
<field name="start_date" eval="time.strftime('%Y-%m-01')" />
<field name="end_date" eval="time.strftime('%Y-%m-31')" />
<field name="end_date" eval="(DateTime.today().replace(day=1)+relativedelta(months=1, days=-1)).strftime('%Y-%m-%d')" />
<field name="target_goal">2000</field>
<field name="state">inprogress</field>
</record>

View File

@ -24,7 +24,7 @@ from openerp import SUPERUSER_ID
from openerp.tools.translate import _
from openerp.addons.web.http import request
import urllib
import werkzeug.urls
import urllib2
import simplejson
@ -43,7 +43,7 @@ class google_service(osv.osv_memory):
#Get the Refresh Token From Google And store it in ir.config_parameter
headers = {"Content-type": "application/x-www-form-urlencoded"}
data = dict(code=authorization_code, client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri, grant_type="authorization_code")
data = urllib.urlencode(data)
data = werkzeug.url_encode(data)
try:
req = urllib2.Request("https://accounts.google.com/o/oauth2/token", data, headers)
content = urllib2.urlopen(req).read()
@ -62,7 +62,7 @@ class google_service(osv.osv_memory):
'response_type': 'code',
'client_id': ir_config.get_param(cr, SUPERUSER_ID, 'google_%s_client_id' % service),
}
uri = 'https://accounts.google.com/o/oauth2/auth?%s' % urllib.urlencode(params)
uri = 'https://accounts.google.com/o/oauth2/auth?%s' % werkzeug.url_encode(params)
return uri
#If no scope is passed, we use service by default to get a default scope
@ -83,7 +83,7 @@ class google_service(osv.osv_memory):
'access_type':'offline'
}
uri = self.get_uri_oauth(a='auth') + "?%s" % urllib.urlencode(params)
uri = self.get_uri_oauth(a='auth') + "?%s" % werkzeug.url_encode(params)
return uri
def _get_google_token_json(self, cr, uid, authorize_code, service, context=None):
@ -103,7 +103,7 @@ class google_service(osv.osv_memory):
headers = {"content-type": "application/x-www-form-urlencoded"}
try:
data = urllib.urlencode(params)
data = werkzeug.url_encode(params)
req = urllib2.Request(self.get_uri_oauth(a='token'), data, headers)
content = urllib2.urlopen(req).read()
@ -128,7 +128,7 @@ class google_service(osv.osv_memory):
headers = {"content-type": "application/x-www-form-urlencoded"}
try:
data = urllib.urlencode(params)
data = werkzeug.url_encode(params)
req = urllib2.Request(self.get_uri_oauth(a='token'), data, headers)
content = urllib2.urlopen(req).read()
res = simplejson.loads(content)
@ -139,12 +139,12 @@ class google_service(osv.osv_memory):
def _do_request(self,cr,uid,uri,params={},headers={},type='POST', context=None):
_logger.debug("Uri: %s - Type : %s - Headers: %s - Params : %s !" % (uri,type,headers,urllib.urlencode(params) if type =='GET' else params))
_logger.debug("Uri: %s - Type : %s - Headers: %s - Params : %s !" % (uri,type,headers,werkzeug.url_encode(params) if type =='GET' else params))
res = False
try:
if type.upper() == 'GET' or type.upper() == 'DELETE':
data = urllib.urlencode(params)
data = werkzeug.url_encode(params)
req = urllib2.Request(self.get_uri_api() + uri + "?" + data)
elif type.upper() == 'POST' or type.upper() == 'PATCH' or type.upper() == 'PUT':
req = urllib2.Request(self.get_uri_api() + uri, params, headers)

View File

@ -23,7 +23,7 @@ from openerp import SUPERUSER_ID
from openerp.osv import fields, osv
from openerp.tools.translate import _
import urllib
import werkzeug.urls
import urllib2
import json
import re
@ -70,7 +70,7 @@ class config(osv.Model):
google_drive_client_secret = ir_config.get_param(cr, SUPERUSER_ID, 'google_drive_client_secret')
#For Getting New Access Token With help of old Refresh Token
data = urllib.urlencode(dict(client_id=google_drive_client_id,
data = werkzeug.url_encode(dict(client_id=google_drive_client_id,
refresh_token=google_drive_refresh_token,
client_secret=google_drive_client_secret,
grant_type="refresh_token",

View File

@ -23,7 +23,7 @@ import simplejson
import logging
from lxml import etree
import re
import urllib
import werkzeug.urls
import urllib2
from openerp.osv import osv
@ -89,7 +89,7 @@ class config(osv.osv):
try:
req = urllib2.Request(
'https://spreadsheets.google.com/feeds/cells/%s/od6/private/full/batch?%s' % (spreadsheet_key, urllib.urlencode({'v': 3, 'access_token': access_token})),
'https://spreadsheets.google.com/feeds/cells/%s/od6/private/full/batch?%s' % (spreadsheet_key, werkzeug.url_encode({'v': 3, 'access_token': access_token})),
data=request,
headers={'content-type': 'application/atom+xml', 'If-Match': '*'})
urllib2.urlopen(req)

View File

@ -10,6 +10,9 @@
<field name="employee_id" type="row"/>
<field name="state" type="row"/>
<field name="nbr" type="measure"/>
<field name="no_of_products" type="measure"/>
<field name="price_average" type="measure"/>
<field name="price_total" type="measure"/>
</graph>
</field>
</record>

View File

@ -23,7 +23,7 @@ from datetime import datetime
from dateutil.relativedelta import relativedelta
from openerp.addons.hr_holidays.tests.common import TestHrHolidaysBase
from openerp.exceptions import Warning, AccessError
from openerp.exceptions import AccessError
from openerp.osv.orm import except_orm
from openerp.tools import mute_logger
@ -204,5 +204,5 @@ class TestHolidaysFlow(TestHrHolidaysBase):
'date_to': (datetime.today() + relativedelta(days=7)),
'number_of_days_temp': 4,
})
with self.assertRaises(Warning):
with self.assertRaises(except_orm):
self.hr_holidays.signal_confirm(cr, self.user_hrmanager_id, [hol2_id])

View File

@ -9,6 +9,7 @@
<field name="user_id" type="row"/>
<field name="date" interval="day" type="col"/>
<field name="quantity" type="measure"/>
<field name="cost" type="measure"/>
</graph>
</field>
</record>

View File

@ -9,6 +9,10 @@
<field name="user_id" type="row"/>
<field name="state" type="row"/>
<field name="quantity" type="measure"/>
<field name="cost" type="measure"/>
<field name="total_diff" type="measure"/>
<field name="total_timesheet" type="measure"/>
<field name="total_attendance" type="measure"/>
</graph>
</field>
</record>

View File

@ -8,6 +8,7 @@ import openerp
import time
import random
import math
import md5
import openerp.addons.hw_proxy.controllers.main as hw_proxy
import subprocess
from threading import Thread
@ -21,6 +22,7 @@ except ImportError:
try:
from .. import escpos
from ..escpos import printer
from ..escpos import supported_devices
except ImportError:
escpos = printer = None
@ -39,21 +41,16 @@ class EscposDriver(Thread):
self.queue = Queue()
self.status = {'status':'connecting', 'messages':[]}
self.supported_printers = [
{ 'vendor' : 0x04b8, 'product' : 0x0e03, 'name' : 'Epson TM-T20' },
{ 'vendor' : 0x04b8, 'product' : 0x0202, 'name' : 'Epson TM-T70' },
]
def connected_usb_devices(self,devices):
def connected_usb_devices(self):
connected = []
for device in devices:
for device in supported_devices.device_list:
if usb.core.find(idVendor=device['vendor'], idProduct=device['product']) != None:
connected.append(device)
return connected
def get_escpos_printer(self):
try:
printers = self.connected_usb_devices(self.supported_printers)
printers = self.connected_usb_devices()
if len(printers) > 0:
self.set_status('connected','Connected to '+printers[0]['name'])
return escpos.printer.Usb(printers[0]['vendor'], printers[0]['product'])
@ -158,25 +155,9 @@ class EscposDriver(Thread):
for tax in taxes:
eprint.text(printline(tax['tax']['name'],price(tax['amount']), width=40,ratio=0.6))
logo = None
if receipt['company']['logo']:
img = receipt['company']['logo']
img = img[img.find(',')+1:]
f = io.BytesIO('img')
f.write(base64.decodestring(img))
f.seek(0)
logo_rgba = Image.open(f)
logo = Image.new('RGB', logo_rgba.size, (255,255,255))
logo.paste(logo_rgba, mask=logo_rgba.split()[3])
width = 300
wfac = width/float(logo_rgba.size[0])
height = int(logo_rgba.size[1]*wfac)
logo = logo.resize((width,height), Image.ANTIALIAS)
# Receipt Header
if logo:
eprint._convert_image(logo)
if receipt['company']['logo']:
eprint.print_base64_image(receipt['company']['logo'])
eprint.text('\n')
else:
eprint.set(align='center',type='b',height=2,width=2)
@ -267,12 +248,12 @@ hw_proxy.drivers['escpos'] = driver
class EscposProxy(hw_proxy.Proxy):
@http.route('/hw_proxy/open_cashbox', type='json', auth='admin')
@http.route('/hw_proxy/open_cashbox', type='json', auth='none', cors='*')
def open_cashbox(self):
_logger.info('ESC/POS: OPEN CASHBOX')
driver.push_task('cashbox')
@http.route('/hw_proxy/print_receipt', type='json', auth='admin')
@http.route('/hw_proxy/print_receipt', type='json', auth='none', cors='*')
def print_receipt(self, receipt):
_logger.info('ESC/POS: PRINT RECEIPT')
driver.push_task('receipt',receipt)

View File

@ -1 +1 @@
__all__ = ["constants","escpos","exceptions","printer"]
__all__ = ["constants","escpos","exceptions","printer","supported_devices"]

View File

@ -13,6 +13,10 @@ except ImportError:
import time
import copy
import io
import base64
import math
import md5
from PIL import Image
@ -30,6 +34,7 @@ class Escpos:
""" ESC/POS Printer object """
device = None
encoding = None
img_cache = {}
def _check_image_size(self, size):
@ -49,6 +54,7 @@ class Escpos:
i = 0
cont = 0
buffer = ""
self._raw(S_RASTER_N)
buffer = "%02X%02X%02X%02X" % (((size[0]/size[1])/8), 0, size[1], 0)
@ -65,6 +71,36 @@ class Escpos:
buffer = ""
cont = 0
def _raw_print_image(self, line, size, output=None ):
""" Print formatted image """
i = 0
cont = 0
buffer = ""
raw = ""
def __raw(string):
if output:
output(string)
else:
self._raw(string)
raw += S_RASTER_N
buffer = "%02X%02X%02X%02X" % (((size[0]/size[1])/8), 0, size[1], 0)
raw += buffer.decode('hex')
buffer = ""
while i < len(line):
hex_string = int(line[i:i+8],2)
buffer += "%02X" % hex_string
i += 8
cont += 1
if cont % 4 == 0:
raw += buffer.decode("hex")
buffer = ""
cont = 0
return raw
def _convert_image(self, im):
""" Parse image and prepare it to a printable format """
@ -111,16 +147,45 @@ class Escpos:
pix_line += im_right
img_size[0] += im_border[1]
self._print_image(pix_line, img_size)
return (pix_line, img_size)
def image(self,path_img):
""" Open image file """
im_open = Image.open(path_img)
im = im_open.convert("RGB")
# Convert the RGB image in printable image
self._convert_image(im)
pix_line, img_size = self._convert_image(im)
self._print_image(pix_line, img_size)
def print_base64_image(self,img):
print 'print_b64_img'
id = md5.new(img).digest()
if id not in self.img_cache:
print 'not in cache'
img = img[img.find(',')+1:]
f = io.BytesIO('img')
f.write(base64.decodestring(img))
f.seek(0)
img_rgba = Image.open(f)
img = Image.new('RGB', img_rgba.size, (255,255,255))
img.paste(img_rgba, mask=img_rgba.split()[3])
print 'convert image'
pix_line, img_size = self._convert_image(img)
print 'print image'
buffer = self._raw_print_image(pix_line, img_size)
self.img_cache[id] = buffer
print 'raw image'
self._raw(self.img_cache[id])
def qr(self,text):
""" Print QR Code for the provided string """

View File

@ -0,0 +1,10 @@
#!/usr/bin/python
# This is a list of esc/pos compatible usb printers. The vendor and product ids can be found by
# typing lsusb in a linux terminal, this will give you the ids in the form ID VENDOR:PRODUCT
device_list = [
{ 'vendor' : 0x04b8, 'product' : 0x0e03, 'name' : 'Epson TM-T20' },
{ 'vendor' : 0x04b8, 'product' : 0x0202, 'name' : 'Epson TM-T70' },
]

View File

@ -33,20 +33,15 @@ class Proxy(http.Controller):
statuses[driver] = drivers[driver].get_status()
return statuses
@http.route('/hw_proxy/hello', type='http', auth='admin')
@http.route('/hw_proxy/hello', type='http', auth='none', cors='*')
def hello(self):
return request.make_response('ping', {
'Cache-Control': 'no-cache',
'Content-Type': 'text/html; charset=utf-8',
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET',
})
return "ping"
@http.route('/hw_proxy/handshake', type='json', auth='admin')
@http.route('/hw_proxy/handshake', type='json', auth='none', cors='*')
def handshake(self):
return True
@http.route('/hw_proxy/status', type='http', auth='admin')
@http.route('/hw_proxy/status', type='http', auth='none', cors='*')
def status_http(self):
resp = '<html>\n<body>\n<h1>Hardware Proxy Status</h1>\n'
statuses = self.get_status()
@ -75,39 +70,39 @@ class Proxy(http.Controller):
'Access-Control-Allow-Methods': 'GET',
})
@http.route('/hw_proxy/status_json', type='json', auth='admin')
@http.route('/hw_proxy/status_json', type='json', auth='none', cors='*')
def status_json(self):
return self.get_status()
@http.route('/hw_proxy/scan_item_success', type='json', auth='admin')
@http.route('/hw_proxy/scan_item_success', type='json', auth='none', cors='*')
def scan_item_success(self, ean):
"""
A product has been scanned with success
"""
print 'scan_item_success: ' + str(ean)
@http.route('/hw_proxy/scan_item_error_unrecognized', type='json', auth='admin')
@http.route('/hw_proxy/scan_item_error_unrecognized', type='json', auth='none', cors='*')
def scan_item_error_unrecognized(self, ean):
"""
A product has been scanned without success
"""
print 'scan_item_error_unrecognized: ' + str(ean)
@http.route('/hw_proxy/help_needed', type='json', auth='admin')
@http.route('/hw_proxy/help_needed', type='json', auth='none', cors='*')
def help_needed(self):
"""
The user wants an help (ex: light is on)
"""
print "help_needed"
@http.route('/hw_proxy/help_canceled', type='json', auth='admin')
@http.route('/hw_proxy/help_canceled', type='json', auth='none', cors='*')
def help_canceled(self):
"""
The user stops the help request
"""
print "help_canceled"
@http.route('/hw_proxy/weighting_start', type='json', auth='admin')
@http.route('/hw_proxy/weighting_start', type='json', auth='none', cors='*')
def weighting_start(self):
if self.scale == 'closed':
print "Opening (Fake) Connection to Scale..."
@ -118,7 +113,7 @@ class Proxy(http.Controller):
else:
print "WARNING: Scale already Connected !!!"
@http.route('/hw_proxy/weighting_read_kg', type='json', auth='admin')
@http.route('/hw_proxy/weighting_read_kg', type='json', auth='none', cors='*')
def weighting_read_kg(self):
if self.scale == 'open':
print "Reading Scale..."
@ -130,7 +125,7 @@ class Proxy(http.Controller):
print "WARNING: Reading closed scale !!!"
return 0.0
@http.route('/hw_proxy/weighting_end', type='json', auth='admin')
@http.route('/hw_proxy/weighting_end', type='json', auth='none', cors='*')
def weighting_end(self):
if self.scale == 'open':
print "Closing Connection to Scale ..."
@ -141,7 +136,7 @@ class Proxy(http.Controller):
else:
print "WARNING: Scale already Closed !!!"
@http.route('/hw_proxy/payment_request', type='json', auth='admin')
@http.route('/hw_proxy/payment_request', type='json', auth='none', cors='*')
def payment_request(self, price):
"""
The PoS will activate the method payment
@ -149,55 +144,55 @@ class Proxy(http.Controller):
print "payment_request: price:"+str(price)
return 'ok'
@http.route('/hw_proxy/payment_status', type='json', auth='admin')
@http.route('/hw_proxy/payment_status', type='json', auth='none', cors='*')
def payment_status(self):
print "payment_status"
return { 'status':'waiting' }
@http.route('/hw_proxy/payment_cancel', type='json', auth='admin')
@http.route('/hw_proxy/payment_cancel', type='json', auth='none', cors='*')
def payment_cancel(self):
print "payment_cancel"
@http.route('/hw_proxy/transaction_start', type='json', auth='admin')
@http.route('/hw_proxy/transaction_start', type='json', auth='none', cors='*')
def transaction_start(self):
print 'transaction_start'
@http.route('/hw_proxy/transaction_end', type='json', auth='admin')
@http.route('/hw_proxy/transaction_end', type='json', auth='none', cors='*')
def transaction_end(self):
print 'transaction_end'
@http.route('/hw_proxy/cashier_mode_activated', type='json', auth='admin')
@http.route('/hw_proxy/cashier_mode_activated', type='json', auth='none', cors='*')
def cashier_mode_activated(self):
print 'cashier_mode_activated'
@http.route('/hw_proxy/cashier_mode_deactivated', type='json', auth='admin')
@http.route('/hw_proxy/cashier_mode_deactivated', type='json', auth='none', cors='*')
def cashier_mode_deactivated(self):
print 'cashier_mode_deactivated'
@http.route('/hw_proxy/open_cashbox', type='json', auth='admin')
@http.route('/hw_proxy/open_cashbox', type='json', auth='none', cors='*')
def open_cashbox(self):
print 'open_cashbox'
@http.route('/hw_proxy/print_receipt', type='json', auth='admin')
@http.route('/hw_proxy/print_receipt', type='json', auth='none', cors='*')
def print_receipt(self, receipt):
print 'print_receipt' + str(receipt)
@http.route('/hw_proxy/is_scanner_connected', type='json', auth='admin')
@http.route('/hw_proxy/is_scanner_connected', type='json', auth='none', cors='*')
def print_receipt(self, receipt):
print 'is_scanner_connected?'
return False
@http.route('/hw_proxy/scanner', type='json', auth='admin')
@http.route('/hw_proxy/scanner', type='json', auth='none', cors='*')
def print_receipt(self, receipt):
print 'scanner'
time.sleep(10)
return ''
@http.route('/hw_proxy/log', type='json', auth='admin')
@http.route('/hw_proxy/log', type='json', auth='none', cors='*')
def log(self, arguments):
_logger.info(' '.join(str(v) for v in arguments))
@http.route('/hw_proxy/print_pdf_invoice', type='json', auth='admin')
@http.route('/hw_proxy/print_pdf_invoice', type='json', auth='none', cors='*')
def print_pdf_invoice(self, pdfinvoice):
print 'print_pdf_invoice' + str(pdfinvoice)

View File

@ -109,8 +109,8 @@ class Scanner(Thread):
if not evdev:
return None
devices = [ device for device in listdir(self.input_dir)]
keyboards = [ device for device in devices if 'kbd' in device ]
scanners = [ device for device in devices if ('barcode' in device.lower()) or ('scanner' in device.lower()) ]
keyboards = [ device for device in devices if ('kbd' in device) and ('keyboard' not in device.lower())]
scanners = [ device for device in devices if ('barcode' in device.lower()) or ('scanner' in device.lower())]
if len(scanners) > 0:
self.set_status('connected','Connected to '+scanners[0])
return evdev.InputDevice(join(self.input_dir,scanners[0]))
@ -124,7 +124,7 @@ class Scanner(Thread):
self.set_status('error',str(e))
return None
@http.route('/hw_proxy/Vis_scanner_connected', type='json', auth='admin')
@http.route('/hw_proxy/Vis_scanner_connected', type='json', auth='none', cors='*')
def is_scanner_connected(self):
return self.get_device() != None
@ -144,6 +144,8 @@ class Scanner(Thread):
return ''
def get_status(self):
if not s.isAlive():
s.start()
return self.status
def run(self):
@ -205,7 +207,7 @@ s = Scanner()
hw_proxy.drivers['scanner'] = s
class ScannerDriver(hw_proxy.Proxy):
@http.route('/hw_proxy/scanner', type='json', auth='admin')
@http.route('/hw_proxy/scanner', type='json', auth='none', cors='*')
def scanner(self):
if not s.isAlive():
s.start()

View File

@ -185,8 +185,8 @@ class im_message(osv.osv):
def post(self, cr, uid, message, to_session_id, technical=False, uuid=None, context=None):
assert_uuid(uuid)
my_id = self.pool.get('im.user').get_my_id(cr, uid, uuid)
session = self.pool.get('im.session').browse(cr, uid, to_session_id, context)
to_ids = [x.id for x in session.user_ids if x.id != my_id]
session_user_ids = self.pool.get('im.session').get_session_users(cr, uid, to_session_id, context=context).get("user_ids", [])
to_ids = [user_id for user_id in session_user_ids if user_id != my_id]
self.create(cr, openerp.SUPERUSER_ID, {"message": message, 'from_id': my_id,
'to_id': [(6, 0, to_ids)], 'session_id': to_session_id, 'technical': technical}, context=context)
notify_channel(cr, "im_channel", {'type': 'message', 'receivers': [my_id] + to_ids})
@ -202,7 +202,7 @@ class im_session(osv.osv):
return res
_columns = {
'user_ids': fields.many2many('im.user'),
'user_ids': fields.many2many('im.user', 'im_session_im_user_rel', 'im_session_id', 'im_user_id', 'Users'),
"name": fields.function(_calc_name, string="Name", type='char'),
}
@ -225,6 +225,9 @@ class im_session(osv.osv):
}, context=context)
return self.read(cr, uid, session_id, context=context)
def get_session_users(self, cr, uid, session_id, context=None):
return self.read(cr, openerp.SUPERUSER_ID, session_id, ['user_ids'], context=context)
def add_to_session(self, cr, uid, session_id, user_id, uuid=None, context=None):
my_id = self.pool.get("im.user").get_my_id(cr, uid, uuid, context=context)
session = self.read(cr, uid, session_id, context=context)
@ -259,7 +262,7 @@ class im_user(osv.osv):
return ['&', ('im_last_status', '=', True), ('im_last_status_update', '>', (current - delta).strftime(DEFAULT_SERVER_DATETIME_FORMAT))]
else:
return ['|', ('im_last_status', '=', False), ('im_last_status_update', '<=', (current - delta).strftime(DEFAULT_SERVER_DATETIME_FORMAT))]
# TODO: Remove fields arg in trunk. Also in im.js.
def search_users(self, cr, uid, text_search, fields, limit, context=None):
my_id = self.get_my_id(cr, uid, None, context)
group_employee = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base', 'group_user')[1]
@ -271,7 +274,7 @@ class im_user(osv.osv):
if len(found) < limit:
found += self.search(cr, uid, [["name", "ilike", text_search], ["id", "<>", my_id], ["uuid", "=", False], ["im_status", "=", False], ["id", "not in", found]],
order="name asc", limit=limit-len(found), context=context)
users = self.read(cr, uid, found, fields, context=context)
users = self.read(cr,openerp.SUPERUSER_ID, found, ["name", "user_id", "uuid", "im_status"], context=context)
users.sort(key=lambda obj: found.index(obj['id']))
return users
@ -319,6 +322,9 @@ class im_user(osv.osv):
continue
return res
def get_users(self, cr, uid, ids, context=None):
return self.read(cr,openerp.SUPERUSER_ID, ids, ["name", "im_status", "uuid"], context=context)
_columns = {
'name': fields.function(_get_name, type='char', size=200, string="Name", store=True, readonly=True),
'assigned_name': fields.char(string="Assigned Name", size=200, required=False),
@ -341,3 +347,16 @@ class im_user(osv.osv):
('user_uniq', 'unique (user_id)', 'Only one chat user per OpenERP user.'),
('uuid_uniq', 'unique (uuid)', 'Chat identifier already used.'),
]
class res_users(osv.osv):
_inherit = "res.users"
def _get_im_user(self, cr, uid, ids, field_name, arg, context=None):
result = dict.fromkeys(ids, False)
for index, im_user in enumerate(self.pool['im.user'].search_read(cr, uid, domain=[('user_id', 'in', ids)], fields=['name', 'user_id'], context=context)):
result[ids[index]] = im_user.get('user_id') and (im_user['user_id'][0], im_user['name']) or False
return result
_columns = {
'im_user_id' : fields.function(_get_im_user, type='many2one', string="IM User", relation="im.user"),
}

View File

@ -2,10 +2,10 @@
<openerp>
<data>
<record id="message_rule_1" model="ir.rule">
<field name="name">Can only read messages that you sent or messages sent to you</field>
<field name="name">Can only read messages from a session where user is</field>
<field name="model_id" ref="model_im_message"/>
<field name="groups" eval="[(6,0,[ref('base.group_user')])]"/>
<field name="domain_force">["|", ('to_id.user_id', 'in', [user.id]), ('from_id.user_id', '=', user.id)]</field>
<field name="domain_force">[('session_id.user_ids', 'in', user.im_user_id.id)]</field>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="0"/>
<field name="perm_create" eval="0"/>

View File

@ -1,4 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_im_message,im.message,model_im_message,base.group_user,1,0,1,0
access_im_message,im.message,model_im_message,,1,0,1,0
access_im_user,im.user,model_im_user,,1,1,1,0
access_im_session,im.session,model_im_session,,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_im_message im.message model_im_message base.group_user 1 0 1 0
3 access_im_user im.user model_im_user 1 1 1 0
4 access_im_session im.session model_im_session 1 0 0 0

View File

@ -92,6 +92,7 @@
search_changed: function(e) {
var users = new instance.web.Model("im.user");
var self = this;
// TODO: Remove fields arg in trunk. Also in im.js.
return this.user_search_dm.add(users.call("search_users", [this.get("current_search"), ["name", "user_id", "uuid", "im_status"],
USERS_LIMIT], {context:new instance.web.CompoundContext()})).then(function(users) {
var logged_users = _.filter(users, function(u) { return !!u.im_status; });

View File

@ -145,7 +145,7 @@ function declare($, _, openerp) {
if (_.size(no_cache) === 0)
def = $.when();
else
def = im_common.connection.model("im.user").call("read", [_.values(no_cache), []]).then(function(users) {
def = im_common.connection.model("im.user").call("get_users", [_.values(no_cache)]).then(function(users) {
self.add_to_user_cache(users);
});
return def.then(function() {
@ -230,7 +230,8 @@ function declare($, _, openerp) {
return self.chat_with_users(users);
});
},
activate_session: function(session_id, focus) {
activate_session: function(session_id, focus, message) {
var self = this;
var conv = _.find(this.conversations, function(conv) {return conv.session_id == session_id;});
var def = $.when();
if (! conv) {
@ -244,6 +245,9 @@ function declare($, _, openerp) {
this.calc_positions();
this.trigger("new_conversation", conv);
}, this));
def = def.then(function(){
return self.load_history(conv, message);
});
}
if (focus) {
def = def.then(function() {
@ -252,13 +256,32 @@ function declare($, _, openerp) {
}
return def.then(function() {return conv});
},
received_messages: function(messages) {
load_history: function(conv, message){
var self = this;
var domain = [["session_id", "=", conv.session_id]];
if (!_.isUndefined(message)){
domain.push(["date", "<", message.date]);
}
return im_common.connection.model("im.message").call("search_read", [domain, [], 0, 10]).then(function(messages){
messages.reverse();
var users = _.unique(_.map(messages, function(message){
return message.from_id[0];
}));
return self.ensure_users(users).then(function(){
return self.received_messages(messages, true);
});
});
},
received_messages: function(messages, seen) {
var self = this;
var defs = [];
var received = false;
if (_.isUndefined(seen)){
seen = false;
}
_.each(messages, function(message) {
if (! message.technical) {
defs.push(self.activate_session(message.session_id[0]).then(function(conv) {
defs.push(self.activate_session(message.session_id[0], false, message).then(function(conv) {
received = self.my_id !== message.from_id[0];
return conv.received_message(message);
}));
@ -269,7 +292,7 @@ function declare($, _, openerp) {
}
});
return $.when.apply($, defs).then(function(){
if (! self.get("window_focus") && received) {
if (! self.get("window_focus") && received && !seen) {
self.set("waiting_messages", self.get("waiting_messages") + messages.length);
self.ting.play();
self.create_ting();
@ -368,7 +391,7 @@ function declare($, _, openerp) {
refresh_users: function() {
var self = this;
var user_ids;
return im_common.connection.model("im.session").call("read", [self.session_id]).then(function(session) {
return im_common.connection.model("im.session").call("get_session_users", [self.session_id]).then(function(session) {
user_ids = _.without(session.user_ids, self.c_manager.me.get("id"));
return self.c_manager.ensure_users(user_ids);
}).then(function(users) {
@ -449,7 +472,7 @@ function declare($, _, openerp) {
date = "" + zpad(date.getHours(), 2) + ":" + zpad(date.getMinutes(), 2);
var to_show = _.map(items, im_common.escape_keep_url);
this.last_bubble = $(openerp.qweb.render("im_common.conversation_bubble", {"items": to_show, "user": user, "time": date}));
$(this.$(".oe_im_chatview_content").children()[0]).append(this.last_bubble);
$(this.$(".oe_im_chatview_conversation")).append(this.last_bubble);
this._go_bottom();
},
_go_bottom: function() {

View File

@ -11,7 +11,7 @@
All users are offline. They will receive your messages on their next connection.
</div>
<div class="oe_im_chatview_content">
<div></div>
<div class="oe_im_chatview_conversation"></div>
</div>
<div class="oe_im_chatview_footer">
<input class="oe_im_chatview_input" t-att-placeholder="widget.inputPlaceholder" />

View File

@ -171,8 +171,8 @@ class im_livechat_channel(osv.osv):
return users
def get_session(self, cr, uid, channel_id, uuid, context=None):
my_id = self.pool.get("im.user").get_my_id(cr, uid, uuid, context=context)
users = self.get_available_users(cr, uid, channel_id, context=context)
self.pool.get("im.user").get_my_id(cr, uid, uuid, context=context)
users = self.get_available_users(cr, openerp.SUPERUSER_ID, channel_id, context=context)
if len(users) == 0:
return False
user_id = random.choice(users).id

View File

@ -125,6 +125,7 @@
<field name="res_model">im.message</field>
<field name="view_mode">list</field>
<field name="domain">[('session_id.channel_id', '!=', None)]</field>
<field name="context">{'search_default_group_by_session_id': 1, 'search_default_group_by_date': 1, 'search_default_session_id': 1}</field>
</record>
<menuitem name="History" parent="im_livechat" id="history" action="action_history" groups="group_im_livechat_manager"/>
@ -141,5 +142,21 @@
</field>
</record>
<record id="im_message_search" model="ir.ui.view">
<field name="name">im.message.search</field>
<field name="model">im.message</field>
<field name="arch" type="xml">
<search string="Search history">
<filter name="session_id" string="My Sessions" domain="[('session_id.user_ids','in', uid)]"/>
<field name="from_id"/>
<field name="to_id"/>
<group expand="0" string="Group By...">
<filter name="group_by_session_id" string="Session" domain="[]" context="{'group_by':'session_id'}"/>
<filter name="group_by_date" string="Date" domain="[]" context="{'group_by':'date'}"/>
</group>
</search>
</field>
</record>
</data>
</openerp>

View File

@ -2,7 +2,5 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_ls_chann1,im_livechat.channel,model_im_livechat_channel,,1,0,0,0
access_ls_chann2,im_livechat.channel,model_im_livechat_channel,group_im_livechat,1,1,1,0
access_ls_chann3,im_livechat.channel,model_im_livechat_channel,group_im_livechat_manager,1,1,1,1
access_ls_message_portal,im_livechat.im.message.portal,im.model_im_message,base.group_portal,0,0,0,0
access_im_user_portal,im_livechat.im.user.portal,im.model_im_user,base.group_portal,1,0,0,0
access_ls_message,im_livechat.im.message,im.model_im_message,base.group_public,0,0,0,0
access_im_user,im_livechat.im.user,im.model_im_user,base.group_public,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_ls_chann1 im_livechat.channel model_im_livechat_channel 1 0 0 0
3 access_ls_chann2 im_livechat.channel model_im_livechat_channel group_im_livechat 1 1 1 0
4 access_ls_chann3 im_livechat.channel model_im_livechat_channel group_im_livechat_manager 1 1 1 1
access_ls_message_portal im_livechat.im.message.portal im.model_im_message base.group_portal 0 0 0 0
5 access_im_user_portal im_livechat.im.user.portal im.model_im_user base.group_portal 1 0 0 0
access_ls_message im_livechat.im.message im.model_im_message base.group_public 0 0 0 0
6 access_im_user im_livechat.im.user im.model_im_user base.group_public 1 0 0 0

View File

@ -107,11 +107,14 @@ define(["openerp", "im_common", "underscore", "require", "jquery",
}
self.manager.activate_session(session_id, true).then(function(conv) {
if (self.options.defaultMessage) {
conv.received_message({
message: self.options.defaultMessage,
date: openerp.datetime_to_str(new Date()),
from_id: [conv.get("users")[0].get("id"), "Unknown"]
});
setTimeout(function(){
conv.received_message({
message: self.options.defaultMessage,
date: openerp.datetime_to_str(new Date()),
from_id: [conv.get("users")[0].get("id"), "Unknown"]
});
},
2500);
}
});
});

View File

@ -83,7 +83,7 @@ class res_users(osv.Model):
def copy_data(self, *args, **kwargs):
data = super(res_users, self).copy_data(*args, **kwargs)
if data.get('alias_name'):
if data and data.get('alias_name'):
data['alias_name'] = data['login']
return data

View File

@ -2,7 +2,7 @@
import datetime
import logging
import sys
import urllib
import werkzeug.urls
import urllib2
import openerp
@ -59,7 +59,7 @@ def get_sys_logs(self, cr, uid):
add_arg = {"timeout":30} if sys.version_info >= (2,6) else {}
arguments = {'arg0': msg, "action": "update",}
arguments_raw = urllib.urlencode(arguments)
arguments_raw = werkzeug.url_encode(arguments)
url = config.get("publisher_warranty_url")

View File

@ -322,9 +322,9 @@ class mail_compose_message(osv.TransientModel):
mail_values['email_from'] = email_dict.pop('email_from')
# replies redirection: mass mailing only
if not wizard.same_thread:
mail_values['reply_to'] = email_dict.pop('reply_to')
mail_values['reply_to'] = email_dict.pop('reply_to', None)
else:
email_dict.pop('reply_to')
email_dict.pop('reply_to', None)
mail_values.update(email_dict)
# mass mailing without post: mail_mail values
if mass_mail_mode and not wizard.post:

View File

@ -1,11 +1,11 @@
from openerp import http
from openerp import http, SUPERUSER_ID
from openerp.http import request
class MassMailController(http.Controller):
@http.route('/mail/track/<int:mail_id>/blank.gif', type='http', auth='admin')
@http.route('/mail/track/<int:mail_id>/blank.gif', type='http', auth='none')
def track_mail_open(self, mail_id):
""" Email tracking. """
mail_mail_stats = request.registry.get('mail.mail.statistics')
mail_mail_stats.set_opened(request.cr, request.uid, mail_mail_ids=[mail_id])
mail_mail_stats.set_opened(request.cr, SUPERUSER_ID, mail_mail_ids=[mail_id])
return "data:image/gif;base64,R0lGODlhAQABAIAAANvf7wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="

View File

@ -40,6 +40,7 @@
<graph string="Membership" type="pivot">
<field name="year" type="row" />
<field name="num_paid" type="measure"/>
<field name="tot_earned" type="measure"/>
</graph>
</field>
</record>

View File

@ -320,10 +320,9 @@ class mrp_bom(osv.osv):
"""
routing_obj = self.pool.get('mrp.routing')
factor = factor / (bom.product_efficiency or 1.0)
max_rounding = max(bom.product_rounding, bom.product_uom.rounding)
factor = rounding(factor, max_rounding)
if factor < max_rounding:
factor = max_rounding
factor = rounding(factor, bom.product_rounding)
if factor < bom.product_rounding:
factor = bom.product_rounding
result = []
result2 = []
phantom = False
@ -772,7 +771,7 @@ class mrp_production(osv.osv):
# qty available for consume and produce
qty_avail = scheduled.product_qty - consumed_data.get(scheduled.product_id.id, 0.0)
if qty_avail <= 0.0:
if float_compare(qty_avail, 0, precision_rounding=scheduled.product_id.uom_id.rounding) <= 0:
# there will be nothing to consume for this raw material
continue
@ -784,7 +783,7 @@ class mrp_production(osv.osv):
# if qtys we have to consume is more than qtys available to consume
prod_name = scheduled.product_id.name_get()[0][1]
raise osv.except_osv(_('Warning!'), _('You are going to consume total %s quantities of "%s".\nBut you can only consume up to total %s quantities.') % (qty, prod_name, qty_avail))
if qty <= 0.0:
if float_compare(qty, 0, precision_rounding=scheduled.product_id.uom_id.rounding) <= 0:
# we already have more qtys consumed than we need
continue

View File

@ -764,7 +764,7 @@
<field name="workcenter_id"/>
<field name="sequence"/>
<field name="cycle"/>
<field name="hour"/>
<field name="hour" widget="float_time"/>
</group>
</form>
<tree string="Production Work Centers">
@ -772,7 +772,7 @@
<field name="name"/>
<field name="workcenter_id"/>
<field name="cycle"/>
<field name="hour"/>
<field name="hour" widget="float_time"/>
</tree>
</field>
</page>

View File

@ -51,7 +51,7 @@
<field name="name"/>
<field name="workcenter_id" widget="selection"/>
<field name="cycle"/>
<field name="hour"/>
<field name="hour" widget="float_time"/>
<field name="state" />
</tree>
</field>

View File

@ -28,10 +28,6 @@ class mrp_workorder(osv.osv):
_description = "Work Order Report"
_auto = False
_columns = {
'year': fields.char('Year', size=64, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
'day': fields.char('Day', size=64, readonly=True),
'nbr': fields.integer('# of Lines', readonly=True),
'date': fields.date('Date', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
@ -50,9 +46,6 @@ class mrp_workorder(osv.osv):
create or replace view mrp_workorder as (
select
to_date(to_char(wl.date_planned, 'MM-dd-YYYY'),'MM-dd-YYYY') as date,
to_char(wl.date_planned, 'YYYY') as year,
to_char(wl.date_planned, 'MM') as month,
to_char(wl.date_planned, 'YYYY-MM-DD') as day,
min(wl.id) as id,
mp.product_id as product_id,
sum(wl.hour) as total_hours,

View File

@ -10,7 +10,10 @@
<field name="arch" type="xml">
<graph string="Work Orders" type="pivot">
<field name="state" type="row"/>
<field name="product_qty" type="measure"/>
<field name="nbr" type="measure"/>
<field name="total_hours" type="measure"/>
<field name="total_cycles" type="measure"/>
</graph>
</field>
</record>
@ -31,9 +34,9 @@
<filter string="Work Center" name="Workcenter" icon="terp-go-home" context="{'group_by':'workcenter_id'}" />
<filter string="Production" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'production_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Planned Day"/>
<filter string="Month" name="terp-go-month" icon="terp-go-month" context="{'group_by':'month'}" help="Planned Month"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Planned Year"/>
<filter string="Date Planned (day)" icon="terp-go-today" context="{'group_by':'date:day'}" help="Planned Day"/>
<filter string="Date Planned (month)" name="terp-go-month" icon="terp-go-month" context="{'group_by':'date:month'}" help="Planned Month"/>
<filter string="Date Planned (year)" icon="terp-go-year" context="{'group_by':'date:year'}" help="Planned Year"/>
</group>
</search>
</field>
@ -45,7 +48,7 @@
<field name="view_mode">graph</field>
<field name="view_id" ref="view_report_mrp_workorder_graph"/>
<field name="search_view_id" ref="view_report_mrp_workorder_filter"/>
<field name="context">{'search_default_Workcenter': 1,'search_default_year':1,'search_default_month':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{'search_default_Workcenter': 1,'group_by_no_leaf':1,'group_by':[]}</field>
</record>
<record model="ir.actions.act_window.view" id="action_report_mrp_workorder_graph">

View File

@ -1,7 +1,7 @@
"""Module to talk to EtherpadLite API."""
import json
import urllib
import werkzeug.urls
import urllib2
@ -32,7 +32,7 @@ class EtherpadLiteClient:
params = arguments or {}
params.update({'apikey': self.apiKey})
data = urllib.urlencode(params, True)
data = werkzeug.url_encode(params, True)
try:
opener = urllib2.build_opener()

View File

@ -8,8 +8,8 @@ import logging
import pprint
import werkzeug
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp import http, SUPERUSER_ID
from openerp.http import request
_logger = logging.getLogger(__name__)
@ -19,12 +19,12 @@ class AdyenController(http.Controller):
@http.route([
'/payment/adyen/return/',
], type='http', auth='admin')
], type='http', auth='none')
def adyen_return(self, pspReference, **post):
""" Paypal IPN."""
post["pspReference"] = pspReference
_logger.info('Beginning Adyen form_feedback with post data %s', pprint.pformat(post)) # debug
request.registry['payment.transaction'].form_feedback(request.cr, request.uid, post, 'adyen', context=request.context)
request.registry['payment.transaction'].form_feedback(request.cr, SUPERUSER_ID, post, 'adyen', context=request.context)
return_url = post.pop('return_url', '')
if not return_url:
custom = json.loads(post.pop('merchantReturnData', '{}'))

View File

@ -3,8 +3,8 @@ import logging
import pprint
import werkzeug
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp import http, SUPERUSER_ID
from openerp.http import request
_logger = logging.getLogger(__name__)
@ -20,10 +20,10 @@ class OgoneController(http.Controller):
'/payment/ogone/decline', '/payment/ogone/test/decline',
'/payment/ogone/exception', '/payment/ogone/test/exception',
'/payment/ogone/cancel', '/payment/ogone/test/cancel',
], type='http', auth='admin')
], type='http', auth='none')
def ogone_form_feedback(self, **post):
""" Ogone contacts using GET, at least for accept """
_logger.info('Ogone: entering form_feedback with post data %s', pprint.pformat(post)) # debug
cr, uid, context = request.cr, request.uid, request.context
cr, uid, context = request.cr, SUPERUSER_ID, request.context
request.registry['payment.transaction'].form_feedback(cr, uid, post, 'ogone', context=context)
return werkzeug.utils.redirect(post.pop('return_url', '/'))

View File

@ -6,12 +6,11 @@ except ImportError:
import json
import logging
import pprint
import urllib
import urllib2
import werkzeug
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp import http, SUPERUSER_ID
from openerp.http import request
_logger = logging.getLogger(__name__)
@ -41,12 +40,12 @@ class PaypalController(http.Controller):
Once data is validated, process it. """
res = False
new_post = dict(post, cmd='_notify-validate')
urequest = urllib2.Request("https://www.sandbox.paypal.com/cgi-bin/webscr", urllib.urlencode(new_post))
urequest = urllib2.Request("https://www.sandbox.paypal.com/cgi-bin/webscr", werkzeug.url_encode(new_post))
uopen = urllib2.urlopen(urequest)
resp = uopen.read()
if resp == 'VERIFIED':
_logger.info('Paypal: validated data')
cr, uid, context = request.cr, request.uid, request.context
cr, uid, context = request.cr, SUPERUSER_ID, request.context
res = request.registry['payment.transaction'].form_feedback(cr, uid, post, 'paypal', context=context)
elif resp == 'INVALID':
_logger.warning('Paypal: answered INVALID on data verification')
@ -54,14 +53,14 @@ class PaypalController(http.Controller):
_logger.warning('Paypal: unrecognized paypal answer, received %s instead of VERIFIED or INVALID' % resp.text)
return res
@http.route('/payment/paypal/ipn/', type='http', auth='admin', methods=['POST'])
@http.route('/payment/paypal/ipn/', type='http', auth='none', methods=['POST'])
def paypal_ipn(self, **post):
""" Paypal IPN. """
_logger.info('Beginning Paypal IPN form_feedback with post data %s', pprint.pformat(post)) # debug
self.paypal_validate_data(**post)
return ''
@http.route('/payment/paypal/dpn', type='http', auth="admin", methods=['POST'])
@http.route('/payment/paypal/dpn', type='http', auth="none", methods=['POST'])
def paypal_dpn(self, **post):
""" Paypal DPN """
_logger.info('Beginning Paypal DPN form_feedback with post data %s', pprint.pformat(post)) # debug
@ -69,10 +68,10 @@ class PaypalController(http.Controller):
self.paypal_validate_data(**post)
return werkzeug.utils.redirect(return_url)
@http.route('/payment/paypal/cancel', type='http', auth="admin")
@http.route('/payment/paypal/cancel', type='http', auth="none")
def paypal_cancel(self, **post):
""" When the user cancels its Paypal payment: GET on this route """
cr, uid, context = request.cr, request.uid, request.context
cr, uid, context = request.cr, SUPERUSER_ID, request.context
_logger.info('Beginning Paypal cancel with post data %s', pprint.pformat(post)) # debug
return_url = self._get_return_url(**post)
return werkzeug.utils.redirect(return_url)

View File

@ -7,7 +7,7 @@ except ImportError:
import json
import logging
import urlparse
import urllib
import werkzeug.urls
import urllib2
from openerp.addons.payment.models.payment_acquirer import ValidationError
@ -134,7 +134,7 @@ class AcquirerPaypal(osv.Model):
password manager
"""
res = dict.fromkeys(ids, False)
parameters = urllib.urlencode({'grant_type': 'client_credentials'})
parameters = werkzeug.url_encode({'grant_type': 'client_credentials'})
for acquirer in self.browse(cr, uid, ids, context=context):
tx_url = self._get_paypal_urls(cr, uid, acquirer.env)['paypal_rest_url']

View File

@ -3,8 +3,8 @@ import logging
import pprint
import werkzeug
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp import http, SUPERUSER_ID
from openerp.http import request
_logger = logging.getLogger(__name__)
@ -14,9 +14,9 @@ class OgoneController(http.Controller):
@http.route([
'/payment/transfer/feedback',
], type='http', auth='admin')
], type='http', auth='none')
def transfer_form_feedback(self, **post):
cr, uid, context = request.cr, request.uid, request.context
cr, uid, context = request.cr, SUPERUSER_ID, request.context
_logger.info('Beginning form_feedback with post data %s', pprint.pformat(post)) # debug
request.registry['payment.transaction'].form_feedback(cr, uid, post, 'transfer', context)
return werkzeug.utils.redirect(post.pop('return_url', '/'))

View File

@ -93,8 +93,9 @@ class plugin_handler(osv.osv_memory):
"""
mail_message = self.pool.get('mail.message')
model_obj = self.pool[model]
msg = self.pool.get('mail.thread').message_parse(cr, uid, email)
message_id = msg.get('message-id')
mail_thread_obj = self.pool.get('mail.thread')
msg = mail_thread_obj.message_parse(cr, uid, email)
message_id = msg.get('message_id')
mail_ids = mail_message.search(cr, uid, [('message_id', '=', message_id), ('res_id', '=', res_id), ('model', '=', model)])
if message_id and mail_ids:
mail_record = mail_message.browse(cr, uid, mail_ids)[0]
@ -107,12 +108,22 @@ class plugin_handler(osv.osv_memory):
res_id = model_obj.message_process(cr, uid, model, email)
notify = _("Mail successfully pushed, a new %s has been created.") % model
else:
email_from = msg.get('email_from')
if not email_from:
author_id = False
else:
authors = mail_thread_obj.message_find_partner_from_emails(cr, uid, [res_id], [email_from])
author_id = authors and authors[0].get('partner_id') or False
model_obj.message_post(cr, uid, [res_id],
body=msg.get('body'),
subject=msg.get('subject'),
type='comment' if model == 'res.partner' else 'email',
parent_id=msg.get('parent_id'),
attachments=msg.get('attachments'))
attachments=msg.get('attachments'),
message_id=message_id,
email_from=email_from,
author_id=author_id)
notify = _("Mail successfully pushed")
url = self._make_url(cr, uid, res_id, model)
return (model, res_id, url, notify)
@ -151,7 +162,7 @@ class plugin_handler(osv.osv_memory):
ir_attachment_obj = self.pool.get('ir.attachment')
attach_ids = []
msg = self.pool.get('mail.thread').message_parse(cr, uid, headers)
message_id = msg.get('message-id')
message_id = msg.get('message_id')
push_mail = self.push_message(cr, uid, model, headers, res_id)
res_id = push_mail[1]
model = push_mail[0]
@ -165,6 +176,6 @@ class plugin_handler(osv.osv_memory):
attach_ids.append(ir_attachment_obj.create(cr, uid, vals))
mail_ids = mail_message.search(cr, uid, [('message_id', '=', message_id), ('res_id', '=', res_id), ('model', '=', model)])
if mail_ids:
mail_message.write(cr, uid, mail_ids[0], {'attachment_ids': [(6, 0, attach_ids)], 'body': body, 'body_html': body_html})
mail_message.write(cr, uid, mail_ids[0], {'attachment_ids': [(6, 0, attach_ids)], 'body': body_html})
url = self._make_url(cr, uid, res_id, model)
return (model, res_id, url, notify)

View File

@ -58,13 +58,12 @@ class PosController(http.Controller):
@http.route('/pos/web', type='http', auth='none')
def a(self, debug=False, **k):
if not request.session.uid:
return http.local_redirect('/web/login?redirect=/pos/web')
js_list = manifest_list('js',db=request.db, debug=debug)
css_list = manifest_list('css',db=request.db, debug=debug)
print css_list
print js_list
js = "\n".join('<script type="text/javascript" src="%s"></script>' % i for i in js_list)
#css = "\n".join('<link rel="stylesheet" href="%s">' % i for i in css_list)
r = html_template % {
@ -76,9 +75,6 @@ class PosController(http.Controller):
wc.show_application = function(){
wc.action_manager.do_action("pos.ui");
};
wc.show_login = function(){
window.location.href = '/';
}
wc.appendTo($(document.body));
"""
}

File diff suppressed because it is too large Load Diff

View File

@ -28,11 +28,6 @@ class pos_order_report(osv.osv):
_auto = False
_columns = {
'date': fields.date('Date Order', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
'product_id':fields.many2one('product.product', 'Product', readonly=True),
'state': fields.selection([('draft', 'New'), ('paid', 'Closed'), ('done', 'Synchronized'), ('invoiced', 'Invoiced'), ('cancel', 'Cancelled')],
@ -57,15 +52,12 @@ class pos_order_report(osv.osv):
select
min(l.id) as id,
count(*) as nbr,
to_date(to_char(s.date_order, 'dd-MM-YYYY'),'dd-MM-YYYY') as date,
s.date_order as date,
sum(l.qty * u.factor) as product_qty,
sum(l.qty * l.price_unit) as price_total,
sum((l.qty * l.price_unit) * (l.discount / 100)) as total_discount,
(sum(l.qty*l.price_unit)/sum(l.qty * u.factor))::decimal(16,2) as average_price,
sum(cast(to_char(date_trunc('day',s.date_order) - date_trunc('day',s.create_date),'DD') as int)) as delay_validation,
to_char(s.date_order, 'YYYY') as year,
to_char(s.date_order, 'MM') as month,
to_char(s.date_order, 'YYYY-MM-DD') as day,
s.partner_id as partner_id,
s.state as state,
s.user_id as user_id,
@ -78,8 +70,7 @@ class pos_order_report(osv.osv):
left join product_template pt on (pt.id=l.product_id)
left join product_uom u on (u.id=pt.uom_id)
group by
to_char(s.date_order, 'dd-MM-YYYY'),to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),
to_char(s.date_order, 'YYYY-MM-DD'), s.partner_id,s.state,
s.date_order, s.partner_id,s.state,
s.user_id,s.warehouse_id,s.company_id,s.sale_journal,l.product_id,s.create_date
having
sum(l.qty * u.factor) != 0)""")

View File

@ -1,29 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_report_pos_order_tree" model="ir.ui.view">
<field name="name">report.pos.order.tree</field>
<record id="view_report_pos_order_graph" model="ir.ui.view">
<field name="name">report.pos.order.graph</field>
<field name="model">report.pos.order</field>
<field name="arch" type="xml">
<tree string="Point of Sale Analysis" create="false">
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="warehouse_id" invisible="1"/>
<!--<field name="journal_id" invisible="1"/>-->
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
<field name="nbr" sum="# of Lines"/>
<field name="product_qty" sum="# of Qty"/>
<field name="average_price" sum="Average Price"/>
<field name="total_discount" sum="Total Discount"/>
<field name="price_total" sum="Total Price"/>
<field name="delay_validation"/>
<!--<field name="state" invisible="1"/>-->
</tree>
<graph string="Point of Sale Analysis" type="pivot">
<field name="date" interval="day" type="row"/>
<field name="nbr" type="measure"/>
<field name="product_qty" type="measure"/>
<field name="average_price" type="measure"/>
<field name="total_discount" type="measure"/>
<field name="price_total" type="measure"/>
</graph>
</field>
</record>
@ -36,10 +25,7 @@
<filter icon="terp-dolar" string="Invoiced" domain="[('state','=',('invoiced'))]"/>
<filter icon="terp-dolar" string="Not Invoiced" domain="[('state','=',('paid'))]"/>
<separator/>
<filter icon="terp-go-year" string="Year" name="year" domain="[('year','=',time.strftime('%%Y'))]" help="POS ordered created during current year"/>
<separator/>
<filter icon="terp-go-today" string="Today" name="today" domain="[('date','=', time.strftime('%%Y-%%m-%%d'))]"
help="POS ordered created by today"/>
<filter icon="terp-go-year" string="Year" name="year" domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;=',time.strftime('%%Y-01-01'))]" help="POS ordered created during current year"/>
<separator/>
<filter icon="terp-personal" string="My Sales" help="My Sales" domain="[('user_id','=',uid)]"/>
<field name="partner_id"/>
@ -50,9 +36,9 @@
<filter string="Salesperson" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
<filter string="Customer" icon="terp-personal" context="{'group_by':'partner_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Day of order date"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}" help="Month of order date"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Year of order date"/>
<filter string="Order Date (day)" icon="terp-go-today" context="{'group_by':'date:day'}" help="Day of order date"/>
<filter string="Order Date (month)" icon="terp-go-month" context="{'group_by':'date:month'}" help="Month of order date"/>
<filter string="Order Date (year)" icon="terp-go-year" context="{'group_by':'date:year'}" help="Year of order date"/>
</group>
</search>
</field>
@ -62,9 +48,9 @@
<field name="name">Orders Analysis</field>
<field name="res_model">report.pos.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="view_mode">graph</field>
<field name="search_view_id" ref="view_report_pos_order_search"/>
<field name="context">{'search_default_year':1,'search_default_today':1,'group_by_no_leaf':1,'group_by':['product_id']}</field>
<field name="context">{'search_default_year':1, 'group_by_no_leaf':1,'group_by':['product_id']}</field>
</record>
<menuitem action="action_report_pos_order_all" id="menu_report_pos_order_all" parent="menu_point_rep" sequence="3"/>

View File

@ -102,6 +102,8 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
};
this.custom_payment_status = this.default_payment_status;
this.receipt_queue = [];
this.notifications = {};
this.bypass_proxy = false;
@ -113,6 +115,13 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
this.set_connection_status('disconnected');
this.on('change:status',this,function(eh,status){
status = status.newValue;
if(status.status === 'connected'){
self.print_receipt();
}
});
window.hw_proxy = this;
},
set_connection_status: function(status,drivers){
@ -133,7 +142,7 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
// connects to the specified url
connect: function(url){
var self = this;
this.connection = new instance.web.Session(undefined,url);
this.connection = new instance.web.Session(undefined,url, { use_cors: true});
this.host = url;
this.set_connection_status('connecting',{});
@ -181,7 +190,7 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
if(!this.keptalive){
this.keptalive = true;
function status(){
self.connection.rpc('/hw_proxy/status_json',{},{timeout:500})
self.connection.rpc('/hw_proxy/status_json',{},{timeout:2500})
.then(function(driver_status){
self.set_connection_status('connected',driver_status);
},function(){
@ -228,7 +237,14 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
this.set_connection_status('connecting');
if(options.force_ip){
urls.push(options.force_ip);
var url = options.force_ip;
if(url.indexOf('//') < 0){
url = 'http://'+url;
}
if(url.indexOf(':',5) < 0){
url = url+port;
}
urls.push(url);
}else{
if(localStorage['hw_proxy_url']){
urls.push(localStorage['hw_proxy_url']);
@ -502,7 +518,23 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
* }
*/
print_receipt: function(receipt){
return this.message('print_receipt',{receipt: receipt});
var self = this;
if(receipt){
this.receipt_queue.push(receipt);
}
var aborted = false;
function send_printing_job(){
if (self.receipt_queue.length > 0){
var r = self.receipt_queue.shift();
self.message('print_receipt',{ receipt: r },{ timeout: 5000 })
.then(function(){
send_printing_job();
},function(){
self.receipt_queue.unshift(r)
});
}
}
send_printing_job();
},
// asks the proxy to log some information, as with the debug.log you can provide several arguments.

View File

@ -92,6 +92,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
},
connect_to_proxy: function(){
var self = this;
var done = new $.Deferred();
this.barcode_reader.disconnect_from_proxy();
this.pos_widget.loading_message(_t('Connecting to the PosBox'),0);
this.pos_widget.loading_skip(function(){
@ -106,7 +107,10 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
if(self.config.iface_scan_via_proxy){
self.barcode_reader.connect_to_proxy();
}
}).always(function(){
done.resolve();
});
return done;
},
// helper function to load data from the server
@ -256,12 +260,26 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
self.company_logo.crossOrigin = 'anonymous';
var logo_loaded = new $.Deferred();
self.company_logo.onload = function(){
var img = self.company_logo;
var ratio = 1;
var targetwidth = 300;
var maxheight = 150;
if( img.width !== targetwidth ){
ratio = targetwidth / img.width;
}
if( img.height * ratio > maxheight ){
ratio = maxheight / img.height;
}
var width = Math.floor(img.width * ratio);
var height = Math.floor(img.height * ratio);
var c = document.createElement('canvas');
c.width = self.company_logo.width;
c.height = self.company_logo.height;
c.width = width;
c.height = height
var ctx = c.getContext('2d');
ctx.drawImage(self.company_logo,0,0);
ctx.drawImage(self.company_logo,0,0, width, height);
self.company_logo_base64 = c.toDataURL();
window.logo64 = self.company_logo_base64;
logo_loaded.resolve();
};
self.company_logo.onerror = function(){

View File

@ -6,10 +6,11 @@
<field name="name">project.task.history.cumulative.graph</field>
<field name="model">project.task.history.cumulative</field>
<field name="arch" type="xml">
<graph string="Project Tasks" type="pivot" stacked="True">
<graph string="Project Tasks" type="bar" stacked="True">
<field name="date" type="row"/>
<field name="type_id" type="row"/>
<field name="planned_hours" type="measure"/>
<field name="remaining_hours" type="measure"/>
</graph>
</field>
</record>

View File

@ -29,8 +29,6 @@ class report_project_task_user(osv.osv):
_auto = False
_columns = {
'name': fields.char('Task Summary', size=128, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'year': fields.char('Year', size=64, required=False, readonly=True),
'user_id': fields.many2one('res.users', 'Assigned To', readonly=True),
'date_start': fields.date('Assignation Date', readonly=True),
'no_of_days': fields.integer('# of Days', size=128, readonly=True),
@ -52,7 +50,6 @@ class report_project_task_user(osv.osv):
'nbr': fields.integer('# of tasks', readonly=True),
'priority': fields.selection([('4', 'Very Low'), ('3', 'Low'), ('2', 'Medium'), ('1', 'Urgent'), ('0', 'Very urgent')],
string='Priority', readonly=True),
'month':fields.selection(fields.date.MONTHS, 'Month', readonly=True),
'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')],'Status', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'partner_id': fields.many2one('res.partner', 'Contact', readonly=True),
@ -67,9 +64,6 @@ class report_project_task_user(osv.osv):
SELECT
(select 1 ) AS nbr,
t.id as id,
to_char(date_start, 'YYYY') as year,
to_char(date_start, 'MM') as month,
to_char(date_start, 'YYYY-MM-DD') as day,
date_trunc('day',t.date_start) as date_start,
date_trunc('day',t.date_end) as date_end,
date_trunc('day',t.date_last_stage_update) as date_last_stage_update,
@ -102,9 +96,6 @@ class report_project_task_user(osv.osv):
total_hours,
planned_hours,
hours_delay,
year,
month,
day,
create_date,
write_date,
date_start,

View File

@ -11,8 +11,12 @@
<field name="model">report.project.task.user</field>
<field name="arch" type="xml">
<graph string="Tasks Analysis" type="pivot">
<field name="name" type="row"/>
<field name="project_id" type="row"/>
<field name="nbr" type="measure"/>
<field name="no_of_days" type="measure"/>
<field name="total_hours" type="measure"/>
<field name="hours_planned" type="measure"/>
<field name="remaining_hours" type="measure"/>
</graph>
</field>
</record>
@ -44,9 +48,9 @@
<filter string="Contact" context="{'group_by':'partner_id'}" />
<filter string="Assigned to" name="User" context="{'group_by':'user_id'}" />
<filter string="Company" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Day" context="{'group_by':'day'}" help="Creation Date"/>
<filter string="Month" context="{'group_by':'month'}" help="Creation Date"/>
<filter string="Year" context="{'group_by':'year'}" help="Creation Date"/>
<filter string="Assignation date (day)" context="{'group_by':'date_start:day'}" help="Creation Date"/>
<filter string="Assignation date (month)" context="{'group_by':'date_start:month'}" help="Creation Date"/>
<filter string="Assignation date (year)" context="{'group_by':'date_start:year'}" help="Creation Date"/>
<filter string="Last Stage Update" context="{'group_by':'date_last_stage_update'}" help="Last Stage Update"/>
</group>
</search>
@ -59,7 +63,7 @@
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="search_view_id" ref="view_task_project_user_search"/>
<field name="context">{'search_default_year':1,'search_default_project':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{'group_by_no_leaf':1,'group_by':[]}</field>
<field name="help">This report allows you to analyse the performance of your projects and users. You can analyse the quantities of tasks, the hours spent compared to the planned hours, the average number of days to open or close a task, etc.</field>
</record>

View File

@ -52,7 +52,8 @@ class project_compute_phases(osv.osv_memory):
else:
project_ids = project_pool.search(cr, uid, [('user_id','=',uid)], context=context)
project_pool.schedule_phases(cr, uid, project_ids, context=context)
if project_ids:
project_pool.schedule_phases(cr, uid, project_ids, context=context)
return self._open_phases_list(cr, uid, data, context=context)
def _open_phases_list(self, cr, uid, data, context=None):

View File

@ -17,15 +17,12 @@
<field name="model">purchase.report</field>
<field name="arch" type="xml">
<tree string="Monthly Purchase by Category">
<field name="month"/>
<field name="category_id"/>
<field name="price_total"/>
<field name="user_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="product_uom" invisible="1"/>
<field name="day" invisible="1"/>
<field name="name" invisible="1"/>
<field name="warehouse_id" invisible="1"/>
<field name="validator" invisible="1"/>
<field name="company_id" invisible="1"/>
@ -39,9 +36,9 @@
<field name="model">purchase.report</field>
<field name="arch" type="xml">
<graph string="Monthly Purchase by Category" type="bar">
<field name="month"/>
<field name="price_total" operator="+"/>
<field name="category_id" group="True"/>
<field name="date" interval="month" type="row"/>
<field name="category_id" type="col"/>
<field name="price_total" type="measure"/>
</graph>
</field>
</record>
@ -50,7 +47,7 @@
<field name="res_model">purchase.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="context">{'group_by':['month','category_id'],'group_by_no_leaf':1}</field>
<field name="context">{'group_by_no_leaf':1}</field>
<field name="domain">[('state','in',('approved','except_picking','except_invoice','done'))]</field>
<field name="view_id" ref="view_purchase_order_monthly_categ_graph"></field>
</record>

View File

@ -695,7 +695,7 @@ class purchase_order(osv.osv):
continue
if order_line.product_id.type in ('product', 'consu'):
move = stock_move.create(cr, uid, self._prepare_order_line_move(cr, uid, order, order_line, picking_id, context=context))
if order_line.move_dest_id:
if order_line.move_dest_id and order_line.move_dest_id.state != 'done':
order_line.move_dest_id.write({'location_id': order.location_id.id})
todo_moves.append(move)
stock_move.action_confirm(cr, uid, todo_moves)
@ -909,6 +909,15 @@ class purchase_order_line(osv.osv):
default.update({'state':'draft', 'move_ids':[],'invoiced':0,'invoice_lines':[]})
return super(purchase_order_line, self).copy_data(cr, uid, id, default, context)
def unlink(self, cr, uid, ids, context=None):
procurement_ids_to_cancel = []
for line in self.browse(cr, uid, ids, context=context):
if line.move_dest_id:
procurement_ids_to_cancel.extend(procurement.id for procurement in line.move_dest_id.procurements)
if procurement_ids_to_cancel:
self.pool['procurement.order'].action_cancel(cr, uid, procurement_ids_to_cancel)
return super(purchase_order_line, self).unlink(cr, uid, ids, context=context)
def onchange_product_uom(self, cr, uid, ids, pricelist_id, product_id, qty, uom_id,
partner_id, date_order=False, fiscal_position_id=False, date_planned=False,
name=False, price_unit=False, context=None):

View File

@ -208,7 +208,7 @@
<page string="Purchase Order">
<field name="order_line">
<tree string="Purchase Order Lines" editable="bottom">
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,False,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
<field name="name"/>
<field name="date_planned"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
@ -387,7 +387,7 @@
<sheet>
<group>
<group>
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,False,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
<label for="product_qty"/>
<div>
<field name="product_qty" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)" class="oe_inline"/>

View File

@ -32,8 +32,6 @@ class purchase_report(osv.osv):
_auto = False
_columns = {
'date': fields.date('Order Date', readonly=True, help="Date on which this document has been created"),
'name': fields.char('Year',size=64,required=False, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'state': fields.selection([('draft', 'Request for Quotation'),
('confirmed', 'Waiting Supplier Ack'),
('approved', 'Approved'),
@ -60,12 +58,10 @@ class purchase_report(osv.osv):
'negociation': fields.float('Purchase-Standard Price', readonly=True, group_operator="avg"),
'price_standard': fields.float('Products Value', readonly=True, group_operator="sum"),
'nbr': fields.integer('# of Lines', readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
'category_id': fields.many2one('product.category', 'Category', readonly=True)
}
_order = 'name desc,price_total desc'
_order = 'date desc, price_total desc'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, 'purchase_report')
cr.execute("""
@ -73,9 +69,6 @@ class purchase_report(osv.osv):
select
min(l.id) as id,
s.date_order as date,
to_char(s.date_order, 'YYYY') as name,
to_char(s.date_order, 'MM') as month,
to_char(s.date_order, 'YYYY-MM-DD') as day,
s.state,
s.date_approve,
s.minimum_planned_date as expected_date,
@ -121,9 +114,6 @@ class purchase_report(osv.osv):
l.product_id,
t.categ_id,
s.date_order,
to_char(s.date_order, 'YYYY'),
to_char(s.date_order, 'MM'),
to_char(s.date_order, 'YYYY-MM-DD'),
s.state,
s.warehouse_id,
u.uom_type,

View File

@ -6,7 +6,12 @@
<field name="model">purchase.report</field>
<field name="arch" type="xml">
<graph string="Purchase Orders Statistics" type="pivot">
<field name="partner_id" type="row"/>
<field name="product_id" type="row"/>
<field name="nbr" type="measure"/>
<field name="quantity" type="measure"/>
<field name="price_average" type="measure"/>
<field name="price_standard" type="measure"/>
<field name="price_total" type="measure"/>
</graph>
</field>
@ -43,66 +48,24 @@
<filter string="Destination" icon="terp-gtk-jump-to-ltr" context="{'group_by':'location_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Order of Day"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}" help="Order of Month"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'name'}" help="Order of Year"/>
<filter string="Order Date (day)" icon="terp-go-today" context="{'group_by':'date:day'}" help="Order of Day"/>
<filter string="Order Date (month)" icon="terp-go-month" context="{'group_by':'date:month'}" help="Order of Day"/>
<filter string="Order Date (year)" icon="terp-go-year" context="{'group_by':'date:year'}" help="Order of Day"/>
</group>
</search>
</field>
</record>
<record model="ir.ui.view" id="view_purchase_order_qty_amount_graph">
<field name="name">purchase.order.qty.amount.graph</field>
<field name="model">purchase.report</field>
<field name="arch" type="xml">
<graph string="Total Qty and Amount by month" type="bar">
<field name="month"/>
<field name="quantity" operator="+"/>
<field name="price_total" operator="+"/>
</graph>
</field>
</record>
<record model="ir.ui.view" id="view_purchase_order_by_user_graph">
<field name="name">purchase.order.by.user.graph</field>
<field name="model">purchase.report</field>
<field name="arch" type="xml">
<graph string="Total Orders Lines by User per month" orientation="vertical" type="bar">
<field name="month" />
<field name="nbr" operator="+"/>
<field name="user_id" group="True" />
</graph>
</field>
</record>
<record id="action_purchase_order_report_all" model="ir.actions.act_window">
<field name="name">Purchase Analysis</field>
<field name="res_model">purchase.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_purchase_order_graph"></field>
<field name="context">{'search_default_year':1,'search_default_month':1,'search_default_group_partner_id':1,'search_default_group_product_id': 1, 'search_default_orders': 1, 'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{'search_default_year':1,'search_default_month':1, 'search_default_orders': 1, 'group_by_no_leaf':1,'group_by':[]}</field>
<field name="help">Purchase Analysis allows you to easily check and analyse your company purchase history and performance. From this menu you can track your negotiation performance, the delivery performance of your suppliers, etc.</field>
</record>
<record id="action_purchase_order_report_graph" model="ir.actions.act_window">
<field name="name">Total Qty and Amount by month</field>
<field name="res_model">purchase.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_purchase_order_qty_amount_graph"></field>
</record>
<record id="action_purchase_order_by_user_all" model="ir.actions.act_window">
<field name="name">Total Orders by User per month</field>
<field name="res_model">purchase.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_purchase_order_by_user_graph"></field>
</record>
<menuitem id="base.next_id_73" name="Purchase" parent="base.menu_reporting" sequence="10"
groups="purchase.group_purchase_manager"/>
<menuitem action="action_purchase_order_report_all" id="menu_action_purchase_order_report_all" parent="base.next_id_73" sequence="3"/>
@ -113,6 +76,7 @@
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="search_view_id" ref="stock.view_stock_search"/>
<field name="view_id" ref="stock.view_stock_graph"/>
<field name="context">{'full':'1','contact_display': 'partner','search_default_done':1, 'search_default_month':1, 'search_default_group_type':1, 'group_by': [], 'group_by_no_leaf':1,'search_default_year':1,}</field>
<field name="help">Reception Analysis allows you to easily check and analyse your company order receptions and the performance of your supplier's deliveries.</field>
</record>

View File

@ -24,3 +24,13 @@
!python {model: procurement.order}: |
procurement = self.browse(cr, uid, ref('procurement_order_testcase0'))
assert procurement.purchase_id, 'RFQ should be generated!'
-
I delete the line from the purchase order and check that the move and the procurement are cancelled
-
!python {model: procurement.order}: |
procurement = self.browse(cr, uid, ref('procurement_order_testcase0'))
move = procurement.purchase_id.order_line[0].move_dest_id
procurement.purchase_id.order_line[0].unlink()
assert move.state == 'cancel', 'Move should be cancelled'
procurement.refresh()
assert procurement.state == 'cancel', 'Procurement should be cancelled'

View File

@ -17,7 +17,7 @@
<field name="priority" eval="32"/>
<field name="arch" type="xml">
<tree string="Monthly Turnover">
<field name="month"/>
<field name="date" interval="month"/>
<field name="price_total"/>
</tree>
</field>
@ -28,7 +28,7 @@
<field name="priority" eval="32"/>
<field name="arch" type="xml">
<graph string="Monthly Turnover" type="bar">
<field name="month" type="row"/>
<field name="date" interval="month" type="row"/>
<field name="price_total" type="measure"/>
</graph>
</field>
@ -40,8 +40,8 @@
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="view_turnover_by_month_graph"/>
<field name="domain">[('year','ilike',time.strftime('%Y')),('user_id','=',uid)]</field>
<field name="context">{'group_by_no_leaf':1,'group_by':['month']}</field>
<field name="domain">[('date','&lt;=', time.strftime('%Y-%m-%d')),('date','&gt;=',time.strftime('%Y-01-01')),('user_id','=',uid)]</field>
<field name="context">{'group_by_no_leaf':1}</field>
</record>
<record id="board_sales_form" model="ir.ui.view">

View File

@ -125,7 +125,7 @@
<field name="product_id"
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
groups="base.group_user"
on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, product_uos_qty, product_uos, name, parent.partner_id, False, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, False, product_uos_qty, False, name, parent.partner_id, False, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
<label for="product_uom_qty"/>
<div>
<field
@ -169,7 +169,7 @@
<field name="product_id"
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
groups="base.group_user"
on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, product_uos_qty, product_uos, name, parent.partner_id, False, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, False, product_uos_qty, False, name, parent.partner_id, False, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
<field name="name"/>
<field name="product_uom_qty"
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"

View File

@ -33,7 +33,7 @@
<field name="product_id"
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
groups="base.group_user"
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, True, parent.date_order, product_packaging, parent.fiscal_position, False, context)"/>
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,False,product_uos_qty,False,name,parent.partner_id, False, True, parent.date_order, product_packaging, parent.fiscal_position, False, context)"/>
</field>
<field name="product_uom_qty" position="replace">
<field context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"

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