[MERGE] merge with trunk addons
bzr revid: mra@mra-laptop-20100804073549-3qwmednxzqqwzbuq
This commit is contained in:
@@ -209,9 +209,9 @@
|
||||
<para style="P11">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="100.0,60.0,88.0,140.0,90.0" style="Table8">
|
||||
<blockTable colWidths="120.0,80.0,88.0,140.0,90.0" style="Table8">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Right">Company <font color="white"> [[ data['model']=='account.account' or removeParentNode('para') ]]</font></para>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.account' and 'Company'or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Fiscal Year</para>
|
||||
|
||||
@@ -244,8 +244,8 @@
|
||||
</para>
|
||||
<blockTable colWidths="80.0,80.0,100.0,130.0,100.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Right">Company <font color="white"> [[ data['model']=='account.journal.period' or removeParentNode('para') ]]</font></para>
|
||||
<para style="terp_tblheader_General_Centre">Chart of Account <font color="white"> [[ data['model']=='ir.ui.menu' or removeParentNode('para') ]]</font></para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journal</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By [[get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
|
||||
|
||||
@@ -224,8 +224,8 @@
|
||||
</blockTable>
|
||||
<blockTable colWidths="80.0,100,80.0,150.0,100.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Right">Company <font color="white"> [[ data['model']=='account.journal.period' or removeParentNode('para') ]]</font></para>
|
||||
<para style="terp_tblheader_General_Centre">Chart of Account <font color="white"> [[ data['model']=='ir.ui.menu' or removeParentNode('para') ]]</font></para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journals</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
|
||||
|
||||
@@ -9,10 +9,8 @@
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
|
||||
<blockTableStyle id="tbl_header">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Company_Name">
|
||||
@@ -20,12 +18,9 @@
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="tbl_content">
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Table_Subheader_Content_detail">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
@@ -194,12 +189,10 @@
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
<para>[[ repeatIn(objects, 'a') ]]</para>
|
||||
|
||||
<blockTable colWidths="80.0,70.0,70.0,80.0,110.0,80.0,80.0" style="Table2">
|
||||
<blockTable colWidths="80.0,70.0,70.0,80.0,100.0,70.0,80.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Chat Account</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Chart of Account</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journals</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Display Account </para></td>
|
||||
|
||||
@@ -204,10 +204,10 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
<blockTable colWidths="200.0,100.0,100.0,80.0,150.0,100.0,100.0" style="Table2">
|
||||
<blockTable colWidths="150.0,100.0,100.0,80.0,150.0,100.0,100.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Right">Company <font color="white"> [[ data['model']=='account.account' or removeParentNode('para') ]]</font></para>
|
||||
<para style="terp_tblheader_General_Centre">Chart of Account <font color="white"> [[ data['model']=='ir.ui.menu' or removeParentNode('para') ]]</font></para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.account' and 'Company' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journals</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Display Account</para></td>
|
||||
|
||||
@@ -205,8 +205,8 @@
|
||||
</para>
|
||||
<blockTable colWidths="80.0,80.0,80.0,120.0,70.0,100.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Right">Company <font color="white"> [[ data['model']=='account.journal.period' or removeParentNode('para') ]]</font></para>
|
||||
<para style="terp_tblheader_General_Centre">Chart of Account <font color="white"> [[ data['model']=='ir.ui.menu' or removeParentNode('para') ]]</font></para></td>
|
||||
<td><para style="terp_tblheader_General_Centre"> [[ data['model']=='account.journal.period'and 'Company' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre">[[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journal</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filters By </para></td>
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="80.0,80.0,100.0,140.0,80.0,80.0" style="Table2_header">
|
||||
<blockTable colWidths="80.0,80.0,80.0,130.0,80.0,80.0" style="Table2_header">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Chart of Account</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
|
||||
@@ -178,6 +178,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
@@ -227,7 +230,18 @@
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="65.0,28.0,45.0,175.0,77.0,75.0,74.0" style="Table_header_1">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
@@ -19,46 +19,26 @@
|
||||
#
|
||||
##############################################################################
|
||||
{
|
||||
"name" : "Accounting and Financial Management",
|
||||
"version" : "1.1",
|
||||
"name" : "Outlook Interface",
|
||||
"version" : "1.0",
|
||||
"author" : "OpenERP SA",
|
||||
"category": 'Generic Modules/Accounting',
|
||||
"description": """Financial and accounting module that covers:
|
||||
General accountings
|
||||
Cost / Analytic accounting
|
||||
Third party accounting
|
||||
Taxes management
|
||||
Budgets
|
||||
Customer and Supplier Invoices
|
||||
Bank statements
|
||||
Reconciliation process by partner
|
||||
Creates a dashboards for accountants that includes:
|
||||
* List of uninvoiced quotations
|
||||
* Graph of aged receivables
|
||||
* Graph of aged incomes
|
||||
"website" : "http://www.openerp.com/",
|
||||
"depends" : ["base"],
|
||||
"category" : "Generic Modules/Outlook interface",
|
||||
"description": '''
|
||||
This module provide the Outlook plug-in.
|
||||
|
||||
Outlook plug-in allows you to select an object that you’d like to add
|
||||
to your email and its attachments from MS Outlook. You can select a partner, a task,
|
||||
a project, an analytical account, or any other object and attach selected
|
||||
mail as .eml file in attachment of selected record.
|
||||
|
||||
''',
|
||||
"init_xml" : [],
|
||||
"demo_xml" : [],
|
||||
"update_xml" : [],
|
||||
"active": False,
|
||||
"installable": True
|
||||
|
||||
The processes like maintaining of general ledger is done through the defined financial Journals (entry move line or
|
||||
grouping is maintained through journal) for a particular financial year and for preparation of vouchers there is a
|
||||
module named account_vouchers
|
||||
""",
|
||||
'website': 'http://www.openerp.com',
|
||||
'init_xml': [],
|
||||
"depends" : ["product", "analytic", "process","board"],
|
||||
'update_xml': [],
|
||||
'demo_xml': [],
|
||||
'test': [
|
||||
# 'test/account_customer_invoice.yml',
|
||||
# 'test/account_supplier_invoice.yml',
|
||||
# 'test/account_change_currency.yml',
|
||||
# 'test/chart_of_account.yml',
|
||||
# 'test/account_period_close.yml',
|
||||
# 'test/account_fiscalyear_close_state.yml',
|
||||
# #'test/account_invoice_state.yml',
|
||||
# 'test/account_use_model.yml',
|
||||
# 'test/account_validate_account_move.yml',
|
||||
# 'test/account_fiscalyear_close.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
'test': [
|
||||
'test/purchase_from_order.yml',
|
||||
'test/purchase_from_manual.yml',
|
||||
# 'test/purchase_from_picking.yml',
|
||||
'test/purchase_from_picking.yml',
|
||||
'purchase_unit_test.xml',
|
||||
'test/procurement_buy.yml',
|
||||
],
|
||||
|
||||
+9
-10
@@ -328,7 +328,7 @@ class sale_order(osv.osv):
|
||||
cr.execute('select id from sale_order_line where order_id IN %s and state=%s',(tuple(ids),'cancel'))
|
||||
line_ids = map(lambda x: x[0], cr.fetchall())
|
||||
self.write(cr, uid, ids, {'state': 'draft', 'invoice_ids': [], 'shipped': 0})
|
||||
self.pool.get('sale.order.line').write(cr, uid, line_ids, {'invoiced': False, 'state': 'draft', 'invoice_lines': [(6, 0, [])]})
|
||||
self.pool.get('sale.order.line').write(cr, uid, line_ids, {'invoiced': False, 'state': 'draft', 'line_invoice_id': False})
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for inv_id in ids:
|
||||
# Deleting the existing instance of workflow for SO
|
||||
@@ -512,11 +512,10 @@ class sale_order(osv.osv):
|
||||
for sale in self.browse(cr, uid, ids, context=context):
|
||||
for line in sale.order_line:
|
||||
invoiced = False
|
||||
for iline in line.invoice_lines:
|
||||
if iline.invoice_id and iline.invoice_id.state == 'cancel':
|
||||
continue
|
||||
else:
|
||||
invoiced = True
|
||||
if line.line_invoice_id and line.line_invoice_id.invoice_id.state == 'cancel':
|
||||
continue
|
||||
else:
|
||||
invoiced = True
|
||||
self.pool.get('sale.order.line').write(cr, uid, [line.id], {'invoiced': invoiced})
|
||||
self.write(cr, uid, ids, {'state': 'invoice_except', 'invoice_ids': False})
|
||||
return True
|
||||
@@ -806,7 +805,8 @@ class sale_order_line(osv.osv):
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of sale order lines."),
|
||||
'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the the shipping of the products to the customer", readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True),
|
||||
'invoice_lines': fields.many2many('account.invoice.line', 'sale_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),
|
||||
# 'invoice_lines': fields.many2many('account.invoice.line', 'sale_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),
|
||||
'line_invoice_id': fields.many2one('account.invoice.line','Invoice Line',readonly=True),
|
||||
'invoiced': fields.boolean('Invoiced', readonly=True),
|
||||
'procurement_id': fields.many2one('procurement.order', 'Procurement'),
|
||||
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price'), readonly=True, states={'draft':[('readonly',False)]}),
|
||||
@@ -918,8 +918,7 @@ class sale_order_line(osv.osv):
|
||||
'note': line.notes,
|
||||
'account_analytic_id': line.order_id.project_id and line.order_id.project_id.id or False,
|
||||
})
|
||||
cr.execute('insert into sale_order_line_invoice_rel (order_line_id,invoice_id) values (%s,%s)', (line.id, inv_id))
|
||||
self.write(cr, uid, [line.id], {'invoiced': True})
|
||||
self.write(cr, uid, [line.id], {'invoiced': True, 'line_invoice_id':inv_id})
|
||||
sales[line.order_id.id] = True
|
||||
create_ids.append(inv_id)
|
||||
# Trigger workflow events
|
||||
@@ -982,7 +981,7 @@ class sale_order_line(osv.osv):
|
||||
context = {}
|
||||
if not default:
|
||||
default = {}
|
||||
default.update({'state': 'draft', 'move_ids': [], 'invoiced': False, 'invoice_lines': []})
|
||||
default.update({'state': 'draft', 'move_ids': [], 'invoiced': False, 'line_invoice_id': False})
|
||||
return super(sale_order_line, self).copy_data(cr, uid, id, default, context=context)
|
||||
|
||||
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
|
||||
|
||||
@@ -175,8 +175,8 @@
|
||||
<field colspan="4" name="notes" nolabel="1"/>
|
||||
</page>
|
||||
<page string="History" groups="base.group_extended">
|
||||
<separator colspan="4" string="Invoice Lines"/>
|
||||
<field colspan="4" name="invoice_lines" nolabel="1"/>
|
||||
<separator colspan="4" string="Invoice"/>
|
||||
<field colspan="2" name="line_invoice_id" nolabel="1"/>
|
||||
<separator colspan="4" string="Stock Moves"/>
|
||||
<field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
|
||||
</page>
|
||||
@@ -414,8 +414,8 @@
|
||||
<!-- <page string="Properties" groups="base.group_extended">-->
|
||||
<!-- <field name="property_ids" nolabel="1"/>-->
|
||||
<!-- </page>-->
|
||||
<page string="Invoice Lines" groups="base.group_extended">
|
||||
<field colspan="4" name="invoice_lines" nolabel="1"/>
|
||||
<page string="Invoice" groups="base.group_extended">
|
||||
<field colspan="2" name="line_invoice_id" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field colspan="4" name="notes" nolabel="1"/>
|
||||
|
||||
@@ -96,7 +96,7 @@ class stock_picking(osv.osv):
|
||||
sale_line_obj = self.pool.get('sale.order.line')
|
||||
if move_line.sale_line_id:
|
||||
sale_line_obj.write(cursor, user, [move_line.sale_line_id.id], {'invoiced':True,
|
||||
'invoice_lines': [(4, invoice_line_id)],
|
||||
'line_invoice_id': invoice_line_id,
|
||||
})
|
||||
return super(stock_picking, self)._invoice_line_hook(cursor, user,
|
||||
move_line, invoice_line_id)
|
||||
@@ -185,7 +185,7 @@ class stock_picking(osv.osv):
|
||||
'account_analytic_id': account_analytic_id,
|
||||
}, context=context)
|
||||
self.pool.get('sale.order.line').write(cursor, user, [sale_line.id], {'invoiced':True,
|
||||
'invoice_lines': [(6, 0, [invoice_line_id])],
|
||||
'line_invoice_id': invoice_line_id,
|
||||
})
|
||||
|
||||
return result
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</page>
|
||||
<page string="History" groups="base.group_extended">
|
||||
<separator colspan="4" string="Invoice Lines"/>
|
||||
<field colspan="4" name="invoice_lines" nolabel="1"/>
|
||||
<field colspan="4" name="line_invoice_id" nolabel="1"/>
|
||||
<separator colspan="4" string="Stock Moves"/>
|
||||
<field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
|
||||
</page>
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state == 'assigned' )],'move_lines') ]]</para>
|
||||
<blockTable colWidths="257.0,58.0,61.0,46.0,26.0,74.0" style="Move_Line_Contect_Assign_State">
|
||||
<blockTable colWidths="257.0,58.0,61.0,46.0,26.0,74.0" style="Move_Line_Contect_Assign_State">[[ picking.move_lines or removeParentNode('blockTable')]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9"><font> [ [[ (move_lines.product_id.default_code) or removeParentNode('font') ]] ] </font> <font> [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] </font> </para>
|
||||
@@ -274,7 +274,7 @@
|
||||
</section>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') and removeParentNode('section') ]]</para>
|
||||
<blockTable colWidths="257.0,57.0,62.0,46.0,26.0,74.0" style="Move_Line_Content_Other_State">
|
||||
<blockTable colWidths="257.0,57.0,62.0,46.0,26.0,74.0" style="Move_Line_Content_Other_State">[[ picking.move_lines or removeParentNode('blockTable')]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9"><font> [ [[ (move_lines.product_id.default_code) or removeParentNode('font') ]] ] </font> <font> [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] </font> </para>
|
||||
|
||||
+2
-44
@@ -112,7 +112,6 @@ class stock_location(osv.osv):
|
||||
res[id] = {}.fromkeys(field_names, 0.0)
|
||||
if ('product_id' not in context) or not ids:
|
||||
return res
|
||||
#location_ids = self.search(cr, uid, [('location_id', 'child_of', ids)])
|
||||
for loc in ids:
|
||||
context['location'] = [loc]
|
||||
prod = self.pool.get('product.product').browse(cr, uid, context['product_id'], context)
|
||||
@@ -176,7 +175,6 @@ class stock_location(osv.osv):
|
||||
'stock_real': fields.function(_product_qty_available, method=True, type='float', string='Real Stock', multi="stock"),
|
||||
'stock_virtual': fields.function(_product_qty_available, method=True, type='float', string='Virtual Stock', multi="stock"),
|
||||
|
||||
#'account_id': fields.many2one('account.account', string='Inventory Account', domain=[('type', '!=', 'view')]),
|
||||
'location_id': fields.many2one('stock.location', 'Parent Location', select=True, ondelete='cascade'),
|
||||
'child_ids': fields.one2many('stock.location', 'location_id', 'Contains'),
|
||||
|
||||
@@ -308,7 +306,6 @@ class stock_location(osv.osv):
|
||||
# Choose the right filed standard_price to read
|
||||
amount_unit = product.price_get(pricetype.field, context)[product.id]
|
||||
price = qty[product_id] * amount_unit
|
||||
# price = qty[product_id] * product.standard_price
|
||||
|
||||
total_price += price
|
||||
result['product'].append({
|
||||
@@ -360,13 +357,6 @@ class stock_location(osv.osv):
|
||||
def _product_virtual_get(self, cr, uid, id, product_ids=False, context=None, states=['done']):
|
||||
return self._product_all_get(cr, uid, id, product_ids, context, ['confirmed', 'waiting', 'assigned', 'done'])
|
||||
|
||||
#
|
||||
# TODO:
|
||||
# Improve this function
|
||||
#
|
||||
# Returns:
|
||||
# [ (tracking_id, product_qty, location_id) ]
|
||||
#
|
||||
def _product_reserve(self, cr, uid, ids, product_id, product_qty, context=None):
|
||||
"""
|
||||
@param product_id: Id of product
|
||||
@@ -629,13 +619,6 @@ class stock_picking(osv.osv):
|
||||
# TODO: Check locations to see if in the same location ?
|
||||
return True
|
||||
|
||||
# def button_confirm(self, cr, uid, ids, *args):
|
||||
# for id in ids:
|
||||
# wf_service = netsvc.LocalService("workflow")
|
||||
# wf_service.trg_validate(uid, 'stock.picking', id, 'button_confirm', cr)
|
||||
# self.force_assign(cr, uid, ids, *args)
|
||||
# return True
|
||||
|
||||
def action_assign(self, cr, uid, ids, *args):
|
||||
""" Changes state of picking to available if all moves are confirmed.
|
||||
@return: True
|
||||
@@ -654,7 +637,6 @@ class stock_picking(osv.osv):
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for pick in self.browse(cr, uid, ids):
|
||||
move_ids = [x.id for x in pick.move_lines if x.state in ['confirmed','waiting']]
|
||||
# move_ids = [x.id for x in pick.move_lines]
|
||||
self.pool.get('stock.move').force_assign(cr, uid, move_ids)
|
||||
wf_service.trg_write(uid, 'stock.picking', pick.id, cr)
|
||||
return True
|
||||
@@ -669,9 +651,6 @@ class stock_picking(osv.osv):
|
||||
raise osv.except_osv(_('Error !'),_('You can not process picking without stock moves'))
|
||||
wf_service.trg_validate(uid, 'stock.picking', pick.id,
|
||||
'button_confirm', cr)
|
||||
#move_ids = [x.id for x in pick.move_lines]
|
||||
#self.pool.get('stock.move').force_assign(cr, uid, move_ids)
|
||||
#wf_service.trg_write(uid, 'stock.picking', pick.id, cr)
|
||||
return True
|
||||
|
||||
def draft_validate(self, cr, uid, ids, *args):
|
||||
@@ -897,7 +876,7 @@ class stock_picking(osv.osv):
|
||||
'origin': (invoice.origin or '') + ', ' + (picking.name or '') + (picking.origin and (':' + picking.origin) or ''),
|
||||
'comment': (comment and (invoice.comment and invoice.comment+"\n"+comment or comment)) or (invoice.comment and invoice.comment or ''),
|
||||
'date_invoice':context.get('date_inv',False),
|
||||
'user_id':picking.sale_id.user_id and picking.sale_id.user_id.id or False
|
||||
'user_id':uid
|
||||
}
|
||||
invoice_obj.write(cr, uid, [invoice_id], invoice_vals, context=context)
|
||||
else:
|
||||
@@ -914,7 +893,7 @@ class stock_picking(osv.osv):
|
||||
'fiscal_position': partner.property_account_position.id,
|
||||
'date_invoice': context.get('date_inv',False),
|
||||
'company_id': picking.company_id.id,
|
||||
'user_id':picking.sale_id.user_id and picking.sale_id.user_id.id or False
|
||||
'user_id':uid
|
||||
}
|
||||
cur_id = self.get_currency_id(cr, uid, picking)
|
||||
if cur_id:
|
||||
@@ -1377,7 +1356,6 @@ class stock_move(osv.osv):
|
||||
|
||||
'prodlot_id': fields.many2one('stock.production.lot', 'Production Lot', help="Production lot is used to put a serial number on the production"),
|
||||
'tracking_id': fields.many2one('stock.tracking', 'Pack', select=True, help="This is the code that will be put on the logistical unit: pallet, box, pack."),
|
||||
# 'lot_id': fields.many2one('stock.lot', 'Consumer lot', select=True, readonly=True),
|
||||
|
||||
'auto_validate': fields.boolean('Auto Validate'),
|
||||
|
||||
@@ -1576,7 +1554,6 @@ class stock_move(osv.osv):
|
||||
""" Confirms stock move.
|
||||
@return: List of ids.
|
||||
"""
|
||||
# ids = map(lambda m: m.id, moves)
|
||||
moves = self.browse(cr, uid, ids)
|
||||
self.write(cr, uid, ids, {'state': 'confirmed'})
|
||||
i = 0
|
||||
@@ -1692,7 +1669,6 @@ class stock_move(osv.osv):
|
||||
r = res.pop(0)
|
||||
move_id = self.copy(cr, uid, move.id, {'product_qty': r[0], 'location_id': r[1]})
|
||||
done.append(move_id)
|
||||
#cr.execute('insert into stock_move_history_ids values (%s,%s)', (move.id,move_id))
|
||||
if done:
|
||||
count += len(done)
|
||||
self.write(cr, uid, done, {'state': 'assigned'})
|
||||
@@ -1745,7 +1721,6 @@ class stock_move(osv.osv):
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for id in ids:
|
||||
wf_service.trg_trigger(uid, 'stock.move', id, cr)
|
||||
#self.action_cancel(cr,uid, ids2, context)
|
||||
return True
|
||||
|
||||
def _get_accounting_values(self, cr, uid, move, context=None):
|
||||
@@ -1789,7 +1764,6 @@ class stock_move(osv.osv):
|
||||
pricetype = price_type_obj.browse(cr,uid,move.company_id.property_valuation_price_type.id)
|
||||
amount_unit = move.product_id.price_get(pricetype.field, context)[move.product_id.id]
|
||||
amount = amount_unit * q or 1.0
|
||||
# amount = q * move.product_id.standard_price
|
||||
return journal_id, acc_src, acc_dest, acc_variation, amount
|
||||
|
||||
def action_done(self, cr, uid, ids, context=None):
|
||||
@@ -1816,7 +1790,6 @@ class stock_move(osv.osv):
|
||||
wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr)
|
||||
else:
|
||||
pass
|
||||
# self.action_done(cr, uid, [move.move_dest_id.id])
|
||||
if move.move_dest_id.auto_validate:
|
||||
self.action_done(cr, uid, [move.move_dest_id.id], context=context)
|
||||
|
||||
@@ -1857,15 +1830,6 @@ class stock_move(osv.osv):
|
||||
'ref': move.picking_id and move.picking_id.name,
|
||||
})
|
||||
|
||||
# This can be removed
|
||||
#tracking_lot = False
|
||||
#if context:
|
||||
# tracking_lot = context.get('tracking_lot', False)
|
||||
# if tracking_lot:
|
||||
# rec_id = context and context.get('active_id', False)
|
||||
# tracking = self.pool.get('stock.tracking')
|
||||
# tracking_lot = tracking.get_create_tracking_lot(cr, uid,[rec_id], tracking_lot)
|
||||
|
||||
self.write(cr, uid, ids, {'state': 'done', 'date_planned': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for id in ids:
|
||||
@@ -1947,7 +1911,6 @@ class stock_move(osv.osv):
|
||||
'location_dest_id': location_id
|
||||
}
|
||||
new_move = self.copy(cr, uid, move.id, default_val)
|
||||
#self.write(cr, uid, [new_move], {'move_history_ids':[(4,move.id)]}) #TODO : to track scrap moves
|
||||
res += [new_move]
|
||||
product_obj = self.pool.get('product.product')
|
||||
for (id, name) in product_obj.name_get(cr, uid, [move.product_id.id]):
|
||||
@@ -2170,7 +2133,6 @@ class stock_move(osv.osv):
|
||||
'state': 'assigned',
|
||||
'move_dest_id': False,
|
||||
'price_unit': move.price_unit,
|
||||
#'tracking_id': tracking_lot,
|
||||
})
|
||||
complete.append(self.browse(cr, uid, new_move))
|
||||
self.write(cr, uid, move.id,
|
||||
@@ -2185,7 +2147,6 @@ class stock_move(osv.osv):
|
||||
{
|
||||
'product_qty': move.product_qty,
|
||||
'product_uos_qty': move.product_qty,
|
||||
#'tracking_id': tracking_lot
|
||||
})
|
||||
complete.append(move)
|
||||
|
||||
@@ -2249,7 +2210,6 @@ class stock_inventory(osv.osv):
|
||||
for line in inv.inventory_line_id:
|
||||
pid = line.product_id.id
|
||||
|
||||
# price = line.product_id.standard_price or 0.0
|
||||
amount = self.pool.get('stock.location')._product_get(cr, uid, line.location_id.id, [pid], {'uom': line.product_uom.id})[pid]
|
||||
#TOCHECK: Why put restriction like new inventory qty should greater available qty ?
|
||||
change = line.product_qty - amount
|
||||
@@ -2348,7 +2308,6 @@ class stock_warehouse(osv.osv):
|
||||
_description = "Warehouse"
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=60, required=True),
|
||||
# 'partner_id': fields.many2one('res.partner', 'Owner'),
|
||||
'company_id': fields.many2one('res.company','Company',required=True,select=1),
|
||||
'partner_address_id': fields.many2one('res.partner.address', 'Owner Address'),
|
||||
'lot_input_id': fields.many2one('stock.location', 'Location Input', required=True, domain=[('usage','<>','view')]),
|
||||
@@ -2385,7 +2344,6 @@ class stock_picking_move_wizard(osv.osv_memory):
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64, invisible=True),
|
||||
#'move_lines': fields.one2many('stock.move', 'picking_id', 'Move lines',readonly=True),
|
||||
'move_ids': fields.many2many('stock.move', 'picking_move_wizard_rel', 'picking_move_wizard_id', 'move_id', 'Entry lines', required=True),
|
||||
'address_id': fields.many2one('res.partner.address', 'Dest. Address', invisible=True),
|
||||
'picking_id': fields.many2one('stock.picking', 'Picking list', select=True, invisible=True),
|
||||
|
||||
Reference in New Issue
Block a user