[MERGE] Merge from master and resolve conflict

This commit is contained in:
Josse Colpaert 2014-06-17 16:23:44 +02:00
commit 6b63d40145
463 changed files with 9070 additions and 6963 deletions

View File

@ -1,68 +1,10 @@
Contributing to Odoo
====================
Reporting Issues
----------------
If possible, always attach a pull request when creating an issue (GitHub will automatically create an issue when submitting the changes). The issues not linked to a pull request or an internal request on odoo.com will be handled with a lower priority.
[Full contribution guidelines](https://github.com/odoo/odoo/wiki/Contributing)
If later on you create a pull request solving an opened issue, do not forget to reference to it in your pull request (e.g.: "This patch fixes issue #42").
TL;DR
When reporting an issue or creating a pull request, use the following structure:
> **Quantity field is ignored in a sale order**
>
> Impacted versions:
>
> - 7.0 and above
>
> Steps to reproduce:
>
> 1. create a new sale order
> 2. add a line with product 'Service', quantity 2, unit price 10.0
> 3. validate the sale order
>
> Current behavior:
>
> - Total price of 10.0
>
> Expected behavior:
>
> - Total price of 20.0 (2 * 10 = 20)
For web or rendering issues, do not forget to specify the operating system and browser you are using.
Against which version should I submit a patch?
----------------------------------------------
Periodically, we forward port the fixes realized in the latest stable version to master and intermediate saas repositories. This means that you should submit your pull request against the lowest supported version. If applying, you should always submit your code against `odoo/7.0`. The `saas-x` versions are intermediate versions between stable versions.
![Submiting against the right version](/doc/_static/pull-request-version.png)
However your change **must** be submitted against `odoo/master` if
* it modifies the database structure (e.g.: adding a new field)
* it adds a new feature
Why was my fix labeled as blocked?
----------------------------------
The label *blocked* is used when an action is required from the submitter. The typical reasons are:
* the fix is incomplete/incorrect and a change is required
* more information is required
Pull requests with the blocked label will not be processed as long as the label remains. Once the correction done, we will review it and eventually remove the label.
Why was my issue closed without merging?
----------------------------------------
A pull request is closed when it will not be merged into odoo. This will typically happens if the fix/issue:
* is not relevant to odoo development (label *invalid*)
* is not considered as a bug or we have no plan to change the current behavior (label *wontfix*)
* is a duplicated of another opened issue (label *duplicate*)
* the pull request should be resubmitted against another version
What is this odoo-dev repository? Should I use it?
--------------------------------------------------
The `odoo-dev/odoo` repository is an internal repository used by the R&D of Odoo to keep the main repository clean. If you are coming from Launchpad, this is the equivalent of the `~openerp-dev` repository.
When forking odoo to submit a patch, always use the `github.com/odoo/odoo` repository. Be also careful of the version you are branching as it will determine the history once the pull request will be realized (e.g.: `git checkout -b 7.0-my-branch odoo/7.0`).
* Use the [template structure](https://raw.githubusercontent.com/odoo/odoo/master/doc/_templates/issue_template.md)
* Pull requests made against the [correct version](https://github.com/odoo/odoo/wiki/Contributing#against-which-version-should-i-submit-a-patch)
* Read the restrictions for [changes in stable](https://github.com/odoo/odoo/wiki/Contributing#what-does-stable-mean)

View File

@ -1,3 +1,5 @@
[![Build Status](http://runbot.odoo.com/runbot/badge/default/1/master.svg)](http://runbot.odoo.com/runbot)
Odoo
----

View File

@ -580,7 +580,14 @@ class account_account(osv.osv):
pass
if name:
if operator not in expression.NEGATIVE_TERM_OPERATORS:
ids = self.search(cr, user, ['|', ('code', '=like', name+"%"), '|', ('shortcut', '=', name), ('name', operator, name)]+args, limit=limit)
plus_percent = lambda n: n+'%'
code_op, code_conv = {
'ilike': ('=ilike', plus_percent),
'like': ('=like', plus_percent),
}.get(operator, (operator, lambda n: n))
ids = self.search(cr, user, ['|', ('code', code_op, code_conv(name)), '|', ('shortcut', '=', name), ('name', operator, name)]+args, limit=limit)
if not ids and len(name.split()) >= 2:
#Separating code and name of account for searching
operand1,operand2 = name.split(' ',1) #name can contain spaces e.g. OpenERP S.A.
@ -2918,7 +2925,7 @@ class account_fiscal_position_template(osv.osv):
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
'account_ids': fields.one2many('account.fiscal.position.account.template', 'position_id', 'Account Mapping'),
'tax_ids': fields.one2many('account.fiscal.position.tax.template', 'position_id', 'Tax Mapping'),
'note': fields.text('Notes', translate=True),
'note': fields.text('Notes'),
}
def generate_fiscal_position(self, cr, uid, chart_temp_id, tax_template_ref, acc_template_ref, company_id, context=None):

View File

@ -5,7 +5,7 @@
<field name="model">account.installer</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<form position="attributes" version="7.0">
<form position="attributes">
<attribute name="string">Accounting Application Configuration</attribute>
</form>
<footer position="replace">

View File

@ -1546,7 +1546,7 @@ class account_invoice_line(osv.osv):
context = dict(context)
context.update({'company_id': company_id})
warning = {}
res = self.product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context=context)
res = self.product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context=context, company_id=company_id)
if not uom:
res['value']['price_unit'] = 0.0
if product and uom:

View File

@ -45,7 +45,7 @@
<field name="name">account.invoice.line.form</field>
<field name="model">account.invoice.line</field>
<field name="arch" type="xml">
<form string="Invoice Line" version="7.0">
<form string="Invoice Line">
<group>
<group>
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
@ -90,7 +90,7 @@
<field name="name">account.invoice.tax.form</field>
<field name="model">account.invoice.tax</field>
<field name="arch" type="xml">
<form string="Manual Invoice Taxes" version="7.0">
<form string="Manual Invoice Taxes">
<group col="4">
<field name="name"/>
<field name="sequence"/>
@ -142,7 +142,7 @@
<field name="model">account.invoice</field>
<field name="priority">2</field>
<field name="arch" type="xml">
<form string="Supplier Invoice" version="7.0">
<form string="Supplier Invoice">
<header>
<button name="invoice_open" states="draft,proforma2" string="Validate" class="oe_highlight" groups="account.group_account_invoice"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Ask Refund' states='open,paid' groups="account.group_account_invoice"/>
@ -291,7 +291,7 @@
<field name="name">account.invoice.form</field>
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<form string="Invoice" version="7.0">
<form string="Invoice">
<header>
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user"/>
<button name="invoice_print" string="Print" type="object" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user"/>
@ -462,7 +462,7 @@
<field name="period_id" string="Period"/>
<separator/>
<filter domain="[('user_id','=',uid)]" help="My Invoices"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter name="group_by_partner_id" string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter name="commercial_partner_id" string="Commercial Partner" domain="[]" context="{'group_by':'commercial_partner_id'}"/>
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>

View File

@ -579,6 +579,9 @@ class account_move_line(osv.osv):
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'account_move_line_journal_id_period_id_index\'')
if not cr.fetchone():
cr.execute('CREATE INDEX account_move_line_journal_id_period_id_index ON account_move_line (journal_id, period_id)')
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = %s', ('account_move_line_date_id_index',))
if not cr.fetchone():
cr.execute('CREATE INDEX account_move_line_date_id_index ON account_move_line (date DESC, id desc)')
return res
def _check_no_view(self, cr, uid, ids, context=None):

View File

@ -7,7 +7,7 @@
<field name="name">account.fiscalyear.form</field>
<field name="model">account.fiscalyear</field>
<field name="arch" type="xml">
<form string="Fiscal year" version="7.0">
<form string="Fiscal year">
<header>
<button name="create_period" states="draft" string="Create Monthly Periods" type="object" class="oe_highlight"/>
<button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" class="oe_highlight"/>
@ -26,7 +26,7 @@
</group>
</group>
<field colspan="4" name="period_ids" nolabel="1" widget="one2many_list">
<form string="Period" version="7.0">
<form string="Period">
<group col="4">
<field name="name"/>
<field name="code"/>
@ -61,7 +61,7 @@
<filter string="Open" domain="[('state','=','draft')]" icon="terp-camera_test"/>
<filter string="Closed" domain="[('state','=','done')]" icon="terp-dialog-close"/>
<field name="state"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
</group>
</search>
@ -94,7 +94,7 @@
<field name="name">account.period.form</field>
<field name="model">account.period</field>
<field name="arch" type="xml">
<form string="Account Period" version="7.0">
<form string="Account Period">
<header>
<button string="Close Period" name="%(account.action_account_period_close)d" type="action" class="oe_highlight" states="draft"/>
<button name="action_draft" states="done" string="Re-Open Period" type="object" groups="account.group_account_manager"/>
@ -168,7 +168,7 @@
<field name="name">account.account.form</field>
<field name="model">account.account</field>
<field name="arch" type="xml">
<form string="Account" version="7.0">
<form string="Account">
<label for="code" class="oe_edit_only" string="Account Code and Name"/>
<h1>
<field name="code" class="oe_inline" placeholder="Account code" style="width: 6em"/> -
@ -232,7 +232,7 @@
<filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
<filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
<field name="user_type"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Parent Account" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
<filter string="Account Type" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'user_type'}"/>
<filter string="Internal Type" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'type'}"/>
@ -381,7 +381,7 @@
<filter domain="['|', ('type', '=', 'cash'), ('type', '=', 'bank')]" string="Liquidity" icon="terp-dolar"/>
<filter domain="['|', ('type', '=', 'general'), ('type', '=', 'situation')]" string="Others" icon="terp-stock"/>
<field name="user_id"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
<filter string="Type" context="{'group_by':'type'}" icon="terp-stock_symbol-selection"/>
<filter string="Company" context="{'group_by':'company_id'}" icon="terp-go-home" groups="base.group_multi_company"/>
@ -393,7 +393,7 @@
<field name="name">account.journal.form</field>
<field name="model">account.journal</field>
<field name="arch" type="xml">
<form string="Account Journal" version="7.0">
<form string="Account Journal">
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
@ -507,7 +507,7 @@
<filter string="Open" name="state_open" domain="[('state','=','open')]" icon="terp-check"/>
<filter string="Confirmed" name="state_confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<field name="journal_id" domain="[('type', '=', 'cash')]" />
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
<filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
<filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
@ -544,7 +544,7 @@
<filter string="Confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<field name="period_id"/>
<field name="journal_id" domain="[('type', '=', 'bank')]" />
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
<filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
<filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
@ -558,7 +558,7 @@
<field name="model">account.bank.statement</field>
<field name="priority">1</field>
<field name="arch" type="xml">
<form string="Bank Statement" version="7.0">
<form string="Bank Statement">
<header>
<field name="all_lines_reconciled" invisible="1" />
<span attrs="{'invisible':['|',('all_lines_reconciled','=',True),('line_ids','=',[])]}">
@ -701,7 +701,7 @@
<field name="name">account.statement.operation.template.form</field>
<field name="model">account.statement.operation.template</field>
<field name="arch" type="xml">
<form string="Statement Operation Templates" version="7.0">
<form string="Statement Operation Templates">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
@ -791,7 +791,7 @@
<field name="name">account.account.type.form</field>
<field name="model">account.account.type</field>
<field name="arch" type="xml">
<form string="Account Type" version="7.0">
<form string="Account Type">
<group>
<group>
<field name="name"/>
@ -850,7 +850,7 @@
<field name="name">account.move.reconcile.form</field>
<field name="model">account.move.reconcile</field>
<field name="arch" type="xml">
<form string="Journal Entry Reconcile" version="7.0">
<form string="Journal Entry Reconcile">
<group col="4">
<field name="name"/>
<field name="create_date"/>
@ -895,7 +895,7 @@
<field name="name">account.tax.code.form</field>
<field name="model">account.tax.code</field>
<field name="arch" type="xml">
<form string="Account Tax Code" version="7.0">
<form string="Account Tax Code">
<group>
<group col="4" colspan="2">
<field name="name"/>
@ -979,7 +979,7 @@
<field name="company_id" groups="base.group_multi_company"/>
<filter string="Sale" domain="[('type_tax_use','=','sale')]" />
<filter string="Purchase" domain="[('type_tax_use','=','purchase')]" />
<group string="Group By...">
<group string="Group By">
<filter string="Company" domain="[]" context="{'group_by':'company_id'}"/>
<filter string="Tax Application" domain="[]" context="{'group_by':'type_tax_use'}"/>
</group>
@ -990,7 +990,7 @@
<field name="name">account.tax.form</field>
<field name="model">account.tax</field>
<field name="arch" type="xml">
<form string="Account Tax" version="7.0">
<form string="Account Tax">
<group>
<group>
<field name="name"/>
@ -1087,7 +1087,7 @@
<field name="model">account.move.line</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<form string="Journal Item" version="7.0">
<form string="Journal Item">
<sheet>
<group>
<group>
@ -1156,7 +1156,7 @@
<field name="model">account.move.line</field>
<field eval="9" name="priority"/>
<field name="arch" type="xml">
<form string="Journal Item" version="7.0">
<form string="Journal Item">
<notebook colspan="4">
<page string="Information">
<group col="4">
@ -1203,7 +1203,7 @@
<field name="model">account.move.line</field>
<field eval="1" name="priority"/>
<field name="arch" type="xml">
<tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" create="true" on_write="on_create_write" version="7.0" editable="top">
<tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" create="true" on_write="on_create_write" editable="top">
<field name="journal_id" options='{"no_open":True}' invisible="context.get('journal_id',False)"/>
<field name="period_id" options='{"no_open":True}' invisible="context.get('period_id',False)"/>
<field name="date"/>
@ -1258,7 +1258,7 @@
<field name="partner_id"/>
<field name="journal_id" context="{'journal_id':self}" widget="selection"/> <!-- it's important to keep widget='selection' in this filter viewbecause without that the value passed in the context is not the ID but the textual value (name) of the selected journal -->
<field name="period_id" context="{'period_id':self}" widget="selection"/> <!-- it's important to keep the widget='selection' in this field, for the same reason as explained above -->
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
@ -1304,7 +1304,7 @@
<field eval="24" name="priority"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree_account_reconciliation colors="red:state == 'draft';black:state == 'valid'" string="Journal Items to Reconcile" create="false" version="7.0">
<tree_account_reconciliation colors="red:state == 'draft';black:state == 'valid'" string="Journal Items to Reconcile" create="false">
<field name="date"/>
<field name="move_id"/>
<field name="ref"/>
@ -1360,7 +1360,7 @@
<field name="name">account.move.form</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<form string="Account Entry" version="7.0">
<form string="Account Entry">
<header>
<button name="button_validate" states="draft" string="Post" type="object" class="oe_highlight" groups="account.group_account_invoice"/>
<button name="button_cancel" states="posted" string="Cancel Entry" type="object" groups="account.group_account_invoice"/>
@ -1388,7 +1388,7 @@
<page string="Journal Items">
<field name="line_id" widget="one2many_list"
context="{'line_id': line_id , 'journal_id': journal_id }">
<form string="Journal Item" version="7.0">
<form string="Journal Item">
<group col="6" colspan="4">
<field name="name"/>
<field name="ref"/>
@ -1491,7 +1491,7 @@
<field name="partner_id"/>
<field name="journal_id"/>
<field name="period_id"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
@ -1594,7 +1594,7 @@
<field name="name">account.model.line.form</field>
<field name="model">account.model.line</field>
<field name="arch" type="xml">
<form string="Journal Entry Model Line" version="7.0">
<form string="Journal Entry Model Line">
<group col="4">
<field colspan="4" name="name"/>
<field name="sequence"/>
@ -1613,7 +1613,7 @@
<field name="name">account.model.form</field>
<field name="model">account.model</field>
<field name="arch" type="xml">
<form string="Journal Entry Model" version="7.0">
<form string="Journal Entry Model">
<group col="4">
<field name="name"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)"/>
@ -1648,7 +1648,7 @@
<filter string="Purchase" icon="terp-purchase" domain="[('journal_id.type', '=', 'purchase')]"/>
<field name="journal_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
</group>
</search>
@ -1683,7 +1683,7 @@
<field name="name">account.payment.term.line.form</field>
<field name="model">account.payment.term.line</field>
<field name="arch" type="xml">
<form string="Payment Term" version="7.0">
<form string="Payment Term">
<group>
<group string="Amount Computation">
<field name="value"/>
@ -1714,7 +1714,7 @@
<field name="name">account.payment.term.form</field>
<field name="model">account.payment.term</field>
<field name="arch" type="xml">
<form string="Payment Term" version="7.0">
<form string="Payment Term">
<group col="4">
<field name="name"/>
<field name="active"/>
@ -1741,7 +1741,7 @@
<field name="name">account.subscription.line.form</field>
<field name="model">account.subscription.line</field>
<field name="arch" type="xml">
<form string="Subscription lines" version="7.0">
<form string="Subscription lines">
<group>
<field name="date"/>
<field name="move_id"/>
@ -1782,7 +1782,7 @@
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Subscription"/>
<filter icon="terp-camera_test" string="Running" domain="[('state','=','running')]" help="Running Subscription"/>
<field name="model_id"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Model" icon="terp-folder-orange" domain="[]" context="{'group_by':'model_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group>
@ -1793,7 +1793,7 @@
<field name="name">account.subscription.form</field>
<field name="model">account.subscription</field>
<field name="arch" type="xml">
<form string="Recurring" version="7.0">
<form string="Recurring">
<header>
<button name="state_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert" />
<button name="compute" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific" class="oe_highlight"/>
@ -1864,7 +1864,7 @@
<field name="model">account.subscription.line</field>
<field eval="20" name="priority"/>
<field name="arch" type="xml">
<form string="Subscription lines" version="7.0">
<form string="Subscription lines">
<group col="4">
<field name="subscription_id"/>
<field name="date"/>
@ -1895,7 +1895,7 @@
<field name="name">account.account.template.form</field>
<field name="model">account.account.template</field>
<field name="arch" type="xml">
<form string="Account Template" version="7.0">
<form string="Account Template">
<group col="4">
<field name="name"/>
<field name="code"/>
@ -1939,7 +1939,7 @@
<field name="parent_id"/>
<field name="user_type"/>
<field name="type"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Internal Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
<filter string="Account Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'user_type'}"/>
</group>
@ -1959,7 +1959,7 @@
<field name="name">Create Account</field>
<field name="model">account.addtmpl.wizard</field>
<field name="arch" type="xml">
<form string="Create Account" version="7.0">
<form string="Create Account">
<header>
<button icon="gtk-ok" name="action_create" string="Add" type="object" class="oe_highlight" />
</header>
@ -1983,7 +1983,7 @@
<field name="name">account.chart.template.form</field>
<field name="model">account.chart.template</field>
<field name="arch" type="xml">
<form string="Chart of Accounts Template" version="7.0">
<form string="Chart of Accounts Template">
<group col="4">
<field name="name"/>
<field name="account_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
@ -2018,7 +2018,7 @@
<field name="name" string="Account Template"/>
<field name="account_root_id"/>
<field name="bank_account_view_id"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Root Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'account_root_id'}"/>
<filter string="Bank Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'bank_account_view_id'}"/>
<filter string="Receivable Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_receivable'}"/>
@ -2058,7 +2058,7 @@
<field name="name">account.tax.template.form</field>
<field name="model">account.tax.template</field>
<field name="arch" type="xml">
<form string="Account Tax Template" version="7.0">
<form string="Account Tax Template">
<group col="4">
<field name="name"/>
<field name="description"/>
@ -2161,7 +2161,7 @@
<search string="Search tax template">
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Tax Template"/>
<field name="parent_id"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Parent Code" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
</group>
</search>
@ -2171,7 +2171,7 @@
<field name="name">account.tax.code.template.form</field>
<field name="model">account.tax.code.template</field>
<field name="arch" type="xml">
<form string="Account Tax Code Template" version="7.0">
<form string="Account Tax Code Template">
<group col="4">
<field name="name"/>
<field name="code"/>
@ -2199,7 +2199,7 @@
<field name="model">wizard.multi.charts.accounts</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="arch" type="xml">
<form position="attributes" version="7.0">
<form position="attributes">
<attribute name="string">Accounting Application Configuration</attribute>
</form>
<group string="res_config_contents" position="replace">
@ -2267,7 +2267,7 @@
<field name="name">account.fiscal.position.template.form</field>
<field name="model">account.fiscal.position.template</field>
<field name="arch" type="xml">
<form string="Fiscal Position Template" version="7.0">
<form string="Fiscal Position Template">
<group col="4">
<field name="name"/>
<field name="chart_template_id"/>
@ -2277,7 +2277,7 @@
<field name="tax_src_id" domain="[('parent_id','=',False)]"/>
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
</tree>
<form string="Taxes Mapping" version="7.0">
<form string="Taxes Mapping">
<field name="tax_src_id" domain="[('parent_id','=',False)]"/>
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
</form>
@ -2287,7 +2287,7 @@
<field name="account_src_id"/>
<field name="account_dest_id"/>
</tree>
<form string="Accounts Mapping" version="7.0">
<form string="Accounts Mapping">
<field name="account_src_id"/>
<field name="account_dest_id"/>
</form>
@ -2340,7 +2340,7 @@
<field name="model">account.bank.statement</field>
<field name="priority">2</field>
<field name="arch" type="xml">
<form string="Statement" version="7.0">
<form string="Statement">
<header>
<field name="all_lines_reconciled" invisible="1" />
<span attrs="{'invisible':['|',('all_lines_reconciled','=',True),('line_ids','=',[])]}">
@ -2381,7 +2381,7 @@
<field name="partner_id"/>
<field name="amount"/>
</tree>
<form string="Statement lines" version="7.0">
<form string="Statement lines">
<group col="4">
<field name="date"/>
<field name="name"/>
@ -2526,7 +2526,7 @@
<field name="name">account.financial.report.form</field>
<field name="model">account.financial.report</field>
<field name="arch" type="xml">
<form string="Account Report" version="7.0">
<form string="Account Report">
<group col="4">
<field name="name"/>
<field name="parent_id"/>
@ -2568,7 +2568,7 @@
<field name="name" string="Account Report"/>
<field name="type"/>
<field name="account_report_id"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Parent Report" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
<filter string="Report Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
</group>

