[MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 10005 revid:dle@openerp.com-20140422150710-mr9x3vyq0wcg31l5
bzr revid: dle@openerp.com-20140422162028-2icoebrb5q4tg3t3
This commit is contained in:
commit
b6255eb55d
|
@ -1945,15 +1945,17 @@ class account_tax(osv.osv):
|
|||
return super(account_tax, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||
if context is None:
|
||||
context = {}
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
|
||||
if context and context.has_key('type'):
|
||||
if context.get('type'):
|
||||
if context.get('type') in ('out_invoice','out_refund'):
|
||||
args += [('type_tax_use','in',['sale','all'])]
|
||||
elif context.get('type') in ('in_invoice','in_refund'):
|
||||
args += [('type_tax_use','in',['purchase','all'])]
|
||||
|
||||
if context and context.has_key('journal_id'):
|
||||
if context.get('journal_id'):
|
||||
journal = journal_pool.browse(cr, uid, context.get('journal_id'))
|
||||
if journal.type in ('sale', 'purchase'):
|
||||
args += [('type_tax_use','in',[journal.type,'all'])]
|
||||
|
|
|
@ -457,7 +457,7 @@
|
|||
<filter name="invoices" string="Invoices" domain="[('state','not in',['draft','cancel'])]" help="Proforma/Open/Paid Invoices"/>
|
||||
<filter name="unpaid" string="Unpaid" domain="[('state','=','open')]" help="Unpaid Invoices"/>
|
||||
<separator/>
|
||||
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
|
||||
<field name="partner_id" operator="child_of"/>
|
||||
<field name="user_id" string="Salesperson"/>
|
||||
<field name="period_id" string="Period"/>
|
||||
<separator/>
|
||||
|
|
|
@ -1020,10 +1020,14 @@ class account_move_line(osv.osv):
|
|||
part_rec_ids = [rec['reconcile_partial_id'][0] for rec in part_recs]
|
||||
unlink_ids += rec_ids
|
||||
unlink_ids += part_rec_ids
|
||||
all_moves = obj_move_line.search(cr, uid, ['|',('reconcile_id', 'in', unlink_ids),('reconcile_partial_id', 'in', unlink_ids)])
|
||||
all_moves = list(set(all_moves) - set(move_ids))
|
||||
if unlink_ids:
|
||||
if opening_reconciliation:
|
||||
obj_move_rec.write(cr, uid, unlink_ids, {'opening_reconciliation': False})
|
||||
obj_move_rec.unlink(cr, uid, unlink_ids)
|
||||
if all_moves:
|
||||
obj_move_line.reconcile_partial(cr, uid, all_moves, 'auto',context=context)
|
||||
return True
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None, check=True):
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<search string="Analytic Account">
|
||||
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Account"/>
|
||||
<field name="date"/>
|
||||
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
|
||||
<field name="partner_id" operator="child_of"/>
|
||||
<field name="manager_id"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="user_id"/>
|
||||
|
|
|
@ -454,15 +454,10 @@ class account_bank_statement(osv.osv):
|
|||
_inherit = "account.bank.statement"
|
||||
_name = "account.bank.statement"
|
||||
|
||||
def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, st_line_number, context=None):
|
||||
account_move_line_pool = self.pool.get('account.move.line')
|
||||
account_bank_statement_line_pool = self.pool.get('account.bank.statement.line')
|
||||
st_line = account_bank_statement_line_pool.browse(cr, uid, st_line_id, context=context)
|
||||
result = super(account_bank_statement,self).create_move_from_st_line(cr, uid, st_line_id, company_currency_id, st_line_number, context=context)
|
||||
move = st_line.move_ids and st_line.move_ids[0] or False
|
||||
if move:
|
||||
for line in move.line_id:
|
||||
account_move_line_pool.write(cr, uid, [line.id], {'analytics_id':st_line.analytics_id.id}, context=context)
|
||||
def _prepare_bank_move_line(self, cr, uid, st_line, move_id, amount, company_currency_id, context=None):
|
||||
result = super(account_bank_statement,self)._prepare_bank_move_line(cr, uid, st_line,
|
||||
move_id, amount, company_currency_id, context=context)
|
||||
result['analytics_id'] = st_line.analytics_id.id
|
||||
return result
|
||||
|
||||
def button_confirm_bank(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -937,19 +937,17 @@ class account_voucher(osv.osv):
|
|||
def cancel_voucher(self, cr, uid, ids, context=None):
|
||||
reconcile_pool = self.pool.get('account.move.reconcile')
|
||||
move_pool = self.pool.get('account.move')
|
||||
|
||||
move_line_pool = self.pool.get('account.move.line')
|
||||
for voucher in self.browse(cr, uid, ids, context=context):
|
||||
# refresh to make sure you don't unlink an already removed move
|
||||
voucher.refresh()
|
||||
recs = []
|
||||
for line in voucher.move_ids:
|
||||
if line.reconcile_id:
|
||||
recs += [line.reconcile_id.id]
|
||||
if line.reconcile_partial_id:
|
||||
recs += [line.reconcile_partial_id.id]
|
||||
|
||||
reconcile_pool.unlink(cr, uid, recs)
|
||||
|
||||
move_lines = [move_line.id for move_line in line.reconcile_id.line_id]
|
||||
move_lines.remove(line.id)
|
||||
reconcile_pool.unlink(cr, uid, [line.reconcile_id.id])
|
||||
if len(move_lines) >= 2:
|
||||
move_line_pool.reconcile_partial(cr, uid, move_lines, 'auto',context=context)
|
||||
if voucher.move_id:
|
||||
move_pool.button_cancel(cr, uid, [voucher.move_id.id])
|
||||
move_pool.unlink(cr, uid, [voucher.move_id.id])
|
||||
|
|
|
@ -327,7 +327,7 @@
|
|||
<field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike',self)]"/>
|
||||
<field name="section_id" context="{'invisible_section': False}" groups="base.group_multi_salesteams"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
|
||||
<field name="partner_id" operator="child_of"/>
|
||||
<field name="create_date"/>
|
||||
<field name="country_id" context="{'invisible_country': False}"/>
|
||||
<separator/>
|
||||
|
@ -546,7 +546,7 @@
|
|||
<field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike', self)]"/>
|
||||
<field name="section_id" context="{'invisible_section': False}" groups="base.group_multi_salesteams"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
|
||||
<field name="partner_id" operator="child_of"/>
|
||||
<field name="stage_id" domain="[]"/>
|
||||
<field name="probability"/>
|
||||
<separator/>
|
||||
|
|
|
@ -176,7 +176,7 @@
|
|||
<separator/>
|
||||
<filter string="Phone Calls Assigned to Me or My Team(s)" icon="terp-personal+" domain="['|', ('section_id.user_id','=',uid), ('user_id', '=', uid)]"
|
||||
help="Phone Calls Assigned to the current user or with a team having the current user as team leader"/>
|
||||
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
|
||||
<field name="partner_id" operator="child_of"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id" string="Sales Team"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<field name="model">mail.mail</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Email Search">
|
||||
<field name="email_from" filter_domain="['|' '|',('email_from','ilike',self), ('email_to','ilike',self), ('subject','ilike',self)]" string="Email"/>
|
||||
<field name="email_from" filter_domain="['|', '|',('email_from','ilike',self), ('email_to','ilike',self), ('subject','ilike',self)]" string="Email"/>
|
||||
<field name="date"/>
|
||||
<filter icon="terp-camera_test" name="received" string="Received" domain="[('state','=','received')]"/>
|
||||
<filter icon="terp-call-start" name="outgoing" string="Outgoing" domain="[('state','=','outgoing')]"/>
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
This module allows users to create their own notes inside OpenERP
|
||||
=================================================================
|
||||
|
||||
Use notes to write meeting minutes, organize ideas, organize personnal todo
|
||||
lists, etc. Each user manages his own personnal Notes. Notes are available to
|
||||
Use notes to write meeting minutes, organize ideas, organize personal todo
|
||||
lists, etc. Each user manages his own personal Notes. Notes are available to
|
||||
their authors only, but they can share notes to others users so that several
|
||||
people can work on the same note in real time. It's very efficient to share
|
||||
meeting minutes.
|
||||
|
|
|
@ -142,7 +142,7 @@
|
|||
<search string="Issue Tracker Search">
|
||||
<field name="name" string="Issue" filter_domain="['|', '|', '|', ('partner_id','child_of',self), ('description','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
|
||||
<field name="id"/>
|
||||
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
|
||||
<field name="partner_id" operator="child_of"/>
|
||||
<filter string="Unassigned" name="unassigned" domain="[('user_id', '=', False)]"/>
|
||||
<filter string="New" name="draft" domain="[('stage_id.sequence', '=', 1)]"/>
|
||||
<separator/>
|
||||
|
|
|
@ -273,7 +273,7 @@
|
|||
<filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]" help="Purchase order which are in the exception state"/>
|
||||
<separator/>
|
||||
<filter icon="terp-gtk-go-back-rtl" name="not_invoiced" string="Not Invoiced" domain="[('invoice_ids','=', False)]" help="Purchase orders that include lines not invoiced."/>
|
||||
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
|
||||
<field name="partner_id" operator="child_of"/>
|
||||
<field name="product_id"/>
|
||||
<field name="create_uid"/>
|
||||
<group expand="0" string="Group By...">
|
||||
|
@ -300,7 +300,7 @@
|
|||
<filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]" help="Purchase orders which are in exception state"/>
|
||||
<separator/>
|
||||
<filter icon="terp-gtk-go-back-rtl" name="not_invoiced" string="Not Invoiced" domain="[('invoice_ids','=', False)]" help="Purchase orders that include lines not invoiced."/>
|
||||
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
|
||||
<field name="partner_id" operator="child_of"/>
|
||||
<field name="product_id"/>
|
||||
<field name="create_uid"/>
|
||||
<group expand="0" string="Group By...">
|
||||
|
|
|
@ -324,7 +324,6 @@ Thanks!</field>
|
|||
<field name="type">service</field>
|
||||
<field name="list_price">150.0</field>
|
||||
<field name="standard_price">100.0</field>
|
||||
<field name="supply_method">produce</field> <!-- TODO this is a procurement field, which is not a sale dependency -->
|
||||
<field name="uom_id" ref="product.product_uom_day"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_day"/>
|
||||
<field name="company_id" eval="[]"/>
|
||||
|
|
|
@ -253,7 +253,7 @@
|
|||
<filter icon="terp-dolar_ok!" string="Done" domain="[('state','=','done')]" help="Sales Order done"/>
|
||||
<separator/>
|
||||
<filter string="My" domain="[('user_id','=',uid)]" help="My Sales Orders" icon="terp-personal" name="my_sale_orders_filter"/>
|
||||
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
|
||||
<field name="partner_id" operator="child_of"/>
|
||||
<field name="user_id"/>
|
||||
<field name="project_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
|
@ -421,7 +421,7 @@
|
|||
<separator/>
|
||||
<filter string="My Sales Order Lines" icon="terp-personnal" domain="[('salesman_id','=',uid)]" help="Sales Order Lines related to a Sales Order of mine"/>
|
||||
<field name="order_id"/>
|
||||
<field name="order_partner_id" filter_domain="[('order_partner_id', 'child_of', self)]"/>
|
||||
<field name="order_partner_id" operator="child_of"/>
|
||||
<field name="product_id"/>
|
||||
<field name="salesman_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
|
@ -447,7 +447,7 @@
|
|||
<separator/>
|
||||
<filter string="My Sales Order Lines" icon="terp-personal" domain="[('salesman_id','=',uid)]" help="My Sales Order Lines"/>
|
||||
<field name="order_id"/>
|
||||
<field name="order_partner_id" filter_domain="[('order_partner_id', 'child_of', self)]"/>
|
||||
<field name="order_partner_id" operator="child_of"/>
|
||||
<field name="product_id"/>
|
||||
<field name="salesman_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
|
|
|
@ -54,6 +54,10 @@
|
|||
<field name="type">make_to_order</field>
|
||||
</record>
|
||||
|
||||
<record id="sale.advance_product_0" model="product.product">
|
||||
<field name="supply_method">produce</field>
|
||||
</record>
|
||||
|
||||
<!-- Run all schedulers -->
|
||||
<function model="procurement.order" name="run_scheduler"/>
|
||||
|
||||
|
|
|
@ -718,7 +718,6 @@ class stock_picking(osv.osv):
|
|||
default = {}
|
||||
default = default.copy()
|
||||
picking_obj = self.browse(cr, uid, id, context=context)
|
||||
move_obj = self.pool.get('stock.move')
|
||||
if ('name' not in default) or (picking_obj.name == '/'):
|
||||
seq_obj_name = 'stock.picking.' + picking_obj.type
|
||||
default['name'] = self.pool.get('ir.sequence').get(cr, uid, seq_obj_name)
|
||||
|
@ -727,10 +726,6 @@ class stock_picking(osv.osv):
|
|||
if 'invoice_state' not in default and picking_obj.invoice_state == 'invoiced':
|
||||
default['invoice_state'] = '2binvoiced'
|
||||
res = super(stock_picking, self).copy(cr, uid, id, default, context)
|
||||
if res:
|
||||
picking_obj = self.browse(cr, uid, res, context=context)
|
||||
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):
|
||||
|
@ -1797,12 +1792,15 @@ class stock_move(osv.osv):
|
|||
_('Quantities, Units of Measure, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator).'))
|
||||
return super(stock_move, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
def copy_data(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
default = default.copy()
|
||||
default.update({'move_history_ids2': [], 'move_history_ids': []})
|
||||
return super(stock_move, self).copy(cr, uid, id, default, context=context)
|
||||
default.setdefault('tracking_id', False)
|
||||
default.setdefault('prodlot_id', False)
|
||||
default.setdefault('move_history_ids', [])
|
||||
default.setdefault('move_history_ids2', [])
|
||||
return super(stock_move, self).copy_data(cr, uid, id, default, context=context)
|
||||
|
||||
def _auto_init(self, cursor, context=None):
|
||||
res = super(stock_move, self)._auto_init(cursor, context=context)
|
||||
|
|
|
@ -28,8 +28,8 @@ class stock_location_product(osv.osv_memory):
|
|||
_columns = {
|
||||
'from_date': fields.datetime('From'),
|
||||
'to_date': fields.datetime('To'),
|
||||
'type': fields.selection([('inventory','Analyse Current Inventory'),
|
||||
('period','Analyse a Period')], 'Analyse Type', required=True),
|
||||
'type': fields.selection([('inventory','Analyze current inventory'),
|
||||
('period','Analyze period')], 'Analysis Type', required=True),
|
||||
}
|
||||
|
||||
def action_open_window(self, cr, uid, ids, context=None):
|
||||
|
|
Loading…
Reference in New Issue