[MERGE] lp:~openerp-dev/openobject-addons/trunk-addons-issues3-account-pso

bzr revid: stw@openerp.com-20120806110035-mkegg0b6x5oom1mr
This commit is contained in:
Stephane Wirtel 2012-08-06 13:00:35 +02:00
commit 3155c9b075
7 changed files with 39 additions and 26 deletions

View File

@ -9,9 +9,9 @@
<form position="attributes" version="7.0">
<attribute name="string">Accounting Application Configuration</attribute>
</form>
<button name="action_next" position="attributes">
<attribute name="string">Continue</attribute>
</button>
<footer position="replace">
<button name="action_next" type="object" string="Continue" class="oe_highlight"/>
</footer>
<separator string="title" position="replace">
<group>
<field name="charts"/>

View File

@ -63,7 +63,7 @@ class crm_meeting(base_state, osv.Model):
'event_id', 'attendee_id', 'Attendees', states={'done': [('readonly', True)]}),
}
_defaults = {
'state': 'draft',
'state': 'open',
}
# ----------------------------------------

View File

@ -72,15 +72,7 @@
<field name="arch" type="xml">
<form string="Meetings" version="7.0">
<header>
<button name="case_open" string="Confirm" type="object"
states="draft"/>
<button name="case_close" string="Done" type="object"
states="open"/>
<button name="case_reset" string="Reset to Unconfirmed" type="object"
states="cancel,done"/>
<button name="case_cancel" string="Cancel" type="object"
states="draft,open"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,done"/>
<field name="state"/>
</header>
<sheet>
<div class="oe_title">

View File

@ -81,6 +81,7 @@ class crm_phonecall(base_state, osv.osv):
'priority': crm.AVAILABLE_PRIORITIES[2][0],
'state': _get_default_state,
'user_id': lambda self,cr,uid,ctx: uid,
'active': 1
}
def create(self, cr, uid, vals, context=None):

View File

@ -419,7 +419,7 @@
</h1>
<group>
<group>
<field name="project_id" on_change="onchange_project(project_id)"/>
<field name="project_id" on_change="onchange_project(project_id)" context="{'default_use_tasks':1}"/>
<field name="user_id" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
@ -542,15 +542,15 @@
<i><field name="date_deadline"/></i>
</div>
<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 === '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 === 'normal'" type="object" string="Ready to Pull" name="set_kanban_state_done" class="oe_kanban_status"> </a>
<a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Ready to Pull" 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.priority.raw_value == 1" type="object" name="set_normal_priority" class="oe_e oe_star_on">7</a>
<a t-if="record.priority.raw_value != 1" type="object" name="set_high_priority" class="oe_e oe_star_off">7</a>
<a t-if="record.priority.raw_value == 1" type="object" string="Priority" name="set_normal_priority" class="oe_e oe_star_on">7</a>
<a t-if="record.priority.raw_value != 1" type="object" string="Priority" 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 groups="project.group_time_work_estimation_tasks">
<span class="oe_e">N</span>
<t t-esc="Math.round(record.remaining_hours.raw_value)"/>
</span>

View File

@ -2802,6 +2802,14 @@ class stock_inventory_line(osv.osv):
'state': fields.related('inventory_id','state',type='char',string='Status',readonly=True),
}
def _default_stock_location(self, cr, uid, context=None):
stock_location = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock')
return stock_location.id
_defaults = {
'location_id': _default_stock_location
}
def on_change_product_id(self, cr, uid, ids, location_id, product, uom=False, to_date=False):
""" Changes UoM and name if product_id changes.
@param location_id: Location id
@ -2833,8 +2841,20 @@ class stock_warehouse(osv.osv):
'lot_stock_id': fields.many2one('stock.location', 'Location Stock', required=True, domain=[('usage','=','internal')]),
'lot_output_id': fields.many2one('stock.location', 'Location Output', required=True, domain=[('usage','<>','view')]),
}
def _default_lot_input_stock_id(self, cr, uid, context=None):
lot_input_stock = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock')
return lot_input_stock.id
def _default_lot_output_id(self, cr, uid, context=None):
lot_output = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_output')
return lot_output.id
_defaults = {
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.inventory', context=c),
'lot_input_id': _default_lot_input_stock_id,
'lot_stock_id': _default_lot_input_stock_id,
'lot_output_id': _default_lot_output_id,
}
stock_warehouse()

View File

@ -680,9 +680,9 @@
<h1><field name="name"/></h1>
<group>
<group>
<field name="lot_input_id"/>
<field name="lot_stock_id"/>
<field name="lot_output_id"/>
<field name="lot_input_id" groups="stock.group_locations"/>
<field name="lot_stock_id" groups="stock.group_locations"/>
<field name="lot_output_id" groups="stock.group_locations"/>
</group>
<group>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
@ -699,9 +699,9 @@
<field name="arch" type="xml">
<tree string="Warehouse">
<field name="name"/>
<field name="lot_input_id"/>
<field name="lot_stock_id"/>
<field name="lot_output_id"/>
<field name="lot_input_id" groups="stock.group_locations"/>
<field name="lot_stock_id" groups="stock.group_locations"/>
<field name="lot_output_id" groups="stock.group_locations"/>
<field name="partner_id"/>
</tree>
</field>
@ -792,7 +792,7 @@
<group>
<group>
<field name="backorder_id" readonly="1"/>
<field name="invoice_state" string="Invoice Control" groups="account.group_account_invoice"/>
<field name="invoice_state" string="Invoice Control" groups="account.group_account_invoice" attrs="{'invisible':[('invoice_state', '=', 'none')]}"/>
<field name="stock_journal_id" widget="selection" groups="account.group_account_user"/>
</group>
<group>