View File

@ -7,7 +7,6 @@
<field name="period_id" ref="account.period_5"/>
<field name="date" eval="time.strftime('%Y')+'-01-01'"/>
<field name="user_id" ref="base.user_demo"/>
<field name="reference_type">none</field>
<field name="name">BNK/2014/001</field>
<field name="balance_end" eval="2040.0"/>
<field name="company_id" ref="base.main_company"/>

View File

@ -33,7 +33,7 @@ class account_fiscal_position(osv.osv):
'company_id': fields.many2one('res.company', 'Company'),
'account_ids': fields.one2many('account.fiscal.position.account', 'position_id', 'Account Mapping'),
'tax_ids': fields.one2many('account.fiscal.position.tax', 'position_id', 'Tax Mapping'),
'note': fields.text('Notes', translate=True),
'note': fields.text('Notes'),
}
_defaults = {

View File

@ -6,7 +6,7 @@
<field name="name">account.fiscal.position.form</field>
<field name="model">account.fiscal.position</field>
<field name="arch" type="xml">
<form string="Fiscal Position" version="7.0">
<form string="Fiscal Position">
<group col="4">
<field name="name"/>
<field name="active"/>
@ -105,7 +105,7 @@
<field name="priority">2</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<page name="sales_purchases" position="after" version="7.0">
<page name="sales_purchases" position="after">
<page string="Accounting" col="4" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}" groups="account.group_account_invoice">
<group>
<group>

View File

@ -37,7 +37,7 @@
<field name="user_id"/>
<filter string="Open" domain="[('state','=','open')]" help="Current Accounts"/>
<filter string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Associated Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Type" domain="[]" context="{'group_by':'type'}"/>
<filter string="Template" domain="[]" context="{'group_by':'template_id'}"/>
@ -127,7 +127,7 @@
<field name="model">account.analytic.line</field>
<field name="priority">1</field>
<field name="arch" type="xml">
<form string="Analytic Entry" version="7.0">
<form string="Analytic Entry">
<group>
<group>
<field name="name"/>
@ -198,7 +198,7 @@
<filter string="My Entries" domain="[('user_id','=',uid)]"/>
<field name="account_id"/>
<field name="user_id"/>
<group string="Group By..." expand="0">
<group string="Group By" expand="0">
<filter string="Analytic Account" context="{'group_by':'account_id'}"/>
<filter string="Fin. Account" context="{'group_by':'general_account_id'}"/>
<filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/>
@ -243,7 +243,7 @@
<field name="name">account.analytic.line.extended_form</field>
<field name="model">account.analytic.line</field>
<field name="arch" type="xml">
<form string="Project line" version="7.0">
<form string="Project line">
<group>
<group>
<field name="name"/>
@ -306,7 +306,7 @@
<search string="Analytic Journals">
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Journal"/>
<field name="type"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
</group>
</search>
@ -317,7 +317,7 @@
<field name="name">account.analytic.journal.form</field>
<field name="model">account.analytic.journal</field>
<field name="arch" type="xml">
<form string="Analytic Journal" version="7.0">
<form string="Analytic Journal">
<group col="4">
<field name="name"/>
<field name="code"/>

View File

@ -6,7 +6,7 @@
<field name="name">Account Analytic Balance</field>
<field name="model">account.analytic.balance</field>
<field name="arch" type="xml">
<form string="Select Period" version="7.0">
<form string="Select Period">
<header>
<button name="check_report" string="Print" type="object" class="oe_highlight"/>
or

View File

@ -6,7 +6,7 @@
<field name="name">Chart of Analytic Accounts</field>
<field name="model">account.analytic.chart</field>
<field name="arch" type="xml">
<form string="Analytic Account Charts" version="7.0">
<form string="Analytic Account Charts">
<group string="Select the Period for Analysis" col="4">
<field name="from_date"/>
<field name="to_date"/>

View File

@ -6,7 +6,7 @@
<field name="name">Account Analytic Cost Ledger Journal</field>
<field name="model">account.analytic.cost.ledger.journal.report</field>
<field name="arch" type="xml">
<form string="Select period" version="7.0">
<form string="Select period">
<header>
<button name="check_report" string="Print" type="object" class="oe_highlight"/>
or

View File

@ -6,7 +6,7 @@
<field name="name">Account Analytic Check</field>
<field name="model">account.analytic.cost.ledger</field>
<field name="arch" type="xml">
<form string="Select Period" version="7.0">
<form string="Select Period">
<header>
<button name="check_report" string="Print" type="object" class="oe_highlight"/>
or

View File

@ -6,7 +6,7 @@
<field name="name">Account Analytic Inverted Balance</field>
<field name="model">account.analytic.inverted.balance</field>
<field name="arch" type="xml">
<form string="Select Period" version="7.0">
<form string="Select Period">
<header>
<button name="check_report" string="Print" type="object" class="oe_highlight"/>
or

View File

@ -6,7 +6,7 @@
<field name="name">Account Analytic Journal</field>
<field name="model">account.analytic.journal.report</field>
<field name="arch" type="xml">
<form string="Select Period" version="7.0">
<form string="Select Period">
<group col="4">
<field name="date1"/>
<field name="date2"/>

View File

@ -6,7 +6,7 @@
<field name="name">project.account.analytic.line.form</field>
<field name="model">project.account.analytic.line</field>
<field name="arch" type="xml">
<form string="View Account Analytic Lines" version="7.0">
<form string="View Account Analytic Lines">
<header>
<button string="Open Entries" name="action_open_window" type="object" class="oe_highlight"/>
or

View File

@ -11,7 +11,7 @@
<field name="account_id" groups="analytic.group_analytic_accounting"/>
<field name="product_id" />
<field name="user_id"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>
<filter string="Account" name="Account" icon="terp-folder-green" context="{'group_by':'account_id'}" groups="analytic.group_analytic_accounting"/>

View File

@ -83,7 +83,7 @@
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group expand="1" string="Group By...">
<group expand="1" string="Group By">
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':['product_id','product_uom_id'], 'quantity_visible':1}"/>
<filter string="Currency" name="group_currency" icon="terp-dolar" context="{'group_by':'currency_id', 'currency_id_visible':1, 'amount_currency_visible':1}"/>

View File

@ -35,7 +35,7 @@
<field name="partner_id"/>
<field name="user_id" />
<field name="categ_id" filter_domain="[('categ_id', 'child_of', self)]"/>
<group expand="1" string="Group By...">
<group expand="1" string="Group By">
<filter string="Partner" name="partner_id" context="{'group_by':'partner_id','residual_visible':True}"/>
<filter string="Commercial Partner" name="commercial_partner_id" context="{'group_by':'commercial_partner_id','residual_visible':True}"/>
<filter string="Commercial Partner's Country" name="country_id" context="{'group_by':'country_id'}"/>

View File

@ -31,7 +31,7 @@
<field name="name">report.account.receivable.form</field>
<field name="model">report.account.receivable</field>
<field name="arch" type="xml">
<form string="Accounts by Type" version="7.0">
<form string="Accounts by Type">
<group>
<field name="name"/>
<field name="type"/>

View File

@ -14,7 +14,7 @@
<field name="name">account settings</field>
<field name="model">account.config.settings</field>
<field name="arch" type="xml">
<form string="Configure Accounting" version="7.0" class="oe_form_configuration">
<form string="Configure Accounting" class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
or

View File

@ -6,7 +6,7 @@
<field name="name">Account Automatic Reconcile</field>
<field name="model">account.automatic.reconcile</field>
<field name="arch" type="xml">
<form string="Reconciliation" version="7.0">
<form string="Reconciliation">
<separator string="Reconciliation"/>
<label string="For an invoice to be considered as paid, the invoice entries must be reconciled with counterparts, usually payments. With the automatic reconciliation functionality, OpenERP makes its own search for entries to reconcile in a series of accounts. It finds entries for each partner where the amounts correspond."/>
<field name="account_ids" domain="[('reconcile','=',1)]"/>
@ -51,7 +51,7 @@
<field name="name">Automatic reconcile unreconcile</field>
<field name="model">account.automatic.reconcile</field>
<field name="arch" type="xml">
<form string="Reconciliation Result" version="7.0">
<form string="Reconciliation Result">
<group>
<field name="reconciled"/>
<field name="unreconciled"/>

View File

@ -5,7 +5,7 @@
<field name="name">Change Currency</field>
<field name="model">account.change.currency</field>
<field name="arch" type="xml">
<form string="Invoice Currency" version="7.0">
<form string="Invoice Currency">
<group string="This wizard will change the currency of the invoice">
<field name="currency_id"/>
</group>

View File

@ -5,7 +5,7 @@
<field name="name">account.chart.form</field>
<field name="model">account.chart</field>
<field name="arch" type="xml">
<form string="Account charts" version="7.0">
<form string="Account charts">
<group>
<label for="fiscalyear"/>
<div>

View File

@ -5,7 +5,7 @@
<field name="name">account.fiscalyear.close.state.form</field>
<field name="model">account.fiscalyear.close.state</field>
<field name="arch" type="xml">
<form string="Close states of Fiscal year and periods" version="7.0">
<form string="Close states of Fiscal year and periods">
<group>
<field name="fy_id" domain="[('state','=','draft')]"/>
</group>

View File

@ -5,7 +5,7 @@
<field name="name">account.fiscalyear.close.form</field>
<field name="model">account.fiscalyear.close</field>
<field name="arch" type="xml">
<form string="Generate Fiscal Year Opening Entries" version="7.0">
<form string="Generate Fiscal Year Opening Entries">
<separator string="Generate Fiscal Year Opening Entries"/>
<label string="This wizard will generate the end of year journal entries of selected fiscal year. Note that you can run this wizard many times for the same fiscal year: it will simply replace the old opening entries with the new ones."/>
<newline/>

View File

@ -6,7 +6,7 @@
<field name="name">account.invoice.refund.form</field>
<field name="model">account.invoice.refund</field>
<field name="arch" type="xml">
<form string="Credit Note" version="7.0">
<form string="Credit Note">
<group>
<group colspan="2">
<label for="filter_refund"/>

View File

@ -5,7 +5,7 @@
<field name="name">account.invoice.confirm.form</field>
<field name="model">account.invoice.confirm</field>
<field name="arch" type="xml">
<form string="Confirm Draft Invoices" version="7.0">
<form string="Confirm Draft Invoices">
<p class="oe_grey">
Once draft invoices are confirmed, you will not be able
to modify them. The invoices will receive a unique
@ -31,7 +31,7 @@
<field name="name">account.invoice.cancel.form</field>
<field name="model">account.invoice.cancel</field>
<field name="arch" type="xml">
<form string="Cancel Selected Invoices" version="7.0">
<form string="Cancel Selected Invoices">
<footer>
<button string="Cancel Invoices" name="invoice_cancel" type="object" default_focus="1" class="oe_highlight"/>
or

View File

@ -6,7 +6,7 @@
<field name="name">Open Journal Button</field>
<field name="model">account.journal.select</field>
<field name="arch" type="xml">
<form string="Journal Select" version="7.0">
<form string="Journal Select">
<label string="Are you sure you want to open Journal Entries?"/>
<footer>
<button string="Open Entries" name="action_open_window" type="object" class="oe_highlight"/>

View File

@ -5,7 +5,7 @@
<field name="name">account.move.bank.reconcile.form</field>
<field name="model">account.move.bank.reconcile</field>
<field name="arch" type="xml">
<form string="Bank reconciliation" version="7.0">
<form string="Bank reconciliation">
<group>
<field name="journal_id"/>
</group>

View File

@ -5,7 +5,7 @@
<field name="name">account.move.line.reconcile.select.form</field>
<field name="model">account.move.line.reconcile.select</field>
<field name="arch" type="xml">
<form string="Reconciliation" version="7.0">
<form string="Reconciliation">
<group>
<field name="account_id"/>
</group>

View File

@ -6,7 +6,7 @@
<field name="name">Open Move Line Button</field>
<field name="model">account.move.line.select</field>
<field name="arch" type="xml">
<form string="Account Select" version="7.0">
<form string="Account Select">
<label string="Are you sure you want to open Account move line entries?"/>
<footer>
<button string="Open Entries" name="open_window" type="object" default_focus="1" class="oe_highlight"/>

View File

@ -5,7 +5,7 @@
<field name="name">account.move.line.unreconcile.select.form</field>
<field name="model">account.move.line.unreconcile.select</field>
<field name="arch" type="xml">
<form string="Unreconciliation" version="7.0">
<form string="Unreconciliation">
<group>
<field name="account_id"/>
</group>

View File

@ -5,7 +5,7 @@
<field name="name">account.open.closed.fiscalyear.form</field>
<field name="model">account.open.closed.fiscalyear</field>
<field name="arch" type="xml">
<form string="Cancel Fiscal Year Closing Entries" version="7.0">
<form string="Cancel Fiscal Year Closing Entries">
<separator string="Cancel Fiscal Year Closing Entries"/>
<p class="oe_grey">
This wizard will remove the end of year journal entries of selected fiscal year. Note that you can run this wizard many times for the same fiscal year.

View File

@ -6,7 +6,7 @@
<field name="name">account.period.close.form</field>
<field name="model">account.period.close</field>
<field name="arch" type="xml">
<form string="Close Period" version="7.0">
<form string="Close Period">
<group string="Are you sure?">
<field name="sure"/>
</group>

View File

@ -5,7 +5,7 @@
<field name="name">Partner Reconcilation Process</field>
<field name="model">account.partner.reconcile.process</field>
<field name="arch" type="xml">
<form string="Partner Reconciliation" version="7.0">
<form string="Partner Reconciliation">
<group col="4">
<field name="next_partner_id"/>
<field name="progress" widget="progressbar" colspan="4"/>

View File

@ -6,7 +6,7 @@
<field name="name">account.move.line.reconcile.full.form</field>
<field name="model">account.move.line.reconcile</field>
<field name="arch" type="xml">
<form string="Reconciliation" version="7.0">
<form string="Reconciliation">
<group col="4" string="Reconciliation Transactions">
<field name="trans_nbr"/>
<newline/>
@ -48,7 +48,7 @@
<field name="name">account.move.line.reconcile.writeoff.form</field>
<field name="model">account.move.line.reconcile.writeoff</field>
<field name="arch" type="xml">
<form string="Information addendum" version="7.0">
<form string="Information addendum">
<header>
<button string="Reconcile" name="trans_rec_reconcile" type="object" default_focus="1" class="oe_highlight"/>
or

View File

@ -7,7 +7,7 @@
<field name="model">account.aged.trial.balance</field>
<!--<field name="inherit_id" ref="account_common_report_view" />-->
<field name="arch" type="xml">
<form string="Report Options" version="7.0">
<form string="Report Options">
<separator string="Aged Partner Balance"/>
<label string="Aged Partner Balance is a more detailed report of your receivables by intervals. When opening that report, OpenERP asks for the name of the company, the fiscal period and the size of the interval to be analyzed (in days). OpenERP then calculates a table of credit balance by period. So if you request an interval of 30 days OpenERP generates an analysis of creditors for the past month, past two months, and so on. "/>
<group col="4">

View File

@ -6,7 +6,7 @@
<field name="name">Common Report</field>
<field name="model">account.common.report</field>
<field name="arch" type="xml">
<form string="Report Options" version="7.0">
<form string="Report Options">
<label string=""/> <!-- binding for inherited views -->
<group col="4">
<field name="chart_account_id" widget='selection' on_change="onchange_chart_id(chart_account_id, context)"/>

View File

@ -6,7 +6,7 @@
<field name="name">Account State Open</field>
<field name="model">account.state.open</field>
<field name="arch" type="xml">
<form string="Open Invoice" version="7.0">
<form string="Open Invoice">
<label string="Are you sure you want to open this invoice ?"/>
<newline/>
<label string="(Invoice should be unreconciled if you want to open it)"/>

View File

@ -5,7 +5,7 @@
<field name="name">account.statement.from.invoice.lines.form</field>
<field name="model">account.statement.from.invoice.lines</field>
<field name="arch" type="xml">
<form string="Import Entries" version="7.0">
<form string="Import Entries">
<separator string="Payable and Receivables"/>
<field height="300" width="700" name="line_ids" domain="[('account_id.type','in',['receivable','payable']),('reconcile_id','=',False), ('reconcile_partial_id','=',False), ('state', '=', 'valid')]"/>
<footer>

View File

@ -6,7 +6,7 @@
<field name="name">account.subscription.generate.form</field>
<field name="model">account.subscription.generate</field>
<field name="arch" type="xml">
<form string="Subscription Compute" version="7.0">
<form string="Subscription Compute">
<group>
<field name="date"/>
</group>

View File

@ -6,7 +6,7 @@
<field name="name">account.tax.chart.form</field>
<field name="model">account.tax.chart</field>
<field name="arch" type="xml">
<form string="Account tax charts" version="7.0">
<form string="Account tax charts">
<group>
<label for="period_id"/>
<div>

View File

@ -6,7 +6,7 @@
<field name="name">Unreconcile Entries</field>
<field name="model">account.unreconcile</field>
<field name="arch" type="xml">
<form string="Unreconcile" version="7.0">
<form string="Unreconcile">
<separator string="Unreconcile Transactions"/>
<label string="If you unreconcile transactions, you must also verify all the actions that are linked to those transactions because they will not be disabled"/>
<footer>
@ -40,7 +40,7 @@
<field name="name">Unreconcile Entries</field>
<field name="model">account.unreconcile.reconcile</field>
<field name="arch" type="xml">
<form string="Unreconciliation" version="7.0">
<form string="Unreconciliation">
<header>
<button icon="gtk-ok" string="Unreconcile" name="trans_unrec_reconcile" type="object" default_focus="1" class="oe_highlight" />
</header>

View File

@ -6,7 +6,7 @@
<field name="name">account.use.model.form</field>
<field name="model">account.use.model</field>
<field name="arch" type="xml">
<form string="Create Entries From Models" version="7.0">
<form string="Create Entries From Models">
<group>
<field name="model"/>
</group>
@ -23,7 +23,7 @@
<field name="name">account.use.model.create.entry.form</field>
<field name="model">account.use.model</field>
<field name="arch" type="xml">
<form string="Use Model" version="7.0">
<form string="Use Model">
<label string = "Are you sure you want to create entries?"/>
<footer>
<button string="Ok" name="create_entries" type="object" default_focus='1' class="oe_highlight"/>

View File

@ -7,7 +7,7 @@
<field name="name">Post Journal Entries</field>
<field name="model">validate.account.move</field>
<field name="arch" type="xml">
<form string="Post Journal Entries" version="7.0">
<form string="Post Journal Entries">
<group>
<field name="journal_ids"/>
<field name="period_ids"/>
@ -43,7 +43,7 @@
<field name="name">Post Journal Entries</field>
<field name="model">validate.account.move.lines</field>
<field name="arch" type="xml">
<form string="Post Journal Entries" version="7.0">
<form string="Post Journal Entries">
<separator string="Post Journal Entries"/>
<label string="All selected journal entries will be validated and posted. It means you won't be able to modify their accounting fields anymore."/>
<footer>

View File

@ -6,7 +6,7 @@
<field name="name">Account Tax Declaration</field>
<field name="model">account.vat.declaration</field>
<field name="arch" type="xml">
<form string="Taxes Report" version="7.0">
<form string="Taxes Report">
<label colspan="4" string="This menu prints a tax declaration based on invoices or payments. Select one or several periods of the fiscal year. The information required for a tax declaration is automatically generated by OpenERP from invoices (or payments, in some countries). This data is updated in real time. Thats very useful because it enables you to preview at any time the tax that you owe at the start and end of the month or quarter."/>
<group string="Taxes Report" col="4">
<field name="chart_tax_id" widget='selection'/>

View File

@ -5,7 +5,7 @@
<field name="name">cash_box_in</field>
<field name="model">cash.box.in</field>
<field name="arch" type="xml">
<form string="Put Money In" version="7.0">
<form string="Put Money In">
<separator string="Fill in this form if you put money in the cash register:" colspan="4" />
<group>
<field name="name" class="oe_inline"/>
@ -33,7 +33,7 @@
<field name="name">cash_box_out</field>
<field name="model">cash.box.out</field>
<field name="arch" type="xml">
<form string="Take Money Out" version="7.0">
<form string="Take Money Out">
<separator string="Describe why you take money from the cash register:"/>
<group>
<field name="name" class="oe_inline"/>

View File

@ -77,7 +77,7 @@ class account_analytic_invoice_line(osv.osv):
price = price_unit
elif pricelist_id:
price = res.price
else:
if price is False:
price = res.list_price
if not name:
name = self.pool.get('product.product').name_get(cr, uid, [res.id], context=local_context)[0][1]

View File

@ -23,7 +23,7 @@
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field eval="40" name="priority"/>
<field name="arch" type="xml">
<xpath expr='//div[@name="duration"]' position="after" version="7.0">
<xpath expr='//div[@name="duration"]' position="after">
<label for="quantity_max"/>
<div>
<field name="quantity_max"/>
@ -139,7 +139,8 @@
<group>
<field name="pricelist_id"
class="oe_inline"
attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
attrs="{'required': [('invoice_on_timesheets', '=', True)]}"
domain="[('type', '=', 'sale')]"/>
<field name="to_invoice"
class="oe_inline"
widget="selection"
@ -235,7 +236,7 @@
<filter string="Customer Contracts" help="Contracts assigned to a customer." name="has_partner" domain="[('partner_id', '!=', False)]"/>
<filter string="Contracts not assigned" help="Contracts that are not assigned to an account manager." domain="[('manager_id', '=', False)]"/>
<separator/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Status" domain="[]" context="{'group_by':'state'}"/>
<filter string="Account Manager" domain="[]" context="{'group_by':'manager_id'}"/>
<filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>

View File

@ -39,7 +39,7 @@ class account_analytic_default(osv.osv):
'date_stop': fields.date('End Date', help="Default end date for this Analytic Account."),
}
def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, context=None):
def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, company_id=None, context=None):
domain = []
if product_id:
domain += ['|', ('product_id', '=', product_id)]
@ -47,6 +47,9 @@ class account_analytic_default(osv.osv):
if partner_id:
domain += ['|', ('partner_id', '=', partner_id)]
domain += [('partner_id', '=', False)]
if company_id:
domain += ['|', ('company_id', '=', company_id)]
domain += [('company_id', '=', False)]
if user_id:
domain += ['|',('user_id', '=', user_id)]
domain += [('user_id','=', False)]
@ -59,6 +62,7 @@ class account_analytic_default(osv.osv):
index = 0
if rec.product_id: index += 1
if rec.partner_id: index += 1
if rec.company_id: index += 1
if rec.user_id: index += 1
if rec.date_start: index += 1
if rec.date_stop: index += 1
@ -74,7 +78,7 @@ class account_invoice_line(osv.osv):
def product_id_change(self, cr, uid, ids, product, uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom_id, qty, name, type, partner_id, fposition_id, price_unit, currency_id=currency_id, context=context, company_id=company_id)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), company_id=company_id, context=context)
if rec:
res_prod['value'].update({'account_analytic_id': rec.analytic_id.id})
else:
@ -88,7 +92,7 @@ class stock_picking(osv.osv):
def _get_account_analytic_invoice(self, cursor, user, picking, move_line):
partner_id = picking.partner_id and picking.partner_id.id or False
rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id , user, time.strftime('%Y-%m-%d'), context={})
rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id, user, time.strftime('%Y-%m-%d'))
if rec:
return rec.analytic_id.id

View File

@ -22,7 +22,7 @@
<field name="name">account.analytic.default.form</field>
<field name="model">account.analytic.default</field>
<field name="arch" type="xml">
<form string="Analytic Defaults" version="7.0">
<form string="Analytic Defaults">
<group col="4">
<field name="analytic_id" required="1" groups="analytic.group_analytic_accounting"/>
<field name="sequence"/>
@ -49,7 +49,7 @@
<field name="partner_id"/>
<field name="user_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="User" icon="terp-personal" context="{'group_by':'user_id'}" help="User"/>
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}" help="Partner"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}" help="Product" />

View File

@ -81,7 +81,7 @@ class account_analytic_plan_line(osv.osv):
_order = "sequence, id"
_columns = {
'plan_id': fields.many2one('account.analytic.plan','Analytic Plan',required=True),
'name': fields.char('Plan Name', size=64, required=True, select=True),
'name': fields.char('Axis Name', size=64, required=True, select=True),
'sequence': fields.integer('Sequence'),
'root_analytic_id': fields.many2one('account.analytic.account', 'Root Account', help="Root account of this plan.", required=False),
'min_required': fields.float('Minimum Allowed (%)'),

View File

@ -70,7 +70,7 @@
<field name="name">account.analytic.plan.instance.form</field>
<field name="model">account.analytic.plan.instance</field>
<field name="arch" type="xml">
<form string="Analytic Distribution" version="7.0">
<form string="Analytic Distribution">
<group col="4">
<field name="name"/>
<field name="code"/>
@ -82,7 +82,7 @@
<field name="rate"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
</tree>
<form string="Analytic Distribution" version="7.0">
<form string="Analytic Distribution">
<field name="rate"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
</form>
@ -124,7 +124,7 @@
<field name="name">account.analytic.plan.instance.line.form</field>
<field name="model">account.analytic.plan.instance.line</field>
<field name="arch" type="xml">
<form string="Analytic Distribution Line" version="7.0">
<form string="Analytic Distribution Line">
<group col="4">
<field name="plan_id"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
@ -160,7 +160,7 @@
<field name="name">account.analytic.plan.form</field>
<field name="model">account.analytic.plan</field>
<field name="arch" type="xml">
<form string="Analytic Plan" version="7.0">
<form string="Analytic Plan">
<group col="4">
<field name="name"/>
<field name="default_instance_id"/>
@ -204,7 +204,7 @@
<field name="name">account.analytic.plan.line.form</field>
<field name="model">account.analytic.plan.line</field>
<field name="arch" type="xml">
<form string="Analytic Plan Line" version="7.0">
<form string="Analytic Plan Line">
<group col="4">
<field name="name"/>
<field name="sequence"/>

View File

@ -6,7 +6,7 @@
<field name="name">account.crossovered.analytic.form</field>
<field name="model">account.crossovered.analytic</field>
<field name="arch" type="xml">
<form string="Crossovered Analytic" version="7.0">
<form string="Crossovered Analytic">
<group col="4">
<field name="date1"/>
<field name="date2"/>

View File

@ -5,7 +5,7 @@
<field name="name">analytic.plan.create.model.msg.form</field>
<field name="model">analytic.plan.create.model</field>
<field name="arch" type="xml">
<form string="Distribution Model Saved" version="7.0">
<form string="Distribution Model Saved">
<label string="Save This Distribution as a Model"/>
<footer>
<button string="Ok" type="object" name="activate" default_focus="1" class="oe_highlight"/>
@ -20,7 +20,7 @@
<field name="name">analytic.plan.create.model.form</field>
<field name="model">analytic.plan.create.model</field>
<field name="arch" type="xml">
<form string="Distribution Model Saved" version="7.0">
<form string="Distribution Model Saved">
<label string="This distribution model has been saved.You will be able to reuse it later."/>
</form>
</field>

View File

@ -9,7 +9,7 @@
<field name="name">account.asset.category.form</field>
<field name="model">account.asset.category</field>
<field name="arch" type="xml">
<form string="Asset category" version="7.0">
<form string="Asset category">
<group>
<group>
<field name="name"/>
@ -75,7 +75,7 @@
<field name="name">account.asset.asset.form</field>
<field name="model">account.asset.asset</field>
<field name="arch" type="xml">
<form string="Asset" version="7.0">
<form string="Asset">
<header>
<button name="validate" states="draft" string="Confirm Asset" type="object" class="oe_highlight"/>
<button name="set_to_close" states="open" string="Set to Close" type="object" class="oe_highlight"/>
@ -238,7 +238,7 @@
<field name="name">account.asset.history.form</field>
<field name="model">account.asset.history</field>
<field name="arch" type="xml">
<form string="Asset History" version="7.0">
<form string="Asset History">
<group>
<group>
<field name="name"/>

View File

@ -33,7 +33,7 @@
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group expand="1" string="Group By...">
<group expand="1" string="Group By">
<filter string="Asset" name="asset" context="{'group_by':'asset_id'}"/>
<filter string="Asset Category" name="asset_category" icon="terp-stock_symbol-selection" context="{'group_by':'asset_category_id'}"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>

View File

@ -6,7 +6,7 @@
<field name="name">wizard.asset.modify.form</field>
<field name="model">asset.modify</field>
<field name="arch" type="xml">
<form string="Modify Asset" version="7.0">
<form string="Modify Asset">
<group string="Asset Durations to Modify" col="4">
<group colspan="2" col="2">
<field name="name"/>

View File

@ -5,7 +5,7 @@
<field name="name">asset.depreciation.confirmation.wizard</field>
<field name="model">asset.depreciation.confirmation.wizard</field>
<field name="arch" type="xml">
<form string="Compute Asset" version="7.0">
<form string="Compute Asset">
<group>
<field name="period_id"/>
</group>

View File

@ -8,7 +8,7 @@
<field name="name">statement.line.global.form</field>
<field name="model">account.bank.statement.line.global</field>
<field name="arch" type="xml">
<form string="Batch Payment Info" version="7.0">
<form string="Batch Payment Info">
<group col="4">
<field name="name"/>
<field name="amount"/>
@ -78,7 +78,7 @@
<field name="name">bank.statement.line.form</field>
<field name="model">account.bank.statement.line</field>
<field name="arch" type="xml">
<form string="Statement Line" version="7.0">
<form string="Statement Line">
<group col="4">
<field name="statement_id"/>
<field name="journal_id"/>
@ -119,7 +119,7 @@
<field name="globalisation_amount" string="Glob. Amount"/>
<field name="note"/>
</group>
<group string="Group By..." expand="1">
<group string="Group By" expand="1">
<filter string="Journal" context="{'group_by':'journal_id'}" icon="terp-folder-green"/>
<filter string="Statement" context="{'group_by':'statement_id'}" icon="terp-folder-orange"/>
</group>

View File

@ -8,7 +8,7 @@
<field name="name">cancel.statement.line.form</field>
<field name="model">cancel.statement.line</field>
<field name="arch" type="xml">
<form string="Cancel selected statement lines" version="7.0">
<form string="Cancel selected statement lines">
<header>
<button icon="gtk-execute" string="Cancel Lines" name="cancel_lines" type="object"/>
</header>

View File

@ -8,7 +8,7 @@
<field name="name">confirm.statement.line.form</field>
<field name="model">confirm.statement.line</field>
<field name="arch" type="xml">
<form string="Confirm selected statement lines" version="7.0">
<form string="Confirm selected statement lines">
<header>
<button string="Confirm Lines" name="confirm_lines" type="object" class="oe_highlight"/>
or

View File

@ -46,7 +46,7 @@
<field name="name">account.budget.post.form.inherit</field>
<field name="model">account.budget.post</field>
<field name="arch" type="xml">
<form string="Budgetary Position" version="7.0">
<form string="Budgetary Position">
<group col="4">
<field name="name"/>
<field name="code"/>
@ -69,7 +69,7 @@
<field name="theoritical_amount" sum="Theoretical Amount"/>
<field name="percentage"/>
</tree>
<form string="Budget Lines" version="7.0">
<form string="Budget Lines">
<group col="4">
<field name="crossovered_budget_id"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
@ -93,7 +93,7 @@
<field name="name">crossovered.budget.view.form</field>
<field name="model">crossovered.budget</field>
<field name="arch" type="xml">
<form string="Budget" version="7.0">
<form string="Budget">
<header>
<button string="Confirm" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
<button string="Approve" name="validate" states="confirm" type="workflow" class="oe_highlight"/>
@ -138,7 +138,7 @@
<field name="theoritical_amount" sum="Theoretical Amount"/>
<field name="percentage"/>
</tree>
<form string="Budget Lines" version="7.0">
<form string="Budget Lines">
<group>
<group>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
@ -255,7 +255,7 @@
<field name="name">crossovered.budget.line.form</field>
<field name="model">crossovered.budget.lines</field>
<field name="arch" type="xml">
<form string="Budget Lines" version="7.0">
<form string="Budget Lines">
<sheet>
<group col="4">
<field name="crossovered_budget_id"/>

View File

@ -6,7 +6,7 @@
<field name="name">account.budget.analytic.form</field>
<field name="model">account.budget.analytic</field>
<field name="arch" type="xml">
<form string="Select Dates Period" version="7.0">
<form string="Select Dates Period">
<group string="This wizard is used to print budget" col="4">
<field name="date_from"/>
<field name="date_to"/>

View File

@ -6,7 +6,7 @@
<field name="name">account.budget.crossvered.report.form</field>
<field name="model">account.budget.crossvered.report</field>
<field name="arch" type="xml">
<form string="Select Dates Period" version="7.0">
<form string="Select Dates Period">
<group string="This wizard is used to print budget" col="4">
<field name="date_from"/>
<field name="date_to"/>

View File

@ -6,7 +6,7 @@
<field name="name">account.budget.crossvered.summary.report.form</field>
<field name="model">account.budget.crossvered.summary.report</field>
<field name="arch" type="xml">
<form string="Select Dates Period" version="7.0">
<form string="Select Dates Period">
<group string="This wizard is used to print summary of budgets">
<field name="date_from"/>
<field name="date_to"/>

View File

@ -6,7 +6,7 @@
<field name="name">account.budget.report.form</field>
<field name="model">account.budget.report</field>
<field name="arch" type="xml">
<form string="Select Dates Period" version="7.0">
<form string="Select Dates Period">
<group string="Print Budgets" col="4">
<field name="date_from"/>
<field name="date_to"/>

View File

@ -6,7 +6,7 @@
<field name="name">account.check.form</field>
<field name="model">account.check.write</field>
<field name="arch" type="xml">
<form string="Check" version="7.0">
<form string="Check">
<group col="4">
<field name="check_number"/>
</group>

View File

@ -51,7 +51,7 @@
<filter string="My Follow-ups" domain="[('payment_responsible_id','=', uid)]" name="my"/>
</group>
</search>
<group string="Group By..." position="inside">
<group string="Group By" position="inside">
<filter string="Follow-up Responsible" context="{'group_by':'payment_responsible_id'}"/>
<filter string="Followup Level" context="{'group_by':'latest_followup_level_id'}"/>
</group>
@ -78,7 +78,7 @@
<field name="model">res.partner</field>
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="arch" type="xml" >
<page string="Accounting" position="before" version="7.0">
<page string="Accounting" position="before">
<page string="Payment Follow-up" groups="account.group_account_invoice" name="followup_tab">
<div class="oe_right oe_button_box" name="followup_button">
<button name="do_button_print" type="object" string="Print Overdue Payments" groups="account.group_account_user"

View File

@ -19,7 +19,7 @@
<field name="name">account_followup.followup.line.form</field>
<field name="model">account_followup.followup.line</field>
<field name="arch" type="xml">
<form string="Follow-up Steps" version="7.0">
<form string="Follow-up Steps">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<div class="oe_inline">
@ -70,7 +70,7 @@
<field name="name">account_followup.followup.form</field>
<field name="model">account_followup.followup</field>
<field name="arch" type="xml">
<form string="Follow-up" version="7.0">
<form string="Follow-up">
<h1><field name="name"/></h1>
<label for="company_id" groups="base.group_multi_company"/>
<field name="company_id" widget="selection" class="oe_inline" groups="base.group_multi_company"/>

View File

@ -26,7 +26,7 @@
help = "Including journal entries marked as a litigation"/>
<field name="partner_id"/>
<field name="balance"/>
<group expand="1" string="Group By...">
<group expand="1" string="Group By">
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}" />
<filter string="Litigation" icon="terp-camera_test" context="{'group_by':'blocked'}" />
<filter string="Follow-up Level" icon="terp-stock_effects-object-colorize" name="followup_level" context="{'group_by':'followup_id'}" />

