Bhumi Thakkar (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-improve-css-all-browsers-m2o-bth into
lp:~openerp-dev/openobject-addons/trunk-improve-css-all-browsers.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-improve-css-all-browsers-m2o-bth/+merge/132454
Hello,
Fixed issue related m2o field in crm when button is not with m2o field.
Added class 'oe_no_button'.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-improve-css-all-browsers-m2o-bth/+merge/132454
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-improve-css-all-browsers-m2o-bth into
lp:~openerp-dev/openobject-addons/trunk-improve-css-all-browsers.
=== modified file 'account/account_view.xml'
--- account/account_view.xml 2012-10-30 15:33:09 +0000
+++ account/account_view.xml 2012-11-01 07:01:24 +0000
@@ -509,8 +509,8 @@
<page string="Cash Registers">
<group>
<group string="Accounts">
- <field name="profit_account_id"/>
- <field name="loss_account_id"/>
+ <field name="profit_account_id" domain="[('type','!=','view')]"/>
+ <field name="loss_account_id" domain="[('type','!=','view')]"/>
<field name="internal_account_id"/>
</group>
<group string="Miscellaneous">
=== modified file 'account/i18n/ru.po'
--- account/i18n/ru.po 2012-10-30 05:37:00 +0000
+++ account/i18n/ru.po 2012-11-01 07:01:24 +0000
@@ -7,14 +7,14 @@
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
-"PO-Revision-Date: 2012-10-26 09:03+0000\n"
+"PO-Revision-Date: 2012-10-31 10:41+0000\n"
"Last-Translator: Chertykov Denis <[email protected]>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-10-30 05:04+0000\n"
-"X-Generator: Launchpad (build 16206)\n"
+"X-Launchpad-Export-Date: 2012-11-01 04:36+0000\n"
+"X-Generator: Launchpad (build 16218)\n"
#. module: account
#: view:account.invoice.report:0
@@ -7939,7 +7939,7 @@
#: model:ir.actions.report.xml,name:account.account_3rdparty_ledger_other
#: model:ir.ui.menu,name:account.menu_account_partner_ledger
msgid "Partner Ledger"
-msgstr "Книгапартнера"
+msgstr "Книга партнера"
#. module: account
#: selection:account.tax.template,type:0
=== modified file 'account_bank_statement_extensions/account_bank_statement.py'
--- account_bank_statement_extensions/account_bank_statement.py 2012-08-06 15:44:10 +0000
+++ account_bank_statement_extensions/account_bank_statement.py 2012-11-01 07:01:24 +0000
@@ -105,7 +105,6 @@
class account_bank_statement_line(osv.osv):
_inherit = 'account.bank.statement.line'
_columns = {
- 'date': fields.date('Entry Date', required=True, states={'confirm': [('readonly', True)]}),
'val_date': fields.date('Valuta Date', states={'confirm': [('readonly', True)]}),
'globalisation_id': fields.many2one('account.bank.statement.line.global', 'Globalisation ID',
states={'confirm': [('readonly', True)]},
=== modified file 'account_bank_statement_extensions/account_bank_statement_view.xml'
--- account_bank_statement_extensions/account_bank_statement_view.xml 2012-10-12 13:06:39 +0000
+++ account_bank_statement_extensions/account_bank_statement_view.xml 2012-11-01 07:01:24 +0000
@@ -56,6 +56,9 @@
<field name="globalisation_id"/>
<field name="state" invisible="1"/>
</xpath>
+ <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='date']" position="replace">
+ <field name="date" string="'Entry Date'" attrs="{'readonly':[('state','=','draft')]}" />
+ </xpath>
</data>
</field>
</record>
=== modified file 'account_voucher/__openerp__.py'
--- account_voucher/__openerp__.py 2012-09-26 12:16:27 +0000
+++ account_voucher/__openerp__.py 2012-11-01 07:01:24 +0000
@@ -61,6 +61,7 @@
'account_voucher_data.xml',
],
'test' : [
+ 'test/case5_suppl_usd_usd.yml',
'test/account_voucher.yml',
'test/sales_receipt.yml',
'test/sales_payment.yml',
=== added file 'account_voucher/test/case5_suppl_usd_usd.yml'
--- account_voucher/test/case5_suppl_usd_usd.yml 1970-01-01 00:00:00 +0000
+++ account_voucher/test/case5_suppl_usd_usd.yml 2012-11-01 07:01:24 +0000
@@ -0,0 +1,185 @@
+-
+ In order to check the Account_voucher module with multi-currency in OpenERP,
+ I create a supplier invoices in USD and make the payment in USD but with another exchange rate and with a write-off
+-
+ I create a cash account with currency USD
+-
+ !record {model: account.account, id: account_cash_usd_id}:
+ currency_id: base.USD
+ name: "cash account in usd"
+ code: "Xcash usd"
+ type: 'liquidity'
+ user_type: "account.data_account_type_cash"
+
+-
+ I create currency USD in OpenERP for November of 1.8 Rate
+-
+ !record {model: res.currency.rate, id: nov_usd}:
+ currency_id: base.USD
+ name: !eval "'%s-11-01' %(datetime.now().year)"
+ rate: 1.8
+-
+ I create currency USD in OpenERP for December of 1.5 Rate
+-
+ !record {model: res.currency.rate, id: dec_usd}:
+ currency_id: base.USD
+ name: !eval "'%s-12-01' %(datetime.now().year)"
+ rate: 1.5
+-
+ I set the income and expense currency accounts on the main company
+-
+ !python {model: res.company}: |
+ from datetime import datetime
+ vals = {
+ 'income_currency_exchange_account_id': ref('account.o_expense'),
+ 'expense_currency_exchange_account_id': ref('account.o_expense')}
+ self.write(cr, uid, ref('base.main_company'), vals)
+-
+ I create a bank journal with EUR as currency
+-
+ !record {model: account.journal, id: bank_journal_EUR}:
+ name: Bank Journal(EUR)
+ code: BEUR
+ type: bank
+ analytic_journal_id: account.sit
+ sequence_id: account.sequence_bank_journal
+ default_debit_account_id: account.cash
+ default_credit_account_id: account.cash
+ company_id: base.main_company
+ view_id: account.account_journal_bank_view
+-
+ I create a bank journal with USD as currency
+-
+ !record {model: account.journal, id: bank_journal_USD}:
+ name: Bank Journal(USD)
+ code: BUSD
+ type: bank
+ analytic_journal_id: account.sit
+ sequence_id: account.sequence_bank_journal
+ default_debit_account_id: account_cash_usd_id
+ default_credit_account_id: account_cash_usd_id
+ currency: base.USD
+ company_id: base.main_company
+ view_id: account.account_journal_bank_view
+-
+ I set the context as would do the action in supplier invoice menuitem
+-
+ !context
+ 'default_type': 'in_invoice'
+-
+ I create the invoice on 1st november for 1000 USD
+-
+ !record {model: account.invoice, id: account_supplier_invoice_november, view: account.invoice_supplier_form}:
+ account_id: account.a_pay
+ company_id: base.main_company
+ currency_id: base.USD
+ date_invoice: !eval "'%s-11-01' %(datetime.now().year)"
+ period_id: account.period_1
+ invoice_line:
+ - account_id: account.a_expense
+ name: '[PCSC234] PC Assemble SC234'
+ price_unit: 1000.0
+ quantity: 1.0
+ product_id: product.product_product_3
+ uos_id: product.product_uom_unit
+ journal_id: account.sales_journal
+ partner_id: base.res_partner_19
+ reference_type: none
+ check_total : 1000
+-
+ I Validate invoice by clicking on Validate button
+-
+ !workflow {model: account.invoice, action: invoice_open, ref: account_supplier_invoice_november}
+-
+ I check that first invoice move is correct for creditor account(debit - credit == -555.56)
+-
+ !python {model: account.invoice}: |
+ invoice_id = self.browse(cr, uid, ref("account_supplier_invoice_november"))
+ assert invoice_id.move_id, "Move not created for open invoice"
+ move_line_obj = self.pool.get('account.move.line')
+ move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
+ move_line = move_line_obj.browse(cr, uid, move_lines[0])
+ assert (move_line.debit - move_line.credit == -555.56), "Invoice move is incorrect for creditor account"
+ assert (move_line.amount_currency == -1000), "Amount currency is incorrect for creditor account"
+-
+ I set the context that will be used for the encoding of all the vouchers of this file
+-
+ !context
+ 'type': 'payment'
+-
+ I create the voucher of payment with values $950, journal USD
+-
+ !record {model: account.voucher, id: account_voucher_case_5_supplier_flow, view: view_vendor_payment_form}:
+ account_id: account.cash
+ amount: 950.0
+ company_id: base.main_company
+ journal_id: bank_journal_USD
+ name: 'Payment: Case Basic SUPPLIER USD/USD'
+ partner_id: base.res_partner_19
+ period_id: account.period_12
+ date: !eval time.strftime("%Y-12-01")
+ payment_option: 'with_writeoff'
+ writeoff_acc_id: account.a_expense
+ comment: 'Write Off'
+ type: 'payment'
+-
+ I fill $1000 for the previously encoded invoice
+-
+ !python {model: account.voucher}: |
+ import netsvc, time
+ vals = {}
+ voucher_id = self.browse(cr, uid, ref('account_voucher_case_5_supplier_flow'))
+ for item in voucher_id.line_dr_ids:
+ if item.amount_unreconciled == 1000.00:
+ self.pool.get('account.voucher.line').write(cr, uid, [item.id], {'amount': 1000})
+ assert (voucher_id.state=='draft'), "Voucher is not in draft state"
+-
+ I check that writeoff amount computed is -50.0
+-
+ !assert {model: account.voucher, id: account_voucher_case_5_supplier_flow}:
+ - writeoff_amount == -50.0
+-
+ I confirm the voucher
+-
+ !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_case_5_supplier_flow}
+-
+ I check that the move of my voucher is valid and that it is posted
+-
+ !python {model: account.voucher}: |
+ voucher_id = self.browse(cr, uid, ref('account_voucher_case_5_supplier_flow'))
+ assert voucher_id.state == 'posted', "Voucher state is not posted"
+ for move_line in voucher_id.move_id.line_id:
+ assert move_line.state == 'valid', "Voucher move is not valid"
+-
+ I check that my creditor account is correct
+-
+ I check that the bank entry is -$950 and 633.33€ as amount_currency and credit, respectively.
+-
+ I check that the creditor account has 1 new line with $1000 and 666.67€ as amount_currency and debit, respectively.
+-
+ I check that my currency rate difference is correct (111.11€ in debit/credit with no amount_currency)
+-
+ I check that my writeoff is correct. 33.34€ in credit with -$50 as amount currency
+-
+ !python {model: account.voucher}: |
+ voucher_id = self.browse(cr, uid, ref('account_voucher_case_5_supplier_flow'))
+ for move_line in voucher_id.move_id.line_id:
+ if move_line.amount_currency == -950.00:
+ assert move_line.credit == 633.33, "Wrong bank entry."
+ elif move_line.credit == 111.11 or move_line.debit == 111.11:
+ assert move_line.amount_currency == 0.00, "Incorrect Currency Difference."
+ elif move_line.credit == 33.34:
+ assert move_line.amount_currency == -50.0, "Writeoff amount is wrong."
+ elif move_line.debit == 666.67:
+ assert move_line.amount_currency == 1000.0, "Wrong supplier entry."
+ else:
+ assert False, "Wrong entry. Unrecognized account move line"
+-
+ I check the residual amount of invoice, it should be 0 in residual currency and 0 in amount_residual and paid
+-
+ !python {model: account.invoice}: |
+ invoice_id = self.browse(cr, uid, ref("account_supplier_invoice_november"))
+ move_line_obj = self.pool.get('account.move.line')
+ move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
+ move_line = move_line_obj.browse(cr, uid, move_lines[0])
+ assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for supplier invoice"
=== modified file 'base_gengo/__openerp__.py'
--- base_gengo/__openerp__.py 2012-08-31 12:54:16 +0000
+++ base_gengo/__openerp__.py 2012-11-01 07:01:24 +0000
@@ -25,7 +25,8 @@
'description': """
Automated Translations through Gengo API
----------------------------------------
- This module will install passive scheduler job for automated translations
+
+This module will install passive scheduler job for automated translations
using the Gengo API. To activate it, you must
1) Configure your Gengo authentication parameters under `Settings > Companies > Gengo Parameters`
2) Launch the wizard under `Settings > Application Terms > Gengo: Manual Request of Translation` and follow the wizard.
=== modified file 'crm/crm_lead_view.xml'
--- crm/crm_lead_view.xml 2012-10-26 09:58:21 +0000
+++ crm/crm_lead_view.xml 2012-11-01 07:01:24 +0000
@@ -160,7 +160,7 @@
<field name="street2"/>
<div class="address_format">
<field name="city" placeholder="City" style="width: 40%%"/>
- <field name="state_id" options='{"no_open": True}' placeholder="State" style="width: 24%%"/>
+ <field name="state_id" options='{"no_open": True}' placeholder="State" class="oe_no_button" style="width: 24%%"/>
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
</div>
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>
@@ -477,7 +477,7 @@
<field name="street2"/>
<div class="address_format">
<field name="city" placeholder="City" style="width: 40%%"/>
- <field name="state_id" options='{"no_open": True}' placeholder="State" style="width: 24%%"/>
+ <field name="state_id" options='{"no_open": True}' placeholder="State" class="oe_no_button" style="width: 24%%"/>
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
</div>
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>
=== modified file 'hr/__openerp__.py'
--- hr/__openerp__.py 2012-09-26 12:16:27 +0000
+++ hr/__openerp__.py 2012-11-01 07:01:24 +0000
@@ -29,7 +29,7 @@
'summary': 'Jobs, Departments, Employees Details',
'description': """
Human Resources Management
-=========================
+==========================
This application enables you to manage important aspects of your company's staff and other details such as their skills, contacts, working time...
=== added file 'l10n_ve/i18n/de.po'
--- l10n_ve/i18n/de.po 1970-01-01 00:00:00 +0000
+++ l10n_ve/i18n/de.po 2012-11-01 07:01:24 +0000
@@ -0,0 +1,83 @@
+# German translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2011-12-23 09:56+0000\n"
+"PO-Revision-Date: 2012-10-31 15:43+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: German <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-11-01 04:36+0000\n"
+"X-Generator: Launchpad (build 16218)\n"
+
+#. module: l10n_ve
+#: model:account.account.type,name:l10n_ve.account_type_receivable
+msgid "Receivable"
+msgstr "Forderungen"
+
+#. module: l10n_ve
+#: model:account.account.type,name:l10n_ve.account_type_expense
+msgid "Expense"
+msgstr "Ausgaben"
+
+#. module: l10n_ve
+#: model:account.account.type,name:l10n_ve.account_type_equity
+msgid "Equity"
+msgstr ""
+
+#. module: l10n_ve
+#: model:account.account.type,name:l10n_ve.account_type_tax
+msgid "Tax"
+msgstr "Steuer"
+
+#. module: l10n_ve
+#: model:account.account.type,name:l10n_ve.account_type_cash
+msgid "Cash"
+msgstr "Barkasse"
+
+#. module: l10n_ve
+#: model:account.account.type,name:l10n_ve.account_type_payable
+msgid "Payable"
+msgstr "Verbindlichkeiten"
+
+#. module: l10n_ve
+#: model:account.account.type,name:l10n_ve.account_type_asset
+msgid "Asset"
+msgstr "Anlagegüter"
+
+#. module: l10n_ve
+#: model:account.account.type,name:l10n_ve.account_type_income
+msgid "Income"
+msgstr "Einnahmen"
+
+#. module: l10n_ve
+#: model:ir.actions.todo,note:l10n_ve.config_call_account_template_ve_chart
+msgid ""
+"Generate Chart of Accounts from a Chart Template. You will be asked to pass "
+"the name of the company, the chart template to follow, the no. of digits to "
+"generate the code for your accounts and Bank account, currency to create "
+"Journals. Thus,the pure copy of chart Template is generated.\n"
+"This is the same wizard that runs from Financial "
+"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
+"Chart of Accounts from a Chart Template.\n"
+"Genere el Plan de cuentas de una Plantilla de Carta. Le pedirán pasar el "
+"nombre de la compania, la plantilla de carta para seguir, el no. de digitos "
+"para generar el codigo para sus cuentas y cuenta Bancaria, dinero para crear "
+"Diarios. Asi, la copia pura de la carta la Plantilla es generada.\n"
+"Esto es el mismo wizard que corre de la Financial "
+"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
+"Chart of Accounts from a Chart Template.\n"
+" "
+msgstr ""
+
+#. module: l10n_ve
+#: model:account.account.type,name:l10n_ve.account_type_view
+msgid "View"
+msgstr "Sicht"
=== modified file 'mail/mail_thread.py'
--- mail/mail_thread.py 2012-10-29 10:12:30 +0000
+++ mail/mail_thread.py 2012-11-01 07:01:24 +0000
@@ -156,25 +156,26 @@
old = set(fol.partner_id.id for fol in fol_obj.browse(cr, SUPERUSER_ID, fol_ids))
new = set(old)
- for command in value:
- if isinstance(command, (int, long)):
- new.add(command)
- elif command[0] == 0:
- new.add(partner_obj.create(cr, uid, command[2], context=context))
- elif command[0] == 1:
- partner_obj.write(cr, uid, [command[1]], command[2], context=context)
- new.add(command[1])
- elif command[0] == 2:
- partner_obj.unlink(cr, uid, [command[1]], context=context)
- new.discard(command[1])
- elif command[0] == 3:
- new.discard(command[1])
- elif command[0] == 4:
- new.add(command[1])
- elif command[0] == 5:
- new.clear()
- elif command[0] == 6:
- new = set(command[2])
+ if value:
+ for command in value:
+ if isinstance(command, (int, long)):
+ new.add(command)
+ elif command[0] == 0:
+ new.add(partner_obj.create(cr, uid, command[2], context=context))
+ elif command[0] == 1:
+ partner_obj.write(cr, uid, [command[1]], command[2], context=context)
+ new.add(command[1])
+ elif command[0] == 2:
+ partner_obj.unlink(cr, uid, [command[1]], context=context)
+ new.discard(command[1])
+ elif command[0] == 3:
+ new.discard(command[1])
+ elif command[0] == 4:
+ new.add(command[1])
+ elif command[0] == 5:
+ new.clear()
+ elif command[0] == 6:
+ new = set(command[2])
# remove partners that are no longer followers
fol_ids = fol_obj.search(cr, SUPERUSER_ID,
=== modified file 'mrp_repair/mrp_repair_view.xml'
--- mrp_repair/mrp_repair_view.xml 2012-10-26 09:58:21 +0000
+++ mrp_repair/mrp_repair_view.xml 2012-11-01 07:01:24 +0000
@@ -34,8 +34,7 @@
<button name="action_invoice_create" states="2binvoiced" string="Make Invoice" class="oe_highlight"/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
<button name="invoice_corrected" states="invoice_except" string="Invoice Corrected"/>
- <button name="action_cancel" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="object" attrs="{'invisible':[('invoice_method','!=','none')]}"/>
- <button name="action_cancel" states="invoice_except" string="Cancel Repair" type="object" attrs="{'invisible':[('invoice_method','!=','none')]}"/>
+ <button name="action_cancel" string="Cancel Repair" type="object" attrs="{'invisible':['|',('invoice_method','!=','none'), ('state', 'not in',('confirmed','2binvoiced','ready','under_repair', 'invoice_except'))]}"/>
<button name="cancel" states="draft" string="Cancel Repair"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done"/>
</header>
=== modified file 'point_of_sale/i18n/hr.po'
--- point_of_sale/i18n/hr.po 2012-10-30 05:37:00 +0000
+++ point_of_sale/i18n/hr.po 2012-11-01 07:01:24 +0000
@@ -7,14 +7,14 @@
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
-"PO-Revision-Date: 2012-05-10 18:27+0000\n"
-"Last-Translator: Goran Kliska <[email protected]>\n"
+"PO-Revision-Date: 2012-10-31 09:46+0000\n"
+"Last-Translator: Krešimir Jeđud <[email protected]>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-10-30 04:54+0000\n"
-"X-Generator: Launchpad (build 16206)\n"
+"X-Launchpad-Export-Date: 2012-11-01 04:36+0000\n"
+"X-Generator: Launchpad (build 16218)\n"
#. module: point_of_sale
#: field:report.transaction.pos,product_nb:0
@@ -916,7 +916,7 @@
#. module: point_of_sale
#: view:pos.receipt:0
msgid "Receipt :"
-msgstr "Receipt :"
+msgstr "Račun"
#. module: point_of_sale
#: field:account.bank.statement.line,pos_statement_id:0
@@ -1671,7 +1671,7 @@
#: model:ir.actions.act_window,name:point_of_sale.action_report_pos_receipt
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:231
msgid "Receipt"
-msgstr "Receipt"
+msgstr "Račun"
#. module: point_of_sale
#: view:pos.open.statement:0
@@ -2639,7 +2639,7 @@
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:31
msgid "Disc (%)"
-msgstr ""
+msgstr "Popust(%)"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:41
@@ -2650,7 +2650,7 @@
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:45
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:268
msgid "Tax:"
-msgstr ""
+msgstr "Porez:"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:64
@@ -2671,17 +2671,17 @@
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:113
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:288
msgid "Change:"
-msgstr ""
+msgstr "Za vratiti:"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:124
msgid "Back to Products"
-msgstr ""
+msgstr "Povratak"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:127
msgid "Validate"
-msgstr ""
+msgstr "Potvrdi"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:140
@@ -2703,7 +2703,7 @@
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:238
msgid "Next Order"
-msgstr ""
+msgstr "Sljedeći račun"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:248
=== modified file 'point_of_sale/point_of_sale.py'
--- point_of_sale/point_of_sale.py 2012-10-12 11:42:58 +0000
+++ point_of_sale/point_of_sale.py 2012-11-01 07:01:24 +0000
@@ -484,7 +484,8 @@
'name': order['name'],
'user_id': order['user_id'] or False,
'session_id': order['pos_session_id'],
- 'lines': order['lines']
+ 'lines': order['lines'],
+ 'pos_reference':order['name']
}, context)
for payments in order['statement_ids']:
@@ -592,7 +593,7 @@
'picking_id': fields.many2one('stock.picking', 'Picking', readonly=True),
'note': fields.text('Internal Notes'),
'nb_print': fields.integer('Number of Print', readonly=True),
-
+ 'pos_reference': fields.char('Receipt Ref', size=64, readonly=True),
'sale_journal': fields.related('session_id', 'config_id', 'journal_id', relation='account.journal', type='many2one', string='Sale Journal', store=True, readonly=True),
}
=== modified file 'point_of_sale/point_of_sale_view.xml'
--- point_of_sale/point_of_sale_view.xml 2012-10-12 11:42:58 +0000
+++ point_of_sale/point_of_sale_view.xml 2012-11-01 07:01:24 +0000
@@ -88,6 +88,7 @@
<field name="user_id"/>
<field name="pricelist_id" groups="product.group_sale_pricelist" domain="[('type','=','sale')]"/>
<field name="picking_id" readonly="1"/>
+ <field name="pos_reference"/>
</group>
<group string="Accounting Information">
<field name="sale_journal" domain="[('type','=','sale')]"/>
@@ -131,6 +132,7 @@
<field name="arch" type="xml">
<tree string="POS Orders" colors="blue:state == 'draft';gray:state in ('done','cancel');black:state not in('done','cancel')">
<field name="name"/>
+ <field name="pos_reference"/>
<field name="partner_id"/>
<field name="date_order"/>
<field name="user_id"/>
@@ -149,6 +151,7 @@
<search string="Search Sales Order">
<field name="name" string="Sales Order"/>
<field name="date_order"/>
+ <field name="pos_reference"/>
<filter icon="terp-document-new" string="New" domain="[('state','=','draft')]"/>
<filter icon="gtk-apply" string="Done" domain="[('state','in',('paid','invoiced','done'))]"/>
<filter icon="terp-check" string="Invoiced" domain="[('state','=','invoiced')]"/>
@@ -890,7 +893,7 @@
<field name="cash_control" invisible="1" />
<group>
<field name="user_id"/>
- <field name="config_id" attrs="{'invisible' : [('config_id', '!=', False)]}"/>
+ <field name="config_id"/>
</group>
<group>
<field name="start_at" attrs="{'invisible' : [('state', '=', 'opening_control')]}"/>
=== modified file 'point_of_sale/report/pos_details.py'
--- point_of_sale/report/pos_details.py 2012-03-05 18:40:03 +0000
+++ point_of_sale/report/pos_details.py 2012-11-01 07:01:24 +0000
@@ -91,16 +91,17 @@
def _get_sum_dis_2(self):
return self.discount or 0.0
- def _get_sum_discount(self, objects):
+ def _get_sum_discount(self, form):
#code for the sum of discount value
- return reduce(lambda acc, object:
- acc + reduce(
- lambda sum_dis, line:
- sum_dis + ((line.price_unit * line.qty) * (line.discount / 100)),
- object.lines,
- 0.0),
- objects,
- 0.0)
+ pos_obj = self.pool.get('pos.order')
+ user_obj = self.pool.get('res.users')
+ user_ids = form['user_ids'] or self._get_all_users()
+ company_id = user_obj.browse(self.cr, self.uid, self.uid).company_id.id
+ pos_ids = pos_obj.search(self.cr, self.uid, [('date_order','>=',form['date_start'] + ' 00:00:00'),('date_order','<=',form['date_end'] + ' 23:59:59'),('user_id','in',user_ids),('company_id','=',company_id)])
+ for pos in pos_obj.browse(self.cr, self.uid, pos_ids):
+ for pol in pos.lines:
+ self.total_discount += ((pol.price_unit * pol.qty) * (pol.discount / 100))
+ return self.total_discount or False
def _get_payments(self, form):
statement_line_obj = self.pool.get("account.bank.statement.line")
@@ -179,11 +180,12 @@
self.qty = 0.0
self.total_invoiced = 0.0
self.discount = 0.0
+ self.total_discount = 0.0
self.localcontext.update({
'time': time,
'strip_name': self._strip_name,
'getpayments': self._get_payments,
- 'getsumdisc': self._get_sum_dis_2,
+ 'getsumdisc': self._get_sum_discount,
'gettotalofthaday': self._total_of_the_day,
'gettaxamount': self._get_tax_amount,
'pos_sales_details':self._pos_sales_details,
=== modified file 'point_of_sale/report/pos_details.rml'
--- point_of_sale/report/pos_details.rml 2012-10-02 16:40:01 +0000
+++ point_of_sale/report/pos_details.rml 2012-11-01 07:01:24 +0000
@@ -373,8 +373,8 @@
<para style="terp_default_Bold_9">Total discount</para>
</td>
<td>
- <para style="terp_default_Right_9_Bold">[[ formatLang(getsumdisc(), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
- </td>
+ <para style="terp_default_Right_9_Bold">[[ formatLang(getsumdisc(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
+ </td>
</tr>
<tr>
<td>
=== modified file 'point_of_sale/report/pos_details.sxw'
Binary files point_of_sale/report/pos_details.sxw 2012-10-02 16:40:01 +0000 and point_of_sale/report/pos_details.sxw 2012-11-01 07:01:24 +0000 differ
=== modified file 'point_of_sale/report/pos_order_report.py'
--- point_of_sale/report/pos_order_report.py 2012-05-04 12:13:26 +0000
+++ point_of_sale/report/pos_order_report.py 2012-11-01 07:01:24 +0000
@@ -60,7 +60,7 @@
to_date(to_char(s.date_order, 'dd-MM-YYYY'),'dd-MM-YYYY') as date,
sum(l.qty * u.factor) as product_qty,
sum(l.qty * l.price_unit) as price_total,
- sum(l.qty * l.discount) as total_discount,
+ 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,
=== modified file 'point_of_sale/report/pos_receipt.rml'
--- point_of_sale/report/pos_receipt.rml 2012-10-11 09:40:02 +0000
+++ point_of_sale/report/pos_receipt.rml 2012-11-01 07:01:24 +0000
@@ -103,6 +103,12 @@
<td>
<para style="P1">[[ repeatIn(o.lines,'line') ]]</para>
<para style="terp_default_9b">[[ line.product_id.name ]]</para>
+ <para style="terp_default_Right_9">
+ <font face="Helvetica">With a [[ line and line.discount == 0.0 and removeParentNode('font') ]] ([[ '%.2f' % line.discount ]]) % discount.</font>
+ </para>
+ <para style="terp_default_9b">
+ <font color="white"> </font>
+ </para>
</td>
<td>
<para style="terp_default_Right_9">[[o.state=='cancel' and o.statement_ids and '-' or '']][['%.f' % line.qty ]]</para>
=== modified file 'point_of_sale/report/pos_receipt.sxw'
Binary files point_of_sale/report/pos_receipt.sxw 2012-10-02 06:58:32 +0000 and point_of_sale/report/pos_receipt.sxw 2012-11-01 07:01:24 +0000 differ
=== modified file 'point_of_sale/static/src/css/pos.css'
--- point_of_sale/static/src/css/pos.css 2012-10-05 14:06:16 +0000
+++ point_of_sale/static/src/css/pos.css 2012-11-01 07:01:24 +0000
@@ -102,6 +102,11 @@
border: 1px solid #cecbcb;
border-radius: 4px;
}
+.point-of-sale .pos-disc-font {
+ font-size: 12px;
+ font-style:italic;
+ color: #808080;
+}
/* ********* The black header bar ********* */
=== modified file 'point_of_sale/static/src/js/models.js'
--- point_of_sale/static/src/js/models.js 2012-09-13 14:03:10 +0000
+++ point_of_sale/static/src/js/models.js 2012-11-01 07:01:24 +0000
@@ -178,12 +178,15 @@
[['state','=','open'],['pos_session_id', '=', self.get('pos_session').id]]
);
}).pipe(function(bank_statements){
+ var journals = new Array();
+ _.each(bank_statements,function(statement) {
+ journals.push(statement.journal_id[0])
+ });
self.set('bank_statements', bank_statements);
-
- return self.fetch('account.journal', undefined, [['user_id','=', self.get('pos_session').user_id[0]]]);
+ return self.fetch('account.journal', undefined, [['id','in', journals]]);
}).pipe(function(journals){
self.set('journals',journals);
-
+
// associate the bank statements with their journals.
var bank_statements = self.get('bank_statements');
for(var i = 0, ilen = bank_statements.length; i < ilen; i++){
@@ -614,6 +617,11 @@
return sum + orderLine.get_price_with_tax();
}), 0);
},
+ getDiscountTotal: function() {
+ return (this.get('orderLines')).reduce((function(sum, orderLine) {
+ return sum + (orderLine.get_list_price() * (orderLine.get_discount()/100) * orderLine.get_quantity());
+ }), 0);
+ },
getTotalTaxExcluded: function() {
return (this.get('orderLines')).reduce((function(sum, orderLine) {
return sum + orderLine.get_price_without_tax();
=== modified file 'point_of_sale/static/src/js/screens.js'
--- point_of_sale/static/src/js/screens.js 2012-10-23 07:50:35 +0000
+++ point_of_sale/static/src/js/screens.js 2012-11-01 07:01:24 +0000
@@ -967,6 +967,9 @@
this.$('#payment-paid-total').html(paidTotal.toFixed(2));
this.$('#payment-remaining').html(remaining.toFixed(2));
this.$('#payment-change').html(change.toFixed(2));
+ if((currentOrder.selected_orderline == undefined))
+ remaining = 1
+
if(this.pos_widget.action_bar){
this.pos_widget.action_bar.set_button_disabled('validation', remaining > 0);
}
=== modified file 'point_of_sale/static/src/xml/pos.xml'
--- point_of_sale/static/src/xml/pos.xml 2012-09-28 15:20:41 +0000
+++ point_of_sale/static/src/xml/pos.xml 2012-11-01 07:01:24 +0000
@@ -541,8 +541,9 @@
<t t-name="PosTicket">
<div class="pos-sale-ticket">
+
<div class="pos-right-align"><t t-esc="new Date().toString(Date.CultureInfo.formatPatterns.shortDate + ' ' +
- Date.CultureInfo.formatPatterns.longTime)"/></div>
+ Date.CultureInfo.formatPatterns.longTime)"/><li><t t-esc="widget.currentOrder.attributes.name"/></li></div>
<br />
<t t-esc="widget.company.name"/><br />
Phone: <t t-esc="widget.company.phone || ''"/><br />
@@ -553,6 +554,11 @@
<tr t-foreach="widget.currentOrderLines.toArray()" t-as="order">
<td>
<t t-esc="order.get_product().get('name')"/>
+ <t t-if="order.get_discount() > 0">
+ <li class="pos-disc-font">
+ With a <t t-esc="order.get_discount()"/>% discount
+ </li>
+ </t>
</td>
<td class="pos-right-align">
<t t-esc="order.get_quantity().toFixed(0)"/>
@@ -567,6 +573,9 @@
<tr><td>Tax:</td><td class="pos-right-align">
<t t-esc="widget.format_currency(widget.currentOrder.getTax().toFixed(2))"/>
</td></tr>
+ <tr><td>Discount:</td><td class="pos-right-align">
+ <t t-esc="widget.format_currency(widget.currentOrder.getDiscountTotal().toFixed(2))"/>
+ </td></tr>
<tr class="emph"><td>Total:</td><td class="pos-right-align">
<t t-esc="widget.format_currency(widget.currentOrder.getTotal().toFixed(2))"/>
</td></tr>
=== modified file 'sale/__openerp__.py'
--- sale/__openerp__.py 2012-09-26 12:16:27 +0000
+++ sale/__openerp__.py 2012-11-01 07:01:24 +0000
@@ -36,7 +36,8 @@
* **Quotation** -> **Sales order** -> **Invoice**
Preferences (only with Warehouse Management installed)
------------
+------------------------------------------------------
+
If you also installed the Warehouse Management, you can deal with the following preferences:
* Shipping: Choice of delivery at once or partial delivery
=== modified file 'stock_location/i18n/it.po'
--- stock_location/i18n/it.po 2012-10-31 04:41:02 +0000
+++ stock_location/i18n/it.po 2012-11-01 07:01:24 +0000
@@ -13,7 +13,7 @@
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-10-31 04:40+0000\n"
+"X-Launchpad-Export-Date: 2012-11-01 04:36+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: stock_location
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp