openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #01993
[Merge] lp:~openerp-dev/openobject-addons/ksa-addons2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons2
ksa(OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/ksa-addons2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons2.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
#500931 No analytic entry is generated finishing one production order
https://bugs.launchpad.net/bugs/500931
#543979 product: check uos not necessary
https://bugs.launchpad.net/bugs/543979
#623680 [5.0] stock - Stock Inventory with date past
https://bugs.launchpad.net/bugs/623680
#674551 "qunatity" in MRP
https://bugs.launchpad.net/bugs/674551
#674578 no pdf report "delivery order" in warehouse management
https://bugs.launchpad.net/bugs/674578
#675418 account moves with same account in debit and credit
https://bugs.launchpad.net/bugs/675418
#677437 Production : done moves should not be re-considered while completing production order
https://bugs.launchpad.net/bugs/677437
#680916 "Work center" spelling is inconsistent
https://bugs.launchpad.net/bugs/680916
#683231 [6.0][purchase] destination address inside company makes picking to "customer" location
https://bugs.launchpad.net/bugs/683231
#687352 remove the domain on the filter field in segment
https://bugs.launchpad.net/bugs/687352
#687360 Warehouse : change order of buttons in incoming and outgoingview
https://bugs.launchpad.net/bugs/687360
#690583 stock.picking.test_finished: write() takes at most 6 arguments (8 given)
https://bugs.launchpad.net/bugs/690583
#690700 [purchase-stock] Wrong Partner used when invoicing from picking coming from a puchase with sent_to_address
https://bugs.launchpad.net/bugs/690700
#691901 [6.0] delivery data.xml contains demo data
https://bugs.launchpad.net/bugs/691901
#692461 [6.0] wiki_faq - update problem - reloads template
https://bugs.launchpad.net/bugs/692461
#692467 menuitem for price.type object is missing
https://bugs.launchpad.net/bugs/692467
#695343 mrp_repair doesn't work with products with lot tracking
https://bugs.launchpad.net/bugs/695343
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/ksa-addons2/+merge/45340
https://bugs.launchpad.net/openobject-addons/+bug/695343
https://bugs.launchpad.net/openobject-addons/+bug/690700
--
https://code.launchpad.net/~openerp-dev/openobject-addons/ksa-addons2/+merge/45340
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/ksa-addons2.
=== modified file 'mrp_repair/mrp_repair.py'
--- mrp_repair/mrp_repair.py 2010-12-20 13:00:56 +0000
+++ mrp_repair/mrp_repair.py 2011-01-06 10:21:17 +0000
@@ -535,6 +535,7 @@
'location_id': move.location_id.id,
'location_dest_id': move.location_dest_id.id,
'tracking_id': False,
+ 'prodlot_id': move.prodlot_id and move.prodlot_id.id or False,
'state': 'done',
})
repair_line_obj.write(cr, uid, [move.id], {'move_id': move_id, 'state': 'done'}, context=context)
@@ -661,6 +662,7 @@
'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'),
'product_uom_qty': fields.float('Quantity (UoM)', digits=(16,2), required=True),
'product_uom': fields.many2one('product.uom', 'Product UoM', required=True),
+ 'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number',domain="[('product_id','=',product_id)]"),
'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
'location_id': fields.many2one('stock.location', 'Source Location', required=True, select=True),
'location_dest_id': fields.many2one('stock.location', 'Dest. Location', required=True, select=True),
=== modified file 'mrp_repair/mrp_repair_view.xml'
--- mrp_repair/mrp_repair_view.xml 2010-12-14 06:22:11 +0000
+++ mrp_repair/mrp_repair_view.xml 2011-01-06 10:21:17 +0000
@@ -49,7 +49,8 @@
<notebook>
<page string="Repair Line">
<field name="name" colspan="4"/>
- <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)" colspan="4"/>
+ <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
+ <field name='prodlot_id'/>
<field name="product_uom_qty" string="Qty" />
<field name="product_uom" string="UoM"/>
<field name="price_unit"/>
@@ -178,7 +179,7 @@
<field name="arch" type="xml">
<search string="Search Reair Orders">
<group col='4' colspan='4'>
- <filter icon="terp-document-new" string="Quotations" domain="[('state','=','draft')]"/>
+ <filter icon="terp-document-new" string="Quotations" domain="[('state','=','draft')]"/>
<filter icon="terp-check" string="Confirmed" domain="[('state','=','confirmed')]" name="current" />
<filter icon="terp-emblem-important" string="Ready To Repair" domain="[('state','=','ready')]"/>
<separator orientation="vertical"/>
@@ -202,7 +203,7 @@
</field>
</record>
-
+
<record id="action_repair_order_tree" model="ir.actions.act_window">
<field name="name">Repair Orders</field>
@@ -212,7 +213,7 @@
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_repair_order_form_filter"/>
<field name="help">Repair orders allow you to organize your product repairs. In a repair order, you can detail the components you remove, add or replace and record the time you spent on the different operations. The repair order uses the warranty date on the production lot in order to know if whether the repair should be invoiced to the customer or not.</field>
- </record>
+ </record>
<menuitem action="action_repair_order_tree" id="menu_repair_order" parent="mrp.menu_mrp_manufacturing" groups="mrp.group_mrp_user" name="Repair Orders" sequence="50"/>
=== modified file 'purchase/purchase_demo.xml'
--- purchase/purchase_demo.xml 2011-01-03 06:19:02 +0000
+++ purchase/purchase_demo.xml 2011-01-06 10:21:17 +0000
@@ -5,7 +5,7 @@
<record id="base.user_demo" model="res.users">
<field eval="[(4, ref('group_purchase_user'))]" name="groups_id"/>
</record>
-
+
<!--Resource: purchase.order-->
<record id="order_purchase1" model="purchase.order">
@@ -26,7 +26,7 @@
<record id="line1_purchase" model="purchase.order.line">
<field name="order_id" ref="order_purchase1"/>
- <field name="date_planned">2010/09/15</field>
+ <field name="date_planned">2010/12/23</field>
<field name="name">New server config + material</field>
<field model="product.product" name="product_id" search="[]"/>
<field model="product.uom" name="product_uom" search="[]"/>
@@ -36,7 +36,7 @@
<record id="line2_purchase" model="purchase.order.line">
<field name="order_id" ref="order_purchase1"/>
- <field name="date_planned">2010/09/15</field>
+ <field name="date_planned">2010/12/23</field>
<field name="name">[PC1] Basic PC</field>
<field name="product_id" ref="product.product_product_pc1"/>
<field name="product_uom" ref="product.product_uom_unit"/>
@@ -46,7 +46,7 @@
<record id="line3_purchase" model="purchase.order.line">
<field name="order_id" ref="order_purchase2"/>
- <field name="date_planned">2010/09/15</field>
+ <field name="date_planned">2010/12/23</field>
<field name="name">[PC3] Medium PC</field>
<field name="product_id" ref="product.product_product_pc3"/>
<field name="product_uom" ref="product.product_uom_unit"/>
=== modified file 'purchase/stock.py'
--- purchase/stock.py 2010-12-06 13:11:02 +0000
+++ purchase/stock.py 2011-01-06 10:21:17 +0000
@@ -58,6 +58,19 @@
'purchase_id': False,
}
+ def _get_address_invoice(self, cr, uid, picking):
+ """ Gets invoice address of a partner
+ @return {'contact': address, 'invoice': address} for invoice
+ """
+ res = super(stock_picking, self)._get_address_invoice(cr, uid, picking)
+ if picking.purchase_id:
+ partner_obj = self.pool.get('res.partner')
+ partner = (picking.purchase_id and picking.purchase_id.partner_id) or picking.address_id.partner_id
+ data = partner_obj.address_get(cr, uid, [partner.id],
+ ['contact', 'invoice'])
+ res.update(data)
+ return res
+
def get_currency_id(self, cursor, user, picking):
if picking.purchase_id:
return picking.purchase_id.pricelist_id.currency_id.id
=== modified file 'sale/stock.py'
--- sale/stock.py 2010-12-29 16:26:07 +0000
+++ sale/stock.py 2011-01-06 10:21:17 +0000
@@ -43,6 +43,19 @@
'sale_id': False
}
+ def _get_address_invoice(self, cr, uid, picking):
+ """ Gets invoice address of a partner
+ @return {'contact': address, 'invoice': address} for invoice
+ """
+ res = super(stock_picking, self)._get_address_invoice(cr, uid, picking)
+ if picking.sale_id:
+ partner_obj = self.pool.get('res.partner')
+ partner = (picking.sale_id and picking.sale_id.partner_id) or picking.address_id.partner_id
+ data = partner_obj.address_get(cr, uid, [partner.id],
+ ['contact', 'invoice'])
+ res.update(data)
+ return res
+
def get_currency_id(self, cursor, user, picking):
if picking.sale_id:
return picking.sale_id.pricelist_id.currency_id.id
=== modified file 'stock/stock.py'
--- stock/stock.py 2011-01-04 11:51:38 +0000
+++ stock/stock.py 2011-01-06 10:21:17 +0000
@@ -874,8 +874,7 @@
@return {'contact': address, 'invoice': address} for invoice
"""
partner_obj = self.pool.get('res.partner')
- partner = (picking.purchase_id and picking.purchase_id.partner_id) or (picking.sale_id and picking.sale_id.partner_id) or picking.address_id.partner_id
-
+ partner = picking.address_id.partner_id
return partner_obj.address_get(cr, uid, [partner.id],
['contact', 'invoice'])
@@ -970,6 +969,7 @@
invoice_obj = self.pool.get('account.invoice')
invoice_line_obj = self.pool.get('account.invoice.line')
+ address_obj = self.pool.get('res.partner.address')
invoices_group = {}
res = {}
inv_type = type
@@ -993,6 +993,7 @@
address_contact_id, address_invoice_id = \
self._get_address_invoice(cr, uid, picking).values()
+ partner_id = address_obj.browse(cr, uid, address_contact_id)
comment = self._get_comment_invoice(cr, uid, picking)
if group and partner.id in invoices_group:
@@ -1012,7 +1013,7 @@
'origin': (picking.name or '') + (picking.origin and (':' + picking.origin) or ''),
'type': inv_type,
'account_id': account_id,
- 'partner_id': partner.id,
+ 'partner_id': partner_id.partner_id.id,
'address_invoice_id': address_invoice_id,
'address_contact_id': address_contact_id,
'comment': comment,
Follow ups