[MERGE] merged with trunk

bzr revid: hmo@tinyerp.com-20120719052044-qg0skb7tkiut2ipc
This commit is contained in:
Harry (OpenERP) 2012-07-19 10:50:44 +05:30
commit d5bb4896e7
49 changed files with 1875 additions and 431 deletions

View File

@ -3351,15 +3351,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
# Create Bank journals # Create Bank journals
self._create_bank_journals_from_o2m(cr, uid, obj_wizard, company_id, acc_template_ref, context=context) self._create_bank_journals_from_o2m(cr, uid, obj_wizard, company_id, acc_template_ref, context=context)
action = { return {}
'type': 'ir.actions.act_window',
'view_type': 'form',
'view_mode': 'form',
'res_model': 'board.board',
'view_id': self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'board_account_form')[1],
'menu_id': self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'menu_finance')[1]
}
return action
def _prepare_bank_journal(self, cr, uid, line, current_num, default_account_id, company_id, context=None): def _prepare_bank_journal(self, cr, uid, line, current_num, default_account_id, company_id, context=None):
''' '''

View File

@ -132,18 +132,18 @@ class account_cash_statement(osv.osv):
for obj in self.browse(cr, uid, ids, context=context): for obj in self.browse(cr, uid, ids, context=context):
if obj.state == 'draft': if obj.state == 'draft':
self.search(cr, uid, statement_ids = self.search(cr, uid,
[('journal_id', '=', journal_id),('state', '=', 'confirm')], [('journal_id', '=', obj.journal_id.id),('state', '=', 'confirm')],
order='create_date desc', order='create_date desc',
limit=1, limit=1,
context=context context=context
) )
if not statement_ids: if not statement_ids:
return result continue
else:
st = self.browse(cr, uid, statement_ids[0], context=context) st = self.browse(cr, uid, statement_ids[0], context=context)
result[obj.id] = st.balance_end_real result[obj.id] = st.balance_end_real
return result return result

View File

@ -177,11 +177,11 @@
domain="[('supplier', '=', True)]"/> domain="[('supplier', '=', True)]"/>
<field name="fiscal_position" widget="selection"/> <field name="fiscal_position" widget="selection"/>
<field name="origin"/> <field name="origin"/>
<label for="reference_type"/> <label for="reference_type"/>
<div> <div>
<field name="reference_type" class="oe_inline oe_edit_only"/> <field name="reference_type" class="oe_inline oe_edit_only"/>
<field name="reference" class="oe_inline"/> <field name="reference" class="oe_inline"/>
</div> </div>
</group> </group>
<group> <group>
<field name="date_invoice"/> <field name="date_invoice"/>
@ -322,11 +322,9 @@
<field name="fiscal_position" widget="selection" /> <field name="fiscal_position" widget="selection" />
</group> </group>
<group> <group>
<field name="date_invoice"/> <field name="date_invoice"/>
<field name="journal_id" groups="account.group_account_user" <field name="journal_id" groups="account.group_account_user"
on_change="onchange_journal_id(journal_id, context)" widget="selection"/> on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
<field domain="[('company_id', '=', company_id),('type','=', 'receivable')]" <field domain="[('company_id', '=', company_id),('type','=', 'receivable')]"
name="account_id" groups="account.group_account_user"/> name="account_id" groups="account.group_account_user"/>
@ -342,7 +340,6 @@
</group> </group>
</group> </group>
<field name="sent" invisible="1"/> <field name="sent" invisible="1"/>
<notebook colspan="4"> <notebook colspan="4">
<page string="Invoice Lines"> <page string="Invoice Lines">
<field name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}"/> <field name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}"/>

View File

