[MERGE] lp:~openerp-dev/openobject-addons/trunk-review_devs-stw
bzr revid: stw@openerp.com-20120725105833-3bdcb66bzd9l5pg7
This commit is contained in:
commit
ac580aeae0
|
@ -45,7 +45,7 @@ class res_company(osv.osv):
|
|||
_defaults = {
|
||||
'expects_chart_of_accounts': True,
|
||||
'tax_calculation_rounding_method': 'round_per_line',
|
||||
'overdue_msg': '''Dear Sir, dear Madam,
|
||||
'overdue_msg': '''Dear Sir/Madam,
|
||||
|
||||
Our records indicate that some payments on your account are still due. Please find details below.
|
||||
If the amount has already been paid, please disregard this notice. Otherwise, please forward us the total amount stated below.
|
||||
|
|
|
@ -3,5 +3,3 @@ access_account_analytic_analysis_summary_user_sale,account_analytic_analysis.sum
|
|||
access_account_analytic_analysis_summary_month_sale,account_analytic_analysis.summary.month sale,model_account_analytic_analysis_summary_month,base.group_sale_salesman,1,0,0,0
|
||||
access_account_analytic_analysis_summary_user,account_analytic_analysis.summary.user,model_account_analytic_analysis_summary_user,account.group_account_manager,1,0,0,0
|
||||
access_account_analytic_analysis_summary_month,account_analytic_analysis.summary.month,model_account_analytic_analysis_summary_month,account.group_account_manager,1,0,0,0
|
||||
access_account_analytic_analysis_summary_user_project_user,account_analytic_analysis.summary.user project,model_account_analytic_analysis_summary_user,project.group_project_user,1,0,0,0
|
||||
access_account_analytic_analysis_summary_month_project_user,account_analytic_analysis.summary.month project,model_account_analytic_analysis_summary_month,project.group_project_user,1,0,0,0
|
||||
|
|
|
|
@ -78,6 +78,7 @@ class task(osv.osv):
|
|||
def create(self, cr, uid, vals, context=None):
|
||||
task_id = super(task, self).create(cr, uid, vals, context=context)
|
||||
task_browse = self.browse(cr, uid, task_id, context=context)
|
||||
if task_browse.project_id.analytic_account_id:
|
||||
self.pool.get('account.analytic.account').message_append_note(cr, uid, [task_browse.project_id.analytic_account_id.id], body=_("Task <em>%s</em> has been <b>created</b>.") % (task_browse.name), context=context)
|
||||
return task_id
|
||||
task()
|
||||
|
|
|
@ -68,7 +68,7 @@ class delivery_carrier(osv.osv):
|
|||
'price' : fields.function(get_price, string='Price'),
|
||||
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the delivery carrier without removing it."),
|
||||
'normal_price': fields.float('Normal Price', help="Keep empty if the pricing depends on the advanced pricing per destination"),
|
||||
'free_if_more_than': fields.boolean('Free If More Than', help="If the order is more expensive than a certain amount, the customer can benefit from a free shipping"),
|
||||
'free_if_more_than': fields.boolean('Free If Order Total Amount Is More Than', help="If the order is more expensive than a certain amount, the customer can benefit from a free shipping"),
|
||||
'amount': fields.float('Amount', help="Amount of the order to benefit from a free shipping, expressed in the company currency"),
|
||||
'use_detailed_pricelist': fields.boolean('Advanced Pricing per Destination', help="Check this box if you want to manage delivery prices that depends on the destination, the weight, the total of the order, etc."),
|
||||
'pricelist_ids': fields.one2many('delivery.grid', 'carrier_id', 'Advanced Pricing'),
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
<search string="Messages Search">
|
||||
<field name="user_id"/>
|
||||
<field name="body"/>
|
||||
<field name="subject"/>
|
||||
<field name="subject" filter_domain="['|', ('subject', 'ilike', self), ('record_name', 'ilike', self)]" />
|
||||
<field name="type"/>
|
||||
<filter icon="terp-personal+" string="My Feeds"
|
||||
name="my_feeds" help="My Feeds"
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
<separator orientation="vertical"/>
|
||||
<filter string="Services" icon="terp-accessories-archiver" domain="[('type','=','service')]"/>
|
||||
<filter string="Products" icon="terp-accessories-archiver" domain="['|',('type','=','product'),('type','=','consu')]" help="Both stockable and consumable products"/>
|
||||
<filter string="To Sell" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/>
|
||||
<filter name="filter_to_purchase" string="To Purchase" icon="terp-accessories-archiver+" domain="[('purchase_ok', '=', 1)]"/>
|
||||
<filter string="Can be Sold" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/>
|
||||
<filter name="filter_to_purchase" string="Can be Purchased" icon="terp-accessories-archiver+" domain="[('purchase_ok', '=', 1)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="categ_id" widget="selection" operator="child_of"/>
|
||||
<group expand="0" string="Context...">
|
||||
|
|
|
@ -1089,6 +1089,7 @@ class task(base_stage, osv.osv):
|
|||
#raise osv.except_osv(_('Warning !'), _('Stage is not defined in the project.'))
|
||||
write_vals = vals_reset_kstate if t.stage_id != new_stage else vals
|
||||
super(task,self).write(cr, uid, [t.id], write_vals, context=context)
|
||||
self.stage_set_send_note(cr, uid, [t.id], new_stage, context=context)
|
||||
result = True
|
||||
else:
|
||||
result = super(task,self).write(cr, uid, ids, vals, context=context)
|
||||
|
|
|
@ -45,9 +45,9 @@ class procurement_order(osv.osv):
|
|||
|
||||
def _convert_qty_company_hours(self, cr, uid, procurement, context=None):
|
||||
product_uom = self.pool.get('product.uom')
|
||||
company_time_uom_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.project_time_mode_id.id
|
||||
if procurement.product_uom.id != company_time_uom_id:
|
||||
planned_hours = product_uom._compute_qty(cr, uid, procurement.product_uom.id, procurement.product_qty, company_time_uom_id)
|
||||
company_time_uom_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.project_time_mode_id
|
||||
if procurement.product_uom.id != company_time_uom_id.id and procurement.product_uom.category_id.id == company_time_uom_id.category_id.id:
|
||||
planned_hours = product_uom._compute_qty(cr, uid, procurement.product_uom.id, procurement.product_qty, company_time_uom_id.id)
|
||||
else:
|
||||
planned_hours = procurement.product_qty
|
||||
return planned_hours
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<field name="task_work" on_change="onchange_task_work(task_work)"/>
|
||||
<field name="timesheet" on_change="onchange_timesheet(timesheet)"/>
|
||||
<field name="default_order_policy" attrs="{'invisible':['|',('group_invoice_so_lines','=',False),('group_invoice_deli_orders','=',False)],'required': ['|',('group_invoice_so_lines','=',True),('group_invoice_deli_orders','=',True)]}"/>
|
||||
<field name="module_delivery" attrs="{'invisible':[('group_invoice_so_lines','=',False), ('group_invoice_deli_orders','=',False)]}"/>
|
||||
<field name="module_delivery"/>
|
||||
<field name="time_unit" domain="[('category_id.name','=','Working Time')]"
|
||||
attrs="{'invisible': [('task_work','=',False), ('module_account_analytic_analysis','=',False)],'required': ['|', ('task_work','=',True), ('module_account_analytic_analysis','=',True)]}"/>
|
||||
<separator string="Contracts" colspan="2"/>
|
||||
|
|
|
@ -204,6 +204,7 @@
|
|||
</header>
|
||||
<group>
|
||||
<group>
|
||||
<field name="state" invisible="1" />
|
||||
<field name="product_id"
|
||||
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
|
||||
groups="base.group_user"
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
<field name="move_type" position="before">
|
||||
<field name="sale_id"/>
|
||||
</field>
|
||||
<label for="partner_id" position="replace">
|
||||
<label for="partner_id" class="oe_edit_only" string="Contact"/>
|
||||
</label>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
@ -71,7 +74,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name="domain">[('type','=','out')]</field>
|
||||
<field name="context">{'default_type': 'out', 'contact_display': 'partner_address', 'search_default_to_invoice': 1, 'search_default_done': 1}</field>
|
||||
<field name="context">{'default_type': 'out', 'contact_display': 'partner_address', 'search_default_to_invoice': 1, 'search_default_done': 1, 'default_invoice_state': '2binvoiced'}</field>
|
||||
<field name="search_view_id" ref="stock.view_picking_out_search"/>
|
||||
</record>
|
||||
<menuitem action="outgoing_picking_list_to_invoice" id="menu_action_picking_list_to_invoice" parent="base.menu_invoiced" groups="sale.group_invoice_deli_orders" sequence="20"/>
|
||||
|
|
|
@ -62,6 +62,9 @@ class stock_change_product_qty(osv.osv_memory):
|
|||
res.update({'new_quantity': 1})
|
||||
if 'product_id' in fields:
|
||||
res.update({'product_id': product_id})
|
||||
if 'location_id' in fields:
|
||||
location_id = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock', context=context)
|
||||
res.update({'location_id': location_id and location_id.id or False})
|
||||
return res
|
||||
|
||||
def change_product_qty(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
<group string="Select Quantity">
|
||||
<field name="new_quantity" />
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="location_id" />
|
||||
<field name="prodlot_id" />
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="prodlot_id" groups="stock.group_tracking_lot"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="change_product_qty" string="_Apply" type="object" class="oe_highlight"/>
|
||||
|
|
|
@ -98,6 +98,9 @@ class stock_partial_picking(osv.osv_memory):
|
|||
if context is None: context = {}
|
||||
res = super(stock_partial_picking, self).default_get(cr, uid, fields, context=context)
|
||||
picking_ids = context.get('active_ids', [])
|
||||
if context['active_model'] == 'purchase.order':
|
||||
for purchase_order in self.pool.get('purchase.order').browse(cr, uid, picking_ids, context=context):
|
||||
picking_ids = [picking_id.id for picking_id in purchase_order.picking_ids]
|
||||
if not picking_ids or len(picking_ids) != 1:
|
||||
# Partial Picking Processing may only be done for one picking at a time
|
||||
return res
|
||||
|
@ -105,7 +108,7 @@ class stock_partial_picking(osv.osv_memory):
|
|||
# (already seen in previous bug where context passed was containing ir.ui.menu as active_model and the menu
|
||||
# ID as active_id). Though this should be fixed in clients now, this place is sensitive enough to ensure the
|
||||
# consistancy of the context.
|
||||
assert context.get('active_model') in ('stock.picking', 'stock.picking.in', 'stock.picking.out'), 'Bad context propagation'
|
||||
assert context.get('active_model') in ('stock.picking', 'stock.picking.in', 'stock.picking.out', 'purchase.order'), 'Bad context propagation'
|
||||
picking_id, = picking_ids
|
||||
if 'picking_id' in fields:
|
||||
res.update(picking_id=picking_id)
|
||||
|
|
|
@ -79,9 +79,10 @@ instance.web_shortcuts.Shortcuts = instance.web.Widget.extend({
|
|||
var self = this,
|
||||
id = $link.data('id');
|
||||
self.session.active_id = id;
|
||||
// TODO: Use do_action({menu_id: id, type: 'ir.actions.menu'})
|
||||
self.rpc('/web/menu/action', {'menu_id': id}, function(ir_menu_data) {
|
||||
if (ir_menu_data.action.length){
|
||||
instance.webclient.user_menu.on_action(ir_menu_data.action[0][2]);
|
||||
instance.webclient.user_menu.on_action({action_id: ir_menu_data.action[0][2].id});
|
||||
}
|
||||
});
|
||||
this.$element.find('.oe_systray_shortcuts').trigger('mouseout');
|
||||
|
|
Loading…
Reference in New Issue