From 76f977c21846f7d103ef7a543eca1063c0bcba83 Mon Sep 17 00:00:00 2001
From: dhr
Date: Fri, 30 Nov 2012 17:15:02 +0530
Subject: [PATCH 001/416] [IMP]Changed Bom Structure Display from bill of
materials
bzr revid: dhr@tinyerp.com-20121130114502-1a5hcleuhdfxf4c0
---
addons/mrp/mrp_view.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 2ed442b1831..dc520f020f1 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -545,6 +545,7 @@
ir.actions.act_window
mrp.bom
[('bom_id', '=',active_ids)]
+ tree
From 0c18a21f71c2769abc3f7ae973c9e73ce6f8077f Mon Sep 17 00:00:00 2001
From: Paramjit Singh Sahota
Date: Mon, 10 Dec 2012 11:55:45 +0530
Subject: [PATCH 002/416] [IMP] Improved code for Settings => Technical =>
Security => Access Controls List: clicking on create should open an editable
line in the top of the list, not at the bottom.
bzr revid: psa@tinyerp.com-20121210062545-7g6d2a3padvgkjt7
---
openerp/addons/base/ir/ir_model_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openerp/addons/base/ir/ir_model_view.xml b/openerp/addons/base/ir/ir_model_view.xml
index 1b5d0cc3caf..b8631e3f55b 100644
--- a/openerp/addons/base/ir/ir_model_view.xml
+++ b/openerp/addons/base/ir/ir_model_view.xml
@@ -352,7 +352,7 @@
ir.model.access
-
+
From af79a385b67fcdad356bff59149ed23183e5f776 Mon Sep 17 00:00:00 2001
From: Paramjit Singh Sahota
Date: Mon, 10 Dec 2012 12:39:35 +0530
Subject: [PATCH 003/416] [IMP] Improved code for Notifications: move
Notifications menuitem below Emails.
bzr revid: psa@tinyerp.com-20121210070935-iulu3a3yfh7000r7
---
addons/mail/mail_followers_view.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/mail/mail_followers_view.xml b/addons/mail/mail_followers_view.xml
index a9d1d80240b..515be85132a 100644
--- a/addons/mail/mail_followers_view.xml
+++ b/addons/mail/mail_followers_view.xml
@@ -66,11 +66,11 @@
-->
+ action="action_view_followers" sequence="30" groups="base.group_no_one"/>
+ action="action_view_notifications" sequence="13" groups="base.group_no_one"/>
From e9f3f51807bfae723925f937b6d9dbd6e2b36934 Mon Sep 17 00:00:00 2001
From: Paramjit Singh Sahota
Date: Mon, 10 Dec 2012 17:18:05 +0530
Subject: [PATCH 004/416] [IMP] Improved code for Human Resources > Appraisal >
Appraisals: when Appraisal is done, make employee/date/Appraisal Forms and
plan fields readonly.
bzr revid: psa@tinyerp.com-20121210114805-3ba1ix0sta3bej6c
---
addons/hr_evaluation/hr_evaluation_view.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml
index 82ef2aa83f4..8c9823bad08 100644
--- a/addons/hr_evaluation/hr_evaluation_view.xml
+++ b/addons/hr_evaluation/hr_evaluation_view.xml
@@ -165,9 +165,9 @@
- ,
+ ,
-
+
@@ -175,7 +175,7 @@
-
+
Purchase orders with their respective purchase order lines
The following CSV file shows how to import
- suppliers and their respective contacts
- Suppliers and their respective contacts
+ customers and their respective contacts
+ Customers and their respective contacts
From 93a1d36d90f85312ca4bfc8ba8820c54fa5b274f Mon Sep 17 00:00:00 2001
From: Vishmita
Date: Tue, 22 Jan 2013 19:09:56 +0530
Subject: [PATCH 020/416] [FIX]Pager doesn't disappear when we create a new
record from o2m/m2m popup
lp bug: https://launchpad.net/bugs/1096830 fixed
bzr revid: vja@tinyerp.com-20130122133956-tv425if9oe3zqsr6
---
addons/web/static/src/js/view_form.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 01d4bf6dd33..376f5209d62 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -4714,6 +4714,7 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend
if (this.view_list) {
this.view_list.$el.hide();
}
+ this.$el.find('.oe_popup_list_pager').hide();
this.setup_form_view();
},
});
From 6c460544cc70a9781bdd4d4414ef52c9361b3c14 Mon Sep 17 00:00:00 2001
From: Vishmita
Date: Wed, 23 Jan 2013 16:28:38 +0530
Subject: [PATCH 021/416] [Fix]Improve code
bzr revid: vja@tinyerp.com-20130123105838-kd4isg7vcxcfk0su
---
addons/web/static/src/js/view_form.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 376f5209d62..3249507f4bb 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -4712,9 +4712,8 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend
this.searchview.hide();
}
if (this.view_list) {
- this.view_list.$el.hide();
+ this.view_list.do_hide();
}
- this.$el.find('.oe_popup_list_pager').hide();
this.setup_form_view();
},
});
From e4250d15586ed6f1cd3c68f2334a8c2d97fce52d Mon Sep 17 00:00:00 2001
From: "sgo@tinyerp.com" <>
Date: Wed, 23 Jan 2013 17:03:06 +0530
Subject: [PATCH 022/416] [IMP]remove sale.shop from pos and improve code
bzr revid: sgo@tinyerp.com-20130123113306-n7enol5as84sv0g2
---
addons/point_of_sale/point_of_sale.py | 21 +++++++++----------
addons/point_of_sale/point_of_sale_view.xml | 8 +++----
.../point_of_sale/report/pos_order_report.py | 6 +++---
.../report/pos_order_report_view.xml | 2 +-
.../security/ir.model.access.csv | 2 +-
addons/point_of_sale/static/src/js/models.js | 13 +++++++-----
addons/point_of_sale/wizard/pos_return.py | 6 +++---
7 files changed, 30 insertions(+), 28 deletions(-)
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 970eb1fbed7..4bfef6ce707 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -51,7 +51,7 @@ class pos_config(osv.osv):
'journal_ids' : fields.many2many('account.journal', 'pos_config_journal_rel',
'pos_config_id', 'journal_id', 'Available Payment Methods',
domain="[('journal_user', '=', True )]",),
- 'shop_id' : fields.many2one('sale.shop', 'Shop',
+ 'warehouse_id' : fields.many2one('stock.warehouse', 'Location',
required=True),
'journal_id' : fields.many2one('account.journal', 'Sale Journal',
domain=[('type', '=', 'sale')],
@@ -112,13 +112,13 @@ class pos_config(osv.osv):
res = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'sale')], limit=1)
return res and res[0] or False
- def _default_shop(self, cr, uid, context=None):
- res = self.pool.get('sale.shop').search(cr, uid, [])
+ def _default_warehouse(self, cr, uid, context=None):
+ res = self.pool.get('stock.warehouse').search(cr, uid, [])
return res and res[0] or False
_defaults = {
'state' : POS_CONFIG_STATE[0][0],
- 'shop_id': _default_shop,
+ 'warehouse_id': _default_warehouse,
'journal_id': _default_sale_journal,
'group_by' : True,
}
@@ -306,7 +306,7 @@ class pos_session(osv.osv):
# the .xml files as the CoA is not yet installed.
jobj = self.pool.get('pos.config')
pos_config = jobj.browse(cr, uid, config_id, context=context)
- context.update({'company_id': pos_config.shop_id.company_id.id})
+ context.update({'company_id': pos_config.warehouse_id.company_id.id})
if not pos_config.journal_id:
jid = jobj.default_get(cr, uid, ['journal_id'], context=context)['journal_id']
if jid:
@@ -333,7 +333,7 @@ class pos_session(osv.osv):
bank_values = {
'journal_id' : journal.id,
'user_id' : uid,
- 'company_id' : pos_config.shop_id.company_id.id
+ 'company_id' : pos_config.warehouse_id.company_id.id
}
statement_id = self.pool.get('account.bank.statement').create(cr, uid, bank_values, context=context)
bank_statement_ids.append(statement_id)
@@ -575,7 +575,7 @@ class pos_order(osv.osv):
_columns = {
'name': fields.char('Order Ref', size=64, required=True, readonly=True),
'company_id':fields.many2one('res.company', 'Company', required=True, readonly=True),
- 'shop_id': fields.related('session_id', 'config_id', 'shop_id', relation='sale.shop', type='many2one', string='Shop', store=True, readonly=True),
+ 'warehouse_id': fields.related('session_id', 'config_id', 'warehouse_id', relation='stock.warehouse', type='many2one', string='Location', store=True, readonly=True),
'date_order': fields.datetime('Order Date', readonly=True, select=True),
'user_id': fields.many2one('res.users', 'Salesman', help="Person who uses the the cash register. It can be a reliever, a student or an interim employee."),
'amount_tax': fields.function(_amount_all, string='Taxes', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
@@ -619,8 +619,7 @@ class pos_order(osv.osv):
session_ids = self._default_session(cr, uid, context)
if session_ids:
session_record = self.pool.get('pos.session').browse(cr, uid, session_ids, context=context)
- shop = self.pool.get('sale.shop').browse(cr, uid, session_record.config_id.shop_id.id, context=context)
- return shop.pricelist_id and shop.pricelist_id.id or False
+ return session_record.user_id.partner_id.property_product_pricelist and session_record.user_id.partner_id.property_product_pricelist.id or False
return False
_defaults = {
@@ -671,8 +670,8 @@ class pos_order(osv.osv):
'auto_picking': True,
}, context=context)
self.write(cr, uid, [order.id], {'picking_id': picking_id}, context=context)
- location_id = order.shop_id.warehouse_id.lot_stock_id.id
- output_id = order.shop_id.warehouse_id.lot_output_id.id
+ location_id = order.warehouse_id.lot_stock_id.id
+ output_id = order.warehouse_id.lot_output_id.id
for line in order.lines:
if line.product_id and line.product_id.type == 'service':
diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml
index 8a53015b7d7..3cf920d8a11 100644
--- a/addons/point_of_sale/point_of_sale_view.xml
+++ b/addons/point_of_sale/point_of_sale_view.xml
@@ -84,7 +84,7 @@
-
+
@@ -771,7 +771,7 @@
-
+
@@ -809,7 +809,7 @@
-
+
@@ -823,7 +823,7 @@
-
+
diff --git a/addons/point_of_sale/report/pos_order_report.py b/addons/point_of_sale/report/pos_order_report.py
index 62250f11e17..41bb1a4e754 100644
--- a/addons/point_of_sale/report/pos_order_report.py
+++ b/addons/point_of_sale/report/pos_order_report.py
@@ -41,7 +41,7 @@ class pos_order_report(osv.osv):
'price_total':fields.float('Total Price', readonly=True),
'total_discount':fields.float('Total Discount', readonly=True),
'average_price': fields.float('Average Price', readonly=True,group_operator="avg"),
- 'shop_id':fields.many2one('sale.shop', 'Shop', readonly=True),
+ 'warehouse_id':fields.many2one('stock.warehouse', 'Location', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
'product_qty':fields.integer('# of Qty', readonly=True),
@@ -69,7 +69,7 @@ class pos_order_report(osv.osv):
s.partner_id as partner_id,
s.state as state,
s.user_id as user_id,
- s.shop_id as shop_id,
+ s.warehouse_id as warehouse_id,
s.company_id as company_id,
s.sale_journal as journal_id,
l.product_id as product_id
@@ -80,7 +80,7 @@ class pos_order_report(osv.osv):
group by
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.create_date
+ s.user_id,s.warehouse_id,s.company_id,s.sale_journal,l.product_id,s.create_date
having
sum(l.qty * u.factor) != 0)""")
diff --git a/addons/point_of_sale/report/pos_order_report_view.xml b/addons/point_of_sale/report/pos_order_report_view.xml
index 8d7bf84171a..135b6dcadaa 100644
--- a/addons/point_of_sale/report/pos_order_report_view.xml
+++ b/addons/point_of_sale/report/pos_order_report_view.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/addons/point_of_sale/security/ir.model.access.csv b/addons/point_of_sale/security/ir.model.access.csv
index 1d2c22053fb..b278c48e1f2 100644
--- a/addons/point_of_sale/security/ir.model.access.csv
+++ b/addons/point_of_sale/security/ir.model.access.csv
@@ -8,7 +8,7 @@ access_account_journal_pos_user,account.journal pos_user,account.model_account_j
access_account_move_pos_user,account.move pos_user,account.model_account_move,group_pos_user,1,1,1,0
access_account_account_pos_user,account.account pos_user,account.model_account_account,group_pos_user,1,0,0,0
access_stock_picking_pos_user,stock.picking pos_user,stock.model_stock_picking,group_pos_user,1,1,1,1
-access_sale_shop_pos_user,sale.shop pos_user,sale.model_sale_shop,group_pos_user,1,0,0,0
+access_stock_warehouse_pos_user,stock.warehouse pos_user,stock.model_stock_warehouse,group_pos_user,1,0,0,0
access_pos_order_stock_worker,pos.order stock_worker,model_pos_order,stock.group_stock_user,1,0,0,0
access_stock_move_pos_user,stock.move pos_user,stock.model_stock_move,group_pos_user,1,1,1,1
access_report_sales_by_user_pos,report.sales.by.user.pos,model_report_sales_by_user_pos,group_pos_user,1,0,0,0
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index 556ea482aad..c4e101fe43e 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -140,7 +140,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
return self.fetch(
'pos.config',
- ['name','journal_ids','shop_id','journal_id',
+ ['name','journal_ids','warehouse_id','journal_id',
'iface_self_checkout', 'iface_led', 'iface_cashdrawer',
'iface_payment_terminal', 'iface_electronic_scale', 'iface_barscan', 'iface_vkeyboard',
'iface_print_via_proxy','iface_cashdrawer','state','sequence_id','session_ids'],
@@ -155,7 +155,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
self.iface_self_checkout = !!pos_config.iface_self_checkout;
self.iface_cashdrawer = !!pos_config.iface_cashdrawer;
- return self.fetch('sale.shop',[],[['id','=',pos_config.shop_id[0]]]);
+ return self.fetch('stock.warehouse',[],[['id','=',pos_config.warehouse_id[0]]]);
}).then(function(shops){
self.set('shop',shops[0]);
@@ -166,13 +166,16 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
return self.fetch('pos.category', ['id','name','parent_id','child_id','image'])
}).then(function(categories){
self.db.add_categories(categories);
-
+ return self.fetch('res.users',['partner_id'],[['id','=',self.session.uid]])
+ }).then(function(user){
+ return self.fetch('res.partner',['property_product_pricelist'],[['id','=',user[0].partner_id[0]]])
+ }).then(function(pricelist){
return self.fetch(
'product.product',
['name', 'list_price','price','pos_categ_id', 'taxes_id', 'ean13',
- 'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description'],
+ 'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description','pricelist_id'],
[['sale_ok','=',true],['available_in_pos','=',true]],
- {pricelist: self.get('shop').pricelist_id[0]} // context for price
+ {pricelist: pricelist[0].property_product_pricelist[0]} // context for price
);
}).then(function(products){
self.db.add_products(products);
diff --git a/addons/point_of_sale/wizard/pos_return.py b/addons/point_of_sale/wizard/pos_return.py
index d6dfdd1e183..753d272f21c 100644
--- a/addons/point_of_sale/wizard/pos_return.py
+++ b/addons/point_of_sale/wizard/pos_return.py
@@ -114,7 +114,7 @@ class pos_return(osv.osv_memory):
source_stock_id = property_obj.get(cr, uid, 'property_stock_customer', 'res.partner', context=context).id
cr.execute("SELECT s.id FROM stock_location s, stock_warehouse w "
"WHERE w.lot_stock_id=s.id AND w.id=%s ",
- (order_id.shop_id.warehouse_id.id,))
+ (order_id.warehouse_id.id,))
res = cr.fetchone()
location_id = res and res[0] or None
new_picking = picking_obj.copy(cr, uid, order_id.picking_id.id, {'name':'%s (return)' % order_id.name,
@@ -209,7 +209,7 @@ class add_product(osv.osv_memory):
stock_dest_id = property_obj.get(cr, uid, 'property_stock_customer', 'res.partner', context=context).id
cr.execute("SELECT s.id FROM stock_location s, stock_warehouse w "
"WHERE w.lot_stock_id=s.id AND w.id=%s ",
- (order_id.shop_id.warehouse_id.id,))
+ (order_id.warehouse_id.id,))
res=cr.fetchone()
location_id=res and res[0] or None
prod_id=prod_obj.browse(cr, uid, prod, context=context)
@@ -273,7 +273,7 @@ class add_product(osv.osv_memory):
stock_dest_id = property_obj.get(cr, uid, 'property_stock_customer', 'res.partner', context=context).id
cr.execute("SELECT s.id FROM stock_location s, stock_warehouse w "
" WHERE w.lot_stock_id=s.id AND w.id=%s ",
- (order_id.shop_id.warehouse_id.id,))
+ (order_id.warehouse_id.id,))
res=cr.fetchone()
location_id=res and res[0] or None
From 8e94b4c7eae8a93eda29de845ba4b3e2e43fe30c Mon Sep 17 00:00:00 2001
From: "sgo@tinyerp.com" <>
Date: Wed, 23 Jan 2013 18:08:28 +0530
Subject: [PATCH 023/416] [IMP]remove sale.shop from yml and improve code
bzr revid: sgo@tinyerp.com-20130123123828-z7rikkrunp1rem55
---
addons/sale_crm/test/sale_crm.yml | 11 -----------
addons/sale_margin/test/sale_margin.yml | 1 -
addons/sale_mrp/test/sale_mrp.yml | 1 -
addons/sale_stock/test/picking_order_policy.yml | 4 ++--
4 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/addons/sale_crm/test/sale_crm.yml b/addons/sale_crm/test/sale_crm.yml
index 011fb6ad5a8..21d2cc08195 100644
--- a/addons/sale_crm/test/sale_crm.yml
+++ b/addons/sale_crm/test/sale_crm.yml
@@ -1,14 +1,3 @@
--
- Make sure the main company has at least one shop.
--
- !python {model: sale.shop}: |
- company_id = self.pool.get('res.users')._get_company(cr, uid, context=context)
- shop_ids = self.search(cr, uid, [('company_id', '=', company_id)])
- if not shop_ids:
- # take a shop, and assign it to the user's company
- shop_ids = self.search(cr, uid, [])
- if shop_ids:
- self.write(cr, uid, [shop_ids[0]], {'company_id': company_id})
-
I open the wizard "Make sales".
-
diff --git a/addons/sale_margin/test/sale_margin.yml b/addons/sale_margin/test/sale_margin.yml
index 1d6b295b3a1..197f51a9681 100644
--- a/addons/sale_margin/test/sale_margin.yml
+++ b/addons/sale_margin/test/sale_margin.yml
@@ -23,7 +23,6 @@
partner_invoice_id: base.res_partner_address_7
partner_shipping_id: base.res_partner_address_7
pricelist_id: product.list0
- shop_id: sale.sale_shop_1
-
I confirm the sale order
-
diff --git a/addons/sale_mrp/test/sale_mrp.yml b/addons/sale_mrp/test/sale_mrp.yml
index 6fd64301af2..6edd404a49a 100644
--- a/addons/sale_mrp/test/sale_mrp.yml
+++ b/addons/sale_mrp/test/sale_mrp.yml
@@ -83,7 +83,6 @@
partner_shipping_id: base.res_partner_address_7
picking_policy: direct
pricelist_id: product.list0
- shop_id: sale.sale_shop_1
-
I confirm the sale order
-
diff --git a/addons/sale_stock/test/picking_order_policy.yml b/addons/sale_stock/test/picking_order_policy.yml
index 800c131e288..d5b9ba897ae 100644
--- a/addons/sale_stock/test/picking_order_policy.yml
+++ b/addons/sale_stock/test/picking_order_policy.yml
@@ -56,8 +56,8 @@
assert picking.note == sale_order.note,"Note is not correspond with sale order."
assert picking.invoice_state == (sale_order.order_policy=='picking' and '2binvoiced') or 'none',"Invoice policy is not correspond with sale order."
assert len(picking.move_lines) == len(sale_order.order_line), "Total move of delivery order are not corresposning with total sale order lines."
- location_id = sale_order.shop_id.warehouse_id.lot_stock_id.id
- output_id = sale_order.shop_id.warehouse_id.lot_output_id.id
+ location_id = sale_order.warehouse_id.lot_stock_id.id
+ output_id = sale_order.warehouse_id.lot_output_id.id
for move in picking.move_lines:
order_line = move.sale_line_id
date_planned = datetime.strptime(sale_order.date_order, DEFAULT_SERVER_DATE_FORMAT) + relativedelta(days=order_line.delay or 0.0)
From 3d5f4f5f3d7f7941f0d8778774b80d419edd25da Mon Sep 17 00:00:00 2001
From: "sgo@tinyerp.com" <>
Date: Thu, 24 Jan 2013 18:06:07 +0530
Subject: [PATCH 024/416] [IMP]improve code
bzr revid: sgo@tinyerp.com-20130124123607-rb405xsiq62gwn5n
---
addons/sale_crm/wizard/crm_make_sale.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py
index 7abdaa9e04d..43a679795ae 100644
--- a/addons/sale_crm/wizard/crm_make_sale.py
+++ b/addons/sale_crm/wizard/crm_make_sale.py
@@ -93,6 +93,7 @@ class crm_make_sale(osv.osv_memory):
'origin': _('Opportunity: %s') % str(case.id),
'section_id': case.section_id and case.section_id.id or False,
'categ_ids': [(6, 0, [categ_id.id for categ_id in case.categ_ids])],
+ 'partner_id': partner.id,
'pricelist_id': pricelist,
'partner_invoice_id': partner_addr['invoice'],
'partner_shipping_id': partner_addr['delivery'],
From 6ad3f2c835ebc5e51a413fef7e1c5f0b00955e6a Mon Sep 17 00:00:00 2001
From: "Ravi Gohil (OpenERP)"
Date: Fri, 25 Jan 2013 12:02:13 +0530
Subject: [PATCH 025/416] [FIX] pass 'uom_id' argument to product_id_change()
to avoid traceback which is faced when we create invoice from Sale Orders
with option 'Percentage' or 'Fixed Price (deposit)': (Maintenance Case:
584499)
bzr revid: rgo@tinyerp.com-20130125063213-2u08rex66cmtt9o1
---
addons/account_analytic_default/account_analytic_default.py | 4 ++--
addons/account_analytic_plans/account_analytic_plans.py | 4 ++--
addons/account_anglo_saxon/invoice.py | 4 ++--
addons/product_visible_discount/product_visible_discount.py | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/addons/account_analytic_default/account_analytic_default.py b/addons/account_analytic_default/account_analytic_default.py
index 9d7df0aa010..488cb0d9c25 100644
--- a/addons/account_analytic_default/account_analytic_default.py
+++ b/addons/account_analytic_default/account_analytic_default.py
@@ -73,8 +73,8 @@ class account_invoice_line(osv.osv):
_inherit = "account.invoice.line"
_description = "Invoice Line"
- def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
- res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id=currency_id, context=context, company_id=company_id)
+ def product_id_change(self, cr, uid, ids, product, uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
+ res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom_id, qty, name, type, partner_id, fposition_id, price_unit, currency_id=currency_id, context=context, company_id=company_id)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
if rec:
res_prod['value'].update({'account_analytic_id': rec.analytic_id.id})
diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py
index 99cb0c4ebc4..5834db99cd3 100644
--- a/addons/account_analytic_plans/account_analytic_plans.py
+++ b/addons/account_analytic_plans/account_analytic_plans.py
@@ -308,8 +308,8 @@ class account_invoice_line(osv.osv):
res ['analytics_id'] = line.analytics_id and line.analytics_id.id or False
return res
- def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
- res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context=context, company_id=company_id)
+ def product_id_change(self, cr, uid, ids, product, uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
+ res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom_id, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context=context, company_id=company_id)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
if rec and rec.analytics_id:
res_prod['value'].update({'analytics_id': rec.analytics_id.id})
diff --git a/addons/account_anglo_saxon/invoice.py b/addons/account_anglo_saxon/invoice.py
index 2b82257e1f0..f27d9b3ae72 100644
--- a/addons/account_anglo_saxon/invoice.py
+++ b/addons/account_anglo_saxon/invoice.py
@@ -136,9 +136,9 @@ class account_invoice_line(osv.osv):
res += diff_res
return res
- def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
+ def product_id_change(self, cr, uid, ids, product, uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
fiscal_pool = self.pool.get('account.fiscal.position')
- res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context, company_id)
+ res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom_id, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context, company_id)
if not product:
return res
if type in ('in_invoice','in_refund'):
diff --git a/addons/product_visible_discount/product_visible_discount.py b/addons/product_visible_discount/product_visible_discount.py
index 3928c2e4676..471c07b6767 100644
--- a/addons/product_visible_discount/product_visible_discount.py
+++ b/addons/product_visible_discount/product_visible_discount.py
@@ -100,8 +100,8 @@ sale_order_line()
class account_invoice_line(osv.osv):
_inherit = "account.invoice.line"
- def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
- res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit,currency_id, context=context, company_id=company_id)
+ def product_id_change(self, cr, uid, ids, product, uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
+ res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom_id, qty, name, type, partner_id, fposition_id, price_unit,currency_id, context=context, company_id=company_id)
def get_real_price(res_dict, product_id, qty, uom, pricelist):
item_obj = self.pool.get('product.pricelist.item')
From 9c6a184fb5aa77561655ae1ea21d34b6ecb8aa5e Mon Sep 17 00:00:00 2001
From: Vidhin Mehta
Date: Fri, 25 Jan 2013 12:32:40 +0530
Subject: [PATCH 026/416] [FIX]graph view usability bug.
bzr revid: vme@tinyerp.com-20130125070240-0drtmiyetwu2btc6
---
addons/web_graph/static/src/js/graph.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js
index 35ad0aaaea8..28e1cf65f12 100644
--- a/addons/web_graph/static/src/js/graph.js
+++ b/addons/web_graph/static/src/js/graph.js
@@ -5,6 +5,7 @@
openerp.web_graph = function (instance) {
var _lt = instance.web._lt;
+var _t = instance.web._t;
// removed ``undefined`` values
var filter_values = function (o) {
@@ -365,7 +366,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
}).then(function() {
var res = {
'data': result,
- 'ticks': _.map(ticks, function(el, key) { return [el, key] })
+ 'ticks': _.map(ticks, function(el, key) { return [el, key || _t("Undefined")] })
};
return res;
});
From 3508126c15bf509fb520b2c49e424a612d5ae41d Mon Sep 17 00:00:00 2001
From: "sgo@tinyerp.com" <>
Date: Fri, 25 Jan 2013 12:37:58 +0530
Subject: [PATCH 027/416] [IMP]set default pricelist as sale pricelist
bzr revid: sgo@tinyerp.com-20130125070758-cgug11ik4bxcelnf
---
addons/point_of_sale/static/src/js/models.js | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index c4e101fe43e..5f2f523d18f 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -166,16 +166,14 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
return self.fetch('pos.category', ['id','name','parent_id','child_id','image'])
}).then(function(categories){
self.db.add_categories(categories);
- return self.fetch('res.users',['partner_id'],[['id','=',self.session.uid]])
- }).then(function(user){
- return self.fetch('res.partner',['property_product_pricelist'],[['id','=',user[0].partner_id[0]]])
+ return new instance.web.Model("ir.model.data").call("get_object_reference", ["product", "list0"])
}).then(function(pricelist){
return self.fetch(
'product.product',
['name', 'list_price','price','pos_categ_id', 'taxes_id', 'ean13',
'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description','pricelist_id'],
[['sale_ok','=',true],['available_in_pos','=',true]],
- {pricelist: pricelist[0].property_product_pricelist[0]} // context for price
+ {pricelist: pricelist[1]} // context for price
);
}).then(function(products){
self.db.add_products(products);
From 6be21ac5d30e29da6044a0c3f66d49562f31cbc6 Mon Sep 17 00:00:00 2001
From: "sgo@tinyerp.com" <>
Date: Thu, 31 Jan 2013 11:56:13 +0530
Subject: [PATCH 028/416] [IMP]add onchange of warehouse to change company
related to warehouse and improve some code
bzr revid: sgo@tinyerp.com-20130131062613-tmlgvdrculc2udu1
---
addons/point_of_sale/point_of_sale.py | 4 ++--
addons/point_of_sale/report/pos_order_report.py | 2 +-
addons/sale_stock/sale_stock.py | 10 +++++++++-
addons/sale_stock/sale_stock_view.xml | 6 ++++++
4 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 4bfef6ce707..d95b64d5c84 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -51,7 +51,7 @@ class pos_config(osv.osv):
'journal_ids' : fields.many2many('account.journal', 'pos_config_journal_rel',
'pos_config_id', 'journal_id', 'Available Payment Methods',
domain="[('journal_user', '=', True )]",),
- 'warehouse_id' : fields.many2one('stock.warehouse', 'Location',
+ 'warehouse_id' : fields.many2one('stock.warehouse', 'Warehouse',
required=True),
'journal_id' : fields.many2one('account.journal', 'Sale Journal',
domain=[('type', '=', 'sale')],
@@ -575,7 +575,7 @@ class pos_order(osv.osv):
_columns = {
'name': fields.char('Order Ref', size=64, required=True, readonly=True),
'company_id':fields.many2one('res.company', 'Company', required=True, readonly=True),
- 'warehouse_id': fields.related('session_id', 'config_id', 'warehouse_id', relation='stock.warehouse', type='many2one', string='Location', store=True, readonly=True),
+ 'warehouse_id': fields.related('session_id', 'config_id', 'warehouse_id', relation='stock.warehouse', type='many2one', string='Warehouse', store=True, readonly=True),
'date_order': fields.datetime('Order Date', readonly=True, select=True),
'user_id': fields.many2one('res.users', 'Salesman', help="Person who uses the the cash register. It can be a reliever, a student or an interim employee."),
'amount_tax': fields.function(_amount_all, string='Taxes', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
diff --git a/addons/point_of_sale/report/pos_order_report.py b/addons/point_of_sale/report/pos_order_report.py
index 41bb1a4e754..243107d4657 100644
--- a/addons/point_of_sale/report/pos_order_report.py
+++ b/addons/point_of_sale/report/pos_order_report.py
@@ -41,7 +41,7 @@ class pos_order_report(osv.osv):
'price_total':fields.float('Total Price', readonly=True),
'total_discount':fields.float('Total Discount', readonly=True),
'average_price': fields.float('Average Price', readonly=True,group_operator="avg"),
- 'warehouse_id':fields.many2one('stock.warehouse', 'Location', readonly=True),
+ 'warehouse_id':fields.many2one('stock.warehouse', 'Warehouse', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
'product_qty':fields.integer('# of Qty', readonly=True),
diff --git a/addons/sale_stock/sale_stock.py b/addons/sale_stock/sale_stock.py
index c2a52b8de7e..682c0e435df 100644
--- a/addons/sale_stock/sale_stock.py
+++ b/addons/sale_stock/sale_stock.py
@@ -139,7 +139,7 @@ class sale_order(osv.osv):
'picking_ids': fields.one2many('stock.picking.out', 'sale_id', 'Related Picking', readonly=True, help="This is a list of delivery orders that has been generated for this sales order."),
'shipped': fields.boolean('Delivered', readonly=True, help="It indicates that the sales order has been delivered. This field is updated only after the scheduler(s) have been launched."),
'picked_rate': fields.function(_picked_rate, string='Picked', type='float'),
- 'warehouse_id': fields.many2one('stock.warehouse', 'Location'),
+ 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse'),
'invoice_quantity': fields.selection([('order', 'Ordered Quantities'), ('procurement', 'Shipped Quantities')], 'Invoice on',
help="The sales order will automatically create the invoice proposition (draft invoice).\
You have to choose if you want your invoice based on ordered ", required=True, readonly=True, states={'draft': [('readonly', False)]}),
@@ -162,6 +162,14 @@ class sale_order(osv.osv):
raise osv.except_osv(_('Invalid Action!'), _('In order to delete a confirmed sales order, you must cancel it.\nTo do so, you must first cancel related picking for delivery orders.'))
return osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
+
+ def onchange_warehouse_id(self, cr, uid, ids, warehouse_id, context=None):
+ val = {}
+ if warehouse_id:
+ warehouse = self.pool.get('stock.warehouse').browse(cr, uid, warehouse_id, context=context)
+ if warehouse.company_id.id:
+ val['company_id'] = warehouse.company_id.id
+ return {'value': val}
def action_view_delivery(self, cr, uid, ids, context=None):
'''
diff --git a/addons/sale_stock/sale_stock_view.xml b/addons/sale_stock/sale_stock_view.xml
index 349af88ceb1..4edde821729 100644
--- a/addons/sale_stock/sale_stock_view.xml
+++ b/addons/sale_stock/sale_stock_view.xml
@@ -23,6 +23,12 @@
+
+
+
+
+
+
Date: Fri, 1 Feb 2013 18:54:54 +0530
Subject: [PATCH 029/416] [IMP]product: Set All for product category instead of
All Products
bzr revid: dbr@tinyerp.com-20130201132454-grkjkqexahqcabz1
---
addons/product/product_data.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/product/product_data.xml b/addons/product/product_data.xml
index 49362e380f4..91d78722d14 100644
--- a/addons/product/product_data.xml
+++ b/addons/product/product_data.xml
@@ -5,7 +5,7 @@
Resource: product.uom.categ
-->
- All products
+ All
From 1609f18060cbba46a7379b01fb93aacd17b2b577 Mon Sep 17 00:00:00 2001
From: Dhruti Shastri
Date: Fri, 1 Feb 2013 18:56:48 +0530
Subject: [PATCH 030/416] [FIX][stock] : decimal precision wrong when invoice a
purchaseorder with invoicing Based on incoming shipments
lp bug: https://launchpad.net/bugs/1105075 fixed
bzr revid: dhs@tinyerp.com-20130201132648-znpkyatl037st2y7
---
addons/stock/stock.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 7198c89e286..bd1fd82eef8 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1646,7 +1646,7 @@ class stock_move(osv.osv):
"* Waiting Availability: This state is reached when the procurement resolution is not straight forward. It may need the scheduler to run, a component to me manufactured...\n"\
"* Available: When products are reserved, it is set to \'Available\'.\n"\
"* Done: When the shipment is processed, the state is \'Done\'."),
- 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Account'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"),
+ 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Product Price'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"),
'price_currency_id': fields.many2one('res.currency', 'Currency for average price', help="Technical field used to record the currency chosen by the user during a picking confirmation (when average price costing method is used)"),
'company_id': fields.many2one('res.company', 'Company', required=True, select=True),
'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order of", select=True),
From dc15cd7a910dda84eedf10a09f7464e02b6f6a94 Mon Sep 17 00:00:00 2001
From: Niels Huylebroeck <>
Date: Mon, 4 Feb 2013 13:08:05 +0530
Subject: [PATCH 031/416] [account_payment] : structured reference type is not
reflected when importing from invoice
bzr revid: dhs@tinyerp.com-20130204073805-79lo0wbn3yf9o98u
---
addons/account_payment/wizard/account_payment_order.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py
index f4d695a05d1..28aa4a6c048 100644
--- a/addons/account_payment/wizard/account_payment_order.py
+++ b/addons/account_payment/wizard/account_payment_order.py
@@ -87,6 +87,7 @@ class payment_order_create(osv.osv_memory):
'order_id': payment.id,
'partner_id': line.partner_id and line.partner_id.id or False,
'communication': line.ref or '/',
+ 'state': line.invoice and line.invoice.reference_type != 'none' and 'structured' or 'normal',
'date': date_to_pay,
'currency': (line.invoice and line.invoice.currency_id.id) or line.journal_id.currency.id or line.journal_id.company_id.currency_id.id,
}, context=context)
From d9c69282ac29477ab6ca70f2ee20f0418f81934a Mon Sep 17 00:00:00 2001
From: "sgo@tinyerp.com" <>
Date: Mon, 4 Feb 2013 18:09:09 +0530
Subject: [PATCH 032/416] [IMP]move warehouse field near company
bzr revid: sgo@tinyerp.com-20130204123909-xobft27wsauqgp4u
---
addons/sale_stock/sale_stock_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/sale_stock/sale_stock_view.xml b/addons/sale_stock/sale_stock_view.xml
index 4edde821729..38b54386827 100644
--- a/addons/sale_stock/sale_stock_view.xml
+++ b/addons/sale_stock/sale_stock_view.xml
@@ -26,7 +26,7 @@
-
+
From 242c0094d9777396e5ca0e7438e3e7d75a20b09c Mon Sep 17 00:00:00 2001
From: Rifakat
Date: Wed, 6 Feb 2013 12:52:26 +0530
Subject: [PATCH 033/416] [FIX] l10n_be_coda: bank statement line has wrong
domain concerning parent which is error prone as its a list view which does
not have parent view
bzr revid: rha@tinyerp.com-20130206072226-q08kv4h2txrgr1tb
---
addons/l10n_be_coda/l10n_be_coda_view.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/addons/l10n_be_coda/l10n_be_coda_view.xml b/addons/l10n_be_coda/l10n_be_coda_view.xml
index 2464e5e9082..07af80b5660 100644
--- a/addons/l10n_be_coda/l10n_be_coda_view.xml
+++ b/addons/l10n_be_coda/l10n_be_coda_view.xml
@@ -44,11 +44,12 @@
+
-
-
+
+
From 86503f581216d271afe75980d977a7cb77715d09 Mon Sep 17 00:00:00 2001
From: Dhruti Shastri
Date: Wed, 6 Feb 2013 16:19:15 +0530
Subject: [PATCH 034/416] [stock] : Chained location: cancelling receptions
doesn't cancel all stock moves
bzr revid: dhs@tinyerp.com-20130206104915-f54l890d06xxq9ks
---
addons/stock/stock.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 7198c89e286..2ba3f50d2a7 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -2201,7 +2201,7 @@ class stock_move(osv.osv):
if move.picking_id:
pickings.add(move.picking_id.id)
if move.move_dest_id and move.move_dest_id.state == 'waiting':
- self.write(cr, uid, [move.move_dest_id.id], {'state': 'assigned'})
+ self.write(cr, uid, [move.move_dest_id.id], {'state': 'confirmed'})
if context.get('call_unlink',False) and move.move_dest_id.picking_id:
wf_service = netsvc.LocalService("workflow")
wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr)
From 9e99431d1fdb5772e5f53381d750f3c9a13b005a Mon Sep 17 00:00:00 2001
From: "sgo@tinyerp.com" <>
Date: Wed, 6 Feb 2013 18:08:51 +0530
Subject: [PATCH 035/416] [IMP]add pricelist field in pos config and set
default
bzr revid: sgo@tinyerp.com-20130206123851-4b3lhr5bzf7msla6
---
addons/point_of_sale/point_of_sale.py | 8 +++++++-
addons/point_of_sale/point_of_sale_view.xml | 3 ++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index d95b64d5c84..6835576d253 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -70,6 +70,7 @@ class pos_config(osv.osv):
"to customize the reference numbers of your orders."),
'session_ids': fields.one2many('pos.session', 'config_id', 'Sessions'),
'group_by' : fields.boolean('Group Journal Items', help="Check this if you want to group the Journal Items by Product while closing a Session"),
+ 'pricelist_id': fields.many2one('product.pricelist','Pricelist', required=True)
}
def _check_cash_control(self, cr, uid, ids, context=None):
@@ -115,12 +116,17 @@ class pos_config(osv.osv):
def _default_warehouse(self, cr, uid, context=None):
res = self.pool.get('stock.warehouse').search(cr, uid, [])
return res and res[0] or False
+
+ def _default_pricelist(self, cr, uid, context=None):
+ res = self.pool.get('product.pricelist').search(cr, uid, [('type', '=', 'sale')])
+ return res and res[0] or False
_defaults = {
'state' : POS_CONFIG_STATE[0][0],
'warehouse_id': _default_warehouse,
'journal_id': _default_sale_journal,
'group_by' : True,
+ 'pricelist_id': _default_pricelist
}
def set_active(self, cr, uid, ids, context=None):
@@ -619,7 +625,7 @@ class pos_order(osv.osv):
session_ids = self._default_session(cr, uid, context)
if session_ids:
session_record = self.pool.get('pos.session').browse(cr, uid, session_ids, context=context)
- return session_record.user_id.partner_id.property_product_pricelist and session_record.user_id.partner_id.property_product_pricelist.id or False
+ return session_record.config_id.pricelist_id and session_record.config_id.pricelist_id.id or False
return False
_defaults = {
diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml
index 3cf920d8a11..6a8208bac0a 100644
--- a/addons/point_of_sale/point_of_sale_view.xml
+++ b/addons/point_of_sale/point_of_sale_view.xml
@@ -84,7 +84,7 @@
-
+
@@ -773,6 +773,7 @@
+
From d0e2c54663f9153a4333c6b03496b9cebb6779a5 Mon Sep 17 00:00:00 2001
From: "sgo@tinyerp.com" <>
Date: Wed, 6 Feb 2013 18:29:13 +0530
Subject: [PATCH 036/416] [IMP]set config pricelist on pos frontend
bzr revid: sgo@tinyerp.com-20130206125913-ibn73y41aw19gkmw
---
addons/point_of_sale/static/src/js/models.js | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index 5a4f7c8cefb..a43e5a28074 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -158,7 +158,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
return self.fetch(
'pos.config',
- ['name','journal_ids','warehouse_id','journal_id',
+ ['name','journal_ids','warehouse_id','journal_id','pricelist_id',
'iface_self_checkout', 'iface_led', 'iface_cashdrawer',
'iface_payment_terminal', 'iface_electronic_scale', 'iface_barscan', 'iface_vkeyboard',
'iface_print_via_proxy','iface_cashdrawer','state','sequence_id','session_ids'],
@@ -184,14 +184,13 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
return self.fetch('pos.category', ['id','name','parent_id','child_id','image'])
}).then(function(categories){
self.db.add_categories(categories);
- return new instance.web.Model("ir.model.data").call("get_object_reference", ["product", "list0"])
- }).then(function(pricelist){
+
return self.fetch(
'product.product',
['name', 'list_price','price','pos_categ_id', 'taxes_id', 'ean13',
- 'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description','pricelist_id'],
+ 'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description'],
[['sale_ok','=',true],['available_in_pos','=',true]],
- {pricelist: pricelist[1]} // context for price
+ {pricelist: self.get('pos_config').pricelist_id[0]} // context for price
);
}).then(function(products){
self.db.add_products(products);
From bc17621cecb4a36d4d4e6c6272b2e1b57e51fa1f Mon Sep 17 00:00:00 2001
From: "sgo@tinyerp.com" <>
Date: Thu, 7 Feb 2013 12:21:26 +0530
Subject: [PATCH 037/416] [IMP]improve pos config form view and add group on
warehouse
bzr revid: sgo@tinyerp.com-20130207065126-1liwmg1u3emnra6j
---
addons/point_of_sale/point_of_sale.py | 3 ++-
addons/point_of_sale/point_of_sale_view.xml | 23 ++++++++++++++-------
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index e1fe577c922..ebb87d02f26 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -114,7 +114,8 @@ class pos_config(osv.osv):
return res and res[0] or False
def _default_warehouse(self, cr, uid, context=None):
- res = self.pool.get('stock.warehouse').search(cr, uid, [])
+ user = self.pool.get('res.users').browse(cr, uid, uid, context)
+ res = self.pool.get('stock.warehouse').search(cr, uid, [('company_id','=',user.company_id.id)], context)
return res and res[0] or False
def _default_pricelist(self, cr, uid, context=None):
diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml
index 6a8208bac0a..a3628761173 100644
--- a/addons/point_of_sale/point_of_sale_view.xml
+++ b/addons/point_of_sale/point_of_sale_view.xml
@@ -769,13 +769,20 @@
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -810,7 +817,7 @@
-
+
@@ -824,7 +831,7 @@
-
+
From 6dac31941aa8a0eb9d4b037cb59a8de75a3f132a Mon Sep 17 00:00:00 2001
From: "sgo@tinyerp.com" <>
Date: Thu, 7 Feb 2013 12:54:40 +0530
Subject: [PATCH 038/416] [IMP]improve code
bzr revid: sgo@tinyerp.com-20130207072440-ekqkxi0o5cxe9iz0
---
addons/point_of_sale/point_of_sale.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index ebb87d02f26..bcdf3a55873 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -115,7 +115,7 @@ class pos_config(osv.osv):
def _default_warehouse(self, cr, uid, context=None):
user = self.pool.get('res.users').browse(cr, uid, uid, context)
- res = self.pool.get('stock.warehouse').search(cr, uid, [('company_id','=',user.company_id.id)], context)
+ res = self.pool.get('stock.warehouse').search(cr, uid, [('company_id','=',user.company_id.id)], context=context)
return res and res[0] or False
def _default_pricelist(self, cr, uid, context=None):
From d7bd9743a2580ec1ee9eb77743a151f8c3d71608 Mon Sep 17 00:00:00 2001
From: "sgo@tinyerp.com" <>
Date: Thu, 7 Feb 2013 15:28:27 +0530
Subject: [PATCH 039/416] [IMP]improve pos config view
bzr revid: sgo@tinyerp.com-20130207095827-oaya9xo9cjroqcex
---
addons/point_of_sale/point_of_sale_view.xml | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml
index a3628761173..dbd5e731db1 100644
--- a/addons/point_of_sale/point_of_sale_view.xml
+++ b/addons/point_of_sale/point_of_sale_view.xml
@@ -773,16 +773,12 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
From 1641ea0997b1cc3aeeaa62f46dd230b417971a98 Mon Sep 17 00:00:00 2001
From: Amit Dodiya
Date: Tue, 12 Feb 2013 12:16:41 +0530
Subject: [PATCH 040/416] [FIX]stock: while running the product to process
wizard on done state move gives traceback
bzr revid: ado@tinyerp.com-20130212064641-t317b31srnd0wohi
---
addons/stock/wizard/stock_partial_move.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py
index 89744615f22..66a346a41df 100644
--- a/addons/stock/wizard/stock_partial_move.py
+++ b/addons/stock/wizard/stock_partial_move.py
@@ -22,6 +22,7 @@
from openerp.osv import fields, osv
from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
import time
+from openerp.tools.translate import _
class stock_partial_move_line(osv.osv_memory):
_inherit = "stock.partial.picking.line"
@@ -67,6 +68,8 @@ class stock_partial_move(osv.osv_memory):
}
moves_ids = []
for move in partial.move_ids:
+ if not move.move_id:
+ raise osv.except_osv(_('Invalid Action !'), _("You can't process the move which is in done state You have manually created line in wizard. Please delete any lines you created !"))
move_id = move.move_id.id
partial_data['move%s' % (move_id)] = {
'product_id': move.product_id.id,
From 35b909c78395c5b3a735fdf052adc9a25e8ff08e Mon Sep 17 00:00:00 2001
From: Amit Dodiya
Date: Tue, 12 Feb 2013 13:06:10 +0530
Subject: [PATCH 041/416] [FIX]survey: while adding the question from edit
survey wizard gives traceback
bzr revid: ado@tinyerp.com-20130212073610-8mrpjpk2hyt5tzzd
---
addons/survey/survey.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/survey/survey.py b/addons/survey/survey.py
index 241b9739016..50f00c978a0 100644
--- a/addons/survey/survey.py
+++ b/addons/survey/survey.py
@@ -502,7 +502,7 @@ class survey_question(osv.osv):
def create(self, cr, uid, vals, context=None):
minimum_ans = 0
maximum_ans = 0
- page = self.pool.get('survey.page').browse(cr, uid, vals['page_id'], context=context).title
+ page = self.pool.get('survey.page').browse(cr, uid, vals.get('page_id'), context=context).title
if vals.has_key('answer_choice_ids') and not len(vals['answer_choice_ids']):
if vals.has_key('type') and vals['type'] not in ['descriptive_text', 'single_textbox', 'comment','table']:
raise osv.except_osv(_('Warning!'),_('You must enter one or more answers for question "%s" of page %s .') % (vals['question'], page))
From cdb96761d4ab0a8b01b6f22e445fff00ba1ce189 Mon Sep 17 00:00:00 2001
From: Hardik Ansodariya
Date: Tue, 12 Feb 2013 17:01:33 +0530
Subject: [PATCH 042/416] [FIX] hr_holidays: add date_from field in list view
in order to be able group by start date(Maintenance case:585171)
bzr revid: han@tinyerp.com-20130212113133-0xs34511nn45uqx0
---
addons/hr_holidays/hr_holidays_view.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index f8b4ad07b77..adee1e71f5d 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -146,6 +146,7 @@
+
From 0b637725be2472d68f3a1fa17833a3472fc40431 Mon Sep 17 00:00:00 2001
From: "Ravi Gohil (OpenERP)"
Date: Fri, 15 Feb 2013 14:12:13 +0530
Subject: [PATCH 043/416] [FIX] report_webkit: If a certain translateable term
happens to be the same src value as on another report (both webkit and
non-webkit reports) the resulting translation on a webkit report uses the
first translation found (which is highly likely to be from the other report).
(Maintenance Case: 586086)
lp bug: https://launchpad.net/bugs/1098602 fixed
bzr revid: rgo@tinyerp.com-20130215084213-h38jfi447y4qpf94
---
addons/report_webkit/webkit_report.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/report_webkit/webkit_report.py b/addons/report_webkit/webkit_report.py
index b6c273f8852..6ad950d8302 100644
--- a/addons/report_webkit/webkit_report.py
+++ b/addons/report_webkit/webkit_report.py
@@ -191,8 +191,9 @@ class WebKitParser(report_sxw):
def translate_call(self, src):
"""Translate String."""
ir_translation = self.pool.get('ir.translation')
+ name = self.tmpl and 'addons/' + self.tmpl or None
res = ir_translation._get_source(self.parser_instance.cr, self.parser_instance.uid,
- None, 'report', self.parser_instance.localcontext.get('lang', 'en_US'), src)
+ name, 'report', self.parser_instance.localcontext.get('lang', 'en_US'), src)
if not res :
return src
return res
From eb6ba5ba47f228adc746cedfa3cd92c154fce60b Mon Sep 17 00:00:00 2001
From: "Pinakin Nayi (OpenERP)"
Date: Fri, 15 Feb 2013 15:28:01 +0530
Subject: [PATCH 044/416] [IMP]account:field supplier invoice number should be
set in journal entry as description
bzr revid: pna@tinyerp.com-20130215095801-wstbzqniydainl4s
---
addons/account/account_invoice.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index f255b6788ee..4f49ecec87a 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -926,7 +926,7 @@ class account_invoice(osv.osv):
total, total_currency, iml = self.compute_invoice_totals(cr, uid, inv, company_currency, ref, iml, context=ctx)
acc_id = inv.account_id.id
- name = inv['name'] or '/'
+ name = inv['name'] or inv['supplier_invoice_number'] or '/'
totlines = False
if inv.payment_term:
totlines = payment_term_obj.compute(cr,
From a75891e1b64876f5534ce636f6e3559635a3f57e Mon Sep 17 00:00:00 2001
From: Mohammed Shekha
Date: Mon, 18 Feb 2013 11:24:02 +0530
Subject: [PATCH 045/416] [FIX]Fixed the issue of translation of POS action
buttons.
bzr revid: msh@openerp.com-20130218055402-zaxa2g6c4o0t6cu5
---
addons/point_of_sale/static/src/js/screens.js | 11 ++++++-----
addons/point_of_sale/static/src/js/widgets.js | 5 +++--
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js
index eca4a3c5915..457457b2969 100644
--- a/addons/point_of_sale/static/src/js/screens.js
+++ b/addons/point_of_sale/static/src/js/screens.js
@@ -16,7 +16,8 @@
// hide()s
function openerp_pos_screens(instance, module){ //module is instance.point_of_sale
- var QWeb = instance.web.qweb;
+ var QWeb = instance.web.qweb,
+ _t = instance.web._t;
module.ScreenSelector = instance.web.Class.extend({
init: function(options){
@@ -808,13 +809,13 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
var self = this;
this.add_action_button({
- label: 'Print',
+ label: _t('Print'),
icon: '/point_of_sale/static/src/img/icons/png48/printer.png',
click: function(){ self.print(); },
});
this.add_action_button({
- label: 'Next Order',
+ label: _t('Next Order'),
icon: '/point_of_sale/static/src/img/icons/png48/go-next.png',
click: function() { self.finishOrder(); },
});
@@ -870,7 +871,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
this.set_numpad_state(this.pos_widget.numpad.state);
this.back_button = this.add_action_button({
- label: 'Back',
+ label: _t('Back'),
icon: '/point_of_sale/static/src/img/icons/png48/go-previous.png',
click: function(){
self.pos_widget.screen_selector.set_current_screen(self.back_screen);
@@ -878,7 +879,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
});
this.validate_button = this.add_action_button({
- label: 'Validate',
+ label: _t('Validate'),
name: 'validation',
icon: '/point_of_sale/static/src/img/icons/png48/validate.png',
click: function(){
diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js
index 874c387ea23..b7cedcf548c 100644
--- a/addons/point_of_sale/static/src/js/widgets.js
+++ b/addons/point_of_sale/static/src/js/widgets.js
@@ -1,5 +1,6 @@
function openerp_pos_widgets(instance, module){ //module is instance.point_of_sale
- var QWeb = instance.web.qweb;
+ var QWeb = instance.web.qweb,
+ _t = instance.web._t;
// The ImageCache is used to hide the latency of the application cache on-disk access in chrome
// that causes annoying flickering on product pictures. Why the hell a simple access to
@@ -969,7 +970,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
this.onscreen_keyboard.appendTo($(".point-of-sale #content"));
this.close_button = new module.HeaderButtonWidget(this,{
- label:'Close',
+ label: _t('Close'),
action: function(){ self.try_close(); },
});
this.close_button.appendTo(this.$('#rightheader'));
From fe8ccdf3140a89dbcaaed1b0bd2afa26e558eb1e Mon Sep 17 00:00:00 2001
From: Amit Dodiya
Date: Mon, 18 Feb 2013 17:54:06 +0530
Subject: [PATCH 046/416] [FIX] [FIX] account: make the string translatable
bzr revid: ado@tinyerp.com-20130218122406-97nnt3py85i35s9u
---
addons/account/wizard/account_fiscalyear_close.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account/wizard/account_fiscalyear_close.py b/addons/account/wizard/account_fiscalyear_close.py
index d4f7b3e6654..c2acfb75f22 100644
--- a/addons/account/wizard/account_fiscalyear_close.py
+++ b/addons/account/wizard/account_fiscalyear_close.py
@@ -38,7 +38,7 @@ class account_fiscalyear_close(osv.osv_memory):
'report_name': fields.char('Name of new entries',size=64, required=True, help="Give name of the new entries"),
}
_defaults = {
- 'report_name': _('End of Fiscal Year Entry'),
+ 'report_name': lambda self, cr, uid, context: _('End of Fiscal Year Entry'),
}
def data_save(self, cr, uid, ids, context=None):
From 62e70a533e0587e78d31621f6e3d8c549c68f4c3 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Mon, 18 Feb 2013 18:06:42 +0530
Subject: [PATCH 047/416] [FIX]stock: added warring message if user mannualy
add prodcut line in return product wizard
bzr revid: mma@tinyerp.com-20130218123642-3f5nzld3qmjrm0ap
---
addons/stock/wizard/stock_return_picking.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py
index 7c6f0655e7a..2aca6249d56 100644
--- a/addons/stock/wizard/stock_return_picking.py
+++ b/addons/stock/wizard/stock_return_picking.py
@@ -180,6 +180,8 @@ class stock_return_picking(osv.osv_memory):
for v in val_id:
data_get = data_obj.browse(cr, uid, v, context=context)
mov_id = data_get.move_id.id
+ if not mov_id:
+ raise osv.except_osv(_('Warning !'), _("You can't process the move which is in done state ! \n Or \n You have manually created line in wizard. Please delete any lines you created !"))
new_qty = data_get.quantity
move = move_obj.browse(cr, uid, mov_id, context=context)
new_location = move.location_dest_id.id
From 3d0a4e0c3dd4c90fac7d539f26e90a5ff683e19b Mon Sep 17 00:00:00 2001
From: Amit Dodiya
Date: Thu, 28 Feb 2013 12:33:11 +0530
Subject: [PATCH 048/416] [FIX] make the breadcrump string translatable
bzr revid: ado@tinyerp.com-20130228070311-zbhx3bcpqo6cgfx0
---
addons/account/account_invoice.py | 8 ++++----
addons/account/i18n/account.pot | 24 ++++++++++++++++++++++++
2 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 2a4b410de2f..fc8acc99b22 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -1130,10 +1130,10 @@ class account_invoice(osv.osv):
if not ids:
return []
types = {
- 'out_invoice': 'Invoice ',
- 'in_invoice': 'Sup. Invoice ',
- 'out_refund': 'Refund ',
- 'in_refund': 'Supplier Refund ',
+ 'out_invoice': _('Invoice '),
+ 'in_invoice': _('Sup. Invoice '),
+ 'out_refund': _('Refund '),
+ 'in_refund': _('Supplier Refund '),
}
return [(r['id'], (r['number']) or types[r['type']] + (r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot
index 12661a8ee22..7125cbae281 100644
--- a/addons/account/i18n/account.pot
+++ b/addons/account/i18n/account.pot
@@ -52,6 +52,30 @@ msgstr ""
msgid "Residual"
msgstr ""
+#. module: account
+#: code:addons/account/account_invoice.py:1133
+#, python-format
+msgid "Invoice "
+msgstr ""
+
+#. module: account
+#: code:addons/account/account_invoice.py:1134
+#, python-format
+msgid "Sup. Invoice "
+msgstr ""
+
+#. module: account
+#: code:addons/account/account_invoice.py:11345
+#, python-format
+msgid "Refund "
+msgstr ""
+
+#. module: account
+#: code:addons/account/account_invoice.py:1136
+#, python-format
+msgid "Supplier Refund "
+msgstr ""
+
#. module: account
#: code:addons/account/account_bank_statement.py:368
#, python-format
From 9b31288c14613f62bd339dd29050e570100c088e Mon Sep 17 00:00:00 2001
From: "Ravish (Open ERP)"
Date: Mon, 4 Mar 2013 16:25:32 +0530
Subject: [PATCH 049/416] currecy_so_po
bzr revid: rmu@tinyerp.com-20130304105532-hzwakhr1y71q88iz
---
addons/product/security/product_security.xml | 2 ++
addons/purchase/purchase.py | 3 ++-
addons/purchase/purchase_view.xml | 2 +-
addons/sale/sale.py | 5 +++--
addons/sale/sale_view.xml | 2 +-
5 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/addons/product/security/product_security.xml b/addons/product/security/product_security.xml
index 2e6bdac9fca..bf528160464 100644
--- a/addons/product/security/product_security.xml
+++ b/addons/product/security/product_security.xml
@@ -10,11 +10,13 @@
Sales Pricelists
+
Purchase Pricelists
+
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index e76bf4a0358..4a37e28b96f 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -184,7 +184,7 @@ class purchase_order(osv.osv):
'warehouse_id': fields.many2one('stock.warehouse', 'Destination Warehouse'),
'location_id': fields.many2one('stock.location', 'Destination', required=True, domain=[('usage','<>','view')], states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]} ),
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, help="The pricelist sets the currency used for this purchase order. It also computes the supplier price for the selected products/quantities."),
- 'currency_id': fields.related('pricelist_id', 'currency_id', type="many2one", relation="res.currency", string="Currency",readonly=True, required=True),
+ 'currency_id': fields.many2one('res.currency','Currency', readonly=True, required=True,states={'draft': [('readonly', False)],'sent': [('readonly', False)]}),
'state': fields.selection(STATE_SELECTION, 'Status', readonly=True, help="The status of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' status. Then the order has to be confirmed by the user, the status switch to 'Confirmed'. Then the supplier must confirm the order to change the status to 'Approved'. When the purchase order is paid and received, the status becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the status becomes in exception.", select=True),
'order_line': fields.one2many('purchase.order.line', 'order_id', 'Order Lines', states={'approved':[('readonly',True)],'done':[('readonly',True)]}),
'validator' : fields.many2one('res.users', 'Validated by', readonly=True),
@@ -224,6 +224,7 @@ class purchase_order(osv.osv):
'create_uid': fields.many2one('res.users', 'Responsible'),
'company_id': fields.many2one('res.company','Company',required=True,select=1, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}),
'journal_id': fields.many2one('account.journal', 'Journal'),
+ 'currency_id': lambda self, cr, uid, context: self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
}
_defaults = {
'date_order': fields.date.context_today,
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 8ba730567e2..a365b719f6a 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -191,7 +191,7 @@
-
+
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 8656dccd5db..0e4e1333e53 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -215,7 +215,7 @@ class sale_order(osv.osv):
help="""This field controls how invoice and delivery operations are synchronized.
- With 'Before Delivery', a draft invoice is created, and it must be paid before delivery."""),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Pricelist for current sales order."),
- 'currency_id': fields.related('pricelist_id', 'currency_id', type="many2one", relation="res.currency", string="Currency", readonly=True, required=True),
+ 'currency_id': fields.many2one('res.currency','Currency', readonly=True, required=True,states={'draft': [('readonly', False)],'sent': [('readonly', False)]}),
'project_id': fields.many2one('account.analytic.account', 'Contract / Analytic', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="The analytic account related to a sales order."),
'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}),
@@ -261,7 +261,8 @@ class sale_order(osv.osv):
'shop_id': _get_default_shop,
'partner_invoice_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['invoice'])['invoice'],
'partner_shipping_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['delivery'])['delivery'],
- 'note': lambda self, cr, uid, context: self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.sale_note
+ 'note': lambda self, cr, uid, context: self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.sale_note,
+ 'currency_id': lambda self, cr, uid, context: self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
}
_sql_constraints = [
('name_uniq', 'unique(name, company_id)', 'Order Reference must be unique per Company!'),
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index f4b8283f9b4..115f5dad79c 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -163,7 +163,7 @@
-
+
From cca957c7169f5a72f25a3e7f0ed9d397091bb5f1 Mon Sep 17 00:00:00 2001
From: "Ravish (Open ERP)"
Date: Mon, 4 Mar 2013 16:52:06 +0530
Subject: [PATCH 050/416] currecy_so_po_improve
bzr revid: rmu@tinyerp.com-20130304112206-dk1486i17igx33g0
---
addons/purchase/purchase.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 4a37e28b96f..4c534265763 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -224,7 +224,7 @@ class purchase_order(osv.osv):
'create_uid': fields.many2one('res.users', 'Responsible'),
'company_id': fields.many2one('res.company','Company',required=True,select=1, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}),
'journal_id': fields.many2one('account.journal', 'Journal'),
- 'currency_id': lambda self, cr, uid, context: self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
+
}
_defaults = {
'date_order': fields.date.context_today,
@@ -236,6 +236,7 @@ class purchase_order(osv.osv):
'pricelist_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').browse(cr, uid, context['partner_id']).property_product_pricelist_purchase.id,
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'purchase.order', context=c),
'journal_id': _get_journal,
+ 'currency_id': lambda self, cr, uid, context: self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
}
_sql_constraints = [
('name_uniq', 'unique(name, company_id)', 'Order Reference must be unique per Company!'),
From 1ee33ffb205e7ee2adc42ffa42eac7a50e6f7ad9 Mon Sep 17 00:00:00 2001
From: "Ravish (Open ERP)"
Date: Tue, 5 Mar 2013 10:14:47 +0530
Subject: [PATCH 051/416] changes as per suggestion
bzr revid: rmu@tinyerp.com-20130305044447-iuyiw2o8epioaajt
---
addons/product/security/product_security.xml | 2 --
1 file changed, 2 deletions(-)
diff --git a/addons/product/security/product_security.xml b/addons/product/security/product_security.xml
index bf528160464..2e6bdac9fca 100644
--- a/addons/product/security/product_security.xml
+++ b/addons/product/security/product_security.xml
@@ -10,13 +10,11 @@
Sales Pricelists
-
Purchase Pricelists
-
From a737b154b329d0beda68f74334e28076d7ac31c6 Mon Sep 17 00:00:00 2001
From: Mohammed Shekha
Date: Wed, 6 Mar 2013 11:24:41 +0530
Subject: [PATCH 052/416] [FIX]Fixed the issue of context not passed call, due
to which view strings are not translated.
bzr revid: msh@openerp.com-20130306055441-uraju3iwod8yqg6t
---
addons/share/static/src/js/share.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/share/static/src/js/share.js b/addons/share/static/src/js/share.js
index da72cea602d..30d933d59d5 100644
--- a/addons/share/static/src/js/share.js
+++ b/addons/share/static/src/js/share.js
@@ -16,7 +16,7 @@ openerp.share = function(session) {
domains: [domain],
contexts: [view.dataset.context]
}).done(function (result) {
- Share.create({
+ $.when(Share.create({
name: action.name,
record_name: rec_name,
domain: result.domain,
@@ -24,8 +24,8 @@ openerp.share = function(session) {
user_type: user_type || 'embedded',
view_type: view.fields_view.type,
invite: invite || false,
- }).done(function(share_id) {
- var step1 = Share.call('go_step_1', [[share_id]]).done(function(result) {
+ })).then(function(share_id) {
+ var step1 = Share.call('go_step_1', [[share_id], result.context]).done(function(result) {
var action = result;
self.do_action(action);
});
From c1e0521566c9c8b893b424f6b03d2ea65d845f55 Mon Sep 17 00:00:00 2001
From: Amit Dodiya
Date: Fri, 8 Mar 2013 18:32:27 +0530
Subject: [PATCH 053/416] [FIX]: account: when we create invoice from portal
menu got the error becuase in context we have passed list in type so code
cannot handle the list
bzr revid: ado@tinyerp.com-20130308130227-bvm08cab4gjkco71
---
addons/account/account_invoice.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 17135ed1f76..269a2367c5f 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -53,9 +53,12 @@ class account_invoice(osv.osv):
company_id = context.get('company_id', user.company_id.id)
type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale_refund', 'in_refund': 'purchase_refund'}
journal_obj = self.pool.get('account.journal')
- res = journal_obj.search(cr, uid, [('type', '=', type2journal.get(type_inv, 'sale')),
- ('company_id', '=', company_id)],
- limit=1)
+ domain = [('company_id', '=', company_id)]
+ if isinstance(type_inv, list):
+ domain.append(('type', 'in', [type2journal.get(type) for type in type_inv if type2journal.get(type)]))
+ else:
+ domain.append(('type', '=', type2journal.get(type_inv, 'sale')))
+ res = journal_obj.search(cr, uid, domain, limit=1)
return res and res[0] or False
def _get_currency(self, cr, uid, context=None):
From f97c97d672b4acd8945f5cd0ae97cc4fe68948f6 Mon Sep 17 00:00:00 2001
From: "Pinakin Nayi (OpenERP)"
Date: Wed, 13 Mar 2013 12:30:29 +0530
Subject: [PATCH 054/416] [IMP]account_followup,hr_timesheet_sheet:in analysis
report create button is there but no need of it
bzr revid: pna@tinyerp.com-20130313070029-9ojiilbnl2tn7f3g
---
addons/account_followup/report/account_followup_report.xml | 2 +-
addons/hr_timesheet_sheet/report/timesheet_report_view.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/account_followup/report/account_followup_report.xml b/addons/account_followup/report/account_followup_report.xml
index 6fee6a77ac1..b7c38e89f5e 100644
--- a/addons/account_followup/report/account_followup_report.xml
+++ b/addons/account_followup/report/account_followup_report.xml
@@ -6,7 +6,7 @@
account_followup.stat.tree
account_followup.stat
-
+
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
index aee07fc23b6..ddc66260cf0 100644
--- a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
+++ b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
@@ -16,7 +16,7 @@
timesheet.report.tree
timesheet.report
-
+
From 7daa6807eee4835ab892206d4dcf4b5a80e8061f Mon Sep 17 00:00:00 2001
From: "Somesh Khare (OpenERP)"
Date: Fri, 15 Mar 2013 14:35:17 +0530
Subject: [PATCH 055/416] [FIX]account_move_line:due to boolean value for
journal_id and period_id error occurred (Case: ref 589954)
bzr revid: skh@tinyerp.com-20130315090517-84g17n9ax2iijh0j
---
addons/account/account_move_line.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index a96ed889aae..06f597768b3 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -1070,12 +1070,12 @@ class account_move_line(osv.osv):
for line in self.browse(cr, uid, ids, context=context):
ctx = context.copy()
- if ('journal_id' not in ctx):
+ if not ctx.get('journal_id'):
if line.move_id:
ctx['journal_id'] = line.move_id.journal_id.id
else:
ctx['journal_id'] = line.journal_id.id
- if ('period_id' not in ctx):
+ if not ctx.get('period_id'):
if line.move_id:
ctx['period_id'] = line.move_id.period_id.id
else:
From 52efab6820cabad5c663c39242c7a77991820863 Mon Sep 17 00:00:00 2001
From: Nehal Panchal
Date: Tue, 19 Mar 2013 15:12:36 +0530
Subject: [PATCH 056/416] [FIX] warning : changed the inherited view of product
form of warning module
bzr revid: nep@tinyerp.com-20130319094236-calq1peyb6onmpuz
---
addons/warning/warning_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/warning/warning_view.xml b/addons/warning/warning_view.xml
index 1df38771e9c..04a35530bd2 100644
--- a/addons/warning/warning_view.xml
+++ b/addons/warning/warning_view.xml
@@ -41,7 +41,7 @@
product.warning.form.inherit
product.product
-
+
From 307818ea0b0ee424cce1405de79b010c73015660 Mon Sep 17 00:00:00 2001
From: Martin Trigaux
Date: Wed, 20 Mar 2013 12:15:20 +0100
Subject: [PATCH 057/416] [ADD] additions from trunk-hr-goal-mat
bzr revid: mat@openerp.com-20130320111520-fmz14if4k400s9s4
---
addons/hr/__openerp__.py | 1 +
addons/hr/hr.py | 41 ++++++++++++++++++++++++++++++++
addons/hr/hr_view.xml | 16 +++++++++----
addons/hr/mail_hr_view.xml | 24 +++++++++++++++++++
addons/hr/static/src/css/hr.css | 5 ++++
addons/mail/mail_thread_view.xml | 3 ++-
6 files changed, 85 insertions(+), 5 deletions(-)
create mode 100644 addons/hr/mail_hr_view.xml
diff --git a/addons/hr/__openerp__.py b/addons/hr/__openerp__.py
index b4b8e982845..b978a83e658 100644
--- a/addons/hr/__openerp__.py
+++ b/addons/hr/__openerp__.py
@@ -59,6 +59,7 @@ You can manage:
'hr_installer.xml',
'hr_data.xml',
'res_config_view.xml',
+ 'mail_hr_view.xml',
],
'demo': ['hr_demo.xml'],
'test': [
diff --git a/addons/hr/hr.py b/addons/hr/hr.py
index 467f34f708b..590e8a52fa8 100644
--- a/addons/hr/hr.py
+++ b/addons/hr/hr.py
@@ -23,6 +23,8 @@ from openerp import addons
import logging
from openerp.osv import fields, osv
from openerp import tools
+from openerp.tools.translate import _
+
_logger = logging.getLogger(__name__)
class hr_employee_category(osv.osv):
@@ -264,6 +266,45 @@ class hr_employee(osv.osv):
image_path = addons.get_module_resource('hr', 'static/src/img', 'default_image.png')
return tools.image_resize_image_big(open(image_path, 'rb').read().encode('base64'))
+ def action_follow(self, cr, uid, ids, context=None):
+ """ Wrapper because message_subscribe_users take a user_ids=None
+ that receive the context without the wrapper. """
+ return self.message_subscribe_users(cr, uid, ids, context=context)
+
+ def action_unfollow(self, cr, uid, ids, context=None):
+ """ Wrapper because message_unsubscribe_users take a user_ids=None
+ that receive the context without the wrapper. """
+ return self.message_unsubscribe_users(cr, uid, ids, context=context)
+
+ def message_post(self, cr, uid, thread_id, context=None, **kwargs):
+ """Overwrite the message_post method when using the send to my
+ followers screen
+
+ When a message is sent to a hr.employee using the action
+ action_mail_inbox_feeds, the context is extended with res_users_id
+ containing the user id of the user linked to the employee and
+ default_res_id contains 0 (to avoid misused of the function called from
+ the inbox page).
+ In these conditions, the thread_id used to send the message is the id
+ of the employee instead of the res_users (or partner_id).
+ If several employee are linked to the same user_id, the message is
+ duplicated and sent to every user.
+
+ :return: the result of message_post from mail_thread, last call if
+ several messages are sent.
+ """
+ if 'res_users_id' in context: # and context['default_res_id'] == 0:
+ employee_ids = self.search(cr, uid, [('user_id', '=', context['res_users_id'])], context=context)
+ if len(employee_ids) > 0:
+ for employee_id in employee_ids:
+ res = super(hr_employee, self).message_post(cr, uid, employee_id, context=context, **kwargs)
+ return res
+ else:
+ raise osv.except_osv(_('Warning!'), _('Your user is not linked to an employee form, which is required to send messages to your followers.'))
+
+ # if no overwrite, send message as usual
+ return super(hr_employee, self).message_post(cr, uid, thread_id, context=context, **kwargs)
+
_defaults = {
'active': 1,
'image': _get_default_image,
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index e0c3edfdb39..9d08627b3b2 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -27,6 +27,10 @@
+
+
+
+