View File

@ -6,7 +6,7 @@
<field name="name">account.followup.print.form</field>
<field name="model">account_followup.print</field>
<field name="arch" type="xml">
<form string="Send follow-ups" version="7.0">
<form string="Send follow-ups">
<group col="4">
<field name="followup_id" groups="base.group_multi_company"/>
<field name="date" groups="base.group_no_one"/>
@ -72,7 +72,7 @@
<field name="name">account_followup.sending.results.form</field>
<field name="model">account_followup.sending.results</field>
<field name="arch" type="xml">
<form string="Summary of actions" version="7.0">
<form string="Summary of actions">
<header>
<field name="description" widget="html" class="oe_view_only"/>
</header>

View File

@ -12,7 +12,7 @@
<field name="name" string="Payment Mode"/>
<field name="journal"/>
<field name="company_id" groups="base.group_multi_company"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal'}"/>
</group>
</search>
@ -35,7 +35,7 @@
<field name="name">payment.mode.form</field>
<field name="model">payment.mode</field>
<field name="arch" type="xml">
<form string="Payment Mode" version="7.0">
<form string="Payment Mode">
<group col="4">
<field name="name"/>
<field name="journal"/>
@ -60,7 +60,7 @@
<field name="name">payment.order.form</field>
<field name="model">payment.order</field>
<field name="arch" type="xml">
<form string="Payment Order" version="7.0">
<form string="Payment Order">
<header>
<button name="open" states="draft" string="Confirm Payments" class="oe_highlight"/>
<button name="set_done" states="open" string="Make Payments" type="object" class="oe_highlight"/>
@ -89,7 +89,7 @@
</group>
</group>
<field name="line_ids" context="{'order_id': active_id or False}" >
<form string="Payment Line" version="7.0">
<form string="Payment Line">
<notebook>
<page string="Payment">
<group col="4">
@ -177,7 +177,7 @@
<filter string="Done" domain="[('state','=','done')]" icon="terp-dialog-close"/>
<field name="mode"/>
<field name="state"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Payment Mode" context="{'group_by': 'mode'}" icon="terp-dolar"/>
<filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
</group>
@ -214,7 +214,7 @@
<field name="name">Payment Line</field>
<field name="model">payment.line</field>
<field name="arch" type="xml">
<form string="Payment Line" version="7.0">
<form string="Payment Line">
<notebook>
<page string="Payment">
<group col="4">

View File

@ -6,7 +6,7 @@
<field name="name">payment.order.create.form</field>
<field name="model">payment.order.create</field>
<field name="arch" type="xml">
<form string="Search Payment lines" version="7.0">
<form string="Search Payment lines">
<group>
<field name="duedate" />
</group>
@ -23,7 +23,7 @@
<field name="name">payment.order.create.form</field>
<field name="model">payment.order.create</field>
<field name="arch" type="xml">
<form string="Search Payment lines" version="7.0">
<form string="Search Payment lines">
<group string="Entries">
<field name="entries"/>
</group>

View File

@ -6,7 +6,7 @@
<field name="name">account.payment.make.payment.form</field>
<field name="model">account.payment.make.payment</field>
<field name="arch" type="xml">
<form string="Make Payment" version="7.0">
<form string="Make Payment">
<separator string="Are you sure you want to make payment?"/>
<footer>
<button name="launch_wizard" string="Yes" type="object" default_focus="1" class="oe_highlight"/>

View File

@ -6,7 +6,7 @@
<field name="name">Payment Populate statement</field>
<field name="model">account.payment.populate.statement</field>
<field name="arch" type="xml">
<form string="Populate Statement:" version="7.0">
<form string="Populate Statement:">
<group>
<field name="lines" nolabel="1"/>
</group>

View File

@ -18,7 +18,7 @@
<field name="name">Tests</field>
<field name="model">accounting.assert.test</field>
<field name="arch" type="xml">
<form string="Tests" version="7.0">
<form string="Tests">
<sheet>
<group>
<group>

View File

@ -23,7 +23,7 @@
<field name="name">account.voucher.line.form</field>
<field name="model">account.voucher.line</field>
<field name="arch" type="xml">
<form string="Voucher Lines" version="7.0">
<form string="Voucher Lines">
<group col="4">
<field name="name"/>
<field name="account_id"/>
@ -40,7 +40,7 @@
<field name="name">account.voucher.form</field>
<field name="model">account.voucher</field>
<field name="arch" type="xml">
<form string="Accounting Voucher" version="7.0">
<form string="Accounting Voucher">
<header>
<button name="proforma_voucher" string="Post" states="draft" class="oe_highlight"/>
<button name="cancel_voucher" string="Cancel Voucher" type="object" states="posted" confirm="Are you sure you want to unreconcile this record?"/>
@ -132,7 +132,7 @@
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" /> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
<field name="period_id"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>

View File

@ -57,7 +57,7 @@
<field name="pay_now"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group expand="1" string="Group By...">
<group expand="1" string="Group By">
<filter string="Partner" name="partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>
<filter string="Salesperson" name='user' icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>

View File

@ -14,7 +14,7 @@
<field name="partner_id" string="Customer" filter_domain="[('partner_id','child_of',self)]"/>
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('bank','cash'))]"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
<field name="period_id"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
@ -37,7 +37,7 @@
<field name="partner_id" string="Supplier" filter_domain="[('partner_id','child_of',self)]"/>
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('bank','cash'))]"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
<field name="period_id"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Supplier" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
@ -54,7 +54,7 @@
<field name="model">account.voucher</field>
<field name="priority">1</field>
<field name="arch" type="xml">
<form string="Bill Payment" version="7.0">
<form string="Bill Payment">
<group col="6">
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Supplier" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1, 'invoice_currency': currency_id}"/>
<field name="state" invisible="1"/>
@ -127,7 +127,7 @@
<field name="name">account.voucher.payment.form</field>
<field name="model">account.voucher</field>
<field name="arch" type="xml">
<form string="Voucher Payment" version="7.0">
<form string="Voucher Payment">
<header>
<button name="proforma_voucher" string="Validate" states="draft" invisible="context.get('line_type', False)" class="oe_highlight"/>
<button name="cancel_voucher" string="Cancel Voucher" states="draft,proforma" invisible="context.get('line_type', False)"/>
@ -296,7 +296,7 @@
<field name="model">account.voucher</field>
<field name="priority">30</field>
<field name="arch" type="xml">
<form string="Payment" version="7.0">
<form string="Payment">
<group>
<group>
<field name="state" invisible="1"/>
@ -334,7 +334,7 @@
<field name="writeoff_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
<field name="payment_option" required="1" attrs="{'invisible':[('writeoff_amount','=',0)]}"/>
<field name="writeoff_acc_id"
attrs="{'invisible':['|', ('payment_option','!=','with_writeoff'), ('writeoff_amount','=',0)], 'required':[('payment_option','=','with_writeoff')]}"
attrs="{'invisible':['|', ('payment_option','!=','with_writeoff'), ('writeoff_amount','=',0)], 'required':[('payment_option','=','with_writeoff'), ('writeoff_amount','!=',0)]}"
domain="[('type','=','other')]"/>
<field name="comment"
attrs="{'invisible':['|', ('payment_option','!=','with_writeoff'), ('writeoff_amount','=',0)]}"/>
@ -407,7 +407,7 @@
<field name="name">account.voucher.receipt.form</field>
<field name="model">account.voucher</field>
<field name="arch" type="xml">
<form string="Receipt" version="7.0">
<form string="Receipt">
<header invisible="context.get('line_type', False)">
<button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
<button name="cancel_voucher" string="Cancel Receipt" states="draft,proforma"/>

View File

@ -13,7 +13,7 @@
<field name="partner_id" string="Supplier" filter_domain="[('partner_id','child_of',self)]"/>
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('purchase','purchase_refund'))]"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
<field name="period_id"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Supplier" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
@ -35,7 +35,7 @@
<field name="partner_id" string="Customer" filter_domain="[('partner_id','child_of',self)]"/>
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('sale','sale_refund'))]"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
<field name="period_id"/>
<group expand="0" string="Group By...">
<group expand="0" string="Group By">
<filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
@ -59,7 +59,7 @@
<field name="name">account.voucher.sale.form</field>
<field name="model">account.voucher</field>
<field name="arch" type="xml">
<form string="Sales Receipt" version="7.0">
<form string="Sales Receipt">
<header>
<button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
<button name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id':partner_id, 'reference':reference, 'amount':amount}" type="action" string="Validate Payment" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}" class="oe_highlight"/>
@ -208,7 +208,7 @@
<field name="name">account.voucher.purchase.form</field>
<field name="model">account.voucher</field>
<field name="arch" type="xml">
<form string="Purchase Voucher" version="7.0">
<form string="Purchase Voucher">
<header>
<button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
<button name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}" class="oe_highlight"/>

View File

@ -6,7 +6,7 @@
<field name="name">analytic.analytic.account.form</field>
<field name="model">account.analytic.account</field>
<field name="arch" type="xml">
<form string="Analytic Account" version="7.0">
<form string="Analytic Account">
<sheet string="Analytic Account">
<div class="oe_right oe_button_box" name="buttons">
</div>

