- [[ '... '*(l['level']) ]] -[[ l['name'] ]]
+ [[ '... '*2*(l['level']) ]] -[[ l['name'] ]]
- [[ l['pname'] ]]
+ [ [[ (l['pcode']) or removeParentNode('font') ]] ] [[ l['pname'] ]]
[[ l['pqty'] ]] [[ l['uname'] ]]
diff --git a/addons/mrp/report/mrp_production_order_view.xml b/addons/mrp/report/mrp_production_order_view.xml
index 7617c8f55e4..efacd8b675d 100644
--- a/addons/mrp/report/mrp_production_order_view.xml
+++ b/addons/mrp/report/mrp_production_order_view.xml
@@ -48,18 +48,18 @@
-
-
+
+ domain="[('month','=',time.strftime('%%m'))]"
+ help="Production performed during current month"/>
+ domain="[('date_start','<=', time.strftime('%%Y-%%m-%%d')), ('date_start','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
+ help="Production during last month"/>
@@ -79,10 +79,12 @@
-
-
+
+
+
+
diff --git a/addons/mrp/report/mrp_report_view.xml b/addons/mrp/report/mrp_report_view.xml
index 5f28f2ce6f4..1bf82338cdd 100644
--- a/addons/mrp/report/mrp_report_view.xml
+++ b/addons/mrp/report/mrp_report_view.xml
@@ -7,9 +7,9 @@
report.workcenter.load
tree
-
-
-
+
+
+
@@ -22,26 +22,23 @@
graph
-
+
-
-
-
- report.workcenter.load.form
+
+
+ report.workcenter.load.search
report.workcenter.load
- form
+ search
-
+
+
+
+
@@ -49,6 +46,7 @@
report.workcenter.load
form
graph,tree
+
Work Center Load is a projection of load in a work center given a period. The load is express in hour and cycle (for machines).
-
+
diff --git a/addons/mrp/wizard/mrp_price_view.xml b/addons/mrp/wizard/mrp_price_view.xml
index 758d0bc5415..e1a5d3a1d6e 100644
--- a/addons/mrp/wizard/mrp_price_view.xml
+++ b/addons/mrp/wizard/mrp_price_view.xml
@@ -15,8 +15,8 @@
-
+
diff --git a/addons/mrp/wizard/mrp_product_produce_view.xml b/addons/mrp/wizard/mrp_product_produce_view.xml
index f2040049056..187574e0e6f 100644
--- a/addons/mrp/wizard/mrp_product_produce_view.xml
+++ b/addons/mrp/wizard/mrp_product_produce_view.xml
@@ -18,8 +18,8 @@
-
+
diff --git a/addons/mrp/wizard/mrp_workcenter_load_view.xml b/addons/mrp/wizard/mrp_workcenter_load_view.xml
index baae314d04c..d2f675988d4 100644
--- a/addons/mrp/wizard/mrp_workcenter_load_view.xml
+++ b/addons/mrp/wizard/mrp_workcenter_load_view.xml
@@ -15,10 +15,10 @@
-
+
+ colspan="1" type="object" icon="gtk-print" />
diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py
index ab936e78daf..968650c6f7b 100644
--- a/addons/mrp_operations/mrp_operations.py
+++ b/addons/mrp_operations/mrp_operations.py
@@ -21,7 +21,6 @@
from osv import fields
from osv import osv
-import ir
import datetime
import netsvc
import time
@@ -135,8 +134,6 @@ class mrp_production_workcenter_line(osv.osv):
result = super(mrp_production_workcenter_line, self).write(cr, uid, ids, vals, context=context)
prod_obj = self.pool.get('mrp.production')
if vals.get('date_planned', False) and update:
- pids = {}
- pids2 = {}
for prod in self.browse(cr, uid, ids, context=context):
if prod.production_id.workcenter_lines:
dstart = min(vals['date_planned'], prod.production_id.workcenter_lines[0]['date_planned'])
@@ -496,25 +493,25 @@ class mrp_operations_operation(osv.osv):
production_obj=self.pool.get('mrp.production').browse(cr,uid,vals['production_id'])
wc_op_id.append(self.pool.get('mrp.production.workcenter.line').create(cr,uid,{'production_id':vals['production_id'],'name':production_obj.product_id.name,'workcenter_id':vals['workcenter_id']}))
if code.start_stop=='start':
- tmp=self.pool.get('mrp.production.workcenter.line').action_start_working(cr,uid,wc_op_id)
+ self.pool.get('mrp.production.workcenter.line').action_start_working(cr,uid,wc_op_id)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_start_working', cr)
if code.start_stop=='done':
- tmp=self.pool.get('mrp.production.workcenter.line').action_done(cr,uid,wc_op_id)
+ self.pool.get('mrp.production.workcenter.line').action_done(cr,uid,wc_op_id)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_done', cr)
self.pool.get('mrp.production').write(cr,uid,vals['production_id'],{'date_finnished':DateTime.now().strftime('%Y-%m-%d %H:%M:%S')})
if code.start_stop=='pause':
- tmp=self.pool.get('mrp.production.workcenter.line').action_pause(cr,uid,wc_op_id)
+ self.pool.get('mrp.production.workcenter.line').action_pause(cr,uid,wc_op_id)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_pause', cr)
if code.start_stop=='resume':
- tmp=self.pool.get('mrp.production.workcenter.line').action_resume(cr,uid,wc_op_id)
+ self.pool.get('mrp.production.workcenter.line').action_resume(cr,uid,wc_op_id)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_resume', cr)
if code.start_stop=='cancel':
- tmp=self.pool.get('mrp.production.workcenter.line').action_cancel(cr,uid,wc_op_id)
+ self.pool.get('mrp.production.workcenter.line').action_cancel(cr,uid,wc_op_id)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_cancel', cr)
if not self.check_operation(cr, uid, vals):
diff --git a/addons/mrp_operations/mrp_operations_view.xml b/addons/mrp_operations/mrp_operations_view.xml
index 4af63c52b77..7a5a5af3dc9 100644
--- a/addons/mrp_operations/mrp_operations_view.xml
+++ b/addons/mrp_operations/mrp_operations_view.xml
@@ -14,12 +14,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -32,12 +32,12 @@
-
-
-
-
-
+
+
+
+
+
@@ -49,7 +49,7 @@
tree
-
+
@@ -61,11 +61,11 @@
-
+
-
+
-
+
@@ -111,15 +111,15 @@
-
+
-
+
-
+
-
+
@@ -153,9 +153,9 @@
-
-
-
+
+
+
@@ -249,7 +249,7 @@
-
diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py
index edc14955ce9..ddcd2ccb501 100644
--- a/addons/mrp_repair/mrp_repair.py
+++ b/addons/mrp_repair/mrp_repair.py
@@ -109,7 +109,7 @@ class mrp_repair(osv.osv):
('invoice_except','Invoice Exception'),
('done','Done'),
('cancel','Cancel')
- ], 'Repair State', readonly=True,
+ ], 'State', readonly=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed repair order. \
\n* The \'Confirmed\' state is used when a user confirms the repair order. \
\n* The \'Ready to Repair\' state is used to start to repairing, user can start repairing only after repair order is confirmed. \
diff --git a/addons/mrp_repair/mrp_repair_view.xml b/addons/mrp_repair/mrp_repair_view.xml
index bc776ea0723..04c9587b6c5 100644
--- a/addons/mrp_repair/mrp_repair_view.xml
+++ b/addons/mrp_repair/mrp_repair_view.xml
@@ -7,14 +7,13 @@
mrp.repair
tree
-
-
+
+
-
+
-
@@ -94,22 +93,22 @@
-
+
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
@@ -153,18 +152,18 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -183,7 +182,7 @@
-
+
@@ -192,10 +191,11 @@
+
+
-
diff --git a/addons/mrp_repair/wizard/cancel_repair.py b/addons/mrp_repair/wizard/cancel_repair.py
index de6e8095569..658adef8e9e 100644
--- a/addons/mrp_repair/wizard/cancel_repair.py
+++ b/addons/mrp_repair/wizard/cancel_repair.py
@@ -69,8 +69,8 @@ class repair_cancel(osv.osv_memory):
-
-
+
+
"""
diff --git a/addons/mrp_repair/wizard/mrp_repair_cancel_view.xml b/addons/mrp_repair/wizard/mrp_repair_cancel_view.xml
index 4af2a3394b0..811551aedbf 100644
--- a/addons/mrp_repair/wizard/mrp_repair_cancel_view.xml
+++ b/addons/mrp_repair/wizard/mrp_repair_cancel_view.xml
@@ -13,9 +13,9 @@
-
-
+
diff --git a/addons/mrp_repair/wizard/mrp_repair_make_invoice_view.xml b/addons/mrp_repair/wizard/mrp_repair_make_invoice_view.xml
index 25edbd454ec..62edf984b20 100644
--- a/addons/mrp_repair/wizard/mrp_repair_make_invoice_view.xml
+++ b/addons/mrp_repair/wizard/mrp_repair_make_invoice_view.xml
@@ -14,10 +14,10 @@
-
-
+
+
diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py
index 3efb4e518d7..769d3a0460e 100644
--- a/addons/point_of_sale/pos.py
+++ b/addons/point_of_sale/pos.py
@@ -280,8 +280,8 @@ class pos_order(osv.osv):
'date_validation': fields.function(_get_date_payment, method=True, string='Validation Date', type='date', store=True),
'date_payment': fields.function(_get_date_payment2, method=True, string='Payment Date', type='date', store=True),
'date_validity': fields.date('Validity Date', required=True),
- 'user_id': fields.many2one('res.users', 'Connected Salesman'),
- 'user_salesman_id': fields.many2one('res.users', 'Cashier', required=True),
+ 'user_id': fields.many2one('res.users', 'Connected Salesman', help="Person who uses the the register. It could be a reliever, a student or an interim employee."),
+ 'user_salesman_id': fields.many2one('res.users', 'Cashier', required=True, help="User who is logged into the system."),
'sale_manager': fields.many2one('res.users', 'Salesman Manager'),
'amount_tax': fields.function(_amount_all, method=True, string='Taxes', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
'amount_total': fields.function(_amount_total, method=True, string='Total'),
@@ -295,7 +295,7 @@ class pos_order(osv.osv):
'payments': fields.one2many('pos.payment', 'order_id', 'Order Payments', states={'draft': [('readonly', False)]}, readonly=True),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),
'partner_id': fields.many2one( 'res.partner', 'Customer', change_default=True, select=1, states={'draft': [('readonly', False)], 'paid': [('readonly', False)]}),
- 'state': fields.selection([('draft', 'Draft'), ('payment', 'Payment'),
+ 'state': fields.selection([('draft', 'Quotation'), ('payment', 'Payment'),
('advance','Advance'),
('paid', 'Paid'), ('done', 'Done'), ('invoiced', 'Invoiced'), ('cancel', 'Cancel')],
'State', readonly=True, ),
@@ -358,7 +358,7 @@ class pos_order(osv.osv):
def test_order_lines(self, cr, uid, order, context=None):
- """ Test order line is created or not for the order "
+ """ Test order line is created or not for the order "
@param name: Names of fields.
@return: True
"""
@@ -581,7 +581,7 @@ class pos_order(osv.osv):
account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context)
args['account_id'] = order.partner_id and order.partner_id.property_account_receivable and order.partner_id.property_account_receivable.id or account_def.id or curr_c.account_receivable.id
if data.get('is_acc',False):
- args['is_acc']=data['is_acc']
+ args['is_acc'] = data['is_acc']
args['account_id']= prod_obj.browse(cr,uid, data['product_id']).property_account_income and prod_obj.browse(cr,uid, data['product_id']).property_account_income.id
if not args['account_id']:
raise osv.except_osv(_('Error'), _('Please provide an account for the product: %s')%(prod_obj.browse(cr,uid, data['product_id']).name))
@@ -631,7 +631,7 @@ class pos_order(osv.osv):
wf_service = netsvc.LocalService("workflow")
wf_service.trg_write(uid, 'pos.order', order_id, cr)
- return order_line_id
+ return order_line_id, price
def refund(self, cr, uid, ids, context=None):
"""Create a copy of order for refund order"""
@@ -1270,9 +1270,9 @@ pos_payment()
class product_product(osv.osv):
_inherit = 'product.product'
_columns = {
- 'income_pdt': fields.boolean('Product for Incoming'),
+ 'income_pdt': fields.boolean('Product for Input'),
'expense_pdt': fields.boolean('Product for expenses'),
- 'am_out': fields.boolean('Controle for Outgoing Operations'),
+ 'am_out': fields.boolean('Controle for Output Operations'),
'disc_controle': fields.boolean('Discount Controle '),
}
_defaults = {
diff --git a/addons/point_of_sale/pos_view.xml b/addons/point_of_sale/pos_view.xml
index 2b17fe5ea88..c0f7b566879 100644
--- a/addons/point_of_sale/pos_view.xml
+++ b/addons/point_of_sale/pos_view.xml
@@ -12,12 +12,14 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -114,16 +109,17 @@
pos.order
tree
-
+
+
-
+
@@ -136,16 +132,18 @@
-
-
-
-
+
+
+
+
-
-
+
+
+
+
@@ -788,33 +786,6 @@
action="action_box_out"
id="menu_wizard_enter_jrnl2" sequence="3" />
-
- POS Sales
- pos.order
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- All sales
- ir.actions.act_window
- pos.order
- form
-
-
POS Sales Lines
pos.order.line
diff --git a/addons/point_of_sale/report/pos_payment_report_date.py b/addons/point_of_sale/report/pos_payment_report_date.py
index 38f87d533f2..e492e929b7c 100644
--- a/addons/point_of_sale/report/pos_payment_report_date.py
+++ b/addons/point_of_sale/report/pos_payment_report_date.py
@@ -37,12 +37,20 @@ class pos_payment_report_date(report_sxw.rml_parse):
dt1 = form['date_start'] + ' 00:00:00'
dt2 = form['date_end'] + ' 23:59:59'
data={}
- self.cr.execute ("select pt.name,pol.qty,pol.discount,pol.price_unit, " \
- "(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) as total " \
- "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
- "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
- "and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s and po.user_id IN %s " \
- ,(dt1,dt2,tuple(form['user_id'])))
+ if form['user_id']:
+ self.cr.execute ("select pt.name,pol.qty,pol.discount,pol.price_unit, " \
+ "(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) as total " \
+ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
+ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
+ "and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s and po.user_id IN %s " \
+ ,(dt1,dt2,tuple(form['user_id'])))
+ else:
+ self.cr.execute ("select pt.name,pol.qty,pol.discount,pol.price_unit, " \
+ "(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) as total " \
+ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
+ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
+ "and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s" \
+ ,(dt1,dt2))
data=self.cr.dictfetchall()
return data
@@ -50,11 +58,18 @@ class pos_payment_report_date(report_sxw.rml_parse):
dt1 = form['date_start'] + ' 00:00:00'
dt2 = form['date_end'] + ' 23:59:59'
res=[]
- self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) " \
- "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
- "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
- "and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s and po.user_id IN %s " \
- ,(dt1,dt2,tuple(form['user_id'])))
+ if form['user_id']:
+ self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) " \
+ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
+ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
+ "and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s and po.user_id IN %s " \
+ ,(dt1,dt2,tuple(form['user_id'])))
+ else:
+ self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) " \
+ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
+ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
+ "and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s" \
+ ,(dt1,dt2))
res=self.cr.fetchone()[0] or 0.0
return res
diff --git a/addons/point_of_sale/report/report_cash_register.py b/addons/point_of_sale/report/report_cash_register.py
index 02945daf77b..0e09ddd9b62 100644
--- a/addons/point_of_sale/report/report_cash_register.py
+++ b/addons/point_of_sale/report/report_cash_register.py
@@ -33,7 +33,7 @@ class report_cash_register(osv.osv):
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
- 'state':fields.selection([('draft', 'Draft'),('confirm', 'Confirmed')],'State'),
+ 'state': fields.selection([('draft', 'Quotation'),('open','Open'),('confirm', 'Confirmed')],'State'),
'journal_id': fields.many2one('account.journal', 'Journal'),
'balance_start': fields.float('Opening Balance'),
'balance_end_real': fields.float('Closing Balance'),
diff --git a/addons/point_of_sale/report/report_cash_register_view.xml b/addons/point_of_sale/report/report_cash_register_view.xml
index e975a1c6d79..3cda047598f 100644
--- a/addons/point_of_sale/report/report_cash_register_view.xml
+++ b/addons/point_of_sale/report/report_cash_register_view.xml
@@ -27,17 +27,17 @@
-
-
-
+
+
+ domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
+ help="Cash Analysis created in last month"/>
-
-
-
+
+
+
- Cash Register Analysis
+ Register Analysis
report.cash.register
form
tree,form
diff --git a/addons/point_of_sale/report/report_pos_order.py b/addons/point_of_sale/report/report_pos_order.py
index 373f8006566..eb8bac2374e 100644
--- a/addons/point_of_sale/report/report_pos_order.py
+++ b/addons/point_of_sale/report/report_pos_order.py
@@ -88,6 +88,8 @@ class report_pos_order(osv.osv):
to_char(s.date_order, 'dd-MM-YYYY'),to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),
to_char(s.date_order, 'YYYY-MM-DD'), s.partner_id,s.state,
s.user_id,s.shop_id,s.company_id,s.sale_journal,l.product_id,s.date_validation,
- s.date_payment)""")
+ s.date_payment
+ having
+ sum(l.qty * u.factor) != 0)""")
report_pos_order()
diff --git a/addons/point_of_sale/report/report_pos_order_view.xml b/addons/point_of_sale/report/report_pos_order_view.xml
index 04356706bcd..6a9bc6823cc 100644
--- a/addons/point_of_sale/report/report_pos_order_view.xml
+++ b/addons/point_of_sale/report/report_pos_order_view.xml
@@ -38,20 +38,20 @@
-
-
-
+
+
+ domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
+ help="POS ordered created last month"/>
-
-
-
+
+
+
diff --git a/addons/point_of_sale/security/ir.model.access.csv b/addons/point_of_sale/security/ir.model.access.csv
index 34efcd6c2f5..206c14172f9 100644
--- a/addons/point_of_sale/security/ir.model.access.csv
+++ b/addons/point_of_sale/security/ir.model.access.csv
@@ -25,7 +25,7 @@
"access_report_pos_order_system","report.pos.order.system","model_report_pos_order","base.group_system",1,1,1,1
"access_report_pos_order","report.pos.order","model_report_pos_order","group_pos_manager",1,1,1,1
"access_account_bank_statement","account.bank.statement","account.model_account_bank_statement","group_pos_user",1,1,1,0
-"access_account_bank_statement_manager","account.bank.statement manager","account.model_account_bank_statement","group_pos_manager",1,0,0,0
+"access_account_bank_statement_manager","account.bank.statement manager","account.model_account_bank_statement","group_pos_manager",1,1,1,1
"access_account_bank_statement_system","account.bank.statement system","account.model_account_bank_statement","base.group_system",1,0,0,0
"access_account_bank_statement_line","account.bank.statement.line","account.model_account_bank_statement_line","group_pos_user",1,1,1,0
"access_account_period_pos","account.period pos user","account.model_account_period","group_pos_user",1,1,1,0
@@ -35,11 +35,13 @@
"access_account_fiscalyear_pos_manager","account.fiscalyear manager","account.model_account_fiscalyear","group_pos_manager",1,0,0,0
"access_account_fiscalyear_pos_system","account.fiscalyear user","account.model_account_fiscalyear","base.group_system",1,0,0,0
"access_account_cashbox_line","account.cashbox.line","account.model_account_cashbox_line","group_pos_user",1,1,1,0
+"access_account_cashbox_line_manager","account.cashbox.line manager","account.model_account_cashbox_line","group_pos_manager",1,1,1,1
"access_product_product","product.product","product.model_product_product","group_pos_user",1,0,0,0
"access_product_template_pos_user","product.template pos user","product.model_product_template","group_pos_user",1,0,0,0
"access_product_product_pos_manager","product.product.pos manager","product.model_product_product","group_pos_manager",1,0,0,0
"access_product_template_pos_manager","product.template pos manager","product.model_product_template","group_pos_manager",1,0,0,0
"access_account_move_line","account.move.line","account.model_account_move_line","group_pos_user",1,1,1,0
+"access_account_move_line_manager","account.move.line manager","account.model_account_move_line","group_pos_manager",1,1,1,1
"access_account_move","account.move","account.model_account_move","group_pos_user",1,1,1,0
"access_account_journal","account.journal","account.model_account_journal","group_pos_user",1,1,1,0
"access_account_journal_manager","account.journal manager","account.model_account_journal","group_pos_manager",1,0,0,0
@@ -57,7 +59,7 @@
"access_product_template_pos","product.template pos","product.model_product_template","base.group_system",1,1,1,1
"access_pos_order_system","pos.order system","model_pos_order","base.group_system",1,0,0,0
"access_pos_order_line_system","pos.order.line system","model_pos_order_line","base.group_system",1,0,0,0
-"access_account_bank_statement_line_manager","account.bank.statement.line manager","account.model_account_bank_statement_line","group_pos_manager",1,0,0,0
+"access_account_bank_statement_line_manager","account.bank.statement.line manager","account.model_account_bank_statement_line","group_pos_manager",1,1,1,1
"access_account_invoice_manager","account.invoice manager","account.model_account_invoice","group_pos_manager",1,1,1,1
"access_pos_payment_manager","pos.payment manager","model_pos_payment","group_pos_manager",1,0,0,0
"access_report_transaction_pos_system","report.transaction.pos system","model_report_transaction_pos","base.group_system",1,1,1,1
diff --git a/addons/point_of_sale/statement_view.xml b/addons/point_of_sale/statement_view.xml
index cd0c3b8c57d..d400bc35a4b 100644
--- a/addons/point_of_sale/statement_view.xml
+++ b/addons/point_of_sale/statement_view.xml
@@ -32,6 +32,57 @@
id="menu_all_menu_cash_register"
sequence="4"
/>-->
+
+
+ account.bank.statement.inherit
+ account.bank.statement
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ account.bank.statement.inherit2
+ account.bank.statement
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Cash Register
@@ -56,8 +107,20 @@
+
+ account.bank.statement.tree
+ account.bank.statement
+ tree
+
+
+
+
+
+
+
+
- All Register
+ Registers
ir.actions.act_window
account.bank.statement
form
@@ -68,7 +131,7 @@
tree
-
+
@@ -79,7 +142,7 @@
diff --git a/addons/point_of_sale/test/pos_test.yml b/addons/point_of_sale/test/pos_test.yml
index 09b7fa3a90a..6baffce34f4 100644
--- a/addons/point_of_sale/test/pos_test.yml
+++ b/addons/point_of_sale/test/pos_test.yml
@@ -1,48 +1,40 @@
-
- In order to test the POS in module, To gives business owners a convenient way of checking out customers and of recording sales.
+ In order to test the POS in module, To give business owners a convenient way of checking out customers and of recording sales.
-
- I configure all details for the customer,Salesman and Product ,Account.
+ I configure all details for the Customer, Salesman and Product, Account.
-
- I create View Account Type.
+ I create View Account Type.
-
!record {model: account.account.type, id: account_account_type_view0}:
close_method: none
code: View
name: View
sign: 1
-
-
-
- I create Income Account Type.
+ I create Income Account Type.
-
!record {model: account.account.type, id: account_account_type_income0}:
close_method: unreconciled
code: Income
name: Income
sign: 1
-
-
-
- I create Expense Account Type.
+ I create Expense Account Type.
-
!record {model: account.account.type, id: account_account_type_expense0}:
close_method: unreconciled
code: Expense
name: Expense
sign: 1
-
-
-
- I create Cash Account Type.
+ I create Cash Account Type.
-
!record {model: account.account.type, id: account_account_type_cash0}:
close_method: balance
code: Cash
name: Cash
sign: 1
-
-
-
I create Minimal Chart Account.
-
@@ -69,8 +61,6 @@
reconcile: true
type: payable
user_type: account_account_type_expense0
-
-
-
I create Receivable Account.
-
@@ -85,8 +75,6 @@
reconcile: true
type: receivable
user_type: account_account_type_income0
-
-
-
I create Cash Account.
-
@@ -100,8 +88,6 @@
parent_right: 7
type: other
user_type: account_account_type_cash0
-
-
-
I create Purchases Account.
-
@@ -116,7 +102,7 @@
type: other
user_type: account_account_type_expense0
-
- I create Sales Account.
+ I create Sales Account.
-
!record {model: account.account, id: account_account_sales0}:
code: Sale
@@ -128,7 +114,6 @@
parent_right: 11
type: other
user_type: account_account_type_income0
-
-
I create Purchase Journal.
-
@@ -141,10 +126,8 @@
sequence_id: account.sequence_purchase_journal
type: purchase
view_id: account.account_journal_view
-
-
-
- I create Sale Journal.
+ I create Sale Journal.
-
!record {model: account.journal, id: account_journal_salejournal0}:
code: SAJ
@@ -155,10 +138,8 @@
sequence_id: account.sequence_sale_journal
type: sale
view_id: account.account_journal_view
-
-
-
- I create Bank Journal.
+ I create Bank Journal.
-
!record {model: account.journal, id: account_journal_bankjournal0}:
code: BNK
@@ -169,7 +150,6 @@
sequence_id: account.sequence_journal
type: cash
view_id: account.account_journal_bank_view
-
-
I create property for account payable.
-
@@ -178,10 +158,8 @@
fields_id: account.field_res_partner_property_account_payable
name: property_account_expense_categ
value_reference: account.account,5
-
-
-
- I create property for account receivable.
+ I create property for account receivable.
-
!record {model: ir.property, id: ir_property_propertyaccountincomecateg0}:
company_id: base.main_company
@@ -200,25 +178,19 @@
category_id:
- res_partner_category_customers0
name: Cleartrail
-
-
-
- I create partner address.
+ I create partner address.
-
!record {model: res.partner.address, id: res_partner_address_1}:
partner_id: res_partner_cleartrail0
street: onam plaza, 14 B palasia A B Road
type: contact
-
-
-
I create partner invoice address.
-
!record {model: res.partner.address, id: res_partner_address_2}:
partner_id: res_partner_cleartrail0
type: invoice
-
-
-
I create partner delivery address.
-
@@ -241,7 +213,6 @@
property_account_payable: account_account_payable1
property_account_receivable: account_account_receivable0
supplier: true
-
-
I create partner address .
-
@@ -270,7 +241,6 @@
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
-
I create product LG Viewty Smart.
-
@@ -294,7 +264,6 @@
-
!record {model: product.category, id: product_category_computer0}:
name: Computer
-
-
I create product HP Pavilion Desktop PCs
-
@@ -315,11 +284,9 @@
uom_po_id: product.product_uom_unit
property_account_expense: account_account_payable1
property_account_income: account_account_receivable0
-
-
I create New Order by adding the details of Salesman and "Product" as LG Viewty Smart Quantity as 10.
-
-
!record {model: pos.order, id: pos_order_pos0}:
company_id: base.main_company
date_order: '2010-05-13 15:02:48'
@@ -351,13 +318,11 @@
self.apply_discount(cr, uid, [ref("pos_discount_0")], {"lang": "en_US", "active_model":
"pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id":
ref("pos_order_pos0"), })
-
-
I open the register.
-
!record {model: pos.open.statement, id: pos_open_statement_0}:
{}
-
-
I open the statement.
-
@@ -365,19 +330,17 @@
self.open_statement(cr, uid, [ref("pos_open_statement_0")], {"lang": "en_US", "active_model":
"ir.ui.menu", "active_ids": [ref("point_of_sale.menu_open_statement")], "tz":
False, "active_id": ref("point_of_sale.menu_open_statement"), })
-
-
I click on the "Make Payment" wizard.
-
!record {model: pos.make.payment, id: pos_make_payment_0}:
amount: 1615.0
journal: 7
- payment_date: 2010-05-13
+ payment_date: "2010-05-13"
payment_name: Payment
product_id: product_product_hppaviliondesktoppcs0
pricelist_id: product.list0
partner_id: base.res_partner_agrolait
-
-
I make the payment.
-
@@ -391,7 +354,6 @@
!python {model: pos.order}: |
order=self.browse(cr,uid,ref("pos_order_pos0"))
assert(order.statement_ids!=[]), "Statement lines not created"
-
-
When I click on Return picking button , I get three option.
-
@@ -412,8 +374,6 @@
self.create_returns(cr, uid, [ref("pos_return_0")], {"lang": "en_US", "active_model":
"pos.order", "active_ids": [ref("point_of_sale.pos_order_pos0")], "tz":
False, "active_id": ref("point_of_sale.pos_order_pos0"), })
-
-
-
Then it allows me to define the quantity of products, which will return to the stock.
-
@@ -432,19 +392,17 @@
self.close_action(cr, uid, [ref("pos_add_product_0")], {"lang": "en_US", "active_model":
"pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id": ref("pos_order_pos0"),
})
-
-
I create payment.
-
!record {model: pos.make.payment, id: pos_make_payment_1}:
amount: 680.0
journal: 7
- payment_date: 2010-05-13
+ payment_date: "2010-05-13"
payment_name: Payment
product_id: product_product_hppaviliondesktoppcs0
pricelist_id: product.list0
partner_id: base.res_partner_agrolait
-
-
For payment, I click on Make Payment.
-
@@ -452,7 +410,6 @@
self.check(cr, uid, [ref("pos_make_payment_1")], {"lang": "en_US", "active_model":
"pos.order", "active_ids": [ref("pos_order_pos0")], "tz":
False, "active_id": ref("pos_order_pos0"), })
-
-
To check the Return without Refund . I click button "Return without Refund ".
-
diff --git a/addons/point_of_sale/wizard/pos_box_entries.py b/addons/point_of_sale/wizard/pos_box_entries.py
index 941b4f3c2d7..f7349726033 100644
--- a/addons/point_of_sale/wizard/pos_box_entries.py
+++ b/addons/point_of_sale/wizard/pos_box_entries.py
@@ -36,8 +36,9 @@ def get_journal(self, cr, uid, context):
obj = self.pool.get('account.journal')
statement_obj = self.pool.get('account.bank.statement')
- user = self.pool.get('res.users').browse(cr, uid, uid)
- ids = obj.search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', user.company_id.id)])
+ cr.execute("""select DISTINCT journal_id from pos_journal_users where user_id=%d order by journal_id"""%(uid))
+ j_ids = map(lambda x1: x1[0], cr.fetchall())
+ ids = obj.search(cr, uid, [('type', '=', 'cash'), ('id', 'in', j_ids)])
obj_ids= statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', 'in', ids)])
res_obj = obj.read(cr, uid, ids, ['journal_id'], context)
res_obj = [(r1['id'])for r1 in res_obj]
diff --git a/addons/point_of_sale/wizard/pos_box_entries.xml b/addons/point_of_sale/wizard/pos_box_entries.xml
index f04c4232ace..e0af60a1f73 100644
--- a/addons/point_of_sale/wizard/pos_box_entries.xml
+++ b/addons/point_of_sale/wizard/pos_box_entries.xml
@@ -14,11 +14,13 @@
-
-
-
+
+
+
+
+
diff --git a/addons/point_of_sale/wizard/pos_box_out.xml b/addons/point_of_sale/wizard/pos_box_out.xml
index 2e48a560823..3bd817b1797 100644
--- a/addons/point_of_sale/wizard/pos_box_out.xml
+++ b/addons/point_of_sale/wizard/pos_box_out.xml
@@ -14,12 +14,14 @@
-
-
-
-
+
+
+
+
+
+
diff --git a/addons/point_of_sale/wizard/pos_close_statement.py b/addons/point_of_sale/wizard/pos_close_statement.py
index f1fb42a04a8..f12a0a16c99 100644
--- a/addons/point_of_sale/wizard/pos_close_statement.py
+++ b/addons/point_of_sale/wizard/pos_close_statement.py
@@ -43,28 +43,29 @@ class pos_close_statement(osv.osv_memory):
cr.execute("""select DISTINCT journal_id from pos_journal_users where user_id=%d order by journal_id"""%(uid))
j_ids = map(lambda x1: x1[0], cr.fetchall())
journal_ids = journal_obj.search(cr, uid, [('auto_cash', '=', True), ('type', '=', 'cash'), ('id', 'in', j_ids)])
-
+ ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', 'in', journal_ids)])
for journal in journal_obj.browse(cr, uid, journal_ids):
- ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)])
if not ids:
- raise osv.except_osv(_('Message'), _('Journals are already closed'))
+ raise osv.except_osv(_('Message'), _('Registers are already closed.'))
else:
- list_statement.append(ids[0])
if not journal.check_dtls:
statement_obj.button_confirm_cash(cr, uid, ids, context)
data_obj = self.pool.get('ir.model.data')
id2 = data_obj._get_id(cr, uid, 'account', 'view_bank_statement_tree')
id3 = data_obj._get_id(cr, uid, 'account', 'view_bank_statement_form2')
+ result = data_obj._get_id(cr, uid, 'point_of_sale', 'view_pos_confirm_cash_statement_filter')
+ search_id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
return {
- 'domain': "[('id','in'," + str(list_statement) + ")]",
+ 'domain': "[('id','in'," + str(ids) + ")]",
'name': 'Close Statements',
'view_type': 'form',
'view_mode': 'tree,form',
+ 'search_view_id': search_id['res_id'],
'res_model': 'account.bank.statement',
'views': [(id2, 'tree'),(id3, 'form')],
'type': 'ir.actions.act_window'
diff --git a/addons/point_of_sale/wizard/pos_close_statement.xml b/addons/point_of_sale/wizard/pos_close_statement.xml
index e46231fa993..c1ee3dc13d4 100644
--- a/addons/point_of_sale/wizard/pos_close_statement.xml
+++ b/addons/point_of_sale/wizard/pos_close_statement.xml
@@ -9,11 +9,15 @@
form
-
-
-
+
+
+
+
+
+
+
diff --git a/addons/point_of_sale/wizard/pos_details.xml b/addons/point_of_sale/wizard/pos_details.xml
index bb62b94fb75..f283139b058 100644
--- a/addons/point_of_sale/wizard/pos_details.xml
+++ b/addons/point_of_sale/wizard/pos_details.xml
@@ -12,6 +12,7 @@
+
form
-
-
-
+
+
+
+
+
+
+
diff --git a/addons/point_of_sale/wizard/pos_payment.py b/addons/point_of_sale/wizard/pos_payment.py
index 68cbbfe19c7..27c04a6dfba 100644
--- a/addons/point_of_sale/wizard/pos_payment.py
+++ b/addons/point_of_sale/wizard/pos_payment.py
@@ -47,8 +47,9 @@ class pos_make_payment(osv.osv_memory):
active_id = context and context.get('active_id',False)
if active_id:
j_obj = self.pool.get('account.journal')
- company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id
- journal = j_obj.search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', company_id)])
+ cr.execute("""select DISTINCT journal_id from pos_journal_users where user_id=%d order by journal_id"""%(uid))
+ j_ids = map(lambda x1: x1[0], cr.fetchall())
+ journal = j_obj.search(cr, uid, [('type', '=', 'cash'), ('id', 'in', j_ids)])
if journal:
journal = journal[0]
@@ -79,6 +80,10 @@ class pos_make_payment(osv.osv_memory):
res.update({'payment_date':current_date})
if 'payment_name' in fields:
res.update({'payment_name':'Payment'})
+ if 'partner_id' in fields:
+ res.update({'partner_id': order.partner_id.id or False})
+ if 'pricelist_id' in fields:
+ res.update({'pricelist_id': order.pricelist_id.id or False})
return res
def view_init(self, cr, uid, fields_list, context=None):
@@ -123,6 +128,18 @@ class pos_make_payment(osv.osv_memory):
"""
return result
+ def onchange_product_id(self, cr, uid, ids, product_id, amount):
+ """ Changes amount if product_id changes.
+ @param product_id: Changed product_id
+ @param amount: Amount to be paid
+ @return: Dictionary of changed values
+ """
+ prod_obj = self.pool.get('product.product')
+ if product_id:
+ product = prod_obj.browse(cr, uid, product_id)
+ amount = amount - product.list_price
+ return {'value': {'amount': amount}}
+
def check(self, cr, uid, ids, context):
"""Check the order:
@@ -135,8 +152,12 @@ class pos_make_payment(osv.osv_memory):
amount = order.amount_total - order.amount_paid
data = self.read(cr, uid, ids)[0]
invoice_wanted = data['invoice_wanted']
+ is_accompte = data['is_acc']
# Todo need to check ...
-
+ if is_accompte:
+ line_id, price = order_obj.add_product(cr, uid, order.id, data['product_id'], -1.0, context)
+ amount = order.amount_total - order.amount_paid - price
+
if amount != 0.0:
order_obj.write(cr, uid, [active_id], {'invoice_wanted': invoice_wanted, 'partner_id': data['partner_id']})
order_obj.add_payment(cr, uid, active_id, data, context=context)
@@ -205,11 +226,11 @@ class pos_make_payment(osv.osv_memory):
_columns = {
'journal':fields.selection(pos_box_entries.get_journal, "Cash Register",required=True),
- 'product_id': fields.many2one('product.product', "Acompte"),
+ 'product_id': fields.many2one('product.product', "Advance"),
'amount':fields.float('Amount', digits=(16,2) ,required= True),
'payment_name': fields.char('Payment name', size=32, required=True),
'payment_date': fields.date('Payment date', required=True),
- 'is_acc': fields.boolean('Accompte'),
+ 'is_acc': fields.boolean('Advance'),
'invoice_wanted': fields.boolean('Invoice'),
'num_sale':fields.char('Num.File', size=32),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist'),
diff --git a/addons/point_of_sale/wizard/pos_payment.xml b/addons/point_of_sale/wizard/pos_payment.xml
index 910cf2df0b3..36c92664e0b 100644
--- a/addons/point_of_sale/wizard/pos_payment.xml
+++ b/addons/point_of_sale/wizard/pos_payment.xml
@@ -12,26 +12,28 @@
form
-
+
-
+
-
+
-
-
-
-
+
+
+
+
+
diff --git a/addons/point_of_sale/wizard/pos_payment_report_date_view.xml b/addons/point_of_sale/wizard/pos_payment_report_date_view.xml
index 4c05c8ac514..748e606f422 100644
--- a/addons/point_of_sale/wizard/pos_payment_report_date_view.xml
+++ b/addons/point_of_sale/wizard/pos_payment_report_date_view.xml
@@ -7,15 +7,21 @@
form
-
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/addons/point_of_sale/wizard/pos_receipt_view.xml b/addons/point_of_sale/wizard/pos_receipt_view.xml
index a9796eff886..3f935f55101 100644
--- a/addons/point_of_sale/wizard/pos_receipt_view.xml
+++ b/addons/point_of_sale/wizard/pos_receipt_view.xml
@@ -12,8 +12,8 @@
-
+
diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py
index 5c6caf1e9db..e1b9b5af40b 100644
--- a/addons/procurement/procurement.py
+++ b/addons/procurement/procurement.py
@@ -19,7 +19,6 @@
#
##############################################################################
-from mx import DateTime
from osv import osv, fields
from tools.translate import _
import netsvc
diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml
index aa5552f0b0c..01c50d67e64 100644
--- a/addons/procurement/procurement_view.xml
+++ b/addons/procurement/procurement_view.xml
@@ -91,7 +91,6 @@
help="Procurement started late" />
-
diff --git a/addons/product/i18n/pt_BR.po b/addons/product/i18n/pt_BR.po
index 0bf7bda1ddc..1ce31156c3e 100644
--- a/addons/product/i18n/pt_BR.po
+++ b/addons/product/i18n/pt_BR.po
@@ -421,7 +421,7 @@ msgid ""
"reception of products."
msgstr ""
"Preço Padrão: o preço é fixo e recalculado periodicamente (geralmente no "
-"final do ano).\r\n"
+"final do ano).\n"
"Preço Médio: o preço de custo é recalculado a cada recepção de produtos."
#. module: product
diff --git a/addons/product/i18n/zh_CN.po b/addons/product/i18n/zh_CN.po
index 7cb31c3b142..43c33f51d02 100644
--- a/addons/product/i18n/zh_CN.po
+++ b/addons/product/i18n/zh_CN.po
@@ -399,7 +399,7 @@ msgid ""
"at the end of the year), Average Price: the cost price is recomputed at each "
"reception of products."
msgstr ""
-"标准价格: 成本价格是定期重新计算(通常在年底).\r\n"
+"标准价格: 成本价格是定期重新计算(通常在年底).\n"
"平均价格: 成本价格是在每次接收产品时重新计算."
#. module: product
@@ -557,7 +557,7 @@ msgid ""
"and the reception of goods for this product and for the default supplier. It "
"is used by the scheduler to order requests based on reordering delays."
msgstr ""
-"产品供应在确认采购订单到接收产品之间的默认平均延迟. \r\n"
+"产品供应在确认采购订单到接收产品之间的默认平均延迟. \n"
"用于在调度订单请求时要考虑的重订货延迟."
#. module: product
@@ -671,7 +671,7 @@ msgid ""
"supplying. 'Make to Order': When needed, purchase or produce for the "
"procurement request."
msgstr ""
-"按库存生产: 在仓库或等待重新供应时得到需求.\r\n"
+"按库存生产: 在仓库或等待重新供应时得到需求.\n"
" 按订单生产: 在采购或产品获得请求时得到需求."
#. module: product
@@ -1214,7 +1214,7 @@ msgid ""
"The computed quantity will be a multiple of this value. Use 1.0 for products "
"that can not be split."
msgstr ""
-"这数量计算将乘于一个数值.\r\n"
+"这数量计算将乘于一个数值.\n"
"产品使用1.0表示不能拆分."
#. module: product
@@ -1444,7 +1444,7 @@ msgid ""
"the delivery of the finished products. It's the time you promise to your "
"customers."
msgstr ""
-"这是确认客户订单和交付的平均时间.\r\n"
+"这是确认客户订单和交付的平均时间.\n"
"是承诺客户的时间."
#. module: product
@@ -1668,7 +1668,7 @@ msgid ""
"reception of the products in your warehouse. Used by the scheduler for "
"automatic computation of the purchase order planning."
msgstr ""
-"延迟天数是确认采购订单到仓库接收产品之间的延迟天数.\r\n"
+"延迟天数是确认采购订单到仓库接收产品之间的延迟天数.\n"
"用于制定采购订单计划时调度程序自动计算."
#. module: product
diff --git a/addons/product/product.py b/addons/product/product.py
index 8cb0a08f52d..eaa1df9ebf2 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -21,13 +21,10 @@
from osv import osv, fields
import decimal_precision as dp
-import pooler
import math
-import logging
from _common import rounding
-from tools import config
from tools.translate import _
def is_pair(x):
diff --git a/addons/project/test/test_project.yml b/addons/project/test/test_project.yml
index b02e9adbe06..d57cc274366 100644
--- a/addons/project/test/test_project.yml
+++ b/addons/project/test/test_project.yml
@@ -1,46 +1,46 @@
-
Test project template feature
--
+-
Create project 'OpenERP Training Programme'
--
+-
!record {model: project.project, id: project_project_openerptrainingprogramme0}:
company_id: base.main_company
- name: OpenERP Training Programme
--
+ name: OpenERP Training Programme
+-
Create task 'Technical Training' for this project
--
+-
!record {model: project.task, id: project_task_technicaltraining0}:
date_start: '2010-05-31 11:48:38'
name: Technical Training
planned_hours: 30.0
project_id: project_project_openerptrainingprogramme0
remaining_hours: 30.0
- state: draft
--
+ state: draft
+-
Create task 'Functional Training' for this project
--
+-
!record {model: project.task, id: project_task_functionaltraining0}:
date_start: '2010-05-31 11:49:11'
name: Functional Training
planned_hours: 30.0
project_id: project_project_openerptrainingprogramme0
remaining_hours: 30.0
- state: draft
--
+ state: draft
+-
Set project as project template
--
+-
!python {model: project.project}: |
self.set_template(cr, uid, [ref("project_project_openerptrainingprogramme0")],
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_open_view_project_all")],
"tz": False, "active_id": ref("project.menu_open_view_project_all"), })
--
+-
Check if project in template state
--
+-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error, string: Project is in template state}:
- - state == "template"
--
+ - state == "template"
+-
Create new project based on this template
--
+-
!python {model: project.project}: |
new_prj = self.duplicate_template(cr, uid, [ref("project_project_openerptrainingprogramme0")],
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_open_view_project_all")],
@@ -60,53 +60,53 @@
[ref("project.menu_open_view_project_all")], "tz": False, "active_model":
"ir.ui.menu", "project_id": False, "active_id": ref("project.menu_open_view_project_all"),
})
--
+-
Check if project in open state
--
+-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error, string: Project is in open state}:
- state == "open"
+
+
-
-
-
--
- Test for different project-states
+
-
+ Test for different project-states
+-
Keep project pending
--
+-
!python {model: project.project}: |
self.set_pending(cr, uid, [ref("project_project_openerptrainingprogramme0")], {"lang": "en_US", "active_ids":
[ref("project.menu_open_view_project_all")], "tz": False, "active_model":
"ir.ui.menu", "project_id": False, "active_id": ref("project.menu_open_view_project_all"),
})
--
+-
Check if project in pending state
--
+-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error, string: Project is in pending state}:
- - state == "pending"
--
+ - state == "pending"
+-
Cancel the project
--
+-
!python {model: project.project}: |
self.set_cancel(cr, uid, [ref("project_project_openerptrainingprogramme0")], {"lang": "en_US", "active_ids":
[ref("project.menu_open_view_project_all")], "tz": False, "active_model":
"ir.ui.menu", "project_id": False, "active_id": ref("project.menu_open_view_project_all"),
})
--
+-
Check if project in cancel state
--
+-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error, string: Project is in cancel state}:
- state == "cancelled"
--
+-
Re-open the project
--
+-
!python {model: project.project}: |
self.set_open(cr, uid, [ref("project_project_openerptrainingprogramme0")], {"lang": "en_US", "active_ids": [ref("project.menu_open_view_project_all")],
"tz": False, "active_model": "ir.ui.menu", "project_id": False, "active_id":
ref("project.menu_open_view_project_all"), })
--
+-
Check if project in open state
--
+-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error, string: Project is in open state}:
- state == "open"
@@ -130,17 +130,17 @@
self.compute_hours(cr, uid, [ref('project_task_technicaltraining_remainingwiz0')], {'active_id': ref("project_task_technicaltraining0"),'button_reactivate': True})
- |
Check if task 'Technical Training' in open state and for other initial values
--
+-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: Project is in open state}:
- state == "open"
- planned_hours == 30
- remaining_hours == 30
- delay_hours == 0.0
- total_hours == 30
- - effective_hours == 0.0
--
+ - effective_hours == 0.0
+-
Make a work task entry 'Training on OpenERP modules, models and classes' of 10 hours
--
+-
!record {model: project.task, id: project_task_technicaltraining0, context: {'withoutemployee': True}}:
work_ids:
- date: '2010-05-31 15:04:22'
@@ -154,10 +154,10 @@
- remaining_hours == 20
- effective_hours == 10.0
- total_hours == effective_hours + remaining_hours
- - delay_hours == total_hours - planned_hours
--
+ - delay_hours == total_hours - planned_hours
+-
Make a work task entry 'Training on OpenERP xml views' of 10 hours
--
+-
!record {model: project.task, id: project_task_technicaltraining0, context: {'withoutemployee': True}}:
work_ids:
- date: '2010-06-01 15:04:46'
@@ -196,13 +196,13 @@
remaining_hours: 10.0
-
Reevaluate the task
--
+-
!python {model: project.task.reevaluate}: |
self.compute_hours(cr, uid, [ref("config_compute_remaining_0")], {"lang": "en_US",
"project_id": False, "tz": False, "active_model": "project.task", "search_default_project_id":
False, "search_default_user_id": 1, "search_default_current": 1, "active_ids":
[ref("project_task_technicaltraining0")], "active_id": ref("project_task_technicaltraining0"), })
-
+
-
Check for effective hours and remaining hours, remaining_hours must be 10 while planned_hours remains 30
-
@@ -211,10 +211,10 @@
- remaining_hours == 10.0
- effective_hours == 30.0
- total_hours == effective_hours + remaining_hours
- - delay_hours == total_hours - planned_hours
--
+ - delay_hours == total_hours - planned_hours
+-
Make a work task entry 'Training on reports and wizards' of 10 hours
--
+-
!record {model: project.task, id: project_task_technicaltraining0, context: {'withoutemployee': True}}:
work_ids:
- date: '2010-05-31 15:08:40'
@@ -230,14 +230,14 @@
- effective_hours == 40.0
- total_hours == effective_hours + remaining_hours
- delay_hours == total_hours - planned_hours
--
+-
Close the task
--
+-
!python {model: project.task}: |
self.do_close(cr, uid, [ref("project_task_technicaltraining0")], {'mail_send': False})
--
+-
Check if task in done state
--
+-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: Task is in done state}:
- state == "done"
@@ -251,7 +251,7 @@
remaining_hours: 10.0
-
Reevaluate the task with 10 hours remaining
--
+-
!python {model: project.task.reevaluate}: |
self.compute_hours(cr, uid, [ref("config_compute_remaining_1")], {"lang": "en_US",
"project_id": False, "tz": False, "button_reactivate": True, "active_model":
@@ -266,10 +266,10 @@
- remaining_hours == 10.0
- effective_hours == 40.0
- total_hours == effective_hours + remaining_hours
- - delay_hours == total_hours - planned_hours
--
+ - delay_hours == total_hours - planned_hours
+-
Make a work task entry 'Training on yml' of 5 hours
--
+-
!record {model: project.task, id: project_task_technicaltraining0, context: {'withoutemployee': True}}:
work_ids:
- date: '2010-05-31 16:55:27'
@@ -284,17 +284,17 @@
- remaining_hours == 5.0
- effective_hours == 45.0
- total_hours == effective_hours + remaining_hours
- - delay_hours == total_hours - planned_hours
--
+ - delay_hours == total_hours - planned_hours
+-
Close the task
--
+-
!python {model: project.task}: |
self.do_close(cr, uid, [ref("project_task_technicaltraining0")], {'mail_send': False})
--
+-
Check if task in done state
--
+-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error}:
- - state == "done"
+ - state == "done"
-
Check for effective hours and remaining hours
-
@@ -303,17 +303,17 @@
- remaining_hours == 0.0
- effective_hours == 45.0
- total_hours == effective_hours + remaining_hours
- - delay_hours == total_hours - planned_hours
--
+ - delay_hours == total_hours - planned_hours
+-
Close project 'OpenERP Training Programme'
--
+-
!python {model: project.project}: |
self.set_done(cr, uid, [ref("project_project_openerptrainingprogramme0")], {"lang": "en_US", "active_ids": [ref("project.menu_open_view_project_all")],
"tz": False, "active_model": "ir.ui.menu", "project_id": False, "active_id":
ref("project.menu_open_view_project_all"), })
--
+-
Check if project in close state
--
+-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error, string: "Project must be in closed state"}:
- - state == "close"
-
+ - state == "close"
+
diff --git a/addons/project_mrp/project_mrp_view.xml b/addons/project_mrp/project_mrp_view.xml
index 726e95d1c9b..c8ed6fbc447 100644
--- a/addons/project_mrp/project_mrp_view.xml
+++ b/addons/project_mrp/project_mrp_view.xml
@@ -19,7 +19,7 @@
form
-
+
diff --git a/addons/resource/i18n/et.po b/addons/resource/i18n/et.po
new file mode 100644
index 00000000000..400369f6dd9
--- /dev/null
+++ b/addons/resource/i18n/et.po
@@ -0,0 +1,323 @@
+# Estonian translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2010-08-18 06:50+0000\n"
+"PO-Revision-Date: 2010-08-28 08:21+0000\n"
+"Last-Translator: OpenERP Administrators \n"
+"Language-Team: Estonian \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-08-29 03:48+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: resource
+#: help:resource.calendar.leaves,resource_id:0
+msgid ""
+"If empty, this is a generic holiday for the company. If a resource is set, "
+"the holiday/leave is only for this resource"
+msgstr ""
+
+#. module: resource
+#: selection:resource.calendar.attendance,dayofweek:0
+msgid "Friday"
+msgstr "Reede"
+
+#. module: resource
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"Objekti nimi peab algama x_'ga ja ei tohi sisaldada ühtegi erisümbolit !"
+
+#. module: resource
+#: field:resource.resource,resource_type:0
+msgid "Resource Type"
+msgstr "Ressursi tüüp"
+
+#. module: resource
+#: model:ir.model,name:resource.model_resource_calendar_leaves
+#: view:resource.calendar.leaves:0
+msgid "Leave Detail"
+msgstr ""
+
+#. module: resource
+#: model:ir.actions.act_window,name:resource.resource_calendar_resources_leaves
+msgid "Resources Leaves"
+msgstr ""
+
+#. module: resource
+#: field:resource.calendar,attendance_ids:0
+#: view:resource.calendar.attendance:0
+#: view:resource.calendar.leaves:0
+msgid "Working Time"
+msgstr "Tööaeg"
+
+#. module: resource
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "Vigane XML vaate arhitektuurile!"
+
+#. module: resource
+#: selection:resource.calendar.attendance,dayofweek:0
+msgid "Thursday"
+msgstr "Neljapäev"
+
+#. module: resource
+#: view:resource.calendar:0
+#: view:resource.calendar.leaves:0
+#: view:resource.resource:0
+msgid "Group By..."
+msgstr ""
+
+#. module: resource
+#: selection:resource.calendar.attendance,dayofweek:0
+msgid "Sunday"
+msgstr "Pühapäev"
+
+#. module: resource
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Vigane mudeli nimi toimingu definitsioonis."
+
+#. module: resource
+#: view:resource.resource:0
+msgid "Search Resource"
+msgstr ""
+
+#. module: resource
+#: view:resource.resource:0
+msgid "Type"
+msgstr "Tüüp"
+
+#. module: resource
+#: model:ir.actions.act_window,name:resource.action_resource_resource_tree
+#: view:resource.resource:0
+msgid "Resources"
+msgstr "Ressursid"
+
+#. module: resource
+#: field:resource.calendar,manager:0
+msgid "Workgroup manager"
+msgstr "Töörühma juhataja"
+
+#. module: resource
+#: view:resource.calendar:0
+msgid "Search Working Period"
+msgstr ""
+
+#. module: resource
+#: selection:resource.calendar.attendance,dayofweek:0
+msgid "Monday"
+msgstr "Esmaspäev"
+
+#. module: resource
+#: model:ir.model,name:resource.model_resource_calendar
+msgid "Resource Calendar"
+msgstr ""
+
+#. module: resource
+#: field:resource.calendar,company_id:0
+#: view:resource.calendar.leaves:0
+#: field:resource.calendar.leaves,company_id:0
+#: view:resource.resource:0
+#: field:resource.resource,company_id:0
+msgid "Company"
+msgstr "Ettevõte"
+
+#. module: resource
+#: selection:resource.resource,resource_type:0
+msgid "Material"
+msgstr "Materjal"
+
+#. module: resource
+#: field:resource.calendar.attendance,dayofweek:0
+msgid "Day of week"
+msgstr "Nädalapäev"
+
+#. module: resource
+#: field:resource.calendar.attendance,date_from:0
+msgid "Starting date"
+msgstr "Alustamise kuupäev"
+
+#. module: resource
+#: view:resource.resource:0
+#: field:resource.resource,user_id:0
+msgid "User"
+msgstr "Kasutaja"
+
+#. module: resource
+#: view:resource.calendar.leaves:0
+msgid "Date"
+msgstr "Kuupäev"
+
+#. module: resource
+#: view:resource.calendar.leaves:0
+msgid "Search Working Period Leaves"
+msgstr ""
+
+#. module: resource
+#: field:resource.calendar.leaves,date_to:0
+msgid "End Date"
+msgstr "Lõppkuupäev"
+
+#. module: resource
+#: model:ir.actions.act_window,name:resource.resource_calendar_closing_days
+msgid "Closing Days"
+msgstr "Sulgemise päevad"
+
+#. module: resource
+#: model:ir.module.module,shortdesc:resource.module_meta_information
+#: view:resource.calendar.leaves:0
+#: field:resource.calendar.leaves,resource_id:0
+#: view:resource.resource:0
+msgid "Resource"
+msgstr "Ressurss"
+
+#. module: resource
+#: view:resource.calendar:0
+#: field:resource.calendar,name:0
+#: field:resource.calendar.attendance,name:0
+#: view:resource.calendar.leaves:0
+#: field:resource.calendar.leaves,name:0
+#: field:resource.resource,name:0
+msgid "Name"
+msgstr "Nimi"
+
+#. module: resource
+#: model:ir.module.module,description:resource.module_meta_information
+msgid ""
+"\n"
+" Module for resource management\n"
+" A resource represent something that can be scheduled\n"
+" (a developer on a task or a workcenter on manufacturing orders).\n"
+" This module manages a resource calendar associated to every resource.\n"
+" It also manages the leaves of every resource.\n"
+"\n"
+" "
+msgstr ""
+
+#. module: resource
+#: help:resource.resource,active:0
+msgid ""
+"If the active field is set to true, it will allow you to hide the resource "
+"record without removing it."
+msgstr ""
+
+#. module: resource
+#: selection:resource.calendar.attendance,dayofweek:0
+msgid "Wednesday"
+msgstr "Kolmapäev"
+
+#. module: resource
+#: model:ir.actions.act_window,name:resource.action_resource_calendar_form
+#: view:resource.calendar:0
+msgid "Working Period"
+msgstr "Tööaeg"
+
+#. module: resource
+#: model:ir.model,name:resource.model_resource_resource
+msgid "Resource Detail"
+msgstr ""
+
+#. module: resource
+#: field:resource.resource,active:0
+msgid "Active"
+msgstr "Aktiivne"
+
+#. module: resource
+#: field:resource.calendar.attendance,calendar_id:0
+msgid "Resource's Calendar"
+msgstr ""
+
+#. module: resource
+#: help:resource.resource,user_id:0
+msgid "Related user name for the resource to manage its access."
+msgstr ""
+
+#. module: resource
+#: help:resource.resource,calendar_id:0
+msgid "Define the schedule of resource"
+msgstr ""
+
+#. module: resource
+#: field:resource.calendar.attendance,hour_from:0
+msgid "Work from"
+msgstr "Töötab alates"
+
+#. module: resource
+#: field:resource.resource,code:0
+msgid "Code"
+msgstr "Kood"
+
+#. module: resource
+#: field:resource.calendar.attendance,hour_to:0
+msgid "Work to"
+msgstr "Töötab kuni"
+
+#. module: resource
+#: help:resource.resource,time_efficiency:0
+msgid ""
+"This field depict the efficiency of the resource to complete tasks. e.g "
+"resource put alone on a phase of 5 days with 5 tasks assigned to him, will "
+"show a load of 100% for this phase by default, but if we put a efficency of "
+"200%, then his load will only be 50%."
+msgstr ""
+
+#. module: resource
+#: selection:resource.calendar.attendance,dayofweek:0
+msgid "Tuesday"
+msgstr "Teisipäev"
+
+#. module: resource
+#: field:resource.calendar.leaves,calendar_id:0
+#: field:resource.resource,calendar_id:0
+msgid "Working time"
+msgstr "Tööaeg"
+
+#. module: resource
+#: model:ir.actions.act_window,name:resource.action_resource_calendar_leave_tree
+msgid "Resource Leaves"
+msgstr ""
+
+#. module: resource
+#: view:resource.calendar:0
+msgid "Manager"
+msgstr "Haldur"
+
+#. module: resource
+#: code:addons/resource/faces/resource.py:0
+#, python-format
+msgid "(vacation)"
+msgstr ""
+
+#. module: resource
+#: field:resource.resource,time_efficiency:0
+msgid "Efficiency factor"
+msgstr ""
+
+#. module: resource
+#: selection:resource.resource,resource_type:0
+msgid "Human"
+msgstr "Inimene"
+
+#. module: resource
+#: model:ir.model,name:resource.model_resource_calendar_attendance
+msgid "Work Detail"
+msgstr ""
+
+#. module: resource
+#: field:resource.calendar.leaves,date_from:0
+msgid "Start Date"
+msgstr "Alguskuupäev"
+
+#. module: resource
+#: selection:resource.calendar.attendance,dayofweek:0
+msgid "Saturday"
+msgstr "Laupäev"
diff --git a/addons/resource/resource_view.xml b/addons/resource/resource_view.xml
index 02b9abd882a..83dcbed5019 100644
--- a/addons/resource/resource_view.xml
+++ b/addons/resource/resource_view.xml
@@ -18,9 +18,13 @@
-
-
+
+
+
+
+
+
@@ -53,16 +57,17 @@
-
-
+
+
-
-
+
+
+
@@ -74,9 +79,11 @@
form
-
-
-
+
+
+
+
+
@@ -196,7 +203,7 @@
Resources
resource.resource
tree,form
- {"search_default_user_id":uid}
+ {}
There you can find clusters of your resources type involved in a specific project phase as well as their workload.
@@ -210,7 +217,7 @@
-
+
@@ -224,11 +231,11 @@
+
-
diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py
index 9d20b0dea4a..be5381b3ffc 100644
--- a/addons/sale_crm/wizard/crm_make_sale.py
+++ b/addons/sale_crm/wizard/crm_make_sale.py
@@ -81,7 +81,6 @@ class crm_make_sale(osv.osv_memory):
sale_line_obj = self.pool.get('sale.order.line')
result = mod_obj._get_id(cr, uid, 'sale', 'view_sales_order_filter')
- id = mod_obj.read(cr, uid, result, ['res_id'])
data = context and context.get('active_ids', []) or []
diff --git a/addons/stock/i18n/bs.po b/addons/stock/i18n/bs.po
index 9e12e11b092..940a921238c 100644
--- a/addons/stock/i18n/bs.po
+++ b/addons/stock/i18n/bs.po
@@ -2013,7 +2013,7 @@ msgid ""
"This stock location will be used, instead of the default one, as the "
"destination location for goods you send to this partner"
msgstr ""
-"Koristiće se ova lokacija zaliha, umjesto podrazumjevane, kao \r\n"
+"Koristiće se ova lokacija zaliha, umjesto podrazumjevane, kao \n"
"odredišna lokacija za robu koju šaljete ovom partneru"
#. module: stock
@@ -2151,8 +2151,8 @@ msgid ""
"instead of the default one, as the source location for stock moves generated "
"by production orders"
msgstr ""
-"Za ovaj proizvod (šablon) biće korištena ova lokacija zaliha, \r\n"
-"umjesto podrazumjevane, kao izvorna lokacija za premještanja zaliha \r\n"
+"Za ovaj proizvod (šablon) biće korištena ova lokacija zaliha, \n"
+"umjesto podrazumjevane, kao izvorna lokacija za premještanja zaliha \n"
"kada ga inicira nalog za proizvodnju"
#. module: stock
@@ -2238,7 +2238,7 @@ msgid ""
"by procurements"
msgstr ""
"Za ovaj proizvod (šablon) biće korištena ova lokacija zaliha, umjesto "
-"podrazumjevane, kao izvorna lokacija za premještanja zaliha \r\n"
+"podrazumjevane, kao izvorna lokacija za premještanja zaliha \n"
"kada ga inicira nabavka"
#. module: stock
diff --git a/addons/stock/product.py b/addons/stock/product.py
index 951c3badcf4..790b50c45b3 100644
--- a/addons/stock/product.py
+++ b/addons/stock/product.py
@@ -67,7 +67,6 @@ class product_product(osv.osv):
stock_output_acc = datas.get('stock_output_account', False)
stock_input_acc = datas.get('stock_input_account', False)
journal_id = datas.get('stock_journal', False)
- property_obj=self.pool.get('ir.property')
product_obj=self.browse(cr,uid,ids)[0]
account_variation = product_obj.categ_id.property_stock_variation
account_variation_id = account_variation and account_variation.id or False
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 5ecbd5f40ba..b1f31294a97 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -23,7 +23,6 @@ from dateutil.relativedelta import relativedelta
import time
from osv import fields, osv
-from tools import config
from tools.translate import _
import netsvc
import tools
@@ -856,7 +855,6 @@ class stock_picking(osv.osv):
""" Gets payment term from partner.
@return: Payment term
"""
- partner_obj = self.pool.get('res.partner')
partner = picking.address_id.partner_id
return partner.property_payment_term and partner.property_payment_term.id or False
@@ -1132,12 +1130,8 @@ class stock_picking(osv.osv):
price_type_obj = self.pool.get('product.price.type')
sequence_obj = self.pool.get('ir.sequence')
wf_service = netsvc.LocalService("workflow")
- partner_id = partial_datas.get('partner_id', False)
- address_id = partial_datas.get('address_id', False)
- delivery_date = partial_datas.get('delivery_date', False)
for pick in self.browse(cr, uid, ids, context=context):
new_picking = None
- new_moves = []
complete, too_many, too_few = [], [], []
move_product_qty = {}
for move in pick.move_lines:
@@ -1197,7 +1191,7 @@ class stock_picking(osv.osv):
})
if product_qty != 0:
- new_obj = move_obj.copy(cr, uid, move.id,
+ move_obj.copy(cr, uid, move.id,
{
'product_qty' : product_qty,
'product_uos_qty': product_qty, #TODO: put correct uos_qty
@@ -1682,7 +1676,6 @@ class stock_move(osv.osv):
"""
moves = self.browse(cr, uid, ids)
self.write(cr, uid, ids, {'state': 'confirmed'})
- i = 0
def create_chained_picking(self, cr, uid, moves, context=None):
new_moves = []
@@ -1815,7 +1808,6 @@ class stock_move(osv.osv):
def setlast_tracking(self, cr, uid, ids, context=None):
tracking_obj = self.pool.get('stock.tracking')
- tracking = context.get('tracking', False)
picking = self.browse(cr, uid, ids)[0].picking_id
if picking:
last_track = [line.tracking_id.id for line in picking.move_lines if line.tracking_id]
@@ -1895,7 +1887,6 @@ class stock_move(osv.osv):
amount = q * move.price_unit
# Base computation on valuation price type
else:
- company_id = move.company_id.id
context['currency_id'] = move.company_id.currency_id.id
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]
@@ -1906,11 +1897,7 @@ class stock_move(osv.osv):
""" Makes the move done and if all moves are done, it will finish the picking.
@return:
"""
- track_flag = False
picking_ids = []
- product_uom_obj = self.pool.get('product.uom')
- price_type_obj = self.pool.get('product.price.type')
- product_obj = self.pool.get('product.product')
move_obj = self.pool.get('account.move')
if context is None:
context = {}
@@ -2205,12 +2192,7 @@ class stock_move(osv.osv):
users_obj = self.pool.get('res.users')
uom_obj = self.pool.get('product.uom')
price_type_obj = self.pool.get('product.price.type')
- sequence_obj = self.pool.get('ir.sequence')
wf_service = netsvc.LocalService("workflow")
- partner_id = partial_datas.get('partner_id', False)
- address_id = partial_datas.get('address_id', False)
- delivery_date = partial_datas.get('delivery_date', False)
- new_moves = []
if context is None:
context = {}
@@ -2303,7 +2285,6 @@ class stock_move(osv.osv):
picking_obj.action_move(cr, uid, [move.picking_id.id])
wf_service.trg_validate(uid, 'stock.picking', move.picking_id.id, 'button_done', cr)
- ref = {}
done_move_ids = []
for move in complete:
done_move_ids.append(move.id)
@@ -2345,7 +2326,6 @@ class stock_inventory(osv.osv):
context = {}
for inv in self.browse(cr, uid, ids):
move_ids = []
- move_line = []
for line in inv.inventory_line_id:
pid = line.product_id.id
@@ -2495,7 +2475,6 @@ class stock_picking_move_wizard(osv.osv_memory):
def action_move(self, cr, uid, ids, context=None):
move_obj = self.pool.get('stock.move')
picking_obj = self.pool.get('stock.picking')
- account_move_obj = self.pool.get('account.move')
for act in self.read(cr, uid, ids):
move_lines = move_obj.browse(cr, uid, act['move_ids'])
for line in move_lines:
diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py
index a5a401800d3..08df30e7ea8 100644
--- a/addons/stock/wizard/stock_move.py
+++ b/addons/stock/wizard/stock_move.py
@@ -20,7 +20,6 @@
##############################################################################
from osv import fields, osv
-from tools.translate import _
class stock_move_track(osv.osv_memory):
_name = "stock.move.track"
@@ -220,7 +219,6 @@ class split_in_production_lot(osv.osv_memory):
@return:
"""
prodlot_obj = self.pool.get('stock.production.lot')
- ir_sequence_obj = self.pool.get('ir.sequence')
move_obj = self.pool.get('stock.move')
new_move = []
for data in self.browse(cr, uid, ids):
diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py
index 17515f86252..1016d6c3977 100644
--- a/addons/stock/wizard/stock_partial_move.py
+++ b/addons/stock/wizard/stock_partial_move.py
@@ -36,7 +36,6 @@ class stock_partial_move(osv.osv_memory):
move_obj = self.pool.get('stock.move')
if not context:
context={}
- moveids = []
for m in move_obj.browse(cr, uid, context.get('active_ids', [])):
if m.state in ('done', 'cancel'):
raise osv.except_osv(_('Invalid action !'), _('Cannot delivery products which are already delivered !'))
@@ -63,7 +62,7 @@ class stock_partial_move(osv.osv_memory):
move_ids = move_obj.search(cr, uid, [('id','in',move_ids)])
_moves_arch_lst = """
-
+
"""
_moves_fields = result['fields']
@@ -147,7 +146,6 @@ class stock_partial_move(osv.osv_memory):
move_obj = self.pool.get('stock.move')
if not context:
context={}
- moveids = address_delivery = address_default = []
if 'date' in fields:
res.update({'date': time.strftime('%Y-%m-%d %H:%M:%S')})
move_ids = context.get('active_ids', [])
@@ -203,7 +201,6 @@ class stock_partial_move(osv.osv_memory):
@return: A dictionary which of fields with values.
"""
- rec_id = context and context.get('active_id', False)
move_obj = self.pool.get('stock.move')
move_ids = context.get('active_ids', False)
partial = self.browse(cr, uid, ids[0], context)
@@ -224,7 +221,7 @@ class stock_partial_move(osv.osv_memory):
'product_price' : getattr(partial, 'move%s_product_price'%(m.id)),
'product_currency': getattr(partial, 'move%s_product_currency'%(m.id)).id
})
- res = move_obj.do_partial(cr, uid, move_ids, partial_datas, context=context)
+ move_obj.do_partial(cr, uid, move_ids, partial_datas, context=context)
return {}
stock_partial_move()
diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py
index 30403e3b1d0..74aa96e8e63 100644
--- a/addons/stock/wizard/stock_return_picking.py
+++ b/addons/stock/wizard/stock_return_picking.py
@@ -75,7 +75,7 @@ class stock_return_picking(osv.osv_memory):
self._columns['return%s'%(m.id)] = fields.float(string=m.name, required=True)
if 'invoice_state' not in self._columns:
self._columns['invoice_state'] = fields.selection([('2binvoiced', 'To be Invoiced'), ('none', 'None')], string='Invoice State', required=True)
- except Exception, e:
+ except Exception:
return res
return res
@@ -117,10 +117,6 @@ class stock_return_picking(osv.osv_memory):
raise osv.except_osv(_('Warning!'),_('There is no product to return!'))
arch_lst.append(' \n ')
- if pick.invoice_state=='invoiced':
- new_invoice_state='2binvoiced'
- else:
- new_invoice_state=pick.invoice_state
res['fields']['invoice_state']={'string':_('Invoice state'), 'type':'selection','required':True, 'selection':[('2binvoiced', _('To Be Invoiced')), ('none', _('None'))]}
arch_lst.append('')
arch_lst.append(' ')
diff --git a/addons/stock/wizard/stock_splitinto.py b/addons/stock/wizard/stock_splitinto.py
index 5e75801d2f6..20b1940e1c7 100644
--- a/addons/stock/wizard/stock_splitinto.py
+++ b/addons/stock/wizard/stock_splitinto.py
@@ -69,7 +69,7 @@ class stock_split_into(osv.osv_memory):
'state': move.state,
'product_uos': move.product_uom.id
}
- current_move = move_obj.copy(cr, uid, move.id, default_val)
+ move_obj.copy(cr, uid, move.id, default_val)
return {}
stock_split_into()
diff --git a/addons/thunderbird/partner/partner.py b/addons/thunderbird/partner/partner.py
index 439b1e4a754..d0c830bfa8b 100644
--- a/addons/thunderbird/partner/partner.py
+++ b/addons/thunderbird/partner/partner.py
@@ -50,14 +50,14 @@ class email_server_tools(osv.osv_memory):
def parse_message(self, message):
#TOCHECK: put this function in mailgateway module
+ if isinstance(message, unicode):
+ message = message.encode('utf-8')
msg_txt = email.message_from_string(message)
message_id = msg_txt.get('message-id', False)
msg = {}
- msg_txt = email.message_from_string(message)
fields = msg_txt.keys()
msg['id'] = message_id
msg['message-id'] = message_id
-
if 'Subject' in fields:
msg['subject'] = self._decode_header(msg_txt.get('Subject'))
@@ -156,10 +156,12 @@ class thunderbird_partner(osv.osv_memory):
server_tools_pool = self.pool.get('email.server.tools')
message_id = msg.get('message-id', False)
msg_pool = self.pool.get('mailgate.message')
-
+ msg_ids = []
res = {}
res_ids = []
-
+ if message_id:
+ msg_ids = msg_pool.search(cr, uid, [('message_id','=',message_id)])
+ if msg_ids and len(msg_ids): return 0
for ref_id in ref_ids:
msg_new = dictcreate.get('message')
ref = ref_id.split(',')