[MERGE]: Merged with lp:openobject-addons

bzr revid: atp@tinyerp.com-20120926043554-xigxoqo52hv574hj
This commit is contained in:
Atul Patel (OpenERP) 2012-09-26 10:05:54 +05:30
commit 740863c6aa
72 changed files with 88 additions and 64 deletions

View File

@ -447,11 +447,13 @@ class account_bank_statement(osv.osv):
return self.write(cr, uid, done, {'state':'draft'}, context=context)
def _compute_balance_end_real(self, cr, uid, journal_id, context=None):
cr.execute('SELECT balance_end_real \
FROM account_bank_statement \
WHERE journal_id = %s AND NOT state = %s \
ORDER BY date DESC,id DESC LIMIT 1', (journal_id, 'draft'))
res = cr.fetchone()
res = False
if journal_id:
cr.execute('SELECT balance_end_real \
FROM account_bank_statement \
WHERE journal_id = %s AND NOT state = %s \
ORDER BY date DESC,id DESC LIMIT 1', (journal_id, 'draft'))
res = cr.fetchone()
return res and res[0] or 0.0
def onchange_journal_id(self, cr, uid, statement_id, journal_id, context=None):

View File

@ -392,7 +392,12 @@
<field name="loss_account_id" model="account.account" ref="rsa" />
<field name="internal_account_id" model="account.account" ref="rsa" />
<field name="with_last_closing_balance" eval="True" />
<field name="cash_control" eval="True" />
<!--
Usually, cash payment methods requires a control at opening and closing.
Bot for demo data, it's better to avoid the control step so that people
that test OpenERP arrive directly in the touchscreen UI.
-->
<field name="cash_control" eval="False"/>
<field name="view_id" ref="account_journal_bank_view"/>
<field name="sequence_id" ref="sequence_cash_journal"/>
<field model="account.account" name="default_debit_account_id" ref="cash"/>
@ -426,9 +431,9 @@
<field name="code">TUBK</field>
<field name="type">bank</field>
<field name="view_id" ref="account_journal_bank_view"/>
<field model="account.account" name="usd_debit_account_id" ref="usd_bnk"/>
<field model="account.account" name="usd_credit_account_id" ref="usd_bnk"/>
<field name="currency_id" ref="base.USD"/>
<field model="account.account" name="default_debit_account_id" ref="usd_bnk"/>
<field model="account.account" name="default_credit_account_id" ref="usd_bnk"/>
<field name="currency" ref="base.USD"/>
</record>
<!--
Product income and expense accounts, default parameters

View File

