# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
move[line.move_id.id] = True
for line in r.line_id:
move[line.move_id.id] = True
-
+
invoice_ids = []
if move:
invoice_ids = self.pool.get('account.invoice').search(cr, uid, [('move_id','in',move.keys())], context=context)
}, help="The account moves of the invoice have been reconciled with account moves of the payment(s)."),
'partner_bank': fields.many2one('res.partner.bank', 'Bank Account',
help='The bank account to pay to or to be paid from'),
- 'move_lines':fields.function(_get_lines , method=True,type='many2many' , relation='account.move.line',string='Move Lines'),
+ 'move_lines':fields.function(_get_lines , method=True,type='many2many' , relation='account.move.line',string='Entry Lines'),
'residual': fields.function(_amount_residual, method=True, digits=(16, int(config['price_accuracy'])),string='Residual',
store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 50),
},
help="Remaining amount due."),
'payment_ids': fields.function(_compute_lines, method=True, relation='account.move.line', type="many2many", string='Payments'),
- 'move_name': fields.char('Account Move', size=64),
+ 'move_name': fields.char('Ledger Posting', size=64),
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position')
}
_defaults = {
for taxe in ait_obj.compute(cr, uid, id, context=context).values():
ait_obj.create(cr, uid, taxe)
# Update the stored value (fields.function), so we write to trigger recompute
- self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=context)
+ self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=context)
# self.pool.get('account.invoice').write(cr, uid, ids, {}, context=context)
return True
tmp += '-'+str(l.get('product_id',"False"))
tmp += '-'+str(l.get('analytic_account_id',"False"))
tmp += '-'+str(l.get('date_maturity',"False"))
-
+
if tmp in line2:
am = line2[tmp]['debit'] - line2[tmp]['credit'] + (l['debit'] - l['credit'])
line2[tmp]['debit'] = (am > 0) and am or 0.0
'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."),
'tax_amount': fields.float('Tax Code Amount', digits=(16,int(config['price_accuracy']))),
}
-
+
def base_change(self, cr, uid, ids, base,currency_id=False,company_id=False,date_invoice=False):
cur_obj = self.pool.get('res.currency')
company_obj = self.pool.get('res.company')
company_currency=False
- if company_id:
+ if company_id:
company_currency = company_obj.read(cr,uid,[company_id],['currency_id'])[0]['currency_id'][0]
if currency_id and company_currency:
base = cur_obj.compute(cr, uid, currency_id, company_currency, base, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
if currency_id and company_currency:
amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
return {'value': {'tax_amount':amount}}
-
+
_order = 'sequence'
_defaults = {
'manual': lambda *a: 1,
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
form = """<?xml version="1.0"?>
<form string="Use Model">
- <label string="Move Lines Created."/>
+ <label string="Entry Lines Created."/>
</form>
"""
fields = {
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
pool_obj = pooler.get_pool(cr.dbname)
data_model = pool_obj.get(data['model']).browse(cr,uid,data['id'])
if not data_model.dotation_ids:
- raise wizard.except_wizard(_('Insufficient Data!'),_('No Dotations or Master Budget Expenses Found on Budget %s!') % data_model.name)
+ raise wizard.except_wizard(_('Insufficient Data!'),_('No Depreciation or Master Budget Expenses Found on Budget %s!') % data_model.name)
return data['form']
states = {
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
<label string="%(company_name)s: User's Company name" colspan="2"/>
<label string="%(company_currency)s: User's Company Currency" colspan="2"/>
<label string="%(heading)s: Move line header" colspan="2"/>
- <label string="%(line)s: Account Move lines" colspan="2"/>
+ <label string="%(line)s: Ledger Posting lines" colspan="2"/>
</page>
</notebook>
</form>"""
cxt = context.copy()
cxt['lang'] = partner.lang
body = pool.get('res.users').browse(cr, uid, uid, context=cxt).company_id.follow_up_msg
-
+
total_amt = followup_data.debit - followup_data.credit
move_line = ''
subtotal_due = 0.0
if partner_id not in partner_list:
partner_list.append(partner_id)
to_update[str(id)] = fups[followup_line_id][1]
-
+
message = pool.get('res.users').browse(cr, uid, uid, context=context).company_id.follow_up_msg
-
+
return {'partner_ids': partner_list, 'to_update': to_update, 'email_body':message}
def _get_screen1_values(self, cr, uid, data, context):
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from tools.translate import _
case_form = """<?xml version="1.0"?>
-<form string="Planify Meeting">
+<form string="Plan Meeting">
<field name="date"/>
<field name="duration" widget="float_time"/>
<label string="Note that you can also use the calendar view to graphically schedule your next meeting." colspan="4"/>
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
'date_confirm': fields.date('Date Confirmed'),
'date_valid': fields.date('Date Validated'),
'user_valid': fields.many2one('res.users', 'Validation User'),
- 'account_move_id': fields.many2one('account.move', 'Account Move'),
+ 'account_move_id': fields.many2one('account.move', 'Ledger Posting'),
'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ),
'note': fields.text('Note'),
'amount': fields.function(_amount, method=True, string='Total Amount'),
acc = self.pool.get('ir.property').get(cr, uid, 'property_account_expense_categ', 'product.category')
if not acc:
raise osv.except_osv(_('Error !'), _('Please configure Default Expanse account for Product purchase, `property_account_expense_categ`'))
-
+
lines.append((0, False, {
'name': l.name,
'account_id': acc,
class product_product(osv.osv):
_inherit = "product.product"
-
+
_columns = {
'hr_expense_ok': fields.boolean('Can be Expensed', help="Determine if the product can be visible in the list of product within a selection from an HR expense sheet line."),
}
-
+
product_product()
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
'security_lead': fields.float('Security Days', required=True,
help="This is the days added to what you promise to customers "\
"for security purpose"),
- 'manufacturing_lead': fields.float('Manufacturity Lead Time', required=True,
+ 'manufacturing_lead': fields.float('Manufacturing Lead Time', required=True,
help="Security days for each manufacturing operation."),
}
_defaults = {
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
'time_cycle': fields.float('Time for 1 cycle (hour)', help="Time in hours for doing one cycle."),
'time_start': fields.float('Time before prod.', help="Time in hours for the setup."),
'time_stop': fields.float('Time after prod.', help="Time in hours for the cleaning."),
- 'time_efficiency': fields.float('Time Efficiency', help="Factor that multiplies all times expressed in the workcenter."),
+ 'time_efficiency': fields.float('Time Efficiency', help="Factor to adjust the work center cycle and before and after production durations"),
'costs_hour': fields.float('Cost per hour'),
'costs_hour_account_id': fields.many2one('account.analytic.account', 'Hour Account', domain=[('type','<>','view')],
'routing_id': fields.many2one('mrp.routing', 'Routing', help="The list of operations (list of workcenters) to produce the finished product. The routing is mainly used to compute workcenter costs during operations and to plan futur loads on workcenters based on production plannification."),
'property_ids': fields.many2many('mrp.property', 'mrp_bom_property_rel', 'bom_id','property_id', 'Properties'),
'revision_ids': fields.one2many('mrp.bom.revision', 'bom_id', 'BoM Revisions'),
- 'revision_type': fields.selection([('numeric','numeric indices'),('alpha','alphabetical indices')], 'indice type'),
- 'child_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hyerarchy", type='many2many'),
- 'child_complete_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hyerarchy", type='many2many')
+ 'revision_type': fields.selection([('numeric','numeric indices'),('alpha','alphabetical indices')], 'Index type'),
+ 'child_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hierarchy", type='many2many'),
+ 'child_complete_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hierarchy", type='many2many')
}
_defaults = {
'active': lambda *a: 1,
parent_move_line=get_parent_move(production['move_prod_id'][0])
if parent_move_line:
move = move_obj.browse(cr,uid,parent_move_line)
- #TODO: fix me sale module can not be used here,
+ #TODO: fix me sale module can not be used here,
#as may be mrp can be installed without sale module
if field_name=='name':
res[production['id']]=move.sale_line_id and move.sale_line_id.order_id.name or False
'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)]),
'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', help="The list of operations (list of workcenters) to produce the finished product. The routing is mainly used to compute workcenter costs during operations and to plan futur loads on workcenters based on production plannification."),
- 'picking_id': fields.many2one('stock.picking', 'Packing list', readonly=True,
- help="This is the internal picking list take bring the raw materials to the production plan."),
+ 'picking_id': fields.many2one('stock.picking', 'Picking list', readonly=True,
+ help="This is the internal picking list of the raw material needed for the production plan"),
'move_prod_id': fields.many2one('stock.move', 'Move product', readonly=True),
'move_lines': fields.many2many('stock.move', 'mrp_production_move_ids', 'production_id', 'move_id', 'Products Consummed'),
'product_lines': fields.one2many('mrp.production.product.line', 'production_id', 'Scheduled goods'),
'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Workcenters Utilisation'),
- 'state': fields.selection([('draft','Draft'),('picking_except', 'Packing Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Cancelled'),('done','Done')],'Status', readonly=True),
+ 'state': fields.selection([('draft','Draft'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Cancelled'),('done','Done')],'Status', readonly=True),
'hour_total': fields.function(_production_calc, method=True, type='float', string='Total Hours', multi='workorder'),
'cycle_total': fields.function(_production_calc, method=True, type='float', string='Total Cycles', multi='workorder'),
class mrp_procurement(osv.osv):
_name = "mrp.procurement"
_description = "Procurement"
- _order = 'priority,date_planned'
+ _order = 'priority,date_planned'
_columns = {
'name': fields.char('Name', size=64, required=True),
'origin': fields.char('Origin', size=64,
'close_move': fields.boolean('Close Move at end', required=True),
'location_id': fields.many2one('stock.location', 'Location', required=True),
- 'procure_method': fields.selection([('make_to_stock','from stock'),('make_to_order','on order')], 'Procurement Method', states={'draft':[('readonly',False)], 'confirmed':[('readonly',False)]},
+ 'procure_method': fields.selection([('make_to_stock','from stock'),('make_to_order','on order')], 'Requisition Method', states={'draft':[('readonly',False)], 'confirmed':[('readonly',False)]},
readonly=True, required=True, help="If you encode manually a procurement, you probably want to use" \
" a make to order method."),
if s['state'] in ['draft','cancel']:
unlink_ids.append(s['id'])
else:
- raise osv.except_osv(_('Invalid action !'), _('Cannot delete Procurement Order(s) which are in %s State!' % s['state']))
+ raise osv.except_osv(_('Invalid action !'), _('Cannot delete Requisition Order(s) which are in %s State!' % s['state']))
return osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
def onchange_product_id(self, cr, uid, ids, product_id, context={}):
def action_confirm(self, cr, uid, ids, context={}):
for procurement in self.browse(cr, uid, ids):
if procurement.product_qty <= 0.00:
- raise osv.except_osv(_('Data Insufficient !'), _('Please check the Quantity of Procurement Order(s), it should not be less than 1!'))
+ raise osv.except_osv(_('Data Insufficient !'), _('Please check the Quantity of Requisition Order(s), it should not be less than 1!'))
if procurement.product_id.type in ('product', 'consu'):
if not procurement.move_id:
source = procurement.location_id.id
class StockMove(osv.osv):
_inherit = 'stock.move'
_columns = {
- 'procurements': fields.one2many('mrp.procurement', 'move_id', 'Procurements'),
+ 'procurements': fields.one2many('mrp.procurement', 'move_id', 'Requisitions'),
}
def copy(self, cr, uid, id, default=None, context=None):
default = default or {}
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
class report_custom(report_rml):
def create_xml(self, cr, uid, ids, datas, context={}):
number = (datas.get('form', False) and datas['form']['number']) or 1
-
+
def process_bom(bom, currency_id):
xml = '<row>'
sum = 0
prod_name = bom['name']
prod_qtty = bom['product_qty']
- prod_uom = prod.uom_id.name
+ prod_uom = prod.uom_id.name
level = 1
main_sp_price = ''
main_sp_name = ''
<col>%s</col>
</row>
</lines>
- """ % (_('Workcenter name'), _('Cycles Cost'), _('Hours Cost'))
+ """ % (_('Workcenter name'), _('Cycles Cost'), _('Total hourly costs'))
prod_header = """
<lines style='header'>
<row>
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
'''% (start_date, end_date, report_total, report_except, report_later)
summary += '\n'.join(report)
request.create(cr, uid,
- {'name': "Procurement calculation report.",
+ {'name': "Requisition calculation report.",
'act_from': uid,
'act_to': uid,
'body': summary,
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
'''Wizard that create a procurement from a product form'''
done_form = """<?xml version="1.0"?>
-<form string="Make Procurement">
+<form string="Make Requisition">
<label string="Your procurement request has been sent !"/>
</form>"""
procurement_form = """<?xml version="1.0"?>
-<form string="Internal Procurement Request">
- <label string="This wizard will planify the procurement for this product. This procurement may generate task, production orders or purchase orders." align="0.0" colspan="4"/>
+<form string="Internal Requisition Request">
+ <label string="This wizard will plan the procurement for this product. This procurement may generate task, production orders or purchase orders." align="0.0" colspan="4"/>
<field name="product_id"/>
<field name="warehouse_id"/>
<field name="qty"/>
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
states = {
'init': {
'actions': [],
- 'result': {'type': 'form', 'arch':parameter_form, 'fields': parameter_fields, 'state':[('end','Cancel'),('compute','Compute Procurements')]}
+ 'result': {'type': 'form', 'arch':parameter_form, 'fields': parameter_fields, 'state':[('end','Cancel'),('compute','Compute Requisitions')]}
},
'compute': {
'actions': [_procure_calculation],
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
states = {
'init': {
'actions': [],
- 'result': {'type': 'form', 'arch':parameter_form, 'fields': parameter_fields, 'state':[('end','Cancel'),('compute','Compute Procurements') ]}
+ 'result': {'type': 'form', 'arch':parameter_form, 'fields': parameter_fields, 'state':[('end','Cancel'),('compute','Compute Requisitions') ]}
},
'compute': {
'actions': [_procure_calculation],
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
states = {
'init': {
'actions': [],
- 'result': {'type': 'form', 'arch':parameter_form, 'fields': parameter_fields, 'state':[('end','Cancel'),('compute','Compute Procurements') ]}
+ 'result': {'type': 'form', 'arch':parameter_form, 'fields': parameter_fields, 'state':[('end','Cancel'),('compute','Compute Requisitions') ]}
},
'compute': {
'actions': [_procure_calculation],
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
'delay': fields.float('Working Hours',help="This is delay between operation start and stop in this workcenter",readonly=True),
'production_state':fields.related('production_id','state',
type='selection',
- selection=[('draft','Draft'),('picking_except', 'Packing Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Canceled'),('done','Done')],
+ selection=[('draft','Draft'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Canceled'),('done','Done')],
string='Prod.State', readonly=True),
'product':fields.related('production_id','product_id',type='many2one',relation='product.product',string='Product',
readonly=True),
if l.production_id.state not in ('done','cancel'):
for wc in l.production_id.workcenter_lines:
i = self.pool.get('hr.timesheet.group').interval_min_get(
- cr,
- uid,
- wc.workcenter_id.timesheet_id.id or False,
+ cr,
+ uid,
+ wc.workcenter_id.timesheet_id.id or False,
dt, wc.hour or 0.0
)
dt = i[0][0]
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
], "Invoice Method",
select=True, required=True, states={'draft':[('readonly',False)]}, readonly=True, help='This field allow you to change the workflow of the repair order. If value selected is different from \'No Invoice\', it also allow you to select the pricelist and invoicing address.'),
'invoice_id': fields.many2one('account.invoice', 'Invoice', readonly=True),
- 'picking_id': fields.many2one('stock.picking', 'Packing',readonly=True),
+ 'picking_id': fields.many2one('stock.picking', 'Picking',readonly=True),
'fees_lines' : fields.one2many('mrp.repair.fee', 'repair_id', 'Fees Lines', readonly=True, states={'draft':[('readonly',False)]}),
'internal_notes' : fields.text('Internal Notes'),
'quotation_notes' : fields.text('Quotation Notes'),
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
'supply_method': fields.selection([('produce','Produce'),('buy','Buy')], 'Supply method', required=True, help="Produce will generate production order or tasks, according to the product type. Purchase will trigger purchase orders when requested."),
'sale_delay': fields.float('Customer Lead Time', help="This is the average time between the confirmation of the customer order and the delivery of the finished products. It's the time you promise to your customers."),
'produce_delay': fields.float('Manufacturing Lead Time', help="Average time to produce this product. This is only for the production order and, if it is a multi-level bill of material, it's only for the level of this product. Different delays will be summed for all levels and purchase orders."),
- 'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procure Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
+ 'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Requisition Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
'rental': fields.boolean('Can be Rent'),
'categ_id': fields.many2one('product.category','Category', required=True, change_default=True),
'list_price': fields.float('Sale Price', digits=(16, int(config['price_accuracy'])), help="Base price for computing the customer price. Sometimes called the catalog price."),
product = self.browse(cr, uid, [product_id], context)[0]
for supinfo in product.seller_ids:
if supinfo.name.id == partner_id:
- return {'code': supinfo.product_code, 'name': supinfo.product_name, 'variants': ''}
- return {'code' : product.default_code, 'name' : product.name, 'variants': product.variants}
+ return {'code': supinfo.product_code, 'name': supinfo.product_name, 'variants': ''}
+ return {'code' : product.default_code, 'name' : product.name, 'variants': product.variants}
def _product_code(self, cr, uid, ids, name, arg, context={}):
res = {}
for p in self.browse(cr, uid, ids, context):
data = self._get_partner_code_name(cr, uid, [], p.id, context.get('partner_id', None), context)
if not data['variants']:
- data['variants'] = p.variants
+ data['variants'] = p.variants
if not data['code']:
data['code'] = p.code
if not data['name']:
'packaging' : fields.one2many('product.packaging', 'product_id', 'Logistical Units', help="Gives the different ways to package the same product. This has no impact on the packing order and is mainly used if you use the EDI module."),
'price_extra': fields.float('Variant Price Extra', digits=(16, int(config['price_accuracy']))),
'price_margin': fields.float('Variant Price Margin', digits=(16, int(config['price_accuracy']))),
- 'pricelist_id': fields.dummy(string='Pricelist',relation='product.pricelist', type='many2one'),
+ 'pricelist_id': fields.dummy(string='Pricelist',relation='product.pricelist', type='many2one'),
}
def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id):
default = {}
default = default.copy()
default['name'] = product['name'] + _(' (copy)')
-
+
if context.get('variant',False):
fields = ['product_tmpl_id', 'active', 'variants', 'default_code',
'price_margin', 'price_extra']
}
_order = 'sequence'
-
+
def name_get(self, cr, uid, ids, context={}):
if not len(ids):
return []
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
_name = "project.task"
_inherit = "project.task"
_columns = {
- 'procurement_id': fields.many2one('mrp.procurement', 'Procurement', ondelete='set null')
+ 'procurement_id': fields.many2one('mrp.procurement', 'Requisition', ondelete='set null')
}
def do_close(self, cr, uid, ids, *args):
res = super(project_task, self).do_close(cr, uid, ids, *args)
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
'incoterm': fields.selection(_incoterm_get, 'Incoterm', size=3),
'picking_policy': fields.selection([('direct', 'Partial Delivery'), ('one', 'Complete Delivery')],
- 'Packing Policy', required=True, help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?"""),
+ 'Picking Policy', required=True, help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?"""),
'order_policy': fields.selection([
('prepaid', 'Payment Before Delivery'),
('manual', 'Shipping & Manual Invoice'),
('postpaid', 'Invoice on Order After Delivery'),
- ('picking', 'Invoice from the Packing'),
+ ('picking', 'Invoice from Picking'),
], 'Shipping Policy', required=True, readonly=True, states={'draft': [('readonly', False)]},
help="""The Shipping Policy is used to synchronise invoice and delivery operations.
- The 'Pay before delivery' choice will first generate the invoice and then generate the packing order after the payment of this invoice.
'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft': [('readonly', False)]}),
'invoice_ids': fields.many2many('account.invoice', 'sale_order_invoice_rel', 'order_id', 'invoice_id', 'Invoices', help="This is the list of invoices that have been generated for this sale order. The same sale order may have been invoiced in several times (by line for example)."),
- 'picking_ids': fields.one2many('stock.picking', 'sale_id', 'Related Packing', readonly=True, help="This is the list of picking list that have been generated for this invoice"),
+ 'picking_ids': fields.one2many('stock.picking', 'sale_id', 'Related Picking', readonly=True, help="This is the list of picking list that have been generated for this invoice"),
'shipped': fields.boolean('Picked', readonly=True),
'picked_rate': fields.function(_picked_rate, method=True, string='Picked', type='float'),
'invoiced_rate': fields.function(_invoiced_rate, method=True, string='Invoiced', type='float'),
invoice_ids = []
context = {}
- # If date was specified, use it as date invoiced, usefull when invoices are generated this month and put the
+ # If date was specified, use it as date invoiced, usefull when invoices are generated this month and put the
# last day of the last month as invoice date
if date_inv:
context['date_inv'] = date_inv
if line.procurement_id:
res.append(line.procurement_id.id)
return res
-
+
# if mode == 'finished':
# returns True if all lines are done, False otherwise
# if mode == 'canceled':
write_cancel_ids = []
stock_move_obj = self.pool.get('stock.move')
for order in self.browse(cr, uid, ids, context={}):
-
- #check for pending deliveries
+
+ #check for pending deliveries
pending_deliveries = False
# check => if order_lines do not exist,don't proceed for any mode.
if not order.order_line:
return False
- for line in order.order_line:
+ for line in order.order_line:
move_ids = stock_move_obj.search(cr, uid, [('sale_line_id','=', line.id)])
for move in stock_move_obj.browse( cr, uid, move_ids ):
#if one of the related order lines is in state draft, auto or confirmed
'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),
'invoiced': fields.boolean('Invoiced', readonly=True),
- 'procurement_id': fields.many2one('mrp.procurement', 'Procurement'),
+ 'procurement_id': fields.many2one('mrp.procurement', 'Requisition'),
'price_unit': fields.float('Unit Price', required=True, digits=(16, int(config['price_accuracy']))),
'price_net': fields.function(_amount_line_net, method=True, string='Net Price', digits=(16, int(config['price_accuracy']))),
'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal'),
'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes'),
- 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procure Method', required=True),
+ 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Requisition Method', required=True),
'property_ids': fields.many2many('mrp.property', 'sale_order_line_property_rel', 'order_id', 'property_id', 'Properties'),
'address_allotment_id': fields.many2one('res.partner.address', 'Allotment Partner'),
'product_uom_qty': fields.float('Quantity (UoM)', digits=(16, 2), required=True),
warn_msg = _("You selected a quantity of %d Units.\nBut it's not compatible with the selected packaging.\nHere is a proposition of quantities according to the packaging: ") % (qty)
warn_msg = warn_msg + "\n\n" + _("EAN: ") + str(ean) + _(" Quantity: ") + str(qty_pack) + _(" Type of ul: ") + str(type_ul.name)
warning = {
- 'title': _('Packing Information !'),
+ 'title': _('Picking Information !'),
'message': warn_msg
}
result['product_uom_qty'] = qty
'picking_policy': fields.selection([
('direct', 'Direct Delivery'),
('one', 'All at Once')
- ], 'Packing Default Policy', required=True),
+ ], 'Picking Default Policy', required=True),
'order_policy': fields.selection([
('manual', 'Invoice Based on Sales Orders'),
('picking', 'Invoice Based on Deliveries'),
], 'Shipping Default Policy', required=True),
'step': fields.selection([
('one', 'Delivery Order Only'),
- ('two', 'Packing List & Delivery Order')
+ ('two', 'Picking List & Delivery Order')
], 'Steps To Deliver a Sale Order', required=True,
help="By default, Open ERP is able to manage complex routing and paths "\
"of products in your warehouse and partner locations. This will configure "\
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
'partner_id': {'string': 'Customer', 'type': 'many2one',
'relation': 'res.partner',
'help': 'Use this partner if there is no partner on the case'},
- 'picking_policy': {'string': 'Packing Policy', 'type': 'selection',
+ 'picking_policy': {'string': 'Picking Policy', 'type': 'selection',
'selection': [('direct','Direct Delivery'),('one','All at once')]},
'products': {'string': 'Products', 'type': 'many2many',
'relation': 'product.product'},
def _makeOrder(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
- mod_obj = pool.get('ir.model.data')
+ mod_obj = pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'sale', 'view_sales_order_filter')
- id = mod_obj.read(cr, uid, result, ['res_id'])
+ id = mod_obj.read(cr, uid, result, ['res_id'])
case_obj = pool.get('crm.case')
sale_obj = pool.get('sale.order')
partner_obj = pool.get('res.partner')
if False in partner_addr.values():
raise wizard.except_wizard(_('Data Insufficient!'),_('Customer has no addresses defined!'))
-
+
vals = {
'origin': 'CRM:%s' % str(case.id),
'picking_policy': data['form']['picking_policy'],
'res_model': 'sale.order',
'view_id': False,
'type': 'ir.actions.act_window',
- 'search_view_id': id['res_id']
+ 'search_view_id': id['res_id']
}
return value
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
class picking_journal(osv.osv):
_name = 'sale_journal.picking.journal'
- _description = 'Packing Journal'
+ _description = 'Picking Journal'
_columns = {
'name': fields.char('Journal', size=64, required=True),
'code': fields.char('Code', size=16, required=True),
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
class report_sale_journal_picking(osv.osv):
_name = "sale_journal.picking.stats"
- _description = "Packing lists by Journal"
+ _description = "Picking lists by Journal"
_auto = False
_columns = {
'name': fields.date('Month', readonly=True),
_columns = {
'qty_available': fields.function(_product_available, method=True, type='float', string='Real Stock', help="Current quantities of products in selected locations or all internal if none have been selected.", multi='qty_available'),
- 'virtual_available': fields.function(_product_available, method=True, type='float', string='Virtual Stock', help="Futur stock for this product according to the selected location or all internal if none have been selected. Computed as: Real Stock - Outgoing + Incoming.", multi='qty_available'),
+ 'virtual_available': fields.function(_product_available, method=True, type='float', string='Virtual Stock', help="Future stock for this product according to the selected location or all internal if none have been selected. Computed as: Real Stock - Outgoing + Incoming.", multi='qty_available'),
'incoming_qty': fields.function(_product_available, method=True, type='float', string='Incoming', help="Quantities of products that are planned to arrive in selected locations or all internal if none have been selected.", multi='qty_available'),
'outgoing_qty': fields.function(_product_available, method=True, type='float', string='Outgoing', help="Quantities of products that are planned to leave in selected locations or all internal if none have been selected.", multi='qty_available'),
'track_production': fields.boolean('Track Production Lots' , help="Force to use a Production Lot during production order"),
if fields:
if location_info.usage == 'supplier':
if fields.get('virtual_available'):
- res['fields']['virtual_available']['string'] = _('Futur Receptions')
+ res['fields']['virtual_available']['string'] = _('Future Receptions')
if fields.get('qty_available'):
res['fields']['qty_available']['string'] = _('Received Qty')
if location_info.usage == 'internal':
if fields.get('virtual_available'):
- res['fields']['virtual_available']['string'] = _('Futur Stock')
+ res['fields']['virtual_available']['string'] = _('Future Stock')
if location_info.usage == 'customer':
if fields.get('virtual_available'):
- res['fields']['virtual_available']['string'] = _('Futur Deliveries')
+ res['fields']['virtual_available']['string'] = _('Future Deliveries')
if fields.get('qty_available'):
res['fields']['qty_available']['string'] = _('Delivered Qty')
if location_info.usage == 'inventory':
if fields.get('virtual_available'):
- res['fields']['virtual_available']['string'] = _('Futur P&L')
+ res['fields']['virtual_available']['string'] = _('Future P&L')
res['fields']['qty_available']['string'] = _('P&L Qty')
if location_info.usage == 'procurement':
if fields.get('virtual_available'):
- res['fields']['virtual_available']['string'] = _('Futur Qty')
+ res['fields']['virtual_available']['string'] = _('Future Qty')
if fields.get('qty_available'):
res['fields']['qty_available']['string'] = _('Unplanned Qty')
if location_info.usage == 'production':
if fields.get('virtual_available'):
- res['fields']['virtual_available']['string'] = _('Futur Productions')
+ res['fields']['virtual_available']['string'] = _('Future Productions')
if fields.get('qty_available'):
res['fields']['qty_available']['string'] = _('Produced Qty')
'stock.location',
type='many2one',
relation='stock.location',
- string="Procurement Location",
+ string="Requisition Location",
method=True,
view_load=True,
domain=[('usage','like','procurement')],
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
_columns = {
'name': fields.char('Location Name', size=64, required=True, translate=True),
'active': fields.boolean('Active'),
- 'usage': fields.selection([('supplier', 'Supplier Location'), ('view', 'View'), ('internal', 'Internal Location'), ('customer', 'Customer Location'), ('inventory', 'Inventory'), ('procurement', 'Procurement'), ('production', 'Production')], 'Location Type', required=True),
+ 'usage': fields.selection([('supplier', 'Supplier Location'), ('view', 'View'), ('internal', 'Internal Location'), ('customer', 'Customer Location'), ('inventory', 'Inventory'), ('procurement', 'Requisition'), ('production', 'Production')], 'Location Type', required=True),
'allocation_method': fields.selection([('fifo', 'FIFO'), ('lifo', 'LIFO'), ('nearest', 'Nearest')], 'Allocation Method', required=True),
'complete_name': fields.function(_complete_name, method=True, type='char', size=100, string="Location Name"),
#----------------------------------------------------------
class stock_picking(osv.osv):
_name = "stock.picking"
- _description = "Packing List"
+ _description = "Picking List"
def _set_maximum_date(self, cr, uid, ids, name, value, arg, context):
if not value:
('cancel', 'Cancelled'),
], 'Status', readonly=True, select=True),
'min_date': fields.function(get_min_max_date, fnct_inv=_set_minimum_date, multi="min_max_date",
- method=True, store=True, type='datetime', string='Planned Date', select=1, help="Planned date for Packing. Default it takes current date"),
+ method=True, store=True, type='datetime', string='Planned Date', select=1, help="Planned date for Picking. Default it takes current date"),
'date': fields.datetime('Date Order', help="Date of Order"),
'date_done': fields.datetime('Date Done', help="Date of completion"),
'max_date': fields.function(get_min_max_date, fnct_inv=_set_maximum_date, multi="min_max_date",
method=True, store=True, type='datetime', string='Max. Planned Date', select=2),
'move_lines': fields.one2many('stock.move', 'picking_id', 'Move lines', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}),
- 'auto_picking': fields.boolean('Auto-Packing'),
+ 'auto_picking': fields.boolean('Auto-Picking'),
'address_id': fields.many2one('res.partner.address', 'Partner', help="Address of partner"),
'invoice_state': fields.selection([
("invoiced", "Invoiced"),
("2binvoiced", "To Be Invoiced"),
- ("none", "Not from Packing")], "Invoice Status",
+ ("none", "Not from Picking")], "Invoice Status",
select=True, required=True, readonly=True, states={'draft': [('readonly', False)]}),
}
_defaults = {
'name': (invoice.name or '') + ', ' + (picking.name or ''),
'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)
+ 'date_invoice':context.get('date_inv',False)
}
invoice_obj.write(cursor, user, [invoice_id], invoice_vals, context=context)
else:
notes = move_line.sale_line_id.notes
elif move_line.purchase_line_id:
notes = move_line.purchase_line_id.notes
-
+
invoice_line_id = invoice_line_obj.create(cursor, user, {
'name': name,
'origin': origin,
'quantity': move_line.product_uos_qty or move_line.product_qty,
'invoice_line_tax_id': [(6, 0, tax_ids)],
'account_analytic_id': account_analytic_id,
- 'note': notes,
+ 'note': notes,
}, context=context)
self._invoice_line_hook(cursor, user, move_line, invoice_line_id)
'move_dest_id': fields.many2one('stock.move', 'Dest. Move'),
'move_history_ids': fields.many2many('stock.move', 'stock_move_history_ids', 'parent_id', 'child_id', 'Move History'),
'move_history_ids2': fields.many2many('stock.move', 'stock_move_history_ids', 'child_id', 'parent_id', 'Move History'),
- 'picking_id': fields.many2one('stock.picking', 'Packing List', select=True),
+ 'picking_id': fields.many2one('stock.picking', 'Picking List', select=True),
'note': fields.text('Notes'),
if res:
#_product_available_test depends on the next status for correct functioning
#the test does not work correctly if the same product occurs multiple times
- #in the same order. This is e.g. the case when using the button 'split in two' of
- #the stock outgoing form
+ #in the same order. This is e.g. the case when using the button 'split in two' of
+ #the stock outgoing form
self.write(cr, uid, move.id, {'state':'assigned'})
done.append(move.id)
pickings[move.picking_id.id] = 1
#'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', 'Move lines', required=True),
'address_id': fields.many2one('res.partner.address', 'Dest. Address', invisible=True),
- 'picking_id': fields.many2one('stock.picking', 'Packing list', select=True, invisible=True),
+ 'picking_id': fields.many2one('stock.picking', 'Picking list', select=True, invisible=True),
}
_defaults = {
'picking_id': _get_picking,