View File

@ -8,7 +8,7 @@
<field name="name">ir.model.fields.anonymization.form</field>
<field name="model">ir.model.fields.anonymization</field>
<field name="arch" type="xml">
<form string="Anonymized Field" version="7.0">
<form string="Anonymized Field">
<sheet>
<group col="4">
<field name="model_id" on_change="onchange_model_id(model_id)" />
@ -53,7 +53,7 @@
<field name="name">ir.model.fields.anonymize.wizard.form</field>
<field name="model">ir.model.fields.anonymize.wizard</field>
<field name="arch" type="xml">
<form string="Database Anonymization" version="7.0">
<form string="Database Anonymization">
<header>
<button name="anonymize_database"
string="Anonymize Database"
@ -98,7 +98,7 @@
<field name="name">ir.model.fields.anonymization.history.form</field>
<field name="model">ir.model.fields.anonymization.history</field>
<field name="arch" type="xml">
<form string="Anonymization History" version="7.0">
<form string="Anonymization History">
<sheet>
<group col="4">
<field name="date"/>

View File

@ -6,7 +6,7 @@
<field name="name">ldap.installer.form</field>
<field name="model">res.company.ldap</field>
<field name="arch" type="xml">
<form string="LDAP Configuration" version="7.0">
<form string="LDAP Configuration">
<group>
<field name="company"/>
<newline/>

View File

@ -9,7 +9,7 @@
<xpath expr="//group[@name='account_grp']" position="after">
<group string="LDAP Parameters">
<field name="ldaps" nolabel="1" colspan="4">
<form string="LDAP Configuration" version="7.0">
<form string="LDAP Configuration">
<group col="4">
<field name="ldap_server"/>
<field name="ldap_server_port"/>

View File

@ -5,7 +5,7 @@
<field name="name">auth.oauth.provider.form</field>
<field name="model">auth.oauth.provider</field>
<field name="arch" type="xml">
<form string="arch" version="7.0">
<form string="arch">
<sheet>
<group>
<field name="name" />
@ -27,7 +27,7 @@
<field name="name">auth.oauth.provider.list</field>
<field name="model">auth.oauth.provider</field>
<field name="arch" type="xml">
<tree string="arch" version="7.0">
<tree string="arch">
<field name="name" />
<field name="client_id" />
<field name="enabled" />

View File

@ -7,7 +7,7 @@
<field name="model">signup.signup</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Signup" version="7.0">
<form string="Signup">
<field name="state" invisible="1"/>
<group colspan="4" states="draft,missmatch">
<field name="name" required="1"/>

View File

@ -214,6 +214,7 @@ class base_action_rule(osv.osv):
""" Wrap the methods `create` and `write` of the models specified by
the rules given by `ids` (or all existing rules if `ids` is `None`.)
"""
updated = False
if ids is None:
ids = self.search(cr, SUPERUSER_ID, [])
for action_rule in self.browse(cr, SUPERUSER_ID, ids):
@ -223,20 +224,21 @@ class base_action_rule(osv.osv):
model_obj.create = self._wrap_create(model_obj.create, model)
model_obj.write = self._wrap_write(model_obj.write, model)
model_obj.base_action_ruled = True
return True
updated = True
return updated
def create(self, cr, uid, vals, context=None):
res_id = super(base_action_rule, self).create(cr, uid, vals, context=context)
self._register_hook(cr, [res_id])
openerp.modules.registry.RegistryManager.signal_registry_change(cr.dbname)
if self._register_hook(cr, [res_id]):
openerp.modules.registry.RegistryManager.signal_registry_change(cr.dbname)
return res_id
def write(self, cr, uid, ids, vals, context=None):
if isinstance(ids, (int, long)):
ids = [ids]
super(base_action_rule, self).write(cr, uid, ids, vals, context=context)
self._register_hook(cr, ids)
openerp.modules.registry.RegistryManager.signal_registry_change(cr.dbname)
if self._register_hook(cr, ids):
openerp.modules.registry.RegistryManager.signal_registry_change(cr.dbname)
return True
def onchange_model_id(self, cr, uid, ids, model_id, context=None):
@ -266,7 +268,10 @@ class base_action_rule(osv.osv):
action_ids = self.search(cr, uid, action_dom, context=context)
for action in self.browse(cr, uid, action_ids, context=context):
now = datetime.now()
last_run = get_datetime(action.last_run) if action.last_run else False
if action.last_run:
last_run = get_datetime(action.last_run)
else:
last_run = datetime.utcfromtimestamp(0)
# retrieve all the records that satisfy the action's condition
model = self.pool[action.model_id.model]
@ -297,11 +302,16 @@ class base_action_rule(osv.osv):
if not record_dt:
continue
action_dt = self._check_delay(cr, uid, action, record, record_dt, context=context)
if last_run and (last_run <= action_dt < now) or (action_dt < now):
if last_run <= action_dt < now:
try:
context = dict(context or {}, action=True)
self._process(cr, uid, action, [record.id], context=context)
except Exception:
import traceback
_logger.error(traceback.format_exc())
action.write({'last_run': now.strftime(DEFAULT_SERVER_DATETIME_FORMAT)})
if automatic:
# auto-commit for batch processing
cr.commit()

View File

@ -10,7 +10,7 @@
<field eval="False" name="doall"/>
<field eval="'base.action.rule'" name="model"/>
<field eval="'_check'" name="function"/>
<field eval="'()'" name="args"/>
<field eval="'(True,)'" name="args"/>
</record>
</data>

View File

@ -9,7 +9,7 @@
<field name="name">base.action.rule.form</field>
<field name="model">base.action.rule</field>
<field name="arch" type="xml">
<form string="Action Rule" version="7.0">
<form string="Action Rule">
<sheet>
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>

View File

@ -5,7 +5,7 @@
<field name="name">base.gengo.translation.form</field>
<field name="model">base.gengo.translations</field>
<field name="arch" type="xml">
<form string="Gengo Request Form" version="7.0">
<form string="Gengo Request Form">
<group>
<field name="lang_id"/>
</group>

View File

@ -34,6 +34,7 @@ class ImportModule(Controller):
@route('/base_import_module/upload', type='http', auth='user', methods=['POST'])
@webservice
def upload(self, mod_file=None, **kw):
def upload(self, mod_file=None, force='', **kw):
self.check_user()
return request.registry['ir.module.module'].import_zipfile(request.cr, request.uid, mod_file, context=request.context)[0]
force = True if force == '1' else False
return request.registry['ir.module.module'].import_zipfile(request.cr, request.uid, mod_file, force=force, context=request.context)[0]

View File

@ -12,10 +12,12 @@ class base_import_module(osv.TransientModel):
'module_file': fields.binary('Module .ZIP file', required=True),
'state':fields.selection([('init','init'),('done','done')], 'Status', readonly=True),
'import_message': fields.char('Import message'),
'force': fields.boolean('Force init', help="Force init mode even if installed. (will update `noupdate='1'` records)"),
}
_defaults = {
_defaults = {
'state': 'init',
'force': False,
}
def import_module(self, cr, uid, ids, context=None):
@ -24,7 +26,7 @@ class base_import_module(osv.TransientModel):
zip_data = base64.decodestring(data.module_file)
fp = BytesIO()
fp.write(zip_data)
res = module_obj.import_zipfile(cr, uid, fp, context=context)
res = module_obj.import_zipfile(cr, uid, fp, force=data.force, context=context)
self.write(cr, uid, ids, {'state': 'done', 'import_message': res[0]}, context=context)
context = dict(context, module_name=res[1])
# Return wizard otherwise it will close wizard and will not show result message to user.

View File

@ -16,7 +16,7 @@ MAX_FILE_SIZE = 100 * 1024 * 1024 # in megabytes
class view(osv.osv):
_inherit = "ir.module.module"
def import_module(self, cr, uid, module, path, context=None):
def import_module(self, cr, uid, module, path, force=False, context=None):
known_mods = self.browse(cr, uid, self.search(cr, uid, []))
known_mods_names = dict([(m.name, m) for m in known_mods])
@ -30,7 +30,7 @@ class view(osv.osv):
if mod:
self.write(cr, uid, mod.id, values)
mode = 'update'
mode = 'update' if not force else 'init'
else:
assert terp.get('installable', True), "Module not installable"
self.create(cr, uid, dict(name=module, state='uninstalled', **values))
@ -73,7 +73,7 @@ class view(osv.osv):
return True
def import_zipfile(self, cr, uid, module_file, context=None):
def import_zipfile(self, cr, uid, module_file, force=False, context=None):
if not module_file:
raise Exception("No file sent.")
if not zipfile.is_zipfile(module_file):
@ -95,7 +95,7 @@ class view(osv.osv):
try:
# assert mod_name.startswith('theme_')
path = opj(module_dir, mod_name)
self.import_module(cr, uid, mod_name, path, context=context)
self.import_module(cr, uid, mod_name, path, force=force, context=context)
success.append(mod_name)
except Exception, e:
errors[mod_name] = str(e)

View File

@ -6,12 +6,14 @@
<field name="name">Import Module</field>
<field name="model">base.import.module</field>
<field name="arch" type="xml">
<form string="Import module" version="7.0">
<form string="Import module">
<field name="state" invisible="1"/>
<separator string="Import Module" colspan="4"/>
<group states="init" col="4">
<label string="Select module package to import (.zip file):" colspan="4"/>
<field name="module_file" colspan="4"/>
<field name="force"/>
</group>
<group states="done" col="4">
<field name="import_message" colspan="4" nolabel="1" readonly="1"/>

View File

@ -7,7 +7,7 @@
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes" version="7.0">
<form position="attributes">
<attribute name="string">OpenERP Report Designer Configuration</attribute>
</form>
<separator string="title" position="before">

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