@ -23,6 +23,7 @@
'name': 'Calendar',
'version': '1.0',
'depends': ['base', 'base_status', 'mail', 'base_action_rule'],
'summary': 'Personnal & Shared Agenda',
'description': """
This is a full-featured calendar system.
========================================
@ -30,7 +31,6 @@ This is a full-featured calendar system.
It supports:
------------
- Calendar of events
- Alerts (create requests)
- Recurring events
- Invitations to people

View File

@ -996,7 +996,7 @@ class calendar_event(osv.osv):
'sequence': fields.integer('Sequence'),
'name': fields.char('Description', size=64, required=False, states={'done': [('readonly', True)]}),
'date': fields.datetime('Date', states={'done': [('readonly', True)]}, required=True,),
'date_deadline': fields.datetime('Deadline', states={'done': [('readonly', True)]}, required=True,),
'date_deadline': fields.datetime('End Date', states={'done': [('readonly', True)]}, required=True,),
'create_date': fields.datetime('Created', readonly=True),
'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
'description': fields.text('Description', states={'done': [('readonly', True)]}),

View File

@ -428,6 +428,5 @@
name="Events" parent="base.menu_calendar_configuration"
sequence="15" action="action_view_event"/>
<menuitem name="Agenda" id="mail_menu_agenda" parent="mail.mail_my_stuff" sequence="10" action="action_view_event"/>
</data>
</openerp>

View File

@ -87,36 +87,38 @@
<page string="Meeting Detail">
<group>
<group>
<field name="user_id"/>
<field name="date" string="Starting at"/>
<label for="duration" attrs="{'invisible': [('allday','=',True)]}"/>
<div attrs="{'invisible': [('allday','=',True)]}">
<field name="duration" widget="float_time"
on_change="onchange_dates(date,duration,False,allday)"
class="oe_inline"/> hours
(<field name="allday" on_change="onchange_dates(date,False,False,allday)" class="oe_inline"/>
<label for="allday" string="All Day?"/>)
</div>
<field name="date_deadline" groups="base.group_no_one"
attrs="{'invisible': [('allday','=',True)]}"
on_change="onchange_dates(date,False,date_deadline)"/>
</group>
<group>
<field name="user_id" groups="base.group_no_one"/>
<field name="categ_ids" widget="many2many_tags"/>
<field name="location"/>
<field name="organizer" groups="base.group_no_one"/>
</group>
</group>
<label for="description"/>
<field name="description"/>
</page>
<page string="Options">
<group>
<group>
<label for="date" string="Starting at"/>
<div>
<field name="date"/>
<span attrs="{'invisible': [('allday','=',True)]}">
(<field name="duration" widget="float_time"
on_change="onchange_dates(date,duration,False,allday)"
class="oe_inline"/> hours)
</span>
</div>
<label for="date_deadline" />
<div>
<field name="date_deadline"
string="End Date" attrs="{'invisible': [('allday','=',True)]}"
on_change="onchange_dates(date,False,date_deadline)"/>
(<field name="allday" on_change="onchange_dates(date,False,False,allday)" class="oe_inline"/>
<label for="allday" string="All Day?"/>)
</div>
<field name="recurrency"
attrs="{'readonly': [('recurrent_uid','!=',False)]}"/>
<field name="recurrency"
attrs="{'readonly': [('recurrent_uid','!=',False)]}"/>
</group>
<group>
<field name="alarm_id" widget="selection" />
<field name="alarm_id" widget="selection" groups="base.group_no_one"/>
<field name="class"/>
<field name="show_as"/>
<field name="rrule" invisible="1" readonly="1"/>
@ -136,7 +138,7 @@
<field name="end_date" attrs="{'invisible' : [('end_type', '!=', 'end_date')], 'required': [('end_type', '=', 'end_date')]}" class="oe_inline"/>
</div>
<label string="Select Weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}"/>
<group col="4" colspan="1" name="weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}">
<group col="2" colspan="1" name="weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}">
<field name="mo" />
<field name="tu" />
<field name="we" />
@ -162,8 +164,6 @@
</group>
</group>
<label for="description"/>
<field name="description"/>
</page>
<page string="Invitation Detail">
<button string="Invite People"
@ -339,7 +339,11 @@
</record>
<menuitem id="menu_crm_meeting" parent="base.menu_sales" sequence="8"
name="Meetings" action="action_crm_meeting"/>
name="Agenda" action="action_crm_meeting"/>
<menuitem name="Agenda"
id="mail_menu_agenda" parent="mail.mail_my_stuff"
sequence="10" action="action_crm_meeting"/>
</data>
</openerp>

View File

@ -57,7 +57,7 @@ Wizards provided by this module:
'base_vat',
'base_iban',
'account_chart',
'account_coda',
'l10n_be_coda',
],
'data': [
'account_financial_report.xml',

View File

@ -20,7 +20,7 @@
#
##############################################################################
import account_coda
import l10n_be_coda
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -93,14 +93,14 @@ If required, you can manually adjust the descriptions via the CODA configuration
'depends': ['account_voucher','base_iban', 'l10n_be_invoice_bba', 'account_bank_statement_extensions'],
'demo': [],
'data': [
'account_coda_trans_type.xml',
'account_coda_trans_code.xml',
'account_coda_trans_category.xml',
'account_coda_comm_type.xml',
'l10n_be_coda_trans_type.xml',
'l10n_be_coda_trans_code.xml',
'l10n_be_coda_trans_category.xml',
'l10n_be_coda_comm_type.xml',
'security/ir.model.access.csv',
'security/account_security.xml',
'account_coda_wizard.xml',
'account_coda_view.xml',
'l10n_be_coda_wizard.xml',
'l10n_be_coda_view.xml',
],
'auto_install': False,
'installable': True,

View File

@ -942,7 +942,7 @@ class account_coda_import(osv.osv_memory):
def action_open_coda_statements(self, cr, uid, ids, context=None):
if context is None:
context = {}
module, xml_id = 'account_coda', 'action_coda_bank_statements'
module, xml_id = 'l10n_be_coda', 'action_coda_bank_statements'
res_model, res_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, module, xml_id)
action = self.pool.get('ir.actions.act_window').read(cr, uid, res_id, context=context)
domain = eval(action.get('domain') or '[]')
@ -973,9 +973,9 @@ def str2float(str):
return 0.0
def list2float(lst):
try:
return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
except:
return 0.0
try:
return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
except:
return 0.0
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -33,7 +33,6 @@ Accounting chart and localization for Ecuador.
'base_vat',
'base_iban',
'account_chart',
'account_coda',
],
'data': [
'account_tax_code.xml',

View File

@ -49,9 +49,9 @@ class account_bilan_report(osv.osv_memory):
data = {}
data['form'] = {}
data['ids'] = active_ids
data['form']['fiscalyear'] = self.browse(cr, uid, ids)[0].fiscalyear_id.id
data['form']['fiscalyear_id'] = self.browse(cr, uid, ids)[0].fiscalyear_id.id
return {'type': 'ir.actions.report.xml', 'report_name': 'l10n.fr.bilan', 'datas': data}
account_bilan_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -49,9 +49,9 @@ class account_cdr_report(osv.osv_memory):
data = {}
data['form'] = {}
data['ids'] = active_ids
data['form']['fiscalyear'] = self.browse(cr, uid, ids)[0].fiscalyear_id.id
data['form']['fiscalyear_id'] = self.browse(cr, uid, ids)[0].fiscalyear_id.id
return { 'type': 'ir.actions.report.xml', 'report_name': 'l10n.fr.compute_resultant', 'datas': data}
account_cdr_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -23,7 +23,7 @@ import openerp
import openerp.tools as tools
from osv import osv
from osv import fields
from openerp import SUPERUSER_ID
class mail_group(osv.Model):
""" A mail_group is a collection of users sharing messages in a discussion
@ -116,7 +116,10 @@ class mail_group(osv.Model):
model_name=self._name, context=context)
vals['alias_id'] = alias_id
mail_group_id = super(mail_group, self).create(cr, uid, vals, context)
#check access rights for the current user, then create as SUPERUSER because the object inherits
#ir.ui.menu (for which normal users do not have creation rights)
self.check_access_rights(cr, uid, 'create')
mail_group_id = super(mail_group, self).create(cr, SUPERUSER_ID, vals, context=context)
# Create client action for this group and link the menu to it
ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'mail', 'action_mail_group_feeds')
@ -130,8 +133,8 @@ class mail_group(osv.Model):
'thread_level': 1,
}
cobj = self.pool.get('ir.actions.client')
newref = cobj.copy(cr, uid, ref[1], default={'params': str(params), 'name': vals['name']}, context=context)
self.write(cr, uid, [mail_group_id], {'action': 'ir.actions.client,' + str(newref), 'mail_group_id': mail_group_id}, context=context)
newref = cobj.copy(cr, SUPERUSER_ID, ref[1], default={'params': str(params), 'name': vals['name']}, context=context)
self.write(cr, SUPERUSER_ID, [mail_group_id], {'action': 'ir.actions.client,' + str(newref), 'mail_group_id': mail_group_id}, context=context)
mail_alias.write(cr, uid, [vals['alias_id']], {"alias_force_thread_id": mail_group_id}, context)

