[MERGE] addosn 17
bzr revid: fp@tinyerp.com-20121102082707-wpv96avu8l5incs8
This commit is contained in:
commit
376cfc937a
|
@ -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">
|
||||
|
|
|
@ -7,14 +7,14 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\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 <chertykov@gmail.com>\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 @@ msgstr "Строка кассы"
|
|||
#: 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
|
||||
|
|
|
@ -105,8 +105,7 @@ account_bank_statement_line_global()
|
|||
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)]}),
|
||||
'val_date': fields.date('Value Date', states={'confirm': [('readonly', True)]}),
|
||||
'globalisation_id': fields.many2one('account.bank.statement.line.global', 'Globalisation ID',
|
||||
states={'confirm': [('readonly', True)]},
|
||||
help="Code to identify transactions belonging to the same globalisation level within a batch payment"),
|
||||
|
|
|
@ -61,6 +61,7 @@ This module manages:
|
|||
'account_voucher_data.xml',
|
||||
],
|
||||
'test' : [
|
||||
'test/case5_suppl_usd_usd.yml',
|
||||
'test/account_voucher.yml',
|
||||
'test/sales_receipt.yml',
|
||||
'test/sales_payment.yml',
|
||||
|
|
|
@ -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"
|
|
@ -89,7 +89,8 @@
|
|||
<page string="Meeting Details">
|
||||
<group>
|
||||
<group>
|
||||
<field name="date" string="Starting at"/>
|
||||
<field name="date" string="Starting at"
|
||||
on_change="onchange_dates(date, duration, False, allday)"/>
|
||||
<label for="duration"/>
|
||||
<div>
|
||||
<field name="duration" widget="float_time"
|
||||
|
@ -100,7 +101,7 @@
|
|||
<label for="allday" string="All Day?"/>)
|
||||
</div>
|
||||
<field name="date_deadline" groups="base.group_no_one"
|
||||
attrs="{'invisible': [('allday','=',True)]}"
|
||||
attrs="{'invisible': ['|', ('allday','=',True), ('duration','<', 24)]}"
|
||||
on_change="onchange_dates(date,False,date_deadline)"/>
|
||||
</group>
|
||||
<group>
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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...
|
||||
|
||||
|
|
|
@ -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 <de@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: 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"
|
|
@ -156,7 +156,7 @@ class mail_thread(osv.AbstractModel):
|
|||
old = set(fol.partner_id.id for fol in fol_obj.browse(cr, SUPERUSER_ID, fol_ids))
|
||||
new = set(old)
|
||||
|
||||
for command in value:
|
||||
for command in value or []:
|
||||
if isinstance(command, (int, long)):
|
||||
new.add(command)
|
||||
elif command[0] == 0:
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -7,14 +7,14 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\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 <gkliska@gmail.com>\n"
|
||||
"PO-Revision-Date: 2012-10-31 09:46+0000\n"
|
||||
"Last-Translator: Krešimir Jeđud <kresimir.jedud@infokom.hr>\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 @@ msgstr "POS Order lines"
|
|||
#. 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 @@ msgstr "Račun br."
|
|||
#: 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 @@ msgstr "Godina"
|
|||
#. 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 @@ msgstr ""
|
|||
#: /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 @@ msgstr ""
|
|||
#: /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 @@ msgstr ""
|
|||
#. 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
|
||||
|
|
|
@ -484,7 +484,8 @@ class pos_order(osv.osv):
|
|||
'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 @@ class pos_order(osv.osv):
|
|||
'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),
|
||||
}
|
||||
|
||||
|
|
|
@ -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')]}"/>
|
||||
|
|
|
@ -91,16 +91,17 @@ class pos_details(report_sxw.rml_parse):
|
|||
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 @@ class pos_details(report_sxw.rml_parse):
|
|||
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,
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -60,7 +60,7 @@ class pos_order_report(osv.osv):
|
|||
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,
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 ********* */
|
||||
|
||||
|
|
|
@ -178,9 +178,12 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
|
|||
[['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);
|
||||
|
||||
|
@ -614,6 +617,11 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
|
|||
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();
|
||||
|
|
|
@ -967,6 +967,9 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -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)"/><t t-esc="widget.currentOrder.attributes.name"/></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">
|
||||
<div class="pos-disc-font">
|
||||
With a <t t-esc="order.get_discount()"/>% discount
|
||||
</div>
|
||||
</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>
|
||||
|
|
|
@ -36,7 +36,8 @@ It handles the full sales workflow:
|
|||
* **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
|
||||
|
|
|
@ -13,7 +13,7 @@ msgstr ""
|
|||
"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
|
||||
|
|
Loading…
Reference in New Issue