@ -17,7 +17,6 @@
<button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" class="oe_highlight"/> <button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" class="oe_highlight"/>
<field name="state" widget="statusbar" nolabel="1" /> <field name="state" widget="statusbar" nolabel="1" />
</header> </header>
<sheet string="Fiscalyear" >
<group> <group>
<group> <group>
<field name="name"/> <field name="name"/>
@ -38,10 +37,10 @@
<field name="date_start"/> <field name="date_start"/>
<field name="date_stop"/> <field name="date_stop"/>
<field name="special"/> <field name="special"/>
<field name="state" invisible="1"/>
</group> </group>
</form> </form>
</field> </field>
</sheet>
</form> </form>
</field> </field>
</record> </record>
@ -99,21 +98,28 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form version="7.0"> <form version="7.0">
<header> <header>
<button name="action_draft" states="done" string="Set to Draft" type="object" groups="account.group_account_manager"/> <button name="action_draft" states="done" string="Set to Draft" type="object" groups="account.group_account_manager"/>
<field name="state" widget="statusbar" nolabel="1"/> <field name="state" widget="statusbar" nolabel="1"/>
</header> </header>
<sheet> <sheet>
<group col="4"> <group>
<field name="name"/> <group>
<field name="code"/> <field name="name"/>
<field name="date_start"/> <field name="fiscalyear_id" widget="selection"/>
<field name="date_stop"/> <label for="date_start" string="Duration"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/> <div>
<field name="fiscalyear_id" widget="selection"/> <field name="date_start" class="oe_inline" nolabel="1"/> -
<field name="special"/> <field name="date_stop" nolabel="1" class="oe_inline"/>
</group> </div>
</sheet> </group>
<group>
<field name="code"/>
<field name="special"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
</group>
</sheet>
</form> </form>
</field> </field>
</record> </record>
@ -463,62 +469,59 @@
<div class="oe_title"> <div class="oe_title">
<label for="name" class="oe_edit_only"/> <label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1> <h1><field name="name"/></h1>
<label for="type" class="oe_edit_only"/>
<h2><field name="type" on_change="onchange_type(type, currency, context)"/></h2>
</div> </div>
<notebook> <group>
<page string="Journal Configuration">
<group> <group>
<group> <field name="code"/>
<field name="code"/> <field name="type" on_change="onchange_type(type, currency, context)"/>
<field name="currency"/>
</group>
<group>
<field name="company_id" groups="base.group_multi_company"/>
<field name="user_id"/>
</group>
<group>
<field name="default_debit_account_id" attrs="{'required':[('type','in', ('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="default_credit_account_id" attrs="{'required':[('type','in',('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="view_id" widget="selection"/>
<field name="sequence_id" required="0"/>
</group>
<group>
<field name="centralisation"/>
<field name="entry_posted"/>
<field name="with_last_closing_balance" />
<field name="allow_date"/>
<field name="group_invoice_lines"/>
</group>
<group>
<field name="type_control_ids" widget="many2many_tags"/>
<field name="account_control_ids" widget="many2many_tags"/>
</group>
</group> </group>
<group>
<field name="default_debit_account_id" attrs="{'required':[('type','in', ('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="default_credit_account_id" attrs="{'required':[('type','in',('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="currency"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</group>
<notebook>
<page string="Advanced Settings">
<group>
<group>
<field name="user_id"/>
<field name="view_id" widget="selection"/>
<field name="sequence_id" required="0"/>
</group>
<group>
<field name="centralisation"/>
<field name="entry_posted"/>
<field name="allow_date"/>
<field name="group_invoice_lines"/>
</group>
</group>
</page>
<page string="Entry Controls"> <page string="Entry Controls">
<separator colspan="4" string="Accounts Type Allowed (empty for no control)"/> <separator colspan="4" string="Accounts Type Allowed (empty for no control)"/>
<field colspan="4" name="type_control_ids" nolabel="1"/> <field colspan="4" name="type_control_ids" nolabel="1"/>
<separator colspan="4" string="Accounts Allowed (empty for no control)"/> <separator colspan="4" string="Accounts Allowed (empty for no control)"/>
<field colspan="4" name="account_control_ids" nolabel="1"/> <field colspan="4" name="account_control_ids" nolabel="1"/>
</page> </page>
<page string="Cash"> <page string="Cash Registers" attrs="{'invisible':[('type', '!=', 'cash')]}">
<group string="Profit &amp; Loss Accounts"> <group>
<field name="profit_account_id" /> <group string="Accounts">
<field name="loss_account_id" /> <field name="profit_account_id"/>
<field name="loss_account_id"/>
<field name="internal_account_id"/>
</group>
<group string="Miscellaneous">
<field name="with_last_closing_balance"/>
</group>
</group> </group>
<separator string="Available Coins" colspan="4" />
<group string="Internal Transfer Account">
<field name="internal_account_id" />
</group>
<separator string="Available Currencies" colspan="4" />
<field name="cashbox_line_ids" nolabel="1" string="Unit Of Currency Definition" colspan="4"> <field name="cashbox_line_ids" nolabel="1" string="Unit Of Currency Definition" colspan="4">
<tree string="CashBox Lines" editable="bottom"> <tree string="CashBox Lines" editable="bottom">
<field name="pieces" /> <field name="pieces" />
</tree> </tree>
</field> </field>
</page> </page>
</page>
</notebook> </notebook>
</form> </form>
</field> </field>
@ -618,6 +621,13 @@
<field name="state" widget="statusbar" statusbar_visible="draft,confirm"/> <field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
</header> </header>
<sheet> <sheet>
<div class="oe_right oe_button_box" name="import_buttons">
<!-- Put here related buttons -->
</div>
<label for="name" class="oe_edit_only" attrs="{'invisible':[('name','=','/')]}"/>
<h1>
<field name="name" attrs="{'invisible':[('name','=','/')]}"/>
</h1>
<group> <group>
<group> <group>
<field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" widget="selection"/> <field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" widget="selection"/>
@ -626,7 +636,6 @@
<field name="date" on_change="onchange_date(date, company_id)" class="oe_inline"/> <field name="date" on_change="onchange_date(date, company_id)" class="oe_inline"/>
<field name="period_id" class="oe_inline"/> <field name="period_id" class="oe_inline"/>
</div> </div>
<field name="name"/>
<field name='company_id' widget="selection" groups="base.group_multi_company" /> <field name='company_id' widget="selection" groups="base.group_multi_company" />
</group><group> </group><group>
<label for="balance_start"/> <label for="balance_start"/>
@ -1054,69 +1063,66 @@
<field eval="2" name="priority"/> <field eval="2" name="priority"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Journal Item" version="7.0"> <form string="Journal Item" version="7.0">
<group col="6"> <sheet>
<field name="name"/> <group>
<field name="ref"/> <group>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/> <field name="name"/>
<field name="ref"/>
<field name="journal_id"/> <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
<field name="period_id"/> </group>
<field name="company_id" required="1" groups="base.group_multi_company"/> <group>
</group> <field name="journal_id"/>
<notebook colspan="4"> <field name="period_id"/>
<page string="Information"> <field name="company_id" required="1" groups="base.group_multi_company"/>
<group> </group>
<group string="Amount"> </group>
<field name="account_id" domain="[('company_id', '=', company_id), ('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation')]"/> <notebook colspan="4">
<field name="debit"/> <page string="Information">
<field name="credit"/> <group>
<field name="quantity"/> <group string="Amount">
</group> <field name="account_id" domain="[('company_id', '=', company_id), ('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation')]"/>
<field name="debit"/>
<group string="Accounting Documents"> <field name="credit"/>
<field name="invoice" readonly="True"/> <field name="quantity"/>
<field name="move_id" required="False"/> </group>
<field name="statement_id" readonly="True"/> <group string="Accounting Documents">
</group> <field name="invoice" readonly="True"/>
<field name="move_id" required="False"/>
<group string="Dates"> <field name="statement_id" readonly="True"/>
<field name="date"/> </group>
<field name="date_maturity"/> <group string="Dates">
<field name="date_created" readonly="True"/> <field name="date"/>
</group> <field name="date_maturity"/>
<field name="date_created" readonly="True"/>
<group string="Taxes"> </group>
<field name="tax_code_id"/> <group string="Taxes">
<field name="tax_amount"/> <field name="tax_code_id"/>
<field name="account_tax_id" domain="[('parent_id','=',False)]"/> <field name="tax_amount"/>
</group> <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
</group>
<group attrs="{'readonly':[('state','=','valid')]}" string="Currency"> <group attrs="{'readonly':[('state','=','valid')]}" string="Currency">
<field name="currency_id"/> <field name="currency_id"/>
<field name="amount_currency"/> <field name="amount_currency"/>
</group> </group>
<group string="Reconciliation">
<group string="Reconciliation"> <field name="reconcile_id"/>
<field name="reconcile_id"/> <field name="reconcile_partial_id"/>
<field name="reconcile_partial_id"/> </group>
</group> <group string="States">
<field name="state"/>
<group string="States"> <field name="blocked"/>
<field name="state"/> </group>
<field name="blocked"/> <group groups="analytic.group_analytic_accounting" string="Analytic">
</group> <field name="analytic_account_id" domain="[('parent_id','!=',False)]"/>
</group>
<group groups="analytic.group_analytic_accounting" string="Analytic"> </group>
<field name="analytic_account_id" domain="[('parent_id','!=',False)]"/> <field name="narration" colspan="4" nolabel="1" placeholder="Add an internal note..."/>
</group> </page>
</group> <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
<separator string="Internal Note" colspan="4"/> <field name="analytic_lines" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
<field name="narration" colspan="4" nolabel="1"/> </page>
</page> </notebook>
<page string="Analytic Lines" groups="analytic.group_analytic_accounting"> </sheet>
<field name="analytic_lines" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
</page>
</notebook>
</form> </form>
</field> </field>
</record> </record>
@ -1316,16 +1322,23 @@
<field name="state" widget="statusbar"/> <field name="state" widget="statusbar"/>
</header> </header>
<sheet string="Journal Entries" > <sheet string="Journal Entries" >
<group col="4"> <label for="name" class="oe_edit_only" attrs="{'invisible':[('name','=','/')]}"/>
<field name="name" readonly="True"/> <h1>
<field name="ref"/> <field name="name" readonly="True" attrs="{'invisible':[('name','=','/')]}"/>
<field name="journal_id"/> </h1>
<field name="period_id"/> <group>
<field name="to_check"/> <group>
<field name="date"/> <field name="journal_id"/>
<field name="company_id" required="1" groups="base.group_multi_company"/> <field name="period_id"/>
<field name="partner_id" invisible="1"/> <field name="company_id" required="1" groups="base.group_multi_company"/>
<field name="amount" invisible="1"/> <field name="partner_id" invisible="1"/>
</group>
<group>
<field name="ref"/>
<field name="date"/>
<field name="to_check"/>
<field name="amount" invisible="1"/>
</group>
</group> </group>
<notebook> <notebook>
<page string="Journal Items"> <page string="Journal Items">
@ -1417,8 +1430,7 @@
<field name="reconcile_partial_id"/> <field name="reconcile_partial_id"/>
</tree> </tree>
</field> </field>
<separator string="Internal Note"/> <field name="narration" colspan="4" placeholder="Add an internal note..." nolabel="1" height="50"/>
<field name="narration" colspan="4" nolabel="1" height="50"/>
</page> </page>
</notebook> </notebook>
</sheet> </sheet>
@ -1878,16 +1890,11 @@
<field name="model_id"/> <field name="model_id"/>
<field name="ref"/> <field name="ref"/>
</group> </group>
<newline/> <group>
<group string="Starts on">
<field name="date_start"/> <field name="date_start"/>
<field name="period_total"/>
</group>
<group string="Valid Up to">
<field name="period_nbr"/>
<field name="period_type"/> <field name="period_type"/>
<field name="period_nbr"/>
<field name="period_total"/>
</group> </group>
</group> </group>
<separator string="Subscription Lines"/> <separator string="Subscription Lines"/>
@ -2590,15 +2597,22 @@ action = pool.get('res.config').next(cr, uid, [], context)
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/> <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
</header> </header>
<sheet string="Statement"> <sheet string="Statement">
<group col="4"> <label for="name" class="oe_edit_only" attrs="{'invisible':[('name','=','/')]}"/>
<field name="name"/> <h1><field name="name" class="oe_inline" attrs="{'invisible':[('name','=','/')]}"/></h1>
<field name='company_id' widget="selection" groups="base.group_multi_company" /> <group>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/> <group>
<field name="user_id" readonly="1"/> <field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/>
<field name="period_id"/> <field name="user_id" readonly="1" string="Responsible"/>
<field name="currency" invisible="1"/> <field name="total_entry_encoding"/>
<field name='company_id' widget="selection" groups="base.group_multi_company" />
</group>
<group>
<field name="date" attrs="{'readonly':[('state','!=','draft')]}" on_change="onchange_date(date, company_id)"/>
<field name="closing_date" readonly="1"/>
<field name="period_id" class="oe_inline"/>
<field name="currency" invisible="1"/>
</group>
</group> </group>
<notebook> <notebook>
<page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}"> <page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
<field name="line_ids" context="{'date':date}"> <field name="line_ids" context="{'date':date}">

View File

@ -380,7 +380,7 @@
<field name="inherit_id" ref="account.view_account_journal_form"/> <field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="currency" position="after"> <field name="type" position="after">
<field name="analytic_journal_id"/> <field name="analytic_journal_id"/>
</field> </field>
</field> </field>

View File

@ -1,5 +1,5 @@
- -
In order to test Cash statement I create a Cash statement and confirm it and check it's move created In order to test Cash statement I create a Cash statement and confirm it and check its move created
- -
!record {model: account.bank.statement, id: account_bank_statement_1}: !record {model: account.bank.statement, id: account_bank_statement_1}:
date: !eval time.strftime('%Y-%m-%d') date: !eval time.strftime('%Y-%m-%d')

View File

@ -7,13 +7,18 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Account charts" version="7.0"> <form string="Account charts" version="7.0">
<group colspan="4"> <group>
<field name="fiscalyear" on_change="onchange_fiscalyear(fiscalyear)"/> <label for="fiscalyear"/>
<div>
<field name="fiscalyear" on_change="onchange_fiscalyear(fiscalyear)" class="oe_inline"/>
<label align="0.7" string="(If you do not select Fiscal year it will take all open fiscal years)" class="oe_inline"/>
</div>
<field name="target_move"/> <field name="target_move"/>
<label align="0.7" colspan="4" string="(If you do not select Fiscal year it will take all open fiscal years)"/> <label for="period_from" string="Periods"/>
<separator string="Periods" colspan="4"/> <div>
<field name="period_from"/> <field name="period_from" class="oe_inline"/> -
<field name="period_to"/> <field name="period_to" class="oe_inline"/>
</div>
</group> </group>
<footer> <footer>
<button string="Open Charts" name="account_chart_open_window" type="object" class="oe_highlight"/> <button string="Open Charts" name="account_chart_open_window" type="object" class="oe_highlight"/>

View File

@ -30,7 +30,7 @@ class account_fiscalyear_close_state(osv.osv_memory):
_description = "Fiscalyear Close state" _description = "Fiscalyear Close state"
_columns = { _columns = {
'fy_id': fields.many2one('account.fiscalyear', \ 'fy_id': fields.many2one('account.fiscalyear', \
'Fiscal Year to close', required=True, help="Select a fiscal year to close"), 'Fiscal Year to Close', required=True, help="Select a fiscal year to close"),
} }
def data_save(self, cr, uid, ids, context=None): def data_save(self, cr, uid, ids, context=None):

View File

@ -7,15 +7,15 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <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" version="7.0">
<header>
<button icon="terp-locked" string="Close Fiscalyear" name="data_save" type="object" class="oe_highlight" />
</header>
<separator string="Close states of Fiscal year and periods"/>
<label string ="If no additional entries should be recorded on a fiscal year, you can close it from here. It will close all opened periods in this year that will make impossible any new entry record. Close a fiscal year when you need to finalize your end of year results definitive "/>
<group> <group>
<field name="fy_id" domain="[('state','=','draft')]"/> <field name="fy_id" domain="[('state','=','draft')]"/>
</group> </group>
</form> <footer>
<button icon="terp-locked" string="Close Fiscal Year" name="data_save" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>
</form>
</field> </field>
</record> </record>

View File

@ -102,12 +102,11 @@ class account_move_journal(osv.osv_memory):
period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name'] period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name']
period_string = _("Period: %s") % tools.ustr(period) period_string = _("Period: %s") % tools.ustr(period)
separator_string = _("Open Journal Items")
open_string = _("Open") open_string = _("Open")
view = """<?xml version="1.0" encoding="utf-8"?> view = """<?xml version="1.0" encoding="utf-8"?>
<form string="Standard entries" version="7.0"> <form string="Standard entries" version="7.0">
<group string="%s"> <group>
<field name="target_move" /> <field name="target_move"/>
</group> </group>
%s: <label string="%s"/> %s: <label string="%s"/>
%s: <label string="%s"/> %s: <label string="%s"/>
@ -116,7 +115,7 @@ class account_move_journal(osv.osv_memory):
or or
<button string="Cancel" class="oe_link" special="cancel"/> <button string="Cancel" class="oe_link" special="cancel"/>
</footer> </footer>
</form>""" % (separator_string, _('Journal'), journal_string, _('Period'), period_string,open_string) </form>""" % (_('Journal'), journal_string, _('Period'), period_string, open_string)
view = etree.fromstring(view.encode('utf8')) view = etree.fromstring(view.encode('utf8'))
xarch, xfields = self._view_look_dom_arch(cr, uid, view, view_id, context=context) xarch, xfields = self._view_look_dom_arch(cr, uid, view, view_id, context=context)

View File

@ -13,10 +13,6 @@
<xpath expr="//field[@name='journal_ids']" position="replace"> <xpath expr="//field[@name='journal_ids']" position="replace">
<field name="journal_ids" colspan="4" nolabel="1" required="0" readonly="1"/> <field name="journal_ids" colspan="4" nolabel="1" required="0" readonly="1"/>
</xpath> </xpath>
<xpath expr="/form/label[@string='']" position="replace">
<separator string="Trial Balance" colspan="4"/>
<label nolabel="1" colspan="4" string="This report allows you to print or generate a pdf of your trial balance allowing you to quickly check the balance of each of your accounts in a single report"/>
</xpath>
<xpath expr="//field[@name='target_move']" position="after"> <xpath expr="//field[@name='target_move']" position="after">
<field name="display_account"/> <field name="display_account"/>
<newline/> <newline/>

View File

@ -17,16 +17,16 @@
</group> </group>
<notebook tabpos="up" colspan="4"> <notebook tabpos="up" colspan="4">
<page string="Filters" name="filters"> <page string="Filters" name="filters">
<group col="4"> <group>
<field name="filter" on_change="onchange_filter(filter, fiscalyear_id)"/> <field name="filter" on_change="onchange_filter(filter, fiscalyear_id)"/>
</group> </group>
<group string="Dates" col="4"> <group string="Dates" attrs="{'invisible':[('filter', '!=', 'filter_date')], 'required':[('filter', '=', 'filter_date')]}">
<field name="date_from" attrs="{'readonly':[('filter', '!=', 'filter_date')], 'required':[('filter', '=', 'filter_date')]}" colspan="4"/> <field name="date_from" />
<field name="date_to" attrs="{'readonly':[('filter', '!=', 'filter_date')], 'required':[('filter', '=', 'filter_date')]}" colspan="4"/> <field name="date_to" />
</group> </group>
<group string="Periods" col="4"> <group string="Periods" attrs="{'invisible':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}">
<field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear_id)]" attrs="{'readonly':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" colspan="4"/> <field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear_id)]"/>
<field name="period_to" domain="[('fiscalyear_id', '=', fiscalyear_id)]" attrs="{'readonly':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" colspan="4"/> <field name="period_to" domain="[('fiscalyear_id', '=', fiscalyear_id)]"/>
</group> </group>
</page> </page>
<page string="Journals" name="journal_ids"> <page string="Journals" name="journal_ids">

View File

@ -9,10 +9,6 @@
<field name="inherit_id" ref="account_common_report_view" /> <field name="inherit_id" ref="account_common_report_view" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>
<xpath expr="/form/label[@string='']" position="replace">
<separator string="General Journals" colspan="4"/>
<label nolabel="1" colspan="4" string="This report gives you an overview of the situation of your general journals"/>
</xpath>
<xpath expr="//field[@name='target_move']" position="after"> <xpath expr="//field[@name='target_move']" position="after">
<field name="amount_currency"/> <field name="amount_currency"/>
<newline/> <newline/>

View File

@ -9,10 +9,6 @@
<field name="inherit_id" ref="account_common_report_view" /> <field name="inherit_id" ref="account_common_report_view" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>
<xpath expr="/form/label[@string='']" position="replace">
<separator string="General Ledger" colspan="4"/>
<label nolabel="1" colspan="4" string="This report allows you to print or generate a pdf of your general ledger with details of all your account journals"/>
</xpath>
<xpath expr="//field[@name='target_move']" position="after"> <xpath expr="//field[@name='target_move']" position="after">
<field name="display_account"/> <field name="display_account"/>
<field name="sortby"/> <field name="sortby"/>

View File

@ -9,10 +9,6 @@
<field name="inherit_id" ref="account_common_report_view" /> <field name="inherit_id" ref="account_common_report_view" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>
<xpath expr="/form/label[@string='']" position="replace">
<separator string="Partner Balance" colspan="4"/>
<label nolabel="1" colspan="4" string="This report is an analysis done by a partner. It is a PDF report containing one line per partner representing the cumulative credit balance"/>
</xpath>
<xpath expr="//field[@name='target_move']" position="after"> <xpath expr="//field[@name='target_move']" position="after">
<field name="result_selection"/> <field name="result_selection"/>
<field name="display_partner"/> <field name="display_partner"/>

View File

@ -9,10 +9,6 @@
<field name="inherit_id" ref="account_common_report_view" /> <field name="inherit_id" ref="account_common_report_view" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>
<xpath expr="/form/label[@string='']" position="replace">
<separator string="Partner Ledger" colspan="4"/>
<label nolabel="1" colspan="4" string="This report is an analysis done by a partner. It is a PDF report containing one line per partner representing the cumulative credit balance"/>
</xpath>
<xpath expr="//field[@name='target_move']" position="after"> <xpath expr="//field[@name='target_move']" position="after">
<field name="result_selection"/> <field name="result_selection"/>
<field name="amount_currency"/> <field name="amount_currency"/>

View File

@ -9,10 +9,6 @@
<field name="inherit_id" ref="account_common_report_view" /> <field name="inherit_id" ref="account_common_report_view" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>
<xpath expr="/form/label[@string='']" position="replace">
<separator string="Journals" colspan="4"/>
<label nolabel="1" colspan="4" string="This report gives you an overview of the situation of a specific journal"/>
</xpath>
<xpath expr="//field[@name='target_move']" position="after"> <xpath expr="//field[@name='target_move']" position="after">
<field name="sort_selection"/> <field name="sort_selection"/>
<field name="amount_currency"/> <field name="amount_currency"/>

View File

@ -28,7 +28,7 @@ class account_subscription_generate(osv.osv_memory):
_name = "account.subscription.generate" _name = "account.subscription.generate"
_description = "Subscription Compute" _description = "Subscription Compute"
_columns = { _columns = {
'date': fields.date('Date', required=True), 'date': fields.date('Generate Entries Before', required=True),
} }
_defaults = { _defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'), 'date': lambda *a: time.strftime('%Y-%m-%d'),

View File

@ -8,8 +8,6 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Subscription Compute" version="7.0"> <form string="Subscription Compute" version="7.0">
<separator string="Generate Entries before:"/>
<label string ="Automatically generate entries based on what has been entered in the system before a specific date."/>
<group> <group>
<field name="date"/> <field name="date"/>
</group> </group>

View File

@ -9,10 +9,13 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Account tax charts" version="7.0"> <form string="Account tax charts" version="7.0">
<group> <group>
<field name="period_id"/> <label for="period_id"/>
<label colspan="4" string="(If you do not select period it will take all open periods)"/> <div>
<field name="period_id" class="oe_inline"/>
<label string="(If you do not select period it will take all open periods)" class="oe_inline"/>
</div>
<field name="target_move"/> <field name="target_move"/>
</group> </group>
<footer> <footer>
<button string="Open Charts" name="account_tax_chart_open_window" type="object" class="oe_highlight"/> <button string="Open Charts" name="account_tax_chart_open_window" type="object" class="oe_highlight"/>
or or

View File

@ -8,8 +8,6 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Create Entries From Models" version="7.0"> <form string="Create Entries From Models" version="7.0">
<separator string="This wizard will create recurring accounting entries"/>
<label string="Create manual recurring entries in a chosen journal."/>
<group> <group>
<field name="model"/> <field name="model"/>
</group> </group>

View File

@ -9,8 +9,6 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Post Journal Entries" version="7.0"> <form string="Post Journal Entries" version="7.0">
<separator string="Post Journal Entries of a Journal"/>
<label string="All draft account entries in this journal and period will be validated. It means you won't be able to modify their accounting fields anymore."/>
<group> <group>
<field name="journal_id"/> <field name="journal_id"/>
<field name="period_id"/> <field name="period_id"/>
@ -25,7 +23,7 @@
</record> </record>
<record id="action_validate_account_move" model="ir.actions.act_window"> <record id="action_validate_account_move" model="ir.actions.act_window">
<field name="name">Open Journal</field> <field name="name">Post Journal Entries</field>
<field name="res_model">validate.account.move</field> <field name="res_model">validate.account.move</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">form</field> <field name="view_mode">form</field>

View File

@ -213,13 +213,13 @@ class account_asset_asset(osv.osv):
_columns = { _columns = {
'account_move_line_ids': fields.one2many('account.move.line', 'asset_id', 'Entries', readonly=True, states={'draft':[('readonly',False)]}), 'account_move_line_ids': fields.one2many('account.move.line', 'asset_id', 'Entries', readonly=True, states={'draft':[('readonly',False)]}),
'name': fields.char('Asset', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}), 'name': fields.char('Asset Name', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}),
'code': fields.char('Reference', size=32, readonly=True, states={'draft':[('readonly',False)]}), 'code': fields.char('Reference', size=32, readonly=True, states={'draft':[('readonly',False)]}),
'purchase_value': fields.float('Gross value ', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'purchase_value': fields.float('Gross Value', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'currency_id': fields.many2one('res.currency','Currency',required=True, readonly=True, states={'draft':[('readonly',False)]}), 'currency_id': fields.many2one('res.currency','Currency',required=True, readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'note': fields.text('Note'), 'note': fields.text('Note'),
'category_id': fields.many2one('account.asset.category', 'Asset category', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}), 'category_id': fields.many2one('account.asset.category', 'Asset Category', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}),
'parent_id': fields.many2one('account.asset.asset', 'Parent Asset', readonly=True, states={'draft':[('readonly',False)]}), 'parent_id': fields.many2one('account.asset.asset', 'Parent Asset', readonly=True, states={'draft':[('readonly',False)]}),
'child_ids': fields.one2many('account.asset.asset', 'parent_id', 'Children Assets'), 'child_ids': fields.one2many('account.asset.asset', 'parent_id', 'Children Assets'),
'purchase_date': fields.date('Purchase Date', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'purchase_date': fields.date('Purchase Date', required=True, readonly=True, states={'draft':[('readonly',False)]}),
@ -233,7 +233,7 @@ class account_asset_asset(osv.osv):
" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n" \ " * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n" \
" * Degressive: Calculated on basis of: Remaining Value * Degressive Factor"), " * Degressive: Calculated on basis of: Remaining Value * Degressive Factor"),
'method_number': fields.integer('Number of Depreciations', readonly=True, states={'draft':[('readonly',False)]}, help="Calculates Depreciation within specified interval"), 'method_number': fields.integer('Number of Depreciations', readonly=True, states={'draft':[('readonly',False)]}, help="Calculates Depreciation within specified interval"),
'method_period': fields.integer('Period Length', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="State here the time during 2 depreciations, in months"), 'method_period': fields.integer('Number of Months in a Period', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="State here the time during 2 depreciations, in months"),
'method_end': fields.date('Ending Date', readonly=True, states={'draft':[('readonly',False)]}), 'method_end': fields.date('Ending Date', readonly=True, states={'draft':[('readonly',False)]}),
'method_progress_factor': fields.float('Degressive Factor', readonly=True, states={'draft':[('readonly',False)]}), 'method_progress_factor': fields.float('Degressive Factor', readonly=True, states={'draft':[('readonly',False)]}),
'value_residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual Value'), 'value_residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual Value'),
@ -316,6 +316,19 @@ class account_asset_asset(osv.osv):
asset_id = super(account_asset_asset, self).create(cr, uid, vals, context=context) asset_id = super(account_asset_asset, self).create(cr, uid, vals, context=context)
self.compute_depreciation_board(cr, uid, [asset_id], context=context) self.compute_depreciation_board(cr, uid, [asset_id], context=context)
return asset_id return asset_id
def open_entries(self, cr, uid, ids, context=None):
if context is None:
context = {}
context.update({'search_default_asset_id': ids, 'default_asset_id': ids})
return {
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.move.line',
'view_id': False,
'type': 'ir.actions.act_window',
'context': context,
}
account_asset_asset() account_asset_asset()
@ -331,7 +344,7 @@ class account_asset_depreciation_line(osv.osv):
_columns = { _columns = {
'name': fields.char('Depreciation Name', size=64, required=True, select=1), 'name': fields.char('Depreciation Name', size=64, required=True, select=1),
'sequence': fields.integer('Sequence of the depreciation', required=True), 'sequence': fields.integer('Sequence', required=True),
'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True), 'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True),
'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'), 'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'),
'amount': fields.float('Depreciation Amount', required=True), 'amount': fields.float('Depreciation Amount', required=True),

View File

@ -88,60 +88,87 @@
<field name="state" widget="statusbar" statusbar_visible="draft,open"/> <field name="state" widget="statusbar" statusbar_visible="draft,open"/>
</header> </header>
<sheet> <sheet>
<label for="name"/> <div class="oe_button_box oe_right">
<h1><field name="name"/></h1> <button name="open_entries" string="Entries" type="object" class="oe_inline"/>
<label for="category_id"/> </div>
<h2><field name="category_id" on_change="onchange_category_id(category_id)"/></h2> <div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" class="oe_inline"/>
</h1>
</div>
<group>
<group>
<field name="category_id" on_change="onchange_category_id(category_id)"/>
<field name="code"/>
<field name="parent_id"/>
</group>
<group>
<field name="purchase_date"/>
<field name="currency_id"/>
<field name="company_id" widget="selection" groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
</group>
</group>
<notebook colspan="4"> <notebook colspan="4">
<page string="General"> <page string="General">
<group> <group>
<group> <group>
<field name="code"/> <field name="purchase_value"/>
<field name="company_id" widget="selection" <field name="salvage_value"/>
groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/> <field name="value_residual"/>
</group> <field name="partner_id"/>
<group> </group>
<field name="purchase_value"/> <group>
<field name="salvage_value"/> <field name="method"/>
<field name="value_residual"/> <field name="method_progress_factor" attrs="{'invisible':[('method','=','linear')], 'required':[('method','=','degressive')]}"/>
<field name="currency_id"/> <label for="method_time"/>
</group> <div>
<group> <field name="method_time" on_change="onchange_method_time(method_time)" class="oe_inline"/>
<field name="partner_id"/> <button name="%(action_asset_modify)d" states="open" string="Change Duration" type="action" icon="terp-stock_effects-object-colorize" class="oe_inline" colspan="1"/>
<field name="purchase_date"/> </div>
<field name="parent_id"/> <field name="prorata" attrs="{'invisible': [('method_time','=','end')]}"/>
</group> <field name="method_number" attrs="{'invisible':[('method_time','=','end')], 'required':[('method_time','=','number')]}"/>
<group> <field name="method_period"/>
<field name="method_time" on_change="onchange_method_time(method_time)"/> <field name="method_end" attrs="{'required': [('method_time','=','end')], 'invisible':[('method_time','=','number')]}"/>
<field name="method_number" attrs="{'invisible':[('method_time','=','end')], 'required':[('method_time','=','number')]}"/> </group>
<field name="method_period"/> </group>
<field name="method_end" attrs="{'required': [('method_time','=','end')], 'invisible':[('method_time','=','number')]}"/>
<button name="%(action_asset_modify)d" states="open" string="Change Duration" type="action" icon="terp-stock_effects-object-colorize" colspan="2"/>
</group>
<group>
<field name="method"/>
<field name="method_progress_factor" attrs="{'invisible':[('method','=','linear')], 'required':[('method','=','degressive')]}"/>
<field name="prorata" attrs="{'invisible': [('method_time','=','end')]}"/>
</group>
</group>
</page> </page>
<page string="Depreciation Board"> <page string="Depreciation Board">
<field name="depreciation_line_ids" mode="tree,graph"> <field name="depreciation_line_ids" mode="tree,graph">
<tree string="Depreciation Lines" colors="blue:(move_check == False);black:(move_check == True)"> <tree string="Depreciation Lines" colors="blue:(move_check == False);black:(move_check == True)">
<field name="depreciation_date"/> <field name="depreciation_date"/>
<field name="sequence" invisible="1"/> <field name="sequence" invisible="1"/>
<field name="depreciated_value" readonly="1"/> <field name="depreciated_value" readonly="1"/>
<field name="amount"/> <field name="amount"/>
<field name="remaining_value" readonly="1"/> <field name="remaining_value" readonly="1"/>
<field name="move_check"/> <field name="move_check"/>
<field name="parent_state" invisible="1"/> <field name="parent_state" invisible="1"/>
<button name="create_move" attrs="{'invisible':['|',('move_check','!=',False),('parent_state','!=','open')]}" icon="gtk-execute" string="Create Move" type="object"/> <button name="create_move" attrs="{'invisible':['|',('move_check','!=',False),('parent_state','!=','open')]}" icon="gtk-execute" string="Create Move" type="object"/>
</tree> </tree>
<graph type="bar"> <form string="Depreciation Lines">
<field name="name"/> <group>
<field name="amount"/> <group>
<field name="depreciated_value"/> <field name="asset_id" invisible="1"/>
</graph> <field name="parent_state" invisible="1"/>
<field name="name"/>
<field name="amount"/>
<field name="move_id"/>
<field name="move_check"/>
<field name="parent_state" invisible="1"/>
</group>
<group>
<field name="sequence"/>
<field name="depreciation_date"/>
<field name="depreciated_value" readonly="1"/>
<field name="remaining_value" readonly="1"/>
</group>
</group>
</form>
<graph type="bar">
<field name="name"/>
<field name="amount"/>
<field name="depreciated_value"/>
</graph>
</field> </field>
<button type="object" name="compute_depreciation_board" string="Compute" icon="terp-stock_format-scientific" colspan="2" attrs="{'invisible':[('state','=','close')]}"/> <button type="object" name="compute_depreciation_board" string="Compute" icon="terp-stock_format-scientific" colspan="2" attrs="{'invisible':[('state','=','close')]}"/>
</page> </page>
@ -150,12 +177,12 @@
<field name="history_ids" readonly="1"/> <field name="history_ids" readonly="1"/>
</page> </page>
<page string="Notes"> <page string="Notes">
<field name="note"/> <field name="note" placeholder="Add an internal note here..."/>
</page> </page>
</notebook> </notebook>
</sheet> </sheet>
</form> </form>
</field> </field>
</record> </record>
<record model="ir.ui.view" id="view_account_asset_asset_tree"> <record model="ir.ui.view" id="view_account_asset_asset_tree">

View File

@ -7,8 +7,6 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Compute Asset" version="7.0"> <form string="Compute Asset" version="7.0">
<separator string="Post Depreciation Lines"/>
<label string="This wizard will post the depreciation lines of running assets that belong to the selected period."/>
<group> <group>
<field name="period_id"/> <field name="period_id"/>
</group> </group>

View File

@ -108,48 +108,71 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form version="7.0"> <form version="7.0">
<header> <header>
<button string="Confirm" name="confirm" states="draft" type="workflow" class="oe_highlight"/> <button string="Confirm" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
<button string="Approve" name="validate" states="confirm" type="workflow" class="oe_highlight"/> <button string="Approve" name="validate" states="confirm" type="workflow" class="oe_highlight"/>
<button string="Done" name="done" states="validate" type="workflow" class="oe_highlight"/> <button string="Done" name="done" states="validate" type="workflow" class="oe_highlight"/>
<button name="draft" states="cancel" string="Reset to Draft" type="workflow" /> <button name="draft" states="cancel" string="Reset to Draft" type="workflow" />
<button string="Cancel" name="cancel" states="confirm,validate" type="workflow"/> <button string="Cancel" name="cancel" states="confirm,validate" type="workflow"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm"/> <field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
</header> </header>
<sheet string="Budget"> <sheet string="Budget">
<group col="4"> <div class="oe_title">
<field name="name" colspan="1" attrs="{'readonly':[('state','!=','draft')]}"/> <label for="name" class="oe_edit_only"/>
<field name="code" colspan="1" attrs="{'readonly':[('state','!=','draft')]}"/> <h1>
<field name="creating_user_id" attrs="{'readonly':[('state','!=','draft')]}"/> <field name="name" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="validating_user_id" readonly="True" attrs="{'readonly':[('state','!=','draft')]}"/> </h1>
<field name="date_from" attrs="{'readonly':[('state','!=','draft')]}"/> </div>
<field name="date_to" attrs="{'readonly':[('state','!=','draft')]}"/> <group>
<field name="company_id" groups="base.group_multi_company" widget="selection"/> <group>
<field name="crossovered_budget_line" colspan="4" nolabel="1" attrs="{'readonly':[('state','!=','draft')]}"> <field name="creating_user_id" attrs="{'readonly':[('state','!=','draft')]}"/>
<tree string="Budget Lines"> <field name="validating_user_id" readonly="True" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/> </group>
<field name="general_budget_id"/> <group>
<field name="date_from"/> <field name="code" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="date_to"/> <label for="date_from" string="Duration"/>
<field name="paid_date"/> <div>
<field name="planned_amount" sum="Planned Amount"/> <field name="date_from" class="oe_inline" attrs="{'readonly':[('state','!=','draft')]}"/> -
<field name="practical_amount" sum="Practical Amount"/> <field name="date_to" class="oe_inline" attrs="{'readonly':[('state','!=','draft')]}" nolabel="1"/>
<field name="theoritical_amount" sum="Theoretical Amount"/> </div>
<field name="percentage"/> <field name="company_id" groups="base.group_multi_company" widget="selection"/>
</tree> </group>
<form string="Budget Lines" version="7.0"> </group>
<group col="4"> <notebook>
<page string="Budget Lines">
<field name="crossovered_budget_line" colspan="4" nolabel="1" attrs="{'readonly':[('state','!=','draft')]}">
<tree string="Budget Lines">
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/> <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<field name="general_budget_id"/> <field name="general_budget_id"/>
<field name="date_from"/> <field name="date_from"/>
<field name="date_to"/> <field name="date_to"/>
<field name="paid_date"/> <field name="paid_date"/>
<field name="planned_amount"/> <field name="planned_amount" sum="Planned Amount"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/> <field name="practical_amount" sum="Practical Amount"/>
</group> <field name="theoritical_amount" sum="Theoretical Amount"/>
</form> <field name="percentage"/>
</field> </tree>
</group> <form string="Budget Lines" version="7.0">
<group>
<group>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<field name="general_budget_id"/>
<field name="planned_amount"/>
</group>
<group>
<label for="date_from" string="Duration"/>
<div>
<field name="date_from" class="oe_inline"/> -
<field name="date_to" class="oe_inline"/>
</div>
<field name="paid_date"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
</group>
</form>
</field>
</page>
</notebook>
</sheet> </sheet>
</form> </form>
</field> </field>

View File

@ -2,7 +2,7 @@
<openerp> <openerp>
<data> <data>
<!-- Supplier voucher view --> <!-- Supplier write check view -->
<record model="ir.ui.view" id="view_vendor_payment_check_form"> <record model="ir.ui.view" id="view_vendor_payment_check_form">
<field name="name">account.voucher.payment.check.form</field> <field name="name">account.voucher.payment.check.form</field>

View File

@ -14,7 +14,7 @@
or or
<button string="Cancel" class="oe_link" special="cancel"/> <button string="Cancel" class="oe_link" special="cancel"/>
</header> </header>
<group col="2" string="Select Your File :"> <group col="2">
<field name="coda_data" filename="coda_fname"/> <field name="coda_data" filename="coda_fname"/>
<field name="coda_fname"/> <field name="coda_fname"/>
</group> </group>

View File

@ -31,7 +31,7 @@ class account_followup_print(osv.osv_memory):
_description = 'Print Follow-up & Send Mail to Customers' _description = 'Print Follow-up & Send Mail to Customers'
_columns = { _columns = {
'date': fields.date('Follow-up Sending Date', required=True, help="This field allow you to select a forecast date to plan your follow-ups"), 'date': fields.date('Follow-up Sending Date', required=True, help="This field allow you to select a forecast date to plan your follow-ups"),
'followup_id': fields.many2one('account_followup.followup', 'Follow-up', required=True), 'followup_id': fields.many2one('account_followup.followup', 'Follow-Up', required=True),
} }
def _get_followup(self, cr, uid, context=None): def _get_followup(self, cr, uid, context=None):
@ -121,10 +121,10 @@ class account_followup_print_all(osv.osv_memory):
_description = 'Print Follow-up & Send Mail to Customers' _description = 'Print Follow-up & Send Mail to Customers'
_columns = { _columns = {
'partner_ids': fields.many2many('account_followup.stat.by.partner', 'partner_stat_rel', 'osv_memory_id', 'partner_id', 'Partners', required=True), 'partner_ids': fields.many2many('account_followup.stat.by.partner', 'partner_stat_rel', 'osv_memory_id', 'partner_id', 'Partners', required=True),
'email_conf': fields.boolean('Send email confirmation'), 'email_conf': fields.boolean('Send Email Confirmation'),
'email_subject': fields.char('Email Subject', size=64), 'email_subject': fields.char('Email Subject', size=64),
'partner_lang': fields.boolean('Send Email in Partner Language', help='Do not change message text, if you want to send email in partner language, or configure from company'), 'partner_lang': fields.boolean('Send Email in Partner Language', help='Do not change message text, if you want to send email in partner language, or configure from company'),
'email_body': fields.text('Email body'), 'email_body': fields.text('Email Body'),
'summary': fields.text('Summary', required=True, readonly=True), 'summary': fields.text('Summary', required=True, readonly=True),
'test_print': fields.boolean('Test Print', help='Check if you want to print follow-ups without changing follow-ups level.') 'test_print': fields.boolean('Test Print', help='Check if you want to print follow-ups without changing follow-ups level.')
} }

View File

@ -8,8 +8,6 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Send follow-ups" version="7.0"> <form string="Send follow-ups" version="7.0">
<separator string="Send Follow-ups"/>
<label string ="This feature allows you to send reminders to partners with pending invoices. You can send them the default message for unpaid invoices or manually enter a message should you need to remind them of a specific information."/>
<group col="4"> <group col="4">
<field name="followup_id"/> <field name="followup_id"/>
<field name="date"/> <field name="date"/>
@ -24,7 +22,7 @@
</record> </record>
<record id="action_account_followup_print" model="ir.actions.act_window"> <record id="action_account_followup_print" model="ir.actions.act_window">
<field name="name">Send follow-ups</field> <field name="name">Send Follow-Ups</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">account.followup.print</field> <field name="res_model">account.followup.print</field>
<field name="view_type">form</field> <field name="view_type">form</field>
@ -76,7 +74,7 @@
<field name="model">account.followup.print.all</field> <field name="model">account.followup.print.all</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Send follow-ups" version="7.0"> <form string="Send Follow-Ups" version="7.0">
<header> <header>
<button name="do_mail" string="Send Mails" type="object" class="oe_highlight"/> <button name="do_mail" string="Send Mails" type="object" class="oe_highlight"/>
<button name="do_print" string="Print Follow Ups" type="object" class="oe_highlight"/> <button name="do_print" string="Print Follow Ups" type="object" class="oe_highlight"/>
@ -93,7 +91,6 @@
<field name="partner_lang" colspan="4"/> <field name="partner_lang" colspan="4"/>
<field name="test_print" colspan="4"/> <field name="test_print" colspan="4"/>
<field name="email_subject" colspan="4"/> <field name="email_subject" colspan="4"/>
<separator string="Email Body" colspan="4" />
<field name="email_body" colspan="4" nolabel="1"/> <field name="email_body" colspan="4" nolabel="1"/>
</group> </group>
<group string="Legend"> <group string="Legend">
@ -125,7 +122,7 @@
</record> </record>
<record id="action_account_followup_print_all" model="ir.actions.act_window"> <record id="action_account_followup_print_all" model="ir.actions.act_window">
<field name="name">Send follow-ups</field> <field name="name">Send Follow-Ups</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">account.followup.print.all</field> <field name="res_model">account.followup.print.all</field>
<field name="view_type">form</field> <field name="view_type">form</field>

View File

@ -87,9 +87,9 @@ class payment_order(osv.osv):
return res return res
_columns = { _columns = {
'date_scheduled': fields.date('Scheduled date if fixed', states={'done':[('readonly', True)]}, help='Select a date if you have chosen Preferred Date to be fixed.'), 'date_scheduled': fields.date('Scheduled Date', states={'done':[('readonly', True)]}, help='Select a date if you have chosen Preferred Date to be fixed.'),
'reference': fields.char('Reference', size=128, required=1, states={'done': [('readonly', True)]}), 'reference': fields.char('Reference', size=128, required=1, states={'done': [('readonly', True)]}),
'mode': fields.many2one('payment.mode', 'Payment mode', select=True, required=1, states={'done': [('readonly', True)]}, help='Select the Payment Mode to be applied.'), 'mode': fields.many2one('payment.mode', 'Payment Mode', select=True, required=1, states={'done': [('readonly', True)]}, help='Select the Payment Mode to be applied.'),
'state': fields.selection([ 'state': fields.selection([
('draft', 'Draft'), ('draft', 'Draft'),
('cancel', 'Cancelled'), ('cancel', 'Cancelled'),
@ -98,14 +98,14 @@ class payment_order(osv.osv):
help='When an order is placed the state is \'Draft\'.\n Once the bank is confirmed the state is set to \'Confirmed\'.\n Then the order is paid the state is \'Done\'.'), help='When an order is placed the state is \'Draft\'.\n Once the bank is confirmed the state is set to \'Confirmed\'.\n Then the order is paid the state is \'Done\'.'),
'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}), 'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}),
'total': fields.function(_total, string="Total", type='float'), 'total': fields.function(_total, string="Total", type='float'),
'user_id': fields.many2one('res.users', 'User', required=True, states={'done': [('readonly', True)]}), 'user_id': fields.many2one('res.users', 'Responsible', required=True, states={'done': [('readonly', True)]}),
'date_prefered': fields.selection([ 'date_prefered': fields.selection([
('now', 'Directly'), ('now', 'Directly'),
('due', 'Due date'), ('due', 'Due date'),
('fixed', 'Fixed date') ('fixed', 'Fixed date')
], "Preferred date", change_default=True, required=True, states={'done': [('readonly', True)]}, help="Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."), ], "Preferred Date", change_default=True, required=True, states={'done': [('readonly', True)]}, help="Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."),
'date_created': fields.date('Creation date', readonly=True), 'date_created': fields.date('Creation Date', readonly=True),
'date_done': fields.date('Execution date', readonly=True), 'date_done': fields.date('Execution Date', readonly=True),
'company_id': fields.related('mode', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True), 'company_id': fields.related('mode', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
} }

View File

@ -112,16 +112,25 @@
<button name="cancel" states="draft,open" string="Cancel"/> <button name="cancel" states="draft,open" string="Cancel"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open"/> <field name="state" widget="statusbar" statusbar_visible="draft,open"/>
</header> </header>
<sheet string="Payment order" > <sheet string="Payment order">
<group col="4"> <div class="oe_button_box">
<field name="reference"/> <button name="%(action_create_payment_order)d" string="Select Invoices to Pay"
<field name="mode" widget='selection'/> type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
<field name="user_id"/> </div>
<field name="date_prefered"/> <div class="oe_title">
<field name="date_scheduled" attrs="{'readonly':[('date_prefered','!=','fixed')]}" /> <label for="reference" class="oe_edit_only"/>
<field name="company_id" widget='selection' groups="base.group_multi_company"/> <h1><field name="reference"/></h1>
<button name="%(action_create_payment_order)d" string="Select Invoices to Pay" </div>
type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/> <group>
<group>
<field name="user_id"/>
<field name="mode"/>
</group>
<group>
<field name="date_prefered"/>
<field name="date_scheduled" attrs="{'readonly':[('date_prefered','!=','fixed')]}"/>
<field name="company_id" widget='selection' groups="base.group_multi_company"/>
</group>
</group> </group>
<field name="line_ids" context="{'order_id': active_id or False}" > <field name="line_ids" context="{'order_id': active_id or False}" >
<form string="Payment Line" version="7.0"> <form string="Payment Line" version="7.0">
@ -177,8 +186,6 @@
<field name="amount" sum="Total in Company Currency" invisible="1"/> <field name="amount" sum="Total in Company Currency" invisible="1"/>
</tree> </tree>
</field> </field>
<field name="date_created"/>
<field name="date_done"/>
</sheet> </sheet>
</form> </form>
</field> </field>
@ -330,9 +337,9 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/> <field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="journal_id" position="after"> <xpath expr="//div[@name='import_buttons']" position="inside">
<button name="%(action_account_populate_statement_confirm)d" attrs="{'invisible':[('state','=','confirm')]}" string="Import payment lines" type="action" icon="gtk-execute"/> <button name="%(action_account_populate_statement_confirm)d" attrs="{'invisible':[('state','=','confirm')]}" string="Import Payment Lines" type="action" icon="gtk-execute"/>
</field> </xpath>
</field> </field>
</record> </record>

View File

@ -8,7 +8,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="account.view_move_form"/> <field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="to_check" position="after"> <field name="period_id" position="after">
<field name="internal_sequence_number"/> <field name="internal_sequence_number"/>
</field> </field>
</field> </field>
@ -44,7 +44,7 @@
<field name="inherit_id" ref="account.view_account_move_filter"/> <field name="inherit_id" ref="account.view_account_move_filter"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>
<xpath expr="//field[@name='ref']" position="before"> <xpath expr="//field[@name='name']" position="after">
<field name="internal_sequence_number"/> <field name="internal_sequence_number"/>
</xpath> </xpath>
</data> </data>

View File

@ -52,6 +52,7 @@
<sheet string="Accounting Voucher"> <sheet string="Accounting Voucher">
<group col="6" colspan="4"> <group col="6" colspan="4">
<field name="partner_id" required="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/> <field name="partner_id" required="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
<field name="payment_rate_currency_id" invisible="1"/>
<field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id)"/> <field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id)"/>
<field name="journal_id" widget="selection" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/> <field name="journal_id" widget="selection" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
<field name="type" required="1"/> <field name="type" required="1"/>
@ -209,11 +210,11 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/> <field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="currency" invisible="1" position="after"> <xpath expr="//div[@name='import_buttons']" position="inside">
<button name="%(action_view_account_statement_from_invoice_lines)d" <button name="%(action_view_account_statement_from_invoice_lines)d"
string="Import Invoices" type="action" icon="gtk-execute" string="Import Invoices" type="action" icon="gtk-execute"
attrs="{'invisible':[('state','=','confirm')]}"/> attrs="{'invisible':[('state','=','confirm')]}"/>
</field> </xpath>
</field> </field>
</record> </record>

View File

@ -113,7 +113,7 @@
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/> <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
</tree> </tree>
</field> </field>
<group> <group>
<field name="narration" placeholder="Internal Notes" nolabel="1"/> <field name="narration" placeholder="Internal Notes" nolabel="1"/>
<group class="oe_subtotal_footer oe_right"> <group class="oe_subtotal_footer oe_right">
<field name="tax_id" <field name="tax_id"
@ -127,10 +127,10 @@
<button type="object" class="oe_link oe_edit_only" <button type="object" class="oe_link oe_edit_only"
name="compute_tax" string="(update)" name="compute_tax" string="(update)"
attrs="{'invisible': [('state','!=','draft')]}"/> attrs="{'invisible': [('state','!=','draft')]}"/>
</div> </div>
<field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/> <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
</group> </group>
<group> <group>
<field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/> <field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
<field name="date_due" attrs="{'invisible':[('pay_now','=','pay_now')]}"/> <field name="date_due" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
<field name="account_id" <field name="account_id"
@ -139,7 +139,7 @@
<field name="reference" <field name="reference"
attrs="{'invisible':[('pay_now','!=','pay_now')]}"/> attrs="{'invisible':[('pay_now','!=','pay_now')]}"/>
</group> </group>
</group> </group>
</page> </page>
<page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}"> <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
<group col="4"> <group col="4">

View File

@ -123,6 +123,7 @@
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form" /> <field name="inherit_id" ref="base.view_partner_form" />
<field name="priority" eval="10"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[@name='buttons']" position="inside"> <xpath expr="//div[@name='buttons']" position="inside">
<button type="action" <button type="action"

View File

@ -0,0 +1,95 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-07-18 16:31+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-07-19 04:46+0000\n"
"X-Generator: Launchpad (build 15637)\n"
#. module: crm_todo
#: model:ir.model,name:crm_todo.model_project_task
msgid "Task"
msgstr "Task"
#. module: crm_todo
#: view:crm.lead:0
msgid "Timebox"
msgstr "Timebox"
#. module: crm_todo
#: view:crm.lead:0
msgid "For cancelling the task"
msgstr "For cancelling the task"
#. module: crm_todo
#: constraint:project.task:0
msgid "Error ! Task end-date must be greater then task start-date"
msgstr "Error ! Task end-date must be greater then task start-date"
#. module: crm_todo
#: model:ir.model,name:crm_todo.model_crm_lead
msgid "crm.lead"
msgstr "crm.lead"
#. module: crm_todo
#: view:crm.lead:0
msgid "Next"
msgstr "Next"
#. module: crm_todo
#: model:ir.actions.act_window,name:crm_todo.crm_todo_action
#: model:ir.ui.menu,name:crm_todo.menu_crm_todo
msgid "My Tasks"
msgstr "My Tasks"
#. module: crm_todo
#: view:crm.lead:0
#: field:crm.lead,task_ids:0
msgid "Tasks"
msgstr "Tasks"
#. module: crm_todo
#: view:crm.lead:0
msgid "Done"
msgstr "Done"
#. module: crm_todo
#: constraint:project.task:0
msgid "Error ! You cannot create recursive tasks."
msgstr "Error ! You cannot create recursive tasks."
#. module: crm_todo
#: view:crm.lead:0
msgid "Cancel"
msgstr "Cancel"
#. module: crm_todo
#: view:crm.lead:0
msgid "Extra Info"
msgstr "Extra Info"
#. module: crm_todo
#: field:project.task,lead_id:0
msgid "Lead / Opportunity"
msgstr "Lead / Opportunity"
#. module: crm_todo
#: view:crm.lead:0
msgid "For changing to done state"
msgstr "For changing to done state"
#. module: crm_todo
#: view:crm.lead:0
msgid "Previous"
msgstr "Previous"

1263
addons/event/i18n/mn.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
<field name="payment_term" position="after"> <field name="payment_term" position="after">
<group col="4" colspan="2"> <group col="4" colspan="2">
<field name="reference_type" nolabel="1" size="0" attrs="{'readonly':[('state','!=','draft')]}" <field name="reference_type" nolabel="1" size="0" attrs="{'readonly':[('state','!=','draft')]}"
on_change="generate_bbacomm(type,reference_type,algorithm,partner_id,reference)" colspan="1"/> on_change="generate_bbacomm(type,reference_type, partner_id,reference, context)" colspan="1"/>
<field name="reference" nolabel="1" colspan="3" attrs="{'readonly':[('state','!=','draft')]}"/> <field name="reference" nolabel="1" colspan="3" attrs="{'readonly':[('state','!=','draft')]}"/>
</group> </group>
</field> </field>

View File

@ -44,7 +44,7 @@ class account_invoice(osv.osv):
#l_logger.warning('reference_type = %s' %res ) #l_logger.warning('reference_type = %s' %res )
return res return res
def check_bbacomm(self, val): def check_bbacomm(self, val):
supported_chars = '0-9+*/ ' supported_chars = '0-9+*/ '
pattern = re.compile('[^' + supported_chars + ']') pattern = re.compile('[^' + supported_chars + ']')
if pattern.findall(val or ''): if pattern.findall(val or ''):
@ -75,10 +75,7 @@ class account_invoice(osv.osv):
if (type == 'out_invoice'): if (type == 'out_invoice'):
reference_type = self.pool.get('res.partner').browse(cr, uid, partner_id).out_inv_comm_type reference_type = self.pool.get('res.partner').browse(cr, uid, partner_id).out_inv_comm_type
if reference_type: if reference_type:
algorithm = self.pool.get('res.partner').browse(cr, uid, partner_id).out_inv_comm_algorithm reference = self.generate_bbacomm(cr, uid, ids, type, reference_type, partner_id, '', context={})['value']['reference']
if not algorithm:
algorithm = 'random'
reference = self.generate_bbacomm(cr, uid, ids, type, reference_type, algorithm, partner_id, '')['value']['reference']
res_update = { res_update = {
'reference_type': reference_type or 'none', 'reference_type': reference_type or 'none',
'reference': reference, 'reference': reference,
@ -86,17 +83,15 @@ class account_invoice(osv.osv):
result['value'].update(res_update) result['value'].update(res_update)
return result return result
def generate_bbacomm(self, cr, uid, ids, type, reference_type, algorithm, partner_id, reference): def generate_bbacomm(self, cr, uid, ids, type, reference_type, partner_id, reference, context=None):
partner_obj = self.pool.get('res.partner') partner_obj = self.pool.get('res.partner')
reference = reference or '' reference = reference or ''
algorithm = False
if partner_id:
algorithm = partner_obj.browse(cr, uid, partner_id, context=context).out_inv_comm_algorithm
algorithm = algorithm or 'random'
if (type == 'out_invoice'): if (type == 'out_invoice'):
if reference_type == 'bba': if reference_type == 'bba':
if not algorithm:
if partner_id:
algorithm = partner_obj.browse(cr, uid, partner_id).out_inv_comm_algorithm
if not algorithm:
if not algorithm:
algorithm = 'random'
if algorithm == 'date': if algorithm == 'date':
if not self.check_bbacomm(reference): if not self.check_bbacomm(reference):
doy = time.strftime('%j') doy = time.strftime('%j')

View File

@ -30,15 +30,15 @@
<field name="target">new</field> <field name="target">new</field>
</record> </record>
<record model="ir.ui.view" id="view_bank_statement_form"> <record model="ir.ui.view" id="view_bank_statement_form_bvr">
<field name="name">account.bank.statement.form.inherit</field> <field name="name">account.bank.statement.form.inherit</field>
<field name="model">account.bank.statement</field> <field name="model">account.bank.statement</field>
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/> <field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="balance_end_real" position="after"> <xpath expr="//div[@name='import_buttons']" position="inside">
<button name="%(wizard_bvr_import)d" icon="gtk-execute" string="Import BVR" type="action" colspan="2"/> <button name="%(wizard_bvr_import)d" icon="gtk-execute" string="Import BVR" type="action"/>
</field> </xpath>
</field> </field>
</record> </record>
</data> </data>

View File

@ -11,8 +11,7 @@
<form position="attributes"> <form position="attributes">
<attribute name="string">Install Outlook Plug-In</attribute> <attribute name="string">Install Outlook Plug-In</attribute>
</form> </form>
<xpath expr="//button[@string='Install Modules']" position="replace"/> <xpath expr="//footer" position="replace"/>
<xpath expr="//button[@string='Cancel']" position="replace"/>
<xpath expr="//separator[@string='title']" position="after" version="7.0"> <xpath expr="//separator[@string='title']" position="after" version="7.0">
<group> <group>
<field name="plugin32" widget="url"/> <field name="plugin32" widget="url"/>

View File

@ -11,8 +11,7 @@
<form position="attributes"> <form position="attributes">
<attribute name="string">Install Thunderbird Plug-In</attribute> <attribute name="string">Install Thunderbird Plug-In</attribute>
</form> </form>
<xpath expr="//button[@string='Install Modules']" position="replace"/> <xpath expr="//footer" position="replace"/>
<xpath expr="//button[@string='Cancel']" position="replace"/>
<xpath expr="//separator[@string='title']" position="after"> <xpath expr="//separator[@string='title']" position="after">
<group> <group>
<field name="thunderbird" invisible="1"/> <field name="thunderbird" invisible="1"/>

View File

@ -106,7 +106,7 @@
<field name="inherit_id" ref="account.view_cash_statement_tree"/> <field name="inherit_id" ref="account.view_cash_statement_tree"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="journal_id" position="after"> <field name="journal_id" position="after">
<field name="user_id"/> <field name="user_id" string="Responsible"/>
</field> </field>
</field> </field>
</record> </record>

View File

@ -517,47 +517,44 @@
<t t-name="kanban-box"> <t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click"> <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="oe_dropdown_toggle oe_dropdown_kanban"> <div class="oe_dropdown_toggle oe_dropdown_kanban">
<span class="oe_e">i</span> <span class="oe_e">í</span>
<ul class="oe_dropdown_menu"> <ul class="oe_dropdown_menu">
<li><a type="edit" >Edit...</a></li> <li><a type="edit" >Edit...</a></li>
<li><a type="delete">Delete</a></li> <li><a type="delete">Delete</a></li>
<li>
<ul class="oe_kanban_project_times">
<li><a name="set_remaining_time_1" type="object" class="oe_kanban_button">1</a></li>
<li><a name="set_remaining_time_2" type="object" class="oe_kanban_button">2</a></li>
<li><a name="set_remaining_time_5" type="object" class="oe_kanban_button">5</a></li>
<li><a name="set_remaining_time_10" type="object" class="oe_kanban_button">10</a></li>
<li><a name="do_open" states="draft" string="Validate planned time" type="object" class="oe_kanban_button oe_kanban_button_active">!</a></li>
</ul>
</li>
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li> <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
</ul> </ul>
</div> </div>
<div class="oe_kanban_content"> <div class="oe_kanban_content">
<div> <div><b><field name="name"/></b></div>
<a t-if="record.priority.raw_value == 1" icon="star-on" type="object" name="set_normal_priority"/>
<a t-if="record.priority.raw_value != 1" icon="star-off" type="object" name="set_high_priority" style="opacity:0.6; filter:alpha(opacity=60);"/>
<b><field name="name"/></b>
</div>
<div>
<field name="partner_id"/>
</div>
<div> <div>
<field name="project_id"/> <field name="project_id"/>
<t t-esc="kanban_text_ellipsis(record.description.value, 160)"/><br/> <t t-esc="kanban_text_ellipsis(record.description.value, 160)"/><br/>
<i><field name="date_deadline"/></i> <i><field name="date_deadline"/></i>
<span class="oe_kanban_project_times" style="white-space: nowrap; padding-left: 5px;">
<t t-set="hours" t-value="record.remaining_hours.raw_value"/>
<t t-set="times" t-value="[
[1, (hours gte 1 and hours lt 2)]
,[2, (hours gte 2 and hours lt 5)]
,[5, (hours gte 5 and hours lt 10)]
,[10, (hours gte 10)]
]"/>
<t t-foreach="times" t-as="time"><a
t-if="!time[1]" t-attf-data-name="set_remaining_time_#{time[0]}" type="object" class="oe_kanban_button"><t t-esc="time[0]"/></a><b
t-if="time[1]" class="oe_kanban_button oe_kanban_button_active"><t t-esc="Math.round(hours)"/></b></t>
<a name="do_open" states="draft" string="Validate planned time" type="object" class="oe_kanban_button oe_kanban_button_active">!</a>
</span>
</div> </div>
<div class="oe_kanban_footer_left" style="margin-top:5px;">
<div class="oe_right"> <div class="oe_kanban_bottom_right">
<a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="" name="set_kanban_state_done" class="oe_kanban_status"> </a> <a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="" name="set_kanban_state_done" class="oe_kanban_status"> </a>
<a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Ready" name="set_kanban_state_blocked" class="oe_kanban_status oe_kanban_status_green"> </a> <a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Ready" name="set_kanban_state_blocked" class="oe_kanban_status oe_kanban_status_green"> </a>
<a t-if="record.kanban_state.raw_value === 'blocked'" type="object" string="Blocked" name="set_kanban_state_normal" class="oe_kanban_status oe_kanban_status_red"> </a> <a t-if="record.kanban_state.raw_value === 'blocked'" type="object" string="Blocked" name="set_kanban_state_normal" class="oe_kanban_status oe_kanban_status_red"> </a>
<img t-att-src="kanban_image('res.users', 'avatar', record.user_id.raw_value[0])" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/> <a t-if="record.priority.raw_value == 1" type="object" name="set_normal_priority" class="oe_e oe_star_on">7</a>
</div> <a t-if="record.priority.raw_value != 1" type="object" name="set_high_priority" class="oe_e oe_star_off">7</a>
<img t-att-src="kanban_image('res.users', 'avatar', record.user_id.raw_value[0])" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
</div>
<div class="oe_kanban_footer_left">
<span>
<span class="oe_e">N</span>
<t t-esc="Math.round(record.remaining_hours.raw_value)"/>
</span>
</div> </div>
</div> </div>
<div class="oe_clear"></div> <div class="oe_clear"></div>

View File

@ -1,7 +1,24 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<openerp> <openerp>
<data> <data>
<!-- Partner kanban view inherte --> <record id="act_res_partner_2_sale_order" model="ir.actions.act_window">
<field name="name">Quotations and Sales</field>
<field name="res_model">sale.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="context">{'search_default_partner_id': active_id}</field>
<field name="groups_id" eval="[(4, ref('base.group_sale_salesman'))]"/>
<field name="help">
This customer has no quotation or sale order.
Click here to create a new quotation.
&lt;p&gt;
The "Quotation" is the first step of the Sales flow. Manage your sales from quotation to invoice.
&lt;p&gt;
You will be able to sell products (manage deliveries) as well as services (create projects).
</field>
</record>
<!-- Partner kanban view inherte -->
<record model="ir.ui.view" id="crm_lead_partner_kanban_view"> <record model="ir.ui.view" id="crm_lead_partner_kanban_view">
<field name="name">res.partner.kanban.saleorder.inherit</field> <field name="name">res.partner.kanban.saleorder.inherit</field>
<field name="model">res.partner</field> <field name="model">res.partner</field>
@ -18,6 +35,22 @@
</xpath> </xpath>
</field> </field>
</record> </record>
<record id="res_partner_view_buttons" model="ir.ui.view">
<field name="name">res.partner.view.buttons</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='buttons']" position="inside">
<button name="%(sale.act_res_partner_2_sale_order)d" type="action"
string="Quotations and Sales"
groups="base.group_sale_salesman"/>
</xpath>
</field>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -27,4 +27,28 @@
<function eval="('default',False,'shop_id', [('sale.order', False)], shop, True, False, False, False, True)" id="sale_default_set" model="ir.values" name="set"/> <function eval="('default',False,'shop_id', [('sale.order', False)], shop, True, False, False, False, True)" id="sale_default_set" model="ir.values" name="set"/>
</data> </data>
<data>
<record id="message_welcome_sale" model="mail.message">
<field name="subject">Module sale installed!</field>
<field name="type">comment</field>
<field name="subtype">text</field>
<field name="model">res.users</field>
<field name="res_id" ref="base.user_root"/>
<field name="body_text">Welcome to OpenERP
You can click on the top menu Sales to manage your
customers, your quotations and sales orders.
If you need to manage your sales pipeline (leads,
opportunities, phonecalls), you can install the CRM module
from the Settings top menu.
</field>
</record>
<record id="message_welcome_sale_root" model="mail.notification">
<field name="user_id" ref="base.user_root"/>
<field name="message_id" ref="message_welcome_sale"/>
</record>
</data>
</openerp> </openerp>

View File

@ -570,14 +570,6 @@
<field name="filter" eval="True"/> <field name="filter" eval="True"/>
</record> </record>
<act_window
context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}"
id="act_res_partner_2_sale_order"
name="Quotations and Sales"
groups="base.group_sale_salesman"
res_model="sale.order"
src_model="res.partner"/>
<act_window <act_window
context="{'search_default_product_id': active_id, 'default_product_id': active_id}" context="{'search_default_product_id': active_id, 'default_product_id': active_id}"
id="action_order_line_product_tree" id="action_order_line_product_tree"

View File

@ -68,4 +68,4 @@ class sale_make_invoice(osv.osv_memory):
sale_make_invoice() sale_make_invoice()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: