Amit Patel 2012-10-16 14:30:46 +05:30
commit fa206b6c42
110 changed files with 5183 additions and 6232 deletions

View File

@ -2768,7 +2768,6 @@ class account_chart_template(osv.osv):
'property_account_income_categ': fields.many2one('account.account.template', 'Income Category Account'), 'property_account_income_categ': fields.many2one('account.account.template', 'Income Category Account'),
'property_account_expense': fields.many2one('account.account.template', 'Expense Account on Product Template'), 'property_account_expense': fields.many2one('account.account.template', 'Expense Account on Product Template'),
'property_account_income': fields.many2one('account.account.template', 'Income Account on Product Template'), 'property_account_income': fields.many2one('account.account.template', 'Income Account on Product Template'),
'property_reserve_and_surplus_account': fields.many2one('account.account.template', 'Reserve and Profit/Loss Account', domain=[('type', '=', 'payable')], help='This Account is used for transferring Profit/Loss(If It is Profit: Amount will be added, Loss: Amount will be deducted.), Which is calculated from Profilt & Loss Report'),
'property_account_income_opening': fields.many2one('account.account.template', 'Opening Entries Income Account'), 'property_account_income_opening': fields.many2one('account.account.template', 'Opening Entries Income Account'),
'property_account_expense_opening': fields.many2one('account.account.template', 'Opening Entries Expense Account'), 'property_account_expense_opening': fields.many2one('account.account.template', 'Opening Entries Expense Account'),
} }
@ -3216,7 +3215,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
('property_account_income_categ','product.category','account.account'), ('property_account_income_categ','product.category','account.account'),
('property_account_expense','product.template','account.account'), ('property_account_expense','product.template','account.account'),
('property_account_income','product.template','account.account'), ('property_account_income','product.template','account.account'),
('property_reserve_and_surplus_account','res.company','account.account')
] ]
template = self.pool.get('account.chart.template').browse(cr, uid, chart_template_id, context=context) template = self.pool.get('account.chart.template').browse(cr, uid, chart_template_id, context=context)
for record in todo_list: for record in todo_list:

View File

@ -1037,11 +1037,10 @@
--> -->
<record id="view_move_line_tree_reconcile" model="ir.ui.view"> <record id="view_move_line_tree_reconcile" model="ir.ui.view">
<field name="name">account.move.line.reconcile.tree</field>
<field name="model">account.move.line</field> <field name="model">account.move.line</field>
<field eval="24" name="priority"/> <field eval="24" name="priority"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items to Reconcile" create="false"> <tree_account_reconciliation colors="red:state == 'draft';black:state == 'valid'" string="Journal Items to Reconcile" create="false" version="7.0">
<field name="date"/> <field name="date"/>
<field name="move_id"/> <field name="move_id"/>
<field name="ref"/> <field name="ref"/>
@ -1049,9 +1048,10 @@
<field name="partner_id"/> <field name="partner_id"/>
<field name="account_id"/> <field name="account_id"/>
<field name="reconcile_partial_id"/> <field name="reconcile_partial_id"/>
<field name="state" invisible="1"/>
<field name="debit" sum="Total debit"/> <field name="debit" sum="Total debit"/>
<field name="credit" sum="Total credit"/> <field name="credit" sum="Total credit"/>
</tree> </tree_account_reconciliation>
</field> </field>
</record> </record>
@ -1542,8 +1542,7 @@
<field name="name">Journal Items to Reconcile</field> <field name="name">Journal Items to Reconcile</field>
<field name="res_model">account.move.line</field> <field name="res_model">account.move.line</field>
<field name="view_id" ref="view_move_line_tree_reconcile"/> <field name="view_id" ref="view_move_line_tree_reconcile"/>
<field name="view_type">form</field> <field name="view_mode">tree_account_reconciliation</field>
<field name="view_mode">account_reconciliation_list</field>
<field name="help" type="html"> <field name="help" type="html">
<p> <p>
No journal items found. No journal items found.
@ -2171,7 +2170,6 @@
<field name="property_account_income" domain="[('id', 'child_of', [account_root_id])]"/> <field name="property_account_income" domain="[('id', 'child_of', [account_root_id])]"/>
<field name="property_account_income_opening" domain="[('id', 'child_of', [account_root_id])]"/> <field name="property_account_income_opening" domain="[('id', 'child_of', [account_root_id])]"/>
<field name="property_account_expense_opening" domain="[('id', 'child_of', [account_root_id])]"/> <field name="property_account_expense_opening" domain="[('id', 'child_of', [account_root_id])]"/>
<field name="property_reserve_and_surplus_account" />
</group> </group>
</form> </form>
</field> </field>

View File

@ -32,14 +32,6 @@ class res_company(osv.osv):
help="If you select 'Round per Line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round Globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes."), help="If you select 'Round per Line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round Globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes."),
'paypal_account': fields.char("Paypal Account", size=128, help="Paypal username (usually email) for receiving online payments."), 'paypal_account': fields.char("Paypal Account", size=128, help="Paypal username (usually email) for receiving online payments."),
'overdue_msg': fields.text('Overdue Payments Message', translate=True), 'overdue_msg': fields.text('Overdue Payments Message', translate=True),
'property_reserve_and_surplus_account': fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Reserve and Profit/Loss Account",
view_load=True,
domain="[('type', '=', 'other')]",
help="This account is used for transferring Profit/Loss (If It is Profit: Amount will be added, Loss : Amount will be deducted.), as calculated in Profit & Loss Report"),
} }
_defaults = { _defaults = {

View File

@ -15,18 +15,5 @@
</field> </field>
</record> </record>
<record model="ir.ui.view" id="view_company_inherit_1_form">
<field name="name">res.company.form.inherit</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="model">res.company</field>
<field name="arch" type="xml">
<xpath expr="//group[@name='account_grp']" position="inside">
<field name="property_reserve_and_surplus_account"/>
<field name="tax_calculation_rounding_method"/>
<field name="paypal_account" placeholder="e.g. sales@openerp.com"/>
</xpath>
</field>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -381,7 +381,6 @@
<field name="property_account_income_categ" ref="conf_a_sale"/> <field name="property_account_income_categ" ref="conf_a_sale"/>
<field name="property_account_income_opening" ref="conf_o_income"/> <field name="property_account_income_opening" ref="conf_o_income"/>
<field name="property_account_expense_opening" ref="conf_o_expense"/> <field name="property_account_expense_opening" ref="conf_o_expense"/>
<field name="property_reserve_and_surplus_account" ref="conf_a_reserve_and_surplus"/>
<field name="complete_tax_set" eval="False"/> <field name="complete_tax_set" eval="False"/>
</record> </record>

View File

@ -304,14 +304,6 @@
<field name="company_id" ref="base.main_company"/> <field name="company_id" ref="base.main_company"/>
</record> </record>
<record forcecreate="True" id="property_reserve_and_surplus_account" model="ir.property">
<field name="name">property_account_receivable</field>
<field name="fields_id" search="[('model','=','res.company'),('name','=','property_reserve_and_surplus_account')]"/>
<field eval="'account.account,'+str(rsa)" name="value"/>
<field name="company_id" ref="base.main_company"/>
</record>
<!-- <!--
Account Journal Account Journal
--> -->

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -163,7 +163,7 @@
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'credit')) ]] </para> <para style="terp_tblheader_Details_Right">[[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'credit')) ]] </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_balance(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]]</para> <para style="terp_tblheader_Details_Right">[[ formatLang(sum_balance(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id)]]</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'quantity')) ]]</para> <para style="terp_tblheader_Details_Right">[[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'quantity')) ]]</para>
@ -187,7 +187,7 @@
<para style="terp_default_Right_9_Bold">[[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'credit')) ]] </para> <para style="terp_default_Right_9_Bold">[[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'credit')) ]] </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(move_sum_balance(o['id'],data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(move_sum_balance(o['id'],data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id)]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'quantity')) ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'quantity')) ]]</para>
@ -211,7 +211,7 @@
<para style="terp_default_Right_9">[[ formatLang(move_g['credit']) ]] </para> <para style="terp_default_Right_9">[[ formatLang(move_g['credit']) ]] </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(move_g['balance'])]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(move_g['balance'], currency_obj = company.currency_id) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(move_g['quantity']) ]]</para> <para style="terp_default_Right_9">[[ formatLang(move_g['quantity']) ]]</para>

View File

@ -224,7 +224,7 @@
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]] </para> <para style="terp_Default_Bold_Right_9_U">[[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]] </para>
</td> </td>
<td> <td>
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (sum_balance(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_Default_Bold_Right_9_U">[[ formatLang (sum_balance(objects,data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -245,7 +245,7 @@
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (account_sum_credit(account,data['form']['date1'],data['form']['date2'])) ]] </para> <para style="terp_Default_Bold_Right_9_U">[[ formatLang (account_sum_credit(account,data['form']['date1'],data['form']['date2'])) ]] </para>
</td> </td>
<td> <td>
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (account_sum_balance(account,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol ]]</para> <para style="terp_Default_Bold_Right_9_U">[[ formatLang (account_sum_balance(account,data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -266,7 +266,7 @@
<para style="terp_Default_Bold_Right_9_U">[[ formatLang( move_g['credit']) ]] </para> <para style="terp_Default_Bold_Right_9_U">[[ formatLang( move_g['credit']) ]] </para>
</td> </td>
<td> <td>
<para style="terp_Default_Bold_Right_9_U">[[ formatLang( move_g['balance']) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_Default_Bold_Right_9_U">[[ formatLang( move_g['balance'], currency_obj = company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -290,7 +290,7 @@
<para style="terp_default_9_italic_Rignt">[[ formatLang( move_a['credit']) ]] </para> <para style="terp_default_9_italic_Rignt">[[ formatLang( move_a['credit']) ]] </para>
</td> </td>
<td> <td>
<para style="terp_default_9_italic_Rignt">[[ formatLang( move_a['balance']) ]] [[ company.currency_id.symbol]]</para> <para style="terp_default_9_italic_Rignt">[[ formatLang( move_a['balance'], currency_obj = company.currency_id)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -164,7 +164,7 @@
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_credit(objects,data['form']['date1'],data['form']['date2']))]]</para> <para style="terp_tblheader_Details_Right">[[ formatLang(sum_credit(objects,data['form']['date1'],data['form']['date2']))]]</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_balance(objects,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol]]</para> <para style="terp_tblheader_Details_Right">[[ formatLang(sum_balance(objects,data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id)]]</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_quantity(objects,data['form']['date1'],data['form']['date2'])) ]]</para> <para style="terp_tblheader_Details_Right">[[ formatLang(sum_quantity(objects,data['form']['date1'],data['form']['date2'])) ]]</para>
@ -188,7 +188,7 @@
<para style="terp_tblheader_Details_Right">[[formatLang(move_g['credit'])]]</para> <para style="terp_tblheader_Details_Right">[[formatLang(move_g['credit'])]]</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">[[ formatLang(move_g['balance'])]] [[ company.currency_id.symbol]]</para> <para style="terp_tblheader_Details_Right">[[ formatLang(move_g['balance'], currency_obj = company.currency_id)]]</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">[[formatLang(move_g['quantity']) ]]</para> <para style="terp_tblheader_Details_Right">[[formatLang(move_g['quantity']) ]]</para>
@ -212,7 +212,7 @@
<para style="terp_default_Right_9">[[ formatLang(move_a['credit']) ]] </para> <para style="terp_default_Right_9">[[ formatLang(move_a['credit']) ]] </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(move_a['balance']) ]] [[ company.currency_id.symbol]]</para> <para style="terp_default_Right_9">[[ formatLang(move_a['balance'], currency_obj = company.currency_id)]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(move_a['quantity']) ]]</para> <para style="terp_default_Right_9">[[ formatLang(move_a['quantity']) ]]</para>

View File

@ -63,8 +63,12 @@ class account_analytic_journal_report(osv.osv_memory):
if context is None: if context is None:
context = {} context = {}
res = super(account_analytic_journal_report, self).default_get(cr, uid, fields, context=context) res = super(account_analytic_journal_report, self).default_get(cr, uid, fields, context=context)
if not context.has_key('active_ids'):
journal_ids = self.pool.get('account.analytic.journal').search(cr, uid, [], context=context)
else:
journal_ids = context.get('active_ids')
if 'analytic_account_journal_id' in fields: if 'analytic_account_journal_id' in fields:
res.update({'analytic_account_journal_id': context.get('active_ids',[])}) res.update({'analytic_account_journal_id': journal_ids})
return res return res
account_analytic_journal_report() account_analytic_journal_report()

View File