View File

@ -61,7 +61,7 @@
<div class="oe_edit_only">
<label for="name" string="Group Name"/>
</div>
<h1><field name="name"/></h1>
<h1><field name="name" readonly="0"/></h1>
<div name="alias_box" colspan="4" attrs="{'invisible': [('alias_domain', '=', False)]}">
<field name="alias_id" invisible="1" required="0"/>
<label for="alias_name" class="oe_edit_only"/>

View File

@ -863,6 +863,8 @@
<form string="Point of Sale Session" version="7.0">
<header>
<button name="open" type="workflow" string="Validate &amp; Open Session" states="opening_control" class="oe_highlight"/>
<button name="open_frontend_cb" type="object" string="Continue Selling" states="opened"
class="oe_highlight"/>
<button name="cashbox_control" type="workflow" string="End of Session"
attrs="{'invisible' : ['|', ('cash_control', '=', False),('state', '!=', 'opened')]}"
class="oe_highlight" />
@ -871,7 +873,6 @@
class="oe_highlight" />
<button name="close" type="workflow" string="Validate Closing &amp; Post Entries" states="closing_control"
class="oe_highlight" />
<button name="open_frontend_cb" type="object" string="Continue Selling" states="opened"/>
<div class="oe_right">
<field name="state" widget="statusbar" statusbar_visible="opening_control,opened,closing_control,closed" nolabel="1" />
</div>

View File

@ -709,6 +709,15 @@ class stock_picking(osv.osv):
for move in picking_obj.move_lines:
move_obj.write(cr, uid, [move.id], {'tracking_id': False,'prodlot_id':False, 'move_history_ids2': [(6, 0, [])], 'move_history_ids': [(6, 0, [])]})
return res
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
if view_type == 'form' and not view_id:
mod_obj = self.pool.get('ir.model.data')
if self._name == "stock.picking.in":
model,view_id = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_in_form')
if self._name == "stock.picking.out":
model,view_id = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_form')
return super(stock_picking,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
def onchange_partner_in(self, cr, uid, context=None, partner_id=None):
return {}
@ -2950,6 +2959,7 @@ class stock_picking_in(osv.osv):
return self.pool.get('stock.picking')._workflow_signal(cr, uid, ids, signal, context=context)
_columns = {
'backorder_id': fields.many2one('stock.picking.in', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
'state': fields.selection(
[('draft', 'Draft'),
('auto', 'Waiting Another Operation'),
@ -2994,6 +3004,7 @@ class stock_picking_out(osv.osv):
return self.pool.get('stock.picking')._workflow_signal(cr, uid, ids, signal, context=context)
_columns = {
'backorder_id': fields.many2one('stock.picking.out', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
'state': fields.selection(
[('draft', 'Draft'),
('auto', 'Waiting Another Operation'),

View File

@ -88,7 +88,7 @@ openerp.web_linkedin = function(instance) {
selected_entity: function(entity) {
var self = this;
this.create_on_change(entity).then(function(to_change) {
self.view.on_processed_onchange({value:to_change});
self.view.set_values(to_change);
});
},
create_on_change: function(entity) {