@ -20,6 +20,7 @@
############################################################################## ##############################################################################
import tools import tools
import decimal_precision as dp
from osv import fields,osv from osv import fields,osv
class account_invoice_report(osv.osv): class account_invoice_report(osv.osv):
@ -27,6 +28,31 @@ class account_invoice_report(osv.osv):
_description = "Invoices Statistics" _description = "Invoices Statistics"
_auto = False _auto = False
_rec_name = 'date' _rec_name = 'date'
def _compute_amounts_in_user_currency(self, cr, uid, ids, field_names, args, context=None):
"""Compute the amounts in the currency of the user
"""
if context is None:
context={}
currency_obj = self.pool.get('res.currency')
currency_rate_obj = self.pool.get('res.currency.rate')
user_currency_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
currency_rate_id = currency_rate_obj.search(cr, uid, [('rate', '=', 1)], limit=1, context=context)[0]
base_currency_id = currency_rate_obj.browse(cr, uid, currency_rate_id, context=context).currency_id.id
res = {}
ctx = context.copy()
for item in self.browse(cr, uid, ids, context=context):
ctx['date'] = item.date
price_total = currency_obj.compute(cr, uid, base_currency_id, user_currency_id, item.price_total, context=ctx)
price_average = currency_obj.compute(cr, uid, base_currency_id, user_currency_id, item.price_average, context=ctx)
residual = currency_obj.compute(cr, uid, base_currency_id, user_currency_id, item.residual, context=ctx)
res[item.id] = {
'user_currency_price_total': price_total,
'user_currency_price_average': price_average,
'user_currency_residual': residual,
}
return res
_columns = { _columns = {
'date': fields.date('Date', readonly=True), 'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True), 'year': fields.char('Year', size=4, readonly=True),
@ -47,7 +73,9 @@ class account_invoice_report(osv.osv):
'company_id': fields.many2one('res.company', 'Company', readonly=True), 'company_id': fields.many2one('res.company', 'Company', readonly=True),
'user_id': fields.many2one('res.users', 'Salesperson', readonly=True), 'user_id': fields.many2one('res.users', 'Salesperson', readonly=True),
'price_total': fields.float('Total Without Tax', readonly=True), 'price_total': fields.float('Total Without Tax', readonly=True),
'user_currency_price_total': fields.function(_compute_amounts_in_user_currency, string="Total Without Tax", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
'price_average': fields.float('Average Price', readonly=True, group_operator="avg"), 'price_average': fields.float('Average Price', readonly=True, group_operator="avg"),
'user_currency_price_average': fields.function(_compute_amounts_in_user_currency, string="Average Price", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
'currency_rate': fields.float('Currency Rate', readonly=True), 'currency_rate': fields.float('Currency Rate', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True), 'nbr':fields.integer('# of Lines', readonly=True),
'type': fields.selection([ 'type': fields.selection([
@ -69,6 +97,7 @@ class account_invoice_report(osv.osv):
'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True), 'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True),
'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True), 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
'residual': fields.float('Total Residual', readonly=True), 'residual': fields.float('Total Residual', readonly=True),
'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
'delay_to_pay': fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"), 'delay_to_pay': fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"),
'due_delay': fields.float('Avg. Due Delay', readonly=True, group_operator="avg"), 'due_delay': fields.float('Avg. Due Delay', readonly=True, group_operator="avg"),
} }
@ -161,7 +190,7 @@ class account_invoice_report(osv.osv):
left join product_uom u on (u.id=ail.uos_id), left join product_uom u on (u.id=ail.uos_id),
res_currency_rate cr res_currency_rate cr
where cr.id in (select id from res_currency_rate cr2 where (cr2.currency_id = ai.currency_id) where cr.id in (select id from res_currency_rate cr2 where (cr2.currency_id = ai.currency_id)
and ((ai.date_invoice is not null and cr.name <= ai.date_invoice) or (ai.date_invoice is null and cr.name <= NOW())) limit 1) and ((ai.date_invoice is not null and cr.name <= ai.date_invoice) or (ai.date_invoice is null and cr.name <= NOW())) order by name desc limit 1)
group by ail.product_id, group by ail.product_id,
ai.date_invoice, ai.date_invoice,
ai.id, ai.id,

View File

@ -28,8 +28,8 @@
<field name="nbr" sum="# of Lines"/> <field name="nbr" sum="# of Lines"/>
<field name="product_qty" sum="Qty"/> <field name="product_qty" sum="Qty"/>
<!-- <field name="reconciled" sum="# Reconciled"/> --> <!-- <field name="reconciled" sum="# Reconciled"/> -->
<field name="price_total" sum="Total Without Tax"/> <field name="user_currency_price_total" sum="Total Without Tax"/>
<field name="residual" sum="Total Residual" invisible="context.get('residual_invisible',False)"/> <field name="user_currency_residual" sum="Total Residual" invisible="context.get('residual_invisible',False)"/>
<field name="due_delay" sum="Avg. Due Delay" invisible="context.get('residual_invisible',False)"/> <field name="due_delay" sum="Avg. Due Delay" invisible="context.get('residual_invisible',False)"/>
<field name="delay_to_pay" sum="Avg. Delay To Pay" invisible="context.get('residual_invisible',False)"/> <field name="delay_to_pay" sum="Avg. Delay To Pay" invisible="context.get('residual_invisible',False)"/>
</tree> </tree>
@ -42,7 +42,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<graph string="Invoices Analysis" type="bar"> <graph string="Invoices Analysis" type="bar">
<field name="product_id"/> <field name="product_id"/>
<field name="price_total"/> <field name="user_currency_price_total"/>
</graph> </graph>
</field> </field>
</record> </record>

View File

@ -29,34 +29,11 @@ class Overdue(report_sxw.rml_parse):
super(Overdue, self).__init__(cr, uid, name, context=context) super(Overdue, self).__init__(cr, uid, name, context=context)
self.localcontext.update( { self.localcontext.update( {
'time': time, 'time': time,
'adr_get': self._adr_get,
'getLines': self._lines_get, 'getLines': self._lines_get,
'tel_get': self._tel_get, 'tel_get': self._tel_get,
'message': self._message, 'message': self._message,
}) })
self.context = context self.context = context
def _adr_get(self, partner, type):
res = []
res_partner = pooler.get_pool(self.cr.dbname).get('res.partner')
addresses = res_partner.address_get(self.cr, self.uid, [partner.id], [type])
adr_id = addresses and addresses[type] or False
result = {
'name': False,
'street': False,
'street2': False,
'city': False,
'zip': False,
'state_id':False,
'country_id': False,
}
if adr_id:
result = res_partner.read(self.cr, self.uid, [adr_id], context=self.context.copy())
result[0]['country_id'] = result[0]['country_id'] and result[0]['country_id'][1] or False
result[0]['state_id'] = result[0]['state_id'] and result[0]['state_id'][1] or False
return result
res.append(result)
return res
def _tel_get(self,partner): def _tel_get(self,partner):
if not partner: if not partner:

View File

@ -126,15 +126,10 @@
<blockTable colWidths="286.0,224.0" style="Tableau2"> <blockTable colWidths="286.0,224.0" style="Tableau2">
<tr> <tr>
<td> <td>
<para style="terp_default_9">[[ repeatIn(adr_get(o, 'invoice'),'addr') ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_9">[[ o.title.name or '' ]] [[ o.name ]]</para> <para style="terp_default_9">[[ o.title.name or '' ]] [[ o.name ]]</para>
<para style="terp_default_9">[[ addr['street'] ]]</para> <para style="terp_default_9">[[ display_address(o.partner_id) ]]</para>
<para style="terp_default_9">[[ addr['street2'] or removeParentNode('para') ]]</para>
<para style="terp_default_9">[[ addr['zip'] ]] [[ addr['city'] ]]</para>
<para style="terp_default_9">[[ addr['state_id'] or removeParentNode('para')]]</para>
<para style="terp_default_9">[[ addr['country_id'] ]]</para>
<para style="terp_default_9"> <para style="terp_default_9">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
@ -216,7 +211,7 @@
<para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]]</para> <para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ time.strftime('%Y-%m-%d') &gt; formatLang((line['date_maturity'])) and formatLang(line['debit'] - line['credit']) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ time.strftime('%Y-%m-%d') &gt; formatLang((line['date_maturity'])) and formatLang(line['debit'] - line['credit'], currency_obj = company.currency_id) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_9">[[ line['blocked'] and 'X' or '' ]]</para> <para style="terp_default_Centre_9">[[ line['blocked'] and 'X' or '' ]]</para>
@ -241,7 +236,7 @@
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] </para> <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] &lt; time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] &lt; time.strftime('%Y-%m-%d'), getLines(o)), 0)), currency_obj=company.currency_id) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_9"> <para style="terp_default_9">
@ -261,7 +256,7 @@
<para style="terp_default_Bold_9">Balance :</para> <para style="terp_default_Bold_9">Balance :</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">[[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_tblheader_Details_Right">[[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0)), currency_obj = company.currency_id) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_8"> <para style="terp_default_8">

View File

@ -121,7 +121,7 @@
</div> </div>
<label for="id" string="Features"/> <label for="id" string="Features"/>
<div> <div>
<div> <div name="group_multi_currency">
<field name="group_multi_currency" class="oe_inline"/> <field name="group_multi_currency" class="oe_inline"/>
<label for="group_multi_currency"/> <label for="group_multi_currency"/>
</div> </div>

View File

@ -5,7 +5,7 @@ openerp.account = function (instance) {
instance.web.account = {}; instance.web.account = {};
instance.web.views.add('account_reconciliation_list', 'instance.web.account.ReconciliationListView'); instance.web.views.add('tree_account_reconciliation', 'instance.web.account.ReconciliationListView');
instance.web.account.ReconciliationListView = instance.web.ListView.extend({ instance.web.account.ReconciliationListView = instance.web.ListView.extend({
init: function() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
@ -101,7 +101,7 @@ openerp.account = function (instance) {
return self.rpc("/web/action/load", { return self.rpc("/web/action/load", {
action_id: result[1], action_id: result[1],
context: additional_context context: additional_context
}, function (result) { }).then(function (result) {
result = result.result; result = result.result;
result.context = _.extend(result.context || {}, additional_context); result.context = _.extend(result.context || {}, additional_context);
result.flags = result.flags || {}; result.flags = result.flags || {};

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n" "POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-02-08 08:45+0000\n" "PO-Revision-Date: 2012-10-12 23:19+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n" "Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 06:19+0000\n" "X-Launchpad-Export-Date: 2012-10-14 04:39+0000\n"
"X-Generator: Launchpad (build 15864)\n" "X-Generator: Launchpad (build 16137)\n"
#. module: account_analytic_plans #. module: account_analytic_plans
#: view:analytic.plan.create.model:0 #: view:analytic.plan.create.model:0
@ -471,7 +471,7 @@ msgstr "Analyt. Verrechnungsvorlage"
#. module: account_analytic_plans #. module: account_analytic_plans
#: field:account.analytic.plan.instance,code:0 #: field:account.analytic.plan.instance,code:0
msgid "Distribution Code" msgid "Distribution Code"
msgstr "Kurzbezeichnung" msgstr "Verteilungs-Schlüssel"
#. module: account_analytic_plans #. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0 #: report:account.analytic.account.crossovered.analytic:0
@ -526,6 +526,8 @@ msgid ""
"analytic accounts for each plan set. Then, you must attach a plan set to " "analytic accounts for each plan set. Then, you must attach a plan set to "
"your account journals." "your account journals."
msgstr "" msgstr ""
"Für jede Kostenrechnung muss ein Stammkonto definiert werden. Dann muss ein "
"Plan definiert werden"
#. module: account_analytic_plans #. module: account_analytic_plans
#: constraint:account.move.line:0 #: constraint:account.move.line:0

View File

@ -154,7 +154,7 @@
<field name="view_id" ref="view_bank_statement_line_list"/> <field name="view_id" ref="view_bank_statement_line_list"/>
</record> </record>
<menuitem action="action_bank_statement_line" id="bank_statement_line" parent="account.menu_finance_bank_and_cash" sequence="20"/> <menuitem action="action_bank_statement_line" id="bank_statement_line" parent="account.menu_finance_bank_and_cash" sequence="20" groups="base.group_no_one"/>
</data> </data>
</openerp> </openerp>

View File

@ -1,13 +1,8 @@
<?xml version="1.0" ?> <?xml version="1.0" ?>
<openerp> <openerp>
<data> <data>
<!-- budget form and tree view from account module *********************************** -->
<record id="action_account_budget_post_tree" model="ir.actions.act_window"> <menuitem name="Budgets" id="menu_action_account_budget_post_tree" parent="account.menu_finance_generic_reporting" sequence="6"/>
<field name="name">Budgets</field>
<field name="res_model">account.budget.post</field>
<field name="view_type">tree</field>
</record>
<menuitem action="action_account_budget_post_tree" id="menu_action_account_budget_post_tree" parent="account.menu_finance_generic_reporting" sequence="6"/>
<!-- <!--
Budgets Budgets

View File

@ -32,7 +32,6 @@ class report_print_check(report_sxw.rml_parse):
'time': time, 'time': time,
'get_lines': self.get_lines, 'get_lines': self.get_lines,
'fill_stars' : self.fill_stars, 'fill_stars' : self.fill_stars,
'get_zip_line': self.get_zip_line,
}) })
def fill_stars(self, amount): def fill_stars(self, amount):
amount = amount.replace('Dollars','') amount = amount.replace('Dollars','')
@ -41,25 +40,6 @@ class report_print_check(report_sxw.rml_parse):
return ' '.join([amount,'*'*stars]) return ' '.join([amount,'*'*stars])
else: return amount else: return amount
def get_zip_line(self, address):
'''
Get the address line
'''
ret = ''
if address:
if address.city:
ret += address.city
if address.state_id:
if address.state_id.name:
if ret:
ret += ', '
ret += address.state_id.name
if address.zip:
if ret:
ret += ' '
ret += address.zip
return ret
def get_lines(self, voucher_lines): def get_lines(self, voucher_lines):
result = [] result = []

View File

@ -281,10 +281,7 @@
</td> </td>
<td> <td>
<para style="P15">[[ voucher.partner_id.name ]]</para> <para style="P15">[[ voucher.partner_id.name ]]</para>
<para style="P15">[[ voucher.partner_id.street or removeParentNode('para') ]]</para> <para style="P15">[[ display_address(voucher.partner_id) or removeParentNode('para') ]]</para>
<para style="P15">[[ voucher.partner_id.street2 or removeParentNode('para') ]]</para>
<para style="P15">[[ get_zip_line(voucher.partner_id) ]] </para>
<para style="P15">[[ voucher.partner_id.country_id.name]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -237,10 +237,7 @@
</td> </td>
<td> <td>
<para style="P15">[[ voucher.partner_id.name ]]</para> <para style="P15">[[ voucher.partner_id.name ]]</para>
<para style="P15">[[ voucher.partner_id.street or removeParentNode('para') ]]</para> <para style="P15">[[ display_address(voucher.partner_id) or removeParentNode('para') ]]</para>
<para style="P15">[[ voucher.partner_id.street2 or removeParentNode('para') ]]</para>
<para style="P15">[[ get_zip_line(voucher.partner_id) ]] </para>
<para style="P15">[[ voucher.partner_id.country_id.name]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -153,9 +153,7 @@
</td> </td>
<td> <td>
<para style="P9">[[ voucher.partner_id.name ]] </para> <para style="P9">[[ voucher.partner_id.name ]] </para>
<para style="P15">[[ voucher.partner_id.street2 or removeParentNode('para') ]]</para> <para style="P15">[[ display_address(voucher.partner_id) or removeParentNode('para') ]]</para>
<para style="P15">[[ get_zip_line(voucher.partner_id) ]] </para>
<para style="P15">[[ voucher.partner_id.country_id.name]]</para>
</td> </td>
<td> <td>
<para/> <para/>

View File

@ -30,7 +30,6 @@ class report_rappel(report_sxw.rml_parse):
self.localcontext.update({ self.localcontext.update({
'time': time, 'time': time,
'ids_to_objects': self._ids_to_objects, 'ids_to_objects': self._ids_to_objects,
'adr_get': self._adr_get,
'getLines': self._lines_get, 'getLines': self._lines_get,
'get_text': self._get_text 'get_text': self._get_text
}) })
@ -43,11 +42,6 @@ class report_rappel(report_sxw.rml_parse):
all_lines.append(line) all_lines.append(line)
return all_lines return all_lines
def _adr_get(self, stat_line, type):
res_partner = pooler.get_pool(self.cr.dbname).get('res.partner')
adr = res_partner.address_get(self.cr, self.uid, [stat_line.partner_id.id], [type])[type]
return adr and res_partner.read(self.cr, self.uid, [adr]) or [{}]
def _lines_get(self, stat_by_partner_line): def _lines_get(self, stat_by_partner_line):
pool = pooler.get_pool(self.cr.dbname) pool = pooler.get_pool(self.cr.dbname)
moveline_obj = pool.get('account.move.line') moveline_obj = pool.get('account.move.line')

View File

@ -129,15 +129,10 @@
<blockTable colWidths="298.0,234.0" style="Tableau2"> <blockTable colWidths="298.0,234.0" style="Tableau2">
<tr> <tr>
<td> <td>
<para style="terp_default_9">[[ repeatIn(adr_get(o,'invoice'),'a' )]]</para>
</td> </td>
<td> <td>
<para style="terp_default_9">[[ o.partner_id.name or '' ]]</para> <para style="terp_default_9">[[ o.partner_id.name or '' ]]</para>
<para style="terp_default_9">[[ a['street'] or '']]</para> <para style="terp_default_9">[[ display_address(o.partner_id) or '']]</para>
<para style="terp_default_9">[[ a['street2'] or removeParentNode('para') ]]</para>
<para style="terp_default_9">[[ a['zip'] or '' ]] [[ a['city'] or '' ]]</para>
<para style="terp_default_9">[[( a['state_id'] and a['state_id'][1]) or removeParentNode('para') ]]</para>
<para style="terp_default_9">[[( a['country_id'] and a['country_id'][1]) or '']]</para>
<para style="terp_default_9"> <para style="terp_default_9">
<font color="white"> </font> <font color="white"> </font>
</para> </para>

View File

@ -256,10 +256,10 @@
<para style="terp_default_Centre_9">[[line.date=='False' and '-' or formatLang(line.date,date=True) ]]</para> <para style="terp_default_Centre_9">[[line.date=='False' and '-' or formatLang(line.date,date=True) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[formatLang(line.amount) or '-' ]] [[get_company_currency_symbol()]] </para> <para style="terp_default_Right_9">[[formatLang(line.amount, currency_obj= user.company_id.currency_id) or '-' ]] </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line.amount_currency) ]] [[ line.currency.symbol]] </para> <para style="terp_default_Right_9">[[ formatLang(line.amount_currency, currency_obj= line.currency)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -275,10 +275,10 @@
<para style="terp_default_Bold_9">Total:</para> <para style="terp_default_Bold_9">Total:</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(get_amount_total(o)) or '' ]] [[get_company_currency_symbol()]] </para> <para style="terp_default_Right_9">[[ formatLang(get_amount_total(o), currency_obj= user.company_id.currency_id) or '' ]] </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(get_amount_total_in_currency(o)) or '' ]] [[get_company_currency_symbol()]] </para> <para style="terp_default_Right_9">[[ formatLang(get_amount_total_in_currency(o), currency_obj= user.company_id.currency_id) or '' ]] </para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -32,7 +32,6 @@ class payment_order(report_sxw.rml_parse):
'time': time, 'time': time,
'get_invoice_name': self._get_invoice_name, 'get_invoice_name': self._get_invoice_name,
'get_company_currency': self._get_company_currency, 'get_company_currency': self._get_company_currency,
'get_company_currency_symbol': self._get_company_currency_symbol,
'get_amount_total_in_currency': self._get_amount_total_in_currency, 'get_amount_total_in_currency': self._get_amount_total_in_currency,
'get_amount_total': self._get_amount_total, 'get_amount_total': self._get_amount_total,
'get_account_name': self._get_account_name, 'get_account_name': self._get_account_name,
@ -72,12 +71,8 @@ class payment_order(report_sxw.rml_parse):
user = pool.get('res.users').browse(self.cr, self.uid, self.uid) user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False
def _get_company_currency_symbol(self):
pool = pooler.get_pool(self.cr.dbname)
user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False
def _get_account_name(self, bank_id): def _get_account_name(self,bank_id):
if bank_id: if bank_id:
pool = pooler.get_pool(self.cr.dbname) pool = pooler.get_pool(self.cr.dbname)
value_name = pool.get('res.partner.bank').name_get(self.cr, self.uid, [bank_id]) value_name = pool.get('res.partner.bank').name_get(self.cr, self.uid, [bank_id])

View File

@ -42,6 +42,21 @@ class res_company(osv.osv):
res_company() res_company()
class account_config_settings(osv.osv_memory):
_inherit = 'account.config.settings'
_columns = {
'income_currency_exchange_account_id': fields.related(
'company_id', 'income_currency_exchange_account_id',
type='many2one',
relation='account.account',
string="Gain Exchange Rate Account"),
'expense_currency_exchange_account_id': fields.related(
'company_id', 'expense_currency_exchange_account_id',
type="many2one",
relation='account.account',
string="Loss Exchange Rate Account"),
}
class account_voucher(osv.osv): class account_voucher(osv.osv):
def _check_paid(self, cr, uid, ids, name, args, context=None): def _check_paid(self, cr, uid, ids, name, args, context=None):
res = {} res = {}

View File

@ -249,16 +249,23 @@
</field> </field>
</record> </record>
<!-- res.company form view --> <!-- res.config form view -->
<record model="ir.ui.view" id="view_company_inherit_currency_xchange_form"> <record model="ir.ui.view" id="view_account_settings_currency_xchange_form">
<field name="name">res.company.form.inherit</field> <field name="name">account.config.settings.inherit</field>
<field name="inherit_id" ref="base.view_company_form"/> <field name="inherit_id" ref="account.view_account_config_settings"/>
<field name="model">res.company</field> <field name="model">account.config.settings</field>
<field name="priority">20</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="currency_id" position="after"> <xpath expr="//div[@name='group_multi_currency']" position="after">
<field name="income_currency_exchange_account_id"/> <group attrs="{'invisible': [('group_multi_currency', '&lt;&gt;', True)]}" col="2">
<field name="expense_currency_exchange_account_id"/> <group>
</field> <field name="income_currency_exchange_account_id"/>
<field name="expense_currency_exchange_account_id"/>
</group>
<group>
</group>
</group>
</xpath>
</field> </field>
</record> </record>

View File

@ -219,7 +219,7 @@
<para style="terp_default_9_30cm">[[ p['pname'] ]]</para> <para style="terp_default_9_30cm">[[ p['pname'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ p['amount'] ]] [[ voucher.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(p['amount'], currency_obj=voucher.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -323,7 +323,7 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ voucher.amount ]] [[ voucher.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(voucher.amount, currency_obj=voucher.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -69,7 +69,7 @@ instance.web.Login = instance.web.Login.extend({
_check_error: function() { _check_error: function() {
var self = this; var self = this;
if (this.params.loginerror !== undefined) { if (this.params.loginerror !== undefined) {
this.rpc('/auth_openid/login/status', {}, function(result) { this.rpc('/auth_openid/login/status', {}).then(function(result) {
if (_.contains(['success', 'failure'], result.status) && result.message) { if (_.contains(['success', 'failure'], result.status) && result.message) {
self.do_warn('Invalid OpenID Login', result.message); self.do_warn('Invalid OpenID Login', result.message);
} }
@ -106,7 +106,7 @@ instance.web.Login = instance.web.Login.extend({
do_openid_login: function(db, openid_url) { do_openid_login: function(db, openid_url) {
var self = this; var self = this;
this.rpc('/auth_openid/login/verify', {'db': db, 'url': openid_url}, function(result) { this.rpc('/auth_openid/login/verify', {'db': db, 'url': openid_url}).then(function(result) {
if (result.error) { if (result.error) {
self.do_warn(result.title, result.error); self.do_warn(result.title, result.error);
return; return;

View File

@ -416,7 +416,7 @@ openerp.base_import = function (instance) {
'</div>' '</div>'
].join('') ].join('')
}, },
})).get(0).scrollIntoView(); }));
}, },
}); });
// FSM-ize DataImport // FSM-ize DataImport

View File

@ -46,7 +46,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
delete(action.attrs.colspan); delete(action.attrs.colspan);
var action_id = _.str.toNumber(action.attrs.name); var action_id = _.str.toNumber(action.attrs.name);
if (!_.isNaN(action_id)) { if (!_.isNaN(action_id)) {
self.rpc('/web/action/load', {action_id: action_id}, function(result) { self.rpc('/web/action/load', {action_id: action_id}).then(function(result) {
self.on_load_action(result, column_index + '_' + action_index, action.attrs); self.on_load_action(result, column_index + '_' + action_index, action.attrs);
}); });
} }
@ -81,7 +81,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
this.rpc('/web/view/undo_custom', { this.rpc('/web/view/undo_custom', {
view_id: this.view.fields_view.view_id, view_id: this.view.fields_view.view_id,
reset: true reset: true
}, this.do_reload); }).then(this.do_reload);
}, },
on_change_layout: function() { on_change_layout: function() {
var self = this; var self = this;
@ -382,7 +382,7 @@ instance.board.AddToDashboard = instance.web.search.Input.extend({
domain: domain, domain: domain,
view_mode: view_parent.active_view, view_mode: view_parent.active_view,
name: this.$el.find("input").val() name: this.$el.find("input").val()
}, function(r) { }).then(function(r) {
if (r === false) { if (r === false) {
self.do_warn("Could not add filter to dashboard"); self.do_warn("Could not add filter to dashboard");
} else { } else {

View File

@ -777,7 +777,6 @@ class crm_lead(base_stage, format_address, osv.osv):
'default_user_id': uid, 'default_user_id': uid,
'default_section_id': opportunity.section_id and opportunity.section_id.id or False, 'default_section_id': opportunity.section_id and opportunity.section_id.id or False,
'default_email_from': opportunity.email_from, 'default_email_from': opportunity.email_from,
'default_state': 'open',
'default_name': opportunity.name, 'default_name': opportunity.name,
} }
return res return res

View File

@ -105,7 +105,23 @@
<field name="allow_unlink"/> <field name="allow_unlink"/>
</group> </group>
<separator string="Team Members"/> <separator string="Team Members"/>
<field name="member_ids"/> <field name="member_ids" widget="many2many_kanban">
<kanban quick_create="false" create="true">
<field name="name"/>
<templates>
<t t-name="kanban-box">
<div style="position: relative">
<a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
<div class="oe_module_vignette">
<div class="oe_module_desc">
<field name="name"/>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</page> </page>
<page string="Stages"> <page string="Stages">
<separator string="Select Stages for this Sales Team"/> <separator string="Select Stages for this Sales Team"/>

View File

@ -170,7 +170,7 @@
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/> <field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<filter string="Salesman" position="after"> <filter string="Salesperson" position="after">
<filter string="Activation" context="{'group_by' : 'activation'}" domain="[]" icon="terp-personal" /> <filter string="Activation" context="{'group_by' : 'activation'}" domain="[]" icon="terp-personal" />
</filter> </filter>
</field> </field>

View File

@ -15,7 +15,7 @@ openerp.edi.EdiView = openerp.web.Widget.extend({
this._super(); this._super();
var self = this; var self = this;
var param = {"db": self.db, "token": self.token}; var param = {"db": self.db, "token": self.token};
return self.rpc('/edi/get_edi_document', param, this.on_document_loaded, this.on_document_failed); return self.rpc('/edi/get_edi_document', param).then(this.on_document_loaded, this.on_document_failed);
}, },
on_document_loaded: function(docs){ on_document_loaded: function(docs){
this.doc = docs[0]; this.doc = docs[0];
@ -149,11 +149,11 @@ openerp.edi.EdiImport = openerp.web.Widget.extend({
}, },
do_import: function() { do_import: function() {
this.rpc('/edi/import_edi_url', {url: this.url}, this.on_imported, this.on_imported_error); this.rpc('/edi/import_edi_url', {url: this.url}).then(this.on_imported, this.on_imported_error);
}, },
on_imported: function(response) { on_imported: function(response) {
if ('action' in response) { if ('action' in response) {
this.rpc("/web/session/save_session_action", {the_action: response.action}, function(key) { this.rpc("/web/session/save_session_action", {the_action: response.action}).then(function(key) {
window.location = "/#sa="+encodeURIComponent(key); window.location = "/#sa="+encodeURIComponent(key);
}); });
} }

View File

@ -19,6 +19,7 @@
# #
############################################################################## ##############################################################################
from datetime import datetime, timedelta
from osv import fields, osv from osv import fields, osv
from tools.translate import _ from tools.translate import _
from openerp import SUPERUSER_ID from openerp import SUPERUSER_ID
@ -281,6 +282,15 @@ class event_event(osv.osv):
}) })
return {'value' : values} return {'value' : values}
def onchange_start_date(self, cr, uid, ids, date_begin=False, date_end=False, context=None):
res = {'value':{}}
if date_end:
return res
if date_begin and isinstance(date_begin, str):
date_begin = datetime.strptime(date_begin, "%Y-%m-%d %H:%M:%S")
date_end = date_begin + timedelta(hours=1)
res['value'] = {'date_end': date_end.strftime("%Y-%m-%d %H:%M:%S")}
return res
# ---------------------------------------- # ----------------------------------------
# OpenChatter methods and notifications # OpenChatter methods and notifications

View File

@ -116,30 +116,28 @@
<label for="name" class="oe_edit_only"/> <label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1> <h1><field name="name"/></h1>
</div> </div>
<div> <group>
<group> <group>
<group> <label for="address_id" string="Location"/>
<label for="address_id" string="Location"/> <div>
<div> <field name="address_id" on_change="on_change_address_id(address_id)" />
<field name="address_id" on_change="on_change_address_id(address_id)" /> <field name="street" placeholder="Street..."/>
<field name="street" placeholder="Street..."/> <field name="street2"/>
<field name="street2"/> <div class="address_format">
<div class="address_format"> <field name="city" placeholder="City" style="width: 40%%"/>
<field name="city" placeholder="City" style="width: 40%%"/> <field name="state_id" class="oe_no_button" placeholder="State" style="width: 37%%" options='{"no_open": true}'/>
<field name="state_id" class="oe_no_button" placeholder="State" style="width: 37%%" options='{"no_open": True}'/> <field name="zip" placeholder="ZIP" style="width: 20%%"/>
<field name="zip" placeholder="ZIP" style="width: 20%%"/> </div>
</div> <field name="country_id" placeholder="Country" class="oe_no_button" options='{"no_open": true}'/>
<field name="country_id" placeholder="Country" class="oe_no_button" options='{"no_open": True}'/> </div>
</div>
</group>
<group>
<field name="type" on_change="onchange_event_type(type,context)"/>
<field name="date_begin"/>
<field name="date_end"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</group> </group>
</div> <group>
<field name="type" on_change="onchange_event_type(type,context)" />
<field name="date_begin" on_change="onchange_start_date(date_begin,date_end)"/>
<field name="date_end"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</group>
<notebook> <notebook>
<page string="Email Configuration" groups="base.group_no_one"> <page string="Email Configuration" groups="base.group_no_one">
<group> <group>
@ -284,13 +282,13 @@
<t t-if="record.register_avail.raw_value != 0"> <t t-if="record.register_avail.raw_value != 0">
<t t-if="!record.is_subscribed.raw_value"> <t t-if="!record.is_subscribed.raw_value">
<input t-att-id="record.id.raw_value" type="text" name="subscribe" class="no_of_seats" value="1" onchange="document.getElementById('btn_sub' +this.id).setAttribute('data-context',JSON.stringify({'ticket':this.value}))"/> <input t-att-id="record.id.raw_value" type="text" name="subscribe" class="no_of_seats" value="1" onchange="document.getElementById('btn_sub' +this.id).setAttribute('data-context',JSON.stringify({'ticket':this.value}))"/>
<button t-att-id="'btn_sub'+record.id.raw_value" type="object" name="subscribe_to_event" class="oe_mail_button_follow"> <button t-att-id="'btn_sub'+record.id.raw_value" type="object" name="subscribe_to_event" class="oe_subscribe_button">
<span >Subscribe</span> <span >Subscribe</span>
</button> </button>
</t> </t>
</t> </t>
<t t-if="record.is_subscribed.raw_value"> <t t-if="record.is_subscribed.raw_value">
<button type="object" name="unsubscribe_to_event" class="oe_mail_button_unfollow"> <button type="object" name="unsubscribe_to_event" class="oe_unsubscribe_button ">
<span>Subscribed</span> <span>Subscribed</span>
<span class="unsubscribe">Unsubscribe</span> <span class="unsubscribe">Unsubscribe</span>
</button> </button>

View File

@ -42,4 +42,10 @@
width:256px; width:256px;
border: 1px solid #eeeeee; border: 1px solid #eeeeee;
} }
.oe_unsubscribe, .oe_unsubscribe_button:hover span {
display: none;
}
.oe_unsubscribe_button:hover .oe_unsubscribe {
display: inline;
}

View File

@ -22,7 +22,7 @@ var _t = instance.web._t;
var form = self.getParent(); var form = self.getParent();
form.sidebar_context().then(function (context) { form.sidebar_context().then(function (context) {
var ds = new instance.web.DataSet(this, 'ir.attachment', context); var ds = new instance.web.DataSet(this, 'ir.attachment', context);
ds.call('google_doc_get', [form.dataset.model, [form.datarecord.id], context], function(r) { ds.call('google_doc_get', [form.dataset.model, [form.datarecord.id], context]).then(function(r) {
if (r == 'False') { if (r == 'False') {
var params = { var params = {
error: response, error: response,
@ -35,7 +35,7 @@ var _t = instance.web._t;
} }
form.reload(); form.reload();
}); });
}) });
} }
}) });
} };

View File

@ -36,9 +36,11 @@
<page string="Public Information"> <page string="Public Information">
<group> <group>
<group string="Contact Information"> <group string="Contact Information">
<field name="address_id" on_change="onchange_address_id(address_id)" context="{'show_address': 1}" options='{"always_reload": True, "highlight_first_line": True}'/>
<field name="work_email" widget="email"/> <field name="work_email" widget="email"/>
<field name="work_phone"/> <field name="work_phone"/>
<field name="mobile_phone"/> <field name="mobile_phone"/>
<field name="work_location"/>
</group> </group>
<group string="Position"> <group string="Position">
<field name="department_id" on_change="onchange_department_id(department_id)"/> <field name="department_id" on_change="onchange_department_id(department_id)"/>
@ -49,7 +51,6 @@
<group> <group>
<field name="company_id" groups="base.group_multi_company" on_change="onchange_company(company_id)"/> <field name="company_id" groups="base.group_multi_company" on_change="onchange_company(company_id)"/>
<field name="user_id" on_change="onchange_user(user_id)" string="Related User"/> <field name="user_id" on_change="onchange_user(user_id)" string="Related User"/>
<field name="address_id" on_change="onchange_address_id(address_id)" context="{'show_address': 1}" options='{"always_reload": True, "highlight_first_line": True}'/>
</group> </group>
</group> </group>
<field name="notes" placeholder="Other Information ..." colspan="4"/> <field name="notes" placeholder="Other Information ..." colspan="4"/>

View File

@ -231,7 +231,7 @@
<para style="terp_default_Right_9">[[ formatLang(line.unit_quantity) ]]</para> <para style="terp_default_Right_9">[[ formatLang(line.unit_quantity) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line.total_amount) ]] [[ o.currency_id.symbol ]] </para> <para style="terp_default_Right_9">[[ formatLang(line.total_amount, currency_obj=o.currency_id) ]] </para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -277,7 +277,7 @@
<para style="terp_tblheader_Details">Total:</para> <para style="terp_tblheader_Details">Total:</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">[[ formatLang(o.amount) ]] [[ o.currency_id.symbol ]]</para> <para style="terp_tblheader_Details_Right">[[ formatLang(o.amount, currency_obj=o.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -206,7 +206,7 @@
<para style="P2">[[ formatLang(r['amount']) ]]</para> <para style="P2">[[ formatLang(r['amount']) ]]</para>
</td> </td>
<td> <td>
<para style="P3">[[ formatLang(r['total']) ]] [[o.company_id and o.company_id.currency_id.symbol or '']]</para> <para style="P3">[[ formatLang(r['total'], currency_obj = o.company_id and o.company_id.currency_id)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -222,7 +222,7 @@
<para style="P15">Total:</para> <para style="P15">Total:</para>
</td> </td>
<td> <td>
<para style="P11">[[ formatLang(sum_total()) ]] [[o.company_id and o.company_id.currency_id.symbol or '']]</para> <para style="P11">[[ formatLang(sum_total(), currency_obj = o.company_id and o.company_id.currency_id)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -197,7 +197,8 @@
</para> </para>
</td> </td>
<td> <td>
<para style="P4">[[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street2 or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.zip or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.city or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.state_id and o.employee_id.address_home_id.state_id.name or '' ]] [[o.employee_id.address_home_id and o.employee_id.address_home_id.country_id and o.employee_id.address_home_id.country_id.name or '' ]]</para> <para style="P4">[[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]]
[[o.employee_id.address_home_id and display_address(o.employee_id.address_home_id)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -293,7 +294,7 @@
<para style="P4">[[ formatLang(p.amount) ]]</para> <para style="P4">[[ formatLang(p.amount) ]]</para>
</td> </td>
<td> <td>
<para style="P5">[[ formatLang(p.total) ]] [[o.company_id and o.company_id.currency_id.symbol or '']]</para> <para style="P5">[[ formatLang(p.total, currency_obj = o.company_id and o.company_id.currency_id)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -234,7 +234,8 @@
</para> </para>
</td> </td>
<td> <td>
<para style="P5">[[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street2 or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.zip or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.city or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.state_id and o.employee_id.address_home_id.state_id.name or '' ]] [[o.employee_id.address_home_id and o.employee_id.address_home_id.country_id and o.employee_id.address_home_id.country_id.name or '' ]]</para> <para style="P5">[[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]]
[[o.employee_id.address_home_id and display_address(o.employee_id.address_home_id)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -334,7 +335,7 @@
<para style="P17"><font face="Helvetica" color="white">[[ '..'*h['level'] ]]</font>[[ h['rule_category'] ]]<font face="Helvetica">[[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font') ]]</font></para> <para style="P17"><font face="Helvetica" color="white">[[ '..'*h['level'] ]]</font>[[ h['rule_category'] ]]<font face="Helvetica">[[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font') ]]</font></para>
</td> </td>
<td> <td>
<para style="P6">[[ formatLang(h['total']) ]] [[o.company_id and o.company_id.currency_id.symbol or '']] <font face="Helvetica" size="8.0">[[ h['level']==0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]]</font></para> <para style="P6">[[ formatLang(h['total'], currency_obj = o.company_id and o.company_id.currency_id)]] <font face="Helvetica" size="8.0">[[ h['level']==0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]]</font></para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -391,7 +392,7 @@
<para style="P5">[[ formatLang(r['amount']) ]]</para> <para style="P5">[[ formatLang(r['amount']) ]]</para>
</td> </td>
<td> <td>
<para style="P6">[[ formatLang(r['total']) ]] [[ o.company_id and o.company_id.currency_id.symbol or '']]<font face="Helvetica">[[ r.get('register_name', False) and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font')]]</font></para> <para style="P6">[[ formatLang(r['total'], currency_obj = o.company_id and o.company_id.currency_id)]]<font face="Helvetica">[[ r.get('register_name', False) and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font')]]</font></para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -36,7 +36,7 @@ class hr_payslip(osv.osv):
_columns = { _columns = {
'period_id': fields.many2one('account.period', 'Force Period',states={'draft': [('readonly', False)]}, readonly=True, domain=[('state','<>','done')], help="Keep empty to use the period of the validation(Payslip) date."), 'period_id': fields.many2one('account.period', 'Force Period',states={'draft': [('readonly', False)]}, readonly=True, domain=[('state','<>','done')], help="Keep empty to use the period of the validation(Payslip) date."),
'journal_id': fields.many2one('account.journal', 'Expense Journal',states={'draft': [('readonly', False)]}, readonly=True, required=True), 'journal_id': fields.many2one('account.journal', 'Salary Journal',states={'draft': [('readonly', False)]}, readonly=True, required=True),
'move_id': fields.many2one('account.move', 'Accounting Entry', readonly=True), 'move_id': fields.many2one('account.move', 'Accounting Entry', readonly=True),
} }
@ -215,7 +215,7 @@ class hr_payslip_run(osv.osv):
_inherit = 'hr.payslip.run' _inherit = 'hr.payslip.run'
_description = 'Payslip Run' _description = 'Payslip Run'
_columns = { _columns = {
'journal_id': fields.many2one('account.journal', 'Expense Journal', states={'draft': [('readonly', False)]}, readonly=True, required=True), 'journal_id': fields.many2one('account.journal', 'Salary Journal', states={'draft': [('readonly', False)]}, readonly=True, required=True),
} }
def _get_default_journal(self, cr, uid, context=None): def _get_default_journal(self, cr, uid, context=None):

View File

@ -297,7 +297,6 @@ class hr_applicant(base_stage, osv.Model):
res['context'] = { res['context'] = {
'default_partner_ids': applicant.partner_id and [applicant.partner_id.id] or False, 'default_partner_ids': applicant.partner_id and [applicant.partner_id.id] or False,
'default_user_id': uid, 'default_user_id': uid,
'default_state': 'open',
'default_name': applicant.name, 'default_name': applicant.name,
'default_categ_ids': category and [category.id] or False, 'default_categ_ids': category and [category.id] or False,
} }

View File

@ -289,7 +289,8 @@
</div> </div>
<div class="oe_kanban_content" tooltip="kanban-tooltip"> <div class="oe_kanban_content" tooltip="kanban-tooltip">
<div> <div>
<b><field name="name"/></b><br/> <t t-if="record.partner_name.raw_value"><b><field name="partner_name"/></b><br/></t>
<i><field name="name"/></i><br/>
<field name="job_id"/><br/> <field name="job_id"/><br/>
<t t-if="record.partner_mobile.raw_value">Mobile: <field name="partner_mobile"/><br/></t> <t t-if="record.partner_mobile.raw_value">Mobile: <field name="partner_mobile"/><br/></t>
<t t-if="record.title_action.raw_value"><field name="title_action"/><br/></t> <t t-if="record.title_action.raw_value"><field name="title_action"/><br/></t>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n" "POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-05-10 18:04+0000\n" "PO-Revision-Date: 2012-10-12 23:22+0000\n"
"Last-Translator: Ferdinand-camptocamp <Unknown>\n" "Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 06:20+0000\n" "X-Launchpad-Export-Date: 2012-10-14 04:39+0000\n"
"X-Generator: Launchpad (build 15864)\n" "X-Generator: Launchpad (build 16137)\n"
#. module: hr_timesheet_invoice #. module: hr_timesheet_invoice
#: view:report.timesheet.line:0 #: view:report.timesheet.line:0
@ -769,7 +769,7 @@ msgstr "Menge"
#. module: hr_timesheet_invoice #. module: hr_timesheet_invoice
#: report:hr.timesheet.invoice.account.analytic.account.cost_ledger:0 #: report:hr.timesheet.invoice.account.analytic.account.cost_ledger:0
msgid "Date/Code" msgid "Date/Code"
msgstr "Datum/Kurzbez." msgstr "Dat/Kurzb."
#. module: hr_timesheet_invoice #. module: hr_timesheet_invoice
#: field:report.timesheet.line,general_account_id:0 #: field:report.timesheet.line,general_account_id:0

View File

@ -55,11 +55,11 @@
<sheet> <sheet>
<label for="employee_id" class="oe_edit_only"/> <label for="employee_id" class="oe_edit_only"/>
<h1><field name="employee_id" on_change="onchange_employee_id(employee_id)"/></h1> <h1><field name="employee_id" on_change="onchange_employee_id(employee_id)"/></h1>
<label for="date_from" class="oe_edit_only" string="Timesheet Period"/>
<h2>From <field name="date_from"/> to <field name="date_to"/></h2>
<group> <group>
<group> <group>
<field name="name"/> <label for="date_from" string="Timesheet Period"/>
<div><field name="date_from"/> to <field name="date_to"/></div>
<field name="name" invisible="1"/>
<field name="department_id"/> <field name="department_id"/>
<field name="company_id" groups="base.group_multi_company"/> <field name="company_id" groups="base.group_multi_company"/>
</group> </group>

View File

@ -108,7 +108,7 @@
<para style="terp_default_9">[[ l['code'] (l['intra_code']) ]]</para> <para style="terp_default_9">[[ l['code'] (l['intra_code']) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ l['amount'] or O.OO ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(l['amount'], currency_obj=company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -129,7 +129,7 @@
<para style="terp_tblheader_General_Right">Total:</para> <para style="terp_tblheader_General_Right">Total:</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ data['form']['amountsum'] or 0.00 ]] [[ company.currency_id.symbol ]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(data['form']['amountsum'], currency_obj=company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -11807,7 +11807,6 @@
<field name="property_account_income" ref="ch_3200"/> <field name="property_account_income" ref="ch_3200"/>
<field name="property_account_income_opening" ref="ch_2990"/> <field name="property_account_income_opening" ref="ch_2990"/>
<field name="property_account_expense_opening" ref="ch_2990"/> <field name="property_account_expense_opening" ref="ch_2990"/>
<field name="property_reserve_and_surplus_account" ref="ch_2991"/>
</record> </record>
<!-- journal configuration of account --> <!-- journal configuration of account -->

View File

@ -957,7 +957,6 @@
<field name="property_account_payable" ref="chart2202"/> <field name="property_account_payable" ref="chart2202"/>
<field name="property_account_expense_categ" ref="chart1401"/> <field name="property_account_expense_categ" ref="chart1401"/>
<field name="property_account_income_categ" ref="chart6001"/> <field name="property_account_income_categ" ref="chart6001"/>
<field name="property_reserve_and_surplus_account" ref="chart4103"/>
</record> </record>
<!-- 增值税 --> <!-- 增值税 -->
<record id="vats" model="account.tax.template"> <record id="vats" model="account.tax.template">

View File

@ -441,7 +441,6 @@
<field name="property_account_payable" ref="fr_pcg_pay"/> <field name="property_account_payable" ref="fr_pcg_pay"/>
<field name="property_account_expense_categ" ref="pcg_6071"/> <field name="property_account_expense_categ" ref="pcg_6071"/>
<field name="property_account_income_categ" ref="pcg_7071"/> <field name="property_account_income_categ" ref="pcg_7071"/>
<field name="property_reserve_and_surplus_account" ref="pcg_120"/>
</record> </record>
</data> </data>

View File

@ -290,9 +290,7 @@
<tr> <tr>
<td> <td>
<para style="terp_default_Bold_8">[[o.employee_id.name or '_']]</para> <para style="terp_default_Bold_8">[[o.employee_id.name or '_']]</para>
<para style="terp_default_Bold_8">[[o.employee_id.address_home_id.street or '_' ]]</para> <para style="terp_default_Bold_8">[[display_address(o.employee_id.address_home_id) or '_' ]]</para>
<para style="terp_default_Bold_8">[[o.employee_id.address_home_id.street2 or '' ]]</para>
<para style="terp_default_Bold_8">[[o.employee_id.address_home_id.zip or '_' ]] [[o.employee_id.address_home_id.city or '' ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -35,7 +35,6 @@
<field name="bank_account_view_id" ref="cta1101"/> <field name="bank_account_view_id" ref="cta1101"/>
<field name="property_account_receivable" ref="cta110201"/> <field name="property_account_receivable" ref="cta110201"/>
<field name="property_account_payable" ref="cta210101"/> <field name="property_account_payable" ref="cta210101"/>
<field name="property_reserve_and_surplus_account" ref="cta310103"/>
<field name="property_account_income_categ" ref="cta410101"/> <field name="property_account_income_categ" ref="cta410101"/>
<field name="property_account_expense_categ" ref="cta510101"/> <field name="property_account_expense_categ" ref="cta510101"/>
</record> </record>

View File

@ -21,7 +21,6 @@
<field name="bank_account_view_id" ref="cta1101"/> <field name="bank_account_view_id" ref="cta1101"/>
<field name="property_account_receivable" ref="cta110201"/> <field name="property_account_receivable" ref="cta110201"/>
<field name="property_account_payable" ref="cta210101"/> <field name="property_account_payable" ref="cta210101"/>
<field name="property_reserve_and_surplus_account" ref="cta310103"/>
<field name="property_account_income_categ" ref="cta410101"/> <field name="property_account_income_categ" ref="cta410101"/>
<field name="property_account_expense_categ" ref="cta510101"/> <field name="property_account_expense_categ" ref="cta510101"/>
</record> </record>

View File

@ -514,7 +514,6 @@
<field name="property_account_payable" ref="a215"/> <field name="property_account_payable" ref="a215"/>
<field name="property_account_expense_categ" ref="a540"/> <field name="property_account_expense_categ" ref="a540"/>
<field name="property_account_income_categ" ref="a311"/> <field name="property_account_income_categ" ref="a311"/>
<field name="property_reserve_and_surplus_account" ref="a260"/>
</record> </record>

View File

@ -668,7 +668,6 @@
<field name="property_account_payable" ref="p21000"/> <field name="property_account_payable" ref="p21000"/>
<field name="property_account_expense_categ" ref="p41010"/> <field name="property_account_expense_categ" ref="p41010"/>
<field name="property_account_income_categ" ref="p31010"/> <field name="property_account_income_categ" ref="p31010"/>
<field name="property_reserve_and_surplus_account" ref="p24600"/>
</record> </record>
</data> </data>

View File

@ -234,7 +234,7 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(e[13]) ]] [[company.currency_id.symbol]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(e[13],currency_obj= company.currency_id)]] </para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -248,43 +248,43 @@
<para style="terp_tblheader_Details">Total</para> <para style="terp_tblheader_Details">Total</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[1]) or removeParentNode('para') ]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(t[1],currency_obj= company.currency_id) or removeParentNode('para') ]] </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[2]) or removeParentNode('para')]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(t[2],currency_obj= company.currency_id) or removeParentNode('para')]] </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[3]) or removeParentNode('para')]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(t[3],currency_obj= company.currency_id) or removeParentNode('para')]] </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[4]) or removeParentNode('para')]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(t[4],currency_obj= company.currency_id) or removeParentNode('para')]] </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[5]) or removeParentNode('para')]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(t[5],currency_obj= company.currency_id) or removeParentNode('para')]] </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[6]) or removeParentNode('para')]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(t[6],currency_obj= company.currency_id) or removeParentNode('para')]] </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[7]) or removeParentNode('para')]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(t[7],currency_obj= company.currency_id) or removeParentNode('para')]] ]</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[8]) or removeParentNode('para')]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(t[8],currency_obj= company.currency_id) or removeParentNode('para')]] </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[9]) or removeParentNode('para')]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(t[9],currency_obj= company.currency_id) or removeParentNode('para')]] </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[10]) or removeParentNode('para')]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(t[10],currency_obj= company.currency_id) or removeParentNode('para')]] </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[11]) or removeParentNode('para')]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(t[11],currency_obj= company.currency_id) or removeParentNode('para')]] </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[12]) or removeParentNode('para')]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(t[12],currency_obj= company.currency_id) or removeParentNode('para')]] </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right">[[ formatLang(get_total()) ]] [[company.currency_id.symbol]]</para> <para style="terp_tblheader_General_Right">[[ formatLang(get_total(), currency_obj = company.currency_id)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -478,7 +478,7 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(e1[13]) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(e1[13],currency_obj= company.currency_id) ]] </para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -571,7 +571,7 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(e2[13]) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(e2[13],currency_obj= company.currency_id) ]] </para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -247,7 +247,7 @@
<para style="P5">[[ line['acc_no'] ]]</para> <para style="P5">[[ line['acc_no'] ]]</para>
</td> </td>
<td> <td>
<para style="P8">[[formatLang(line['bysal'])]] [[ (company.currency_id and company.currency_id.symbol) or '' ]]</para> <para style="P8">[[formatLang(line['bysal'], currency_obj = company.currency_id) ]]</para>
</td> </td>
<td> <td>
<para style="P5">[[ line['debit_credit'] ]]</para> <para style="P5">[[ line['debit_credit'] ]]</para>
@ -296,7 +296,7 @@
<para style="P5">[[ line['ifsc_code'] ]]</para> <para style="P5">[[ line['ifsc_code'] ]]</para>
</td> </td>
<td> <td>
<para style="P8">[[formatLang(line['bysal'])]] [[ (company.currency_id and company.currency_id.symbol) or '' ]]</para> <para style="P8">[[formatLang(line['bysal'], currency_obj = company.currency_id) ]]</para>
</td> </td>
<td> <td>
<para style="P5">[[ line['debit_credit'] ]]</para> <para style="P5">[[ line['debit_credit'] ]]</para>
@ -321,7 +321,7 @@
<para style="P4"/> <para style="P4"/>
</td> </td>
<td> <td>
<para style="P4"><font face="Helvetica" size="6.0">[[ o.line_ids==[] and removeParentNode('para') ]]</font>[[ formatLang(get_bysal_total()) ]] [[ (company.currency_id and company.currency_id.symbol) or '' ]]</para> <para style="P4"><font face="Helvetica" size="6.0">[[ o.line_ids==[] and removeParentNode('para') ]]</font>[[ formatLang(get_bysal_total(), currency_obj = company.currency_id) ]]</para>
</td> </td>
<td> <td>
<para style="P4"> <para style="P4">
@ -347,7 +347,7 @@
<para style="P4"/> <para style="P4"/>
</td> </td>
<td> <td>
<para style="P4"><font face="Helvetica" size="6.0">[[ o.line_ids==[] and removeParentNode('para') ]]</font>[[ formatLang(get_bysal_total()) ]] [[ (company.currency_id and company.currency_id.symbol) or '' ]]</para> <para style="P4"><font face="Helvetica" size="6.0">[[ o.line_ids==[] and removeParentNode('para') ]]</font>[[ formatLang(get_bysal_total(), currency_obj = company.currency_id) ]]</para>
</td> </td>
<td> <td>
<para style="P4"> <para style="P4">

View File

@ -234,7 +234,7 @@
</para> </para>
</td> </td>
<td> <td>
<para style="P5">[[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street2 or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.zip or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.city or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.state_id and o.employee_id.address_home_id.state_id.name or '' ]] [[o.employee_id.address_home_id and o.employee_id.address_home_id.country_id and o.employee_id.address_home_id.country_id.name or '' ]]</para> <para style="P5">[[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and display_address(o.employee_id.address_home_id)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -334,7 +334,7 @@
<para style="P17"><font face="Helvetica" color="white">[[ '..'*h['level'] ]]</font>[[ h['rule_category'] ]]<font face="Helvetica">[[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font') ]]</font></para> <para style="P17"><font face="Helvetica" color="white">[[ '..'*h['level'] ]]</font>[[ h['rule_category'] ]]<font face="Helvetica">[[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font') ]]</font></para>
</td> </td>
<td> <td>
<para style="P6">[[ formatLang(h['total']) ]] [[o.company_id and o.company_id.currency_id.symbol or '']] <font face="Helvetica" size="8.0">[[ h['level']==0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]]</font></para> <para style="P6">[[ formatLang(h['total'], currency_obj = o.company_id and o.company_id.currency_id)]] <font face="Helvetica" size="8.0">[[ h['level']==0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]]</font></para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -4102,7 +4102,6 @@
<field name="property_account_payable" ref="a_pay"/> <!-- crediteuren --> <field name="property_account_payable" ref="a_pay"/> <!-- crediteuren -->
<field name="property_account_expense_categ" ref="a_expense"/><!-- aankoop grondstoffen --> <field name="property_account_expense_categ" ref="a_expense"/><!-- aankoop grondstoffen -->
<field name="property_account_income_categ" ref="a_sale"/> <!-- verkoop rekening --> <field name="property_account_income_categ" ref="a_sale"/> <!-- verkoop rekening -->
<field name="property_reserve_and_surplus_account" ref="a_9999"/>
</record> </record>
<!-- BTW Template <!-- BTW Template

View File

@ -1,2 +1,2 @@
"id","name","account_root_id:id","tax_code_root_id:id","bank_account_view_id:id","property_account_receivable:id","property_account_payable:id","property_account_expense_categ:id","property_account_income_categ:id","property_reserve_and_surplus_account:id" "id","name","account_root_id:id","tax_code_root_id:id","bank_account_view_id:id","property_account_receivable:id","property_account_payable:id","property_account_expense_categ:id","property_account_income_categ:id"
"l10n_uk","UK Tax and Account Chart Template (by SmartMode)","UK0","0","1200","1100","2100","5000","4000","3200" "l10n_uk","UK Tax and Account Chart Template (by SmartMode)","UK0","0","1200","1100","2100","5000","4000"

1 id name account_root_id:id tax_code_root_id:id bank_account_view_id:id property_account_receivable:id property_account_payable:id property_account_expense_categ:id property_account_income_categ:id property_reserve_and_surplus_account:id
2 l10n_uk UK Tax and Account Chart Template (by SmartMode) UK0 0 1200 1100 2100 5000 4000 3200

View File

@ -1895,7 +1895,6 @@
<field name="property_account_payable" ref="uy_code_21100"/> <field name="property_account_payable" ref="uy_code_21100"/>
<field name="property_account_income_categ" ref="uy_code_4100"/> <field name="property_account_income_categ" ref="uy_code_4100"/>
<field name="property_account_expense_categ" ref="uy_code_5100"/> <field name="property_account_expense_categ" ref="uy_code_5100"/>
<field name="property_reserve_and_surplus_account" ref="uy_code_3313"/>
</record> </record>

View File

@ -137,7 +137,7 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_default_9_right_bold"><u>[[ formatLang(get_total(o,objects)) ]] [[ (o.company_id and o.company_id.currency_id and o.company_id.currency_id.symbol) or '' ]]</u></para> <para style="terp_default_9_right_bold"><u>[[ formatLang(get_total(o,objects), currency_obj = o.company_id and o.company_id.currency_id) ]]</u></para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -155,7 +155,7 @@
<para style="terp_default_9">[[ lines.descript]]</para> <para style="terp_default_9">[[ lines.descript]]</para>
</td> </td>
<td> <td>
<para style="terp_default_9_right">[[ lines.price ]] [[ (o.company_id and o.company_id.currency_id and o.company_id.currency_id.symbol) or '' ]]</para> <para style="terp_default_9_right">[[ formatLang(lines.price , currency_obj = o.company_id and o.company_id.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -172,7 +172,7 @@
<para style="terp_tbl_detail_header">Total :</para> <para style="terp_tbl_detail_header">Total :</para>
</td> </td>
<td> <td>
<para style="terp_default_9_right_bold">[[ formatLang(get_nettotal()) ]] [[ (o.company_id and o.company_id.currency_id and o.company_id.currency_id.symbol) or '' ]]</para> <para style="terp_default_9_right_bold">[[ formatLang(get_nettotal(), currency_obj = o.company_id and o.company_id.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -1267,7 +1267,7 @@ openerp.mail = function(session) {
domains: domains || [], domains: domains || [],
contexts: contexts || [], contexts: contexts || [],
group_by_seq: groupbys || [] group_by_seq: groupbys || []
}, function (results) { }).then(function (results) {
self.search_results['context'] = results.context; self.search_results['context'] = results.context;
self.search_results['domain'] = results.domain; self.search_results['domain'] = results.domain;
self.thread.destroy(); self.thread.destroy();

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:49+0000\n" "POT-Creation-Date: 2012-02-08 00:49+0000\n"
"PO-Revision-Date: 2012-02-22 07:45+0000\n" "PO-Revision-Date: 2012-10-12 23:20+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n" "Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-13 04:38+0000\n" "X-Launchpad-Export-Date: 2012-10-14 04:39+0000\n"
"X-Generator: Launchpad (build 15944)\n" "X-Generator: Launchpad (build 16137)\n"
#. module: mrp #. module: mrp
#: view:mrp.routing.workcenter:0 #: view:mrp.routing.workcenter:0
@ -956,7 +956,7 @@ msgstr "Bezeichnung Arbeitsplatz"
#. module: mrp #. module: mrp
#: field:mrp.routing,code:0 #: field:mrp.routing,code:0
msgid "Code" msgid "Code"
msgstr "Kurzbezeichnung" msgstr "Kurzbez."
#. module: mrp #. module: mrp
#: report:mrp.production.order:0 #: report:mrp.production.order:0

View File

@ -274,6 +274,17 @@ class mrp_bom(osv.osv):
return {'value': {'name': prod.name, 'product_uom': prod.uom_id.id}} return {'value': {'name': prod.name, 'product_uom': prod.uom_id.id}}
return {} return {}
def onchange_uom(self, cr, uid, ids, product_id, product_uom, context=None):
res = {'value':{}}
if not product_uom or not product_id:
return res
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
uom = self.pool.get('product.uom').browse(cr, uid, product_uom, context=context)
if uom.category_id.id != product.uom_id.category_id.id:
res['warning'] = {'title': _('Warning'), 'message': _('The Product Unit of Measure you chose has a different category than in the product form.')}
res['value'].update({'product_uom': product.uom_id.id})
return res
def _bom_find(self, cr, uid, product_id, product_uom, properties=None): def _bom_find(self, cr, uid, product_id, product_uom, properties=None):
""" Finds BoM for particular product and product uom. """ Finds BoM for particular product and product uom.
@param product_id: Selected product. @param product_id: Selected product.

View File

@ -351,7 +351,7 @@
<label for="product_qty" string="Quantity"/> <label for="product_qty" string="Quantity"/>
<div> <div>
<field name="product_qty" class="oe_inline"/> <field name="product_qty" class="oe_inline"/>
<field name="product_uom" class="oe_inline" groups="product.group_uom"/> <field name="product_uom" class="oe_inline" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
</div> </div>
<label for="product_uos_qty" groups="product.group_uos"/> <label for="product_uos_qty" groups="product.group_uos"/>
<div groups="product.group_uos" > <div groups="product.group_uos" >
@ -382,7 +382,7 @@
<tree string="Components" editable="bottom"> <tree string="Components" editable="bottom">
<field name="product_id" on_change="onchange_product_id(product_id, name)"/> <field name="product_id" on_change="onchange_product_id(product_id, name)"/>
<field name="product_qty"/> <field name="product_qty"/>
<field name="product_uom" groups="product.group_uom"/> <field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
<field name="name" invisible="1"/> <field name="name" invisible="1"/>
<field name="date_start"/> <field name="date_start"/>
<field name="date_stop"/> <field name="date_stop"/>
@ -971,7 +971,7 @@
<attribute name="invisible">False</attribute> <attribute name="invisible">False</attribute>
</xpath> </xpath>
<group name="procurement_help" position="inside"> <group name="procurement_help" position="inside">
<p attrs="{'invisible': [('type','=','service'),('procure_method','&lt;&gt;','make_to_order'),('supply_method','&lt;&gt;','produce')]}"> <p attrs="{'invisible': ['|','|',('type','=','service'),('procure_method','&lt;&gt;','make_to_order'),('supply_method','&lt;&gt;','produce')]}">
When you sell this product, OpenERP will trigger <b>a manufacturing When you sell this product, OpenERP will trigger <b>a manufacturing
order</b> using the bill of materials assigned to this product. order</b> using the bill of materials assigned to this product.
The delivery order will be ready once the production is done. The delivery order will be ready once the production is done.
@ -1038,6 +1038,7 @@
<record model="ir.actions.act_window" id="product_open_bom"> <record model="ir.actions.act_window" id="product_open_bom">
<field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field> <field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
<field name="name">Bill of Materials</field> <field name="name">Bill of Materials</field>
<field name="domain">[('bom_id','=',False)]</field>
<field name="res_model">mrp.bom</field> <field name="res_model">mrp.bom</field>
</record> </record>

View File

@ -312,7 +312,7 @@
<para style="terp_default_Right_9">[[ formatLang(line.price_unit) ]] </para> <para style="terp_default_Right_9">[[ formatLang(line.price_unit) ]] </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line.price_subtotal) ]] [[ o.pricelist_id.currency_id. symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, currency_obj = o.pricelist_id.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -337,7 +337,7 @@
<para style="terp_default_Right_9">[[ formatLang(fees.price_unit) ]]</para> <para style="terp_default_Right_9">[[ formatLang(fees.price_unit) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(fees.price_subtotal) ]] [[ o.pricelist_id.currency_id. symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(fees.price_subtotal, currency_obj = o.pricelist_id.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -353,7 +353,7 @@
<para style="terp_default_9">Net Total :</para> <para style="terp_default_9">Net Total :</para>
</td> </td>
<td> <td>
<para style="P26">[[ formatLang(o.amount_untaxed, dp='Sale Price')]] [[ o.pricelist_id.currency_id. symbol ]]</para> <para style="P26">[[ formatLang(o.amount_untaxed, dp='Sale Price', currency_obj=o.pricelist_id.currency_id) ]]</para>
</td> </td>
</tr> </tr>
@ -367,7 +367,7 @@
<para style="terp_default_9">Taxes:</para> <para style="terp_default_9">Taxes:</para>
</td> </td>
<td> <td>
<para style="P26">[[ formatLang(o.amount_tax, dp='Account')]] [[ o.pricelist_id.currency_id. symbol ]]</para> <para style="P26">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -380,7 +380,7 @@
<para style="terp_tblheader_Details">Total :</para> <para style="terp_tblheader_Details">Total :</para>
</td> </td>
<td> <td>
<para style="terp_default_right_bold_9">[[ formatLang(total(o), dp='Sale Price') ]] [[ o.pricelist_id.currency_id. symbol ]]</para> <para style="terp_default_right_bold_9">[[ formatLang(total(o), dp='Sale Price', currency_obj=o.pricelist_id.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -22,6 +22,7 @@
from osv import fields from osv import fields
from osv import osv from osv import osv
import decimal_precision as dp import decimal_precision as dp
from tools.translate import _
class mrp_subproduct(osv.osv): class mrp_subproduct(osv.osv):
_name = 'mrp.subproduct' _name = 'mrp.subproduct'
@ -51,6 +52,17 @@ class mrp_subproduct(osv.osv):
return {'value': v} return {'value': v}
return {} return {}
def onchange_uom(self, cr, uid, ids, product_id, product_uom, context=None):
res = {'value':{}}
if not product_uom or not product_id:
return res
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
uom = self.pool.get('product.uom').browse(cr, uid, product_uom, context=context)
if uom.category_id.id != product.uom_id.category_id.id:
res['warning'] = {'title': _('Warning'), 'message': _('The Product Unit of Measure you chose has a different category than in the product form.')}
res['value'].update({'product_uom': product.uom_id.id})
return res
mrp_subproduct() mrp_subproduct()
class mrp_bom(osv.osv): class mrp_bom(osv.osv):

View File

@ -11,13 +11,13 @@
<field name="sub_products"> <field name="sub_products">
<tree string="sub products" editable="top"> <tree string="sub products" editable="top">
<field name="product_id" on_change="onchange_product_id(product_id)"/> <field name="product_id" on_change="onchange_product_id(product_id)"/>
<field name="product_uom" groups="product.group_uom"/> <field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
<field name="product_qty"/> <field name="product_qty"/>
<field name="subproduct_type"/> <field name="subproduct_type"/>
</tree> </tree>
<form string="Sub Products"> <form string="Sub Products">
<field name="product_id" on_change="onchange_product_id(product_id)"/> <field name="product_id" on_change="onchange_product_id(product_id)"/>
<field name="product_uom" groups="product.group_uom"/> <field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
<field name="product_qty"/> <field name="product_qty"/>
<field name="subproduct_type"/> <field name="subproduct_type"/>
</form> </form>

View File

@ -214,10 +214,10 @@
<para style="terp_default_Centre_8">[[ formatLang(statement.closing_date,date_time=True)]]</para> <para style="terp_default_Centre_8">[[ formatLang(statement.closing_date,date_time=True)]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_8">[[ formatLang(statement.balance_start, dp='Account') ]][[ company.currency_id.symbol ]]</para> <para style="terp_default_Centre_8">[[ formatLang(statement.balance_start, dp='Account', currency_obj = company.currency_id) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real, dp='Account') ]][[ company.currency_id.symbol ]]</para> <para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real, dp='Account', currency_obj = company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -250,7 +250,7 @@
<para style="terp_default_9">[[ line_ids.partner_id.name ]]</para> <para style="terp_default_9">[[ line_ids.partner_id.name ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line_ids.amount, dp='Account') ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(line_ids.amount, dp='Account', currency_obj=company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -267,7 +267,7 @@
<para style="terp_tblheader_Details">Total :</para> <para style="terp_tblheader_Details">Total :</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(get_total(statement.line_ids), dp='Account') ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(get_total(statement.line_ids), dp='Account', currency_obj = company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -73,7 +73,7 @@ class all_closed_cashbox_of_the_day(report_sxw.rml_parse):
if res: if res:
return res[0]['bal'] return res[0]['bal']
else: else:
return False return 0
def _get_sub_total(self, user, data, date): def _get_sub_total(self, user, data, date):
res={} res={}

View File

@ -183,10 +183,10 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right"><u>[[ formatLang(get_net_total_starting(user)[1]) ]] [[company.currency_id.symbol]]</u></para> <para style="terp_tblheader_General_Right"><u>[[ formatLang(get_net_total_starting(user)[1], currency_obj = company.currency_id)]]</u></para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Right"><u>[[ formatLang(get_net_total(user)) ]] [[company.currency_id.symbol]]</u></para> <para style="terp_tblheader_General_Right"><u>[[ formatLang(get_net_total(user), currency_obj = company.currency_id)]]</u></para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -207,10 +207,10 @@
<para style="terp_default_Bold_8">[[ statement['closing_date'] ]]</para> <para style="terp_default_Bold_8">[[ statement['closing_date'] ]]</para>
</td> </td>
<td> <td>
<para style="P1"><u>[[ (get_bal(statement)) or '0.00' ]] [[company.currency_id.symbol]]</u></para> <para style="P1"><u>[[ formatLang(get_bal(statement), currency_obj = company.currency_id)]]</u></para>
</td> </td>
<td> <td>
<para style="P1"><u>[[ formatLang(get_sub_total(user,statement['journal_id'],statement['date'])) ]] [[company.currency_id.symbol]]</u></para> <para style="P1"><u>[[ formatLang(get_sub_total(user,statement['journal_id'],statement['date']), currency_obj = company.currency_id )]]</u></para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -236,7 +236,7 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line_ids['amount']) ]] [[company.currency_id.symbol]]</para> <para style="terp_default_Right_9">[[ formatLang(line_ids['amount'], currency_obj = company.currency_id)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -252,7 +252,7 @@
<para style="terp_default_9">[ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]]</para> <para style="terp_default_9">[ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line_ids['price_unit'], dp='Sale Price') ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(line_ids['price_unit'], dp='Sale Price', currency_obj = company.currency_id) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_9">[[ formatLang(line_ids['qty']) ]] [[ line_ids['uom'] ]]</para> <para style="terp_default_Centre_9">[[ formatLang(line_ids['qty']) ]] [[ line_ids['uom'] ]]</para>
@ -289,7 +289,7 @@
<para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para> <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(p['amount']) or removeParentNode('tr') ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(p['amount'], currency_obj = company.currency_id) or removeParentNode('tr') ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -320,7 +320,7 @@
<para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para> <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(p['sum'], dp='Account') or removeParentNode('tr') ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(p['sum'], dp='Account', currency_obj = company.currency_id) or removeParentNode('tr') ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -349,7 +349,7 @@
<para style="terp_default_Bold_9">Sales total(Revenue)</para> <para style="terp_default_Bold_9">Sales total(Revenue)</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(getsalestotal2(), dp='Sale Price') ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(getsalestotal2(), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -365,7 +365,7 @@
<para style="terp_default_Bold_9">Total invoiced</para> <para style="terp_default_Bold_9">Total invoiced</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(getsuminvoice2(data['form']), dp='Sale Price') ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(getsuminvoice2(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -373,15 +373,15 @@
<para style="terp_default_Bold_9">Total discount</para> <para style="terp_default_Bold_9">Total discount</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(getsumdisc(data['form']), dp='Sale Price') ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(getsumdisc(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
</td> >> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<para style="terp_default_Bold_9">Total paid</para> <para style="terp_default_Bold_9">Total paid</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(getpaidtotal2(), dp='Sale Price') ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(getpaidtotal2(), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -389,7 +389,7 @@
<para style="terp_default_Bold_9">Total of the day</para> <para style="terp_default_Bold_9">Total of the day</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(gettotalofthaday(data['form']), dp='Sale Price') ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(gettotalofthaday(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -204,7 +204,7 @@
<para style="P1">[[ p[0] ]]</para> <para style="P1">[[ p[0] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ p[1] ]] [[company.currency_id.symbol]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(p[1], currency_obj=company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -235,7 +235,7 @@
<para style="P2">[[ t[0] ]]</para> <para style="P2">[[ t[0] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ '%.2f' % (t[1],) ]] [[company.currency_id.symbol]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(t[1], currency_obj=company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -280,7 +280,7 @@
<para style="terp_default_Bold_9">Total invoiced</para> <para style="terp_default_Bold_9">Total invoiced</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ '%.2f' % getsuminvoice(objects) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(getsuminvoice(objects), currency_obj=company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -288,7 +288,7 @@
<para style="terp_default_Bold_9">Total discount</para> <para style="terp_default_Bold_9">Total discount</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ '%.2f' % getsumdisc(objects) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(getsumdisc(objects), currency_obj=company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -296,7 +296,7 @@
<para style="terp_default_Bold_9">Total paid</para> <para style="terp_default_Bold_9">Total paid</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ '%.2f' % getpaidtotal(objects) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(getpaidtotal(objects), currency_obj=company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -304,7 +304,7 @@
<para style="terp_default_Bold_9">Total of the day</para> <para style="terp_default_Bold_9">Total of the day</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ '%.2f' % gettotalofthaday(objects) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(gettotalofthaday(objects), currency_obj=company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -186,7 +186,7 @@
<para style="terp_default_Centre_9">[[ formatLang(l.discount) ]]</para> <para style="terp_default_Centre_9">[[ formatLang(l.discount) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(l.price_subtotal) ]] [[o.pricelist_id.currency_id. symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, currency_obj=o.pricelist_id.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -202,7 +202,7 @@
<para style="terp_default_9">Net Total :</para> <para style="terp_default_9">Net Total :</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_total) ]] [[o.pricelist_id.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(o.amount_total, currency_obj=o.pricelist_id.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -215,7 +215,7 @@
<para style="terp_default_9">Taxes :</para> <para style="terp_default_9">Taxes :</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[o.pricelist_id.currency_id. symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, currency_obj=o.pricelist_id.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -228,7 +228,7 @@
<para style="terp_default_Bold_9">Total:</para> <para style="terp_default_Bold_9">Total:</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total + o.amount_tax) ]] [[o.pricelist_id.currency_id. symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total + o.amount_tax, currency_obj=o.pricelist_id.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -183,7 +183,7 @@
<para style="terp_default_Right_9">[[ formatLang(line_ids['price_unit']) ]]</para> <para style="terp_default_Right_9">[[ formatLang(line_ids['price_unit']) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line_ids['total']) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(line_ids['total'], currency_obj = company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
@ -201,7 +201,7 @@
<para style="terp_tblheader_Details">Net Total:</para> <para style="terp_tblheader_Details">Net Total:</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(pos_payment_total(o)) or removeParentNode('blockTable')]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(pos_payment_total(o), currency_obj = company.currency_id) or removeParentNode('blockTable')]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -168,7 +168,7 @@
<para style="terp_default_Right_9">[[ formatLang(line_ids['price_unit']) ]]</para> <para style="terp_default_Right_9">[[ formatLang(line_ids['price_unit']) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line_ids['total']) ]] [[company.currency_id.symbol]]</para> <para style="terp_default_Right_9">[[ formatLang(line_ids['total'], currency_obj = company.currency_id)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -194,7 +194,7 @@
<para style="terp_tblheader_General_Right">Total:</para> <para style="terp_tblheader_General_Right">Total:</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(pos_payment_user_total(data['form'])) or removeParentNode('blockTable')]] [[company.currency_id.symbol]]</para> <para style="terp_default_Right_9">[[ formatLang(pos_payment_user_total(data['form'], currency_obj = company.currency_id)) or removeParentNode('blockTable')]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -72,8 +72,7 @@
<story> <story>
<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para> <para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
<para style="terp_header_Centre">[[o.user_id.company_id.name]]</para> <para style="terp_header_Centre">[[o.user_id.company_id.name]]</para>
<para style="terp_default_Centre_9">[[ address and address.street ]], [[ address and address.zip ]] [[ address and address.city ]]</para> <para style="terp_default_Centre_9">[[ address and display_address(address)]]</para>
<para style="terp_default_Centre_9">[[ address and address.country_id.name ]]</para>
<para style="terp_default_Centre_9">Tel : [[ address and address.phone ]]</para> <para style="terp_default_Centre_9">Tel : [[ address and address.phone ]]</para>
<para style="terp_default_Centre_9">User : [[ o.user_id.name ]]</para> <para style="terp_default_Centre_9">User : [[ o.user_id.name ]]</para>
<para style="terp_default_Centre_9">Shop : [[ o.shop_id.name ]]</para> <para style="terp_default_Centre_9">Shop : [[ o.shop_id.name ]]</para>
@ -115,7 +114,7 @@
<para style="terp_default_Right_9">[[o.state=='cancel' and o.statement_ids and '-' or '']][['%.f' % line.qty ]]</para> <para style="terp_default_Right_9">[[o.state=='cancel' and o.statement_ids and '-' or '']][['%.f' % line.qty ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[o.state=='cancel' and o.statement_ids and '-' or '']][[ '%.2f' % net(line.id) ]] [[company.currency_id.symbol]] </para> <para style="terp_default_Right_9">[[o.state=='cancel' and o.statement_ids and '-' or '']][[ formatLang(net(line.id), currency_obj=company.currency_id) ]] <font face="Helvetica">[[ line and line.discount == 0.0 and removeParentNode('font') ]] ([[ formatLang(line.discount, currency_obj=company.currency_id) ]])</font></para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -125,7 +124,7 @@
<para style="P6a">Taxes :</para> <para style="P6a">Taxes :</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[o.state=='cancel' and o.statement_ids and '-' or '']][['%.2f' % o.amount_tax]] [[company.currency_id.symbol]]</para> <para style="terp_default_Right_9">[[o.state=='cancel' and o.statement_ids and '-' or '']][[formatLang(o.amount_tax, currency_obj=company.currency_id)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -135,7 +134,7 @@
<para style="P6">Total :</para> <para style="P6">Total :</para>
</td> </td>
<td> <td>
<para style="terp_default_Bold_9_Right2">[[o.state=='cancel' and o.statement_ids and '-' or '']][['%.2f' % o.amount_total]] [[company.currency_id.symbol]]</para> <para style="terp_default_Bold_9_Right2">[[o.state=='cancel' and o.statement_ids and '-' or '']][[formatLang(o.amount_total, currency_obj=company.currency_id)]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -164,7 +163,7 @@
</para> </para>
</td> </td>
<td> <td>
<para style="P8">[[ '%.2f' %(d['amt'] or 0) ]] [[company.currency_id.symbol]]</para> <para style="P8">[[ formatLang(d['amt'] or 0, currency_obj=company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -191,7 +191,7 @@
<para style="terp_default_Right_9">[[ formatLang(line_ids['qty']) ]] [[line_ids['uom'] ]]</para> <para style="terp_default_Right_9">[[ formatLang(line_ids['qty']) ]] [[line_ids['uom'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line_ids['amt']) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(line_ids['amt'], currency_obj = company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -208,7 +208,7 @@
<para style="terp_tblheader_General_Right">Total :</para> <para style="terp_tblheader_General_Right">Total :</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(get_total(statement)) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(get_total(statement), currency_obj = company.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -19,7 +19,7 @@
<field name="inherit_id" ref="base.view_users_form" /> <field name="inherit_id" ref="base.view_users_form" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<notebook position="inside"> <notebook position="inside">
<page string="Point Of Sale"> <page string="Point of Sale">
<group> <group>
<field name="pos_config" /> <field name="pos_config" />
<field name="ean13" /> <field name="ean13" />

View File

@ -37,8 +37,7 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
callbacks[i](params); callbacks[i](params);
} }
this.connection.rpc('/pos/'+name, params || {}, this.connection.rpc('/pos/'+name, params || {}).then(function(result){
function(result){
ret.resolve(result); ret.resolve(result);
}, },
function(error){ function(error){

View File

@ -216,13 +216,12 @@ instance.web.ViewManager.include({
var dataset = new instance.web.DataSet(this, 'ir.values', this.session.user_context); var dataset = new instance.web.DataSet(this, 'ir.values', this.session.user_context);
var action_manager = new instance.web.ActionManager(self); var action_manager = new instance.web.ActionManager(self);
dataset.call('get', dataset.call('get',
['action', 'tree_but_open',[['ir.ui.menu', id]], dataset.context], ['action', 'tree_but_open',[['ir.ui.menu', id]], dataset.context]).then(function(res) {
function(res) {
var action = res[0][res[0].length - 1]; var action = res[0][res[0].length - 1];
self.rpc("/web/action/load", { self.rpc("/web/action/load", {
action_id: action.id, action_id: action.id,
context: dataset.context context: dataset.context
}, function(result) { }).then(function(result) {
action_manager.replace(self.$el); action_manager.replace(self.$el);
action_manager.do_action(result.result); action_manager.do_action(result.result);
}) })

View File

@ -332,12 +332,12 @@
</xpath> </xpath>
<xpath expr="//group[@name='general']" position="after" > <xpath expr="//group[@name='general']" position="after" >
<group name="procurement_help" class="oe_grey" col="1" groups="base.group_user"> <group name="procurement_help" class="oe_grey" col="1" groups="base.group_user">
<p attrs="{'invisible': [('type','&lt;&gt;','service'),('procure_method','&lt;&gt;','make_to_stock')]}"> <p attrs="{'invisible': ['|','|',('type','&lt;&gt;','service'),('procure_method','&lt;&gt;','make_to_stock')]}">
When you sell this service, nothing special will be trigered When you sell this service, nothing special will be triggered
to deliver the customer, as you set the procurement method as to deliver the customer, as you set the procurement method as
'Make to Stock'. 'Make to Stock'.
</p> </p>
<p attrs="{'invisible': [('type','&lt;&gt;','product'),('procure_method','&lt;&gt;','make_to_stock')]}"> <p attrs="{'invisible': ['|','|',('type','&lt;&gt;','product'),('procure_method','&lt;&gt;','make_to_stock')]}">
When you sell this product, OpenERP will <b>use the available When you sell this product, OpenERP will <b>use the available
inventory</b> for the delivery order. inventory</b> for the delivery order.
<br/><br/> <br/><br/>
@ -345,7 +345,7 @@
will wait for new products. To fulfill the inventory, you should will wait for new products. To fulfill the inventory, you should
create others rules like orderpoints. create others rules like orderpoints.
</p> </p>
<p attrs="{'invisible': [('type','&lt;&gt;','consu'),('procure_method','&lt;&gt;','make_to_stock')]}"> <p attrs="{'invisible': ['|','|',('type','&lt;&gt;','consu'),('procure_method','&lt;&gt;','make_to_stock')]}">
When you sell this product, a delivery order will be created. When you sell this product, a delivery order will be created.
OpenERP will consider that the <b>required quantities are always OpenERP will consider that the <b>required quantities are always
available</b> as it's a consumable (as a result of this, the quantity available</b> as it's a consumable (as a result of this, the quantity

View File

@ -109,8 +109,8 @@ class product_uom(osv.osv):
_order = "name" _order = "name"
_columns = { _columns = {
'name': fields.char('Name', size=64, required=True, translate=True), 'name': fields.char('Unit of Measure', size=64, required=True, translate=True),
'category_id': fields.many2one('product.uom.categ', 'Unit of Measure Category', required=True, ondelete='cascade', 'category_id': fields.many2one('product.uom.categ', 'Category', required=True, ondelete='cascade',
help="Quantity conversions may happen automatically between Units of Measure in the same category, according to their respective ratios."), help="Quantity conversions may happen automatically between Units of Measure in the same category, according to their respective ratios."),
'factor': fields.float('Ratio', required=True,digits=(12, 12), 'factor': fields.float('Ratio', required=True,digits=(12, 12),
help='How many times this Unit of Measure is smaller than the reference Unit of Measure in this category:\n'\ help='How many times this Unit of Measure is smaller than the reference Unit of Measure in this category:\n'\
@ -126,7 +126,7 @@ class product_uom(osv.osv):
'active': fields.boolean('Active', help="By unchecking the active field you can disable a unit of measure without deleting it."), 'active': fields.boolean('Active', help="By unchecking the active field you can disable a unit of measure without deleting it."),
'uom_type': fields.selection([('bigger','Bigger than the reference Unit of Measure'), 'uom_type': fields.selection([('bigger','Bigger than the reference Unit of Measure'),
('reference','Reference Unit of Measure for this category'), ('reference','Reference Unit of Measure for this category'),
('smaller','Smaller than the reference Unit of Measure')],'Unit of Measure Type', required=1), ('smaller','Smaller than the reference Unit of Measure')],'Type', required=1),
} }
_defaults = { _defaults = {

View File

@ -13,7 +13,7 @@
<filter string="Consumable" name="consumable" icon="terp-accessories-archiver" domain="[('type','=','consu')]" help="Consumable products"/> <filter string="Consumable" name="consumable" icon="terp-accessories-archiver" domain="[('type','=','consu')]" help="Consumable products"/>
<separator/> <separator/>
<filter string="Can be Sold" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/> <filter string="Can be Sold" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/>
<field name="categ_id" operator="child_of"/> <field name="categ_id"/>
<group expand="0" string="Context..."> <group expand="0" string="Context...">
<field name="pricelist_id" context="{'pricelist': self}" groups="product.group_sale_pricelist"/> <field name="pricelist_id" context="{'pricelist': self}" groups="product.group_sale_pricelist"/>
<field name="company_id" groups="base.group_multi_company"/> <field name="company_id" groups="base.group_multi_company"/>
@ -104,11 +104,11 @@
<field name="cost_method" groups="product.group_costing_method"/> <field name="cost_method" groups="product.group_costing_method"/>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/> <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
</group> </group>
<group name="procurement_uom" groups="product.group_uom"> <group name="procurement_uom" groups="product.group_uom" string="Purchase">
<field name="uom_po_id"/> <field name="uom_po_id"/>
</group> </group>
</group> </group>
<separator string="Notes for Suppliers"/> <separator string="Description for Suppliers"/>
<field name="description_purchase" placeholder="This note will be displayed on requests for quotation..."/> <field name="description_purchase" placeholder="This note will be displayed on requests for quotation..."/>
</page> </page>
<page string="Inventory" groups="base.group_user"> <page string="Inventory" groups="base.group_user">
@ -160,7 +160,7 @@
<field name="name"/> <field name="name"/>
</form> </form>
</field> </field>
<separator string="Notes on Quotations"/> <separator string="Description for Quotations"/>
<field name="description_sale" placeholder="note to be displayed on quotations..."/> <field name="description_sale" placeholder="note to be displayed on quotations..."/>
</page> </page>
</notebook> </notebook>
@ -412,7 +412,6 @@
<tree string="Units of Measure"> <tree string="Units of Measure">
<field name="name"/> <field name="name"/>
<field name="category_id"/> <field name="category_id"/>
<field name="factor"/>
</tree> </tree>
</field> </field>
</record> </record>
@ -426,19 +425,22 @@
<group> <group>
<field name="name"/> <field name="name"/>
<field name="category_id"/> <field name="category_id"/>
<field name="active"/> <field name="uom_type" on_change="onchange_type(uom_type)"/>
<label for="factor"/>
<div>
<field name="factor" attrs="{'invisible':[('uom_type','!=','smaller')]}"/>
<field name="factor_inv" attrs="{'invisible':[('uom_type','!=','bigger')]}"/>
<p attrs="{'invisible':[('uom_type','!=','smaller')]}" class="oe_grey">
e.g: 1 * (reference unit) = ratio * (this unit)
</p>
<p attrs="{'invisible':[('uom_type','!=','bigger')]}" class="oe_grey">
e.g: 1 * (this unit) = ratio * (reference unit)
</p>
</div>
</group> </group>
<group> <group>
<field name="uom_type" on_change="onchange_type(uom_type)"/> <field name="active"/>
<p attrs="{'invisible':[('uom_type','!=','smaller')]}" colspan="2">
e.g: 1 * (reference unit) = ratio * (this unit)
</p>
<p attrs="{'invisible':[('uom_type','!=','bigger')]}" colspan="2">
e.g: 1 * (this unit) = ratio * (reference unit)
</p>
<field name="rounding"/> <field name="rounding"/>
<field name="factor" attrs="{'invisible':[('uom_type','!=','smaller')]}"/>
<field name="factor_inv" attrs="{'invisible':[('uom_type','!=','bigger')]}"/>
</group> </group>
</group> </group>
</form> </form>

View File

@ -1425,7 +1425,7 @@ class project_task_history_cumulative(osv.osv):
} }
def init(self, cr): def init(self, cr):
tools.drop_view_if_exists(cr, 'report_event_registration') tools.drop_view_if_exists(cr, 'project_task_history_cumulative')
cr.execute(""" CREATE VIEW project_task_history_cumulative AS ( cr.execute(""" CREATE VIEW project_task_history_cumulative AS (
SELECT SELECT

View File

@ -135,7 +135,7 @@
<field name="resource_calendar_id"/> <field name="resource_calendar_id"/>
</group> </group>
<group string="Miscellaneous" name="misc"> <group string="Miscellaneous" name="misc">
<field name="date"/> <field name="date" string="End Date"/>
<field name="priority" groups="base.group_no_one"/> <field name="priority" groups="base.group_no_one"/>
<field name="active" attrs="{'invisible':[('state','in',['open', 'pending', 'template'])]}"/> <field name="active" attrs="{'invisible':[('state','in',['open', 'pending', 'template'])]}"/>

View File

@ -42,10 +42,10 @@
</record> </record>
<record model="ir.rule" id="project_public_members_rule"> <record model="ir.rule" id="project_public_members_rule">
<field name="name">public Members</field> <field name="name">Public Members</field>
<field name="model_id" ref="model_project_project"/> <field name="model_id" ref="model_project_project"/>
<field name="global" eval="True"/> <field name="global" eval="True"/>
<field name="domain_force">['|','|',('privacy_visibility','in',[False,'public']),('members','in',[user.id]),('message_follower_ids','in',[user.partner_id.id])]</field> <field name="domain_force">['|',('privacy_visibility','in',[False,'public']),('message_follower_ids','in',[user.partner_id.id])]</field>
</record> </record>
<record model="ir.rule" id="task_comp_rule"> <record model="ir.rule" id="task_comp_rule">

View File

@ -78,8 +78,6 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="remaining_hours" position="after"> <field name="remaining_hours" position="after">
<field string="Timebox" name="timebox_id" invisible=" not context.get('gtd', False)"/> <field string="Timebox" name="timebox_id" invisible=" not context.get('gtd', False)"/>
<button name="prev_timebox" type="object" icon="gtk-go-back" string="Previous" states="draft,pending,open" invisible=" not context.get('gtd',False)"/>
<button name="next_timebox" type="object" icon="gtk-go-forward" string="Next" states="draft,pending,open" invisible=" not context.get('gtd',False)"/>
<field name="context_id" invisible="not context.get('context_show', False)" widget="selection"/> <field name="context_id" invisible="not context.get('context_show', False)" widget="selection"/>
<button name="do_reopen" states="done,cancelled" string="Reactivate" type="object" icon="gtk-convert" help="For reopening the tasks" invisible="not context.get('set_visible',False)"/> <button name="do_reopen" states="done,cancelled" string="Reactivate" type="object" icon="gtk-convert" help="For reopening the tasks" invisible="not context.get('set_visible',False)"/>
</field> </field>
@ -123,7 +121,7 @@
<field name="context">{'set_editable':True,'set_visible':True,'gtd':True,'user_invisible':True, "search_default_open": 1}</field> <field name="context">{'set_editable':True,'set_visible':True,'gtd':True,'user_invisible':True, "search_default_open": 1}</field>
<field name="domain">[('user_id','=',uid)]</field> <field name="domain">[('user_id','=',uid)]</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,gantt,graph,kanban</field> <field name="view_mode">kanban,tree,form,calendar,gantt,graph</field>
</record> </record>
<menuitem action="open_gtd_task" id="menu_open_gtd_timebox_tree" parent="project.menu_project_management" sequence="10"/> <menuitem action="open_gtd_task" id="menu_open_gtd_timebox_tree" parent="project.menu_project_management" sequence="10"/>

View File

@ -40,7 +40,7 @@
<attribute name="invisible">False</attribute> <attribute name="invisible">False</attribute>
</xpath> </xpath>
<group name="procurement_help" position="inside"> <group name="procurement_help" position="inside">
<p attrs="{'invisible': [('type','&lt;&gt;','service'),('procure_method','&lt;&gt;','make_to_order'),('supply_method','&lt;&gt;','produce')]}"> <p attrs="{'invisible': ['|','|',('type','&lt;&gt;','service'),('procure_method','&lt;&gt;','make_to_order'),('supply_method','&lt;&gt;','produce')]}">
When you sell this service to a customer, <b>a task</b> will be When you sell this service to a customer, <b>a task</b> will be
created to follow up the job to do. This task will appear created to follow up the job to do. This task will appear
in the project related to the contract of the sale order. in the project related to the contract of the sale order.

View File

@ -608,13 +608,13 @@
<field name="inherit_id" ref="procurement.product_form_view_procurement_button"/> <field name="inherit_id" ref="procurement.product_form_view_procurement_button"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<group name="procurement_help" position="inside"> <group name="procurement_help" position="inside">
<p attrs="{'invisible': [('type','&lt;&gt;','service'),('procure_method','&lt;&gt;','make_to_order'),('supply_method','&lt;&gt;','buy')]}"> <p attrs="{'invisible': ['|','|',('type','&lt;&gt;','service'),('procure_method','&lt;&gt;','make_to_order'),('supply_method','&lt;&gt;','buy')]}">
When you sell this service to a customer, <b>a draft purchase order</b> When you sell this service to a customer, <b>a draft purchase order</b>
will be created in order to subcontract the job will be created in order to subcontract the job
<i attrs="{'invisible': [('seller_id','=',False)]}">to <i attrs="{'invisible': [('seller_id','=',False)]}">to
<field name="seller_id" class="oe_inline"/></i>. <field name="seller_id" class="oe_inline"/></i>.
</p> </p>
<p attrs="{'invisible': [('type','=','service'),('procure_method','&lt;&gt;','make_to_order'),('supply_method','&lt;&gt;','buy')]}"> <p attrs="{'invisible': ['|','|',('type','=','service'),('procure_method','&lt;&gt;','make_to_order'),('supply_method','&lt;&gt;','buy')]}">
When you sell this product, OpenERP will trigger <b>a draft When you sell this product, OpenERP will trigger <b>a draft
purchase order</b> to buy the required quantities to the supplier. purchase order</b> to buy the required quantities to the supplier.
The delivery order will be ready after having received the The delivery order will be ready after having received the

View File

@ -245,7 +245,7 @@
<para style="terp_default_Centre_9">[[ l.discount and formatLang (l.discount) or '' ]] </para> <para style="terp_default_Centre_9">[[ l.discount and formatLang (l.discount) or '' ]] </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(l.price_subtotal) ]] [[ o.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, currency_obj=o.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -301,7 +301,7 @@
<para style="terp_default_9">Total (excl. taxes):</para> <para style="terp_default_9">Total (excl. taxes):</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, currency_obj=o.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -314,7 +314,7 @@
<para style="terp_default_9">Taxes:</para> <para style="terp_default_9">Taxes:</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, currency_obj=o.currency_id) ]]</para>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -327,7 +327,7 @@
<para style="terp_default_Bold_9">Total (inclu. taxes):</para> <para style="terp_default_Bold_9">Total (inclu. taxes):</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">[[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]]</para> <para style="terp_tblheader_Details_Right">[[ formatLang(o.amount_total, currency_obj=o.currency_id) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -360,10 +360,10 @@
<para style="terp_default_8">[[ t.name ]]</para> <para style="terp_default_8">[[ t.name ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_8">[[ formatLang(t.base, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para> <para style="terp_default_Right_8">[[ formatLang(t.base, digits=get_digits(dp='Account'), currency_obj = o.currency_id) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para> <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_8"> <para style="terp_default_8">

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