WIP purchase_by_sale_history For odoo 13.0

This commit is contained in:
Bhoomi
2019-09-26 14:51:44 -04:00
parent e47f11fdf5
commit 1dfcfb05a2
4 changed files with 1 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
{
'name': 'Purchase by Sale History',
'author': 'Hibou Corp. <hello@hibou.io>',
'version': '12.0.1.0.0',
'version': '13.0.1.0.0',
'category': 'Purchases',
'sequence': 95,
'summary': 'Fill Purchase Orders by Sales History',

View File

@@ -64,7 +64,6 @@ class TestPurchaseBySaleHistory(common.TransactionCase):
self.env['sale.order'].create({
'partner_id': sale_partner.id,
'date_order': sale_date,
'confirmation_date': sale_date,
'picking_policy': 'direct',
'order_line': [
(0, 0, {'product_id': product11.id, 'product_uom_qty': 3.0}),
@@ -93,7 +92,6 @@ class TestPurchaseBySaleHistory(common.TransactionCase):
self.env['sale.order'].create({
'partner_id': sale_partner.id,
'date_order': sale_date,
'confirmation_date': sale_date,
'picking_policy': 'direct',
'order_line': [
(0, 0, {'product_id': product11.id, 'product_uom_qty': 3.0}),
@@ -112,7 +110,6 @@ class TestPurchaseBySaleHistory(common.TransactionCase):
self.env['sale.order'].create({
'partner_id': sale_partner.id,
'date_order': sale_date,
'confirmation_date': sale_date,
'picking_policy': 'direct',
'warehouse_id': wh2.id,
'order_line': [
@@ -132,7 +129,6 @@ class TestPurchaseBySaleHistory(common.TransactionCase):
self.env['sale.order'].create({
'partner_id': sale_partner.id,
'date_order': sale_date,
'confirmation_date': sale_date,
'picking_policy': 'direct',
'order_line': [
(0, 0, {'product_id': product11.id, 'product_uom_qty': 3.0}),

View File

@@ -22,7 +22,6 @@ class PurchaseBySaleHistory(models.TransientModel):
'If it is left blank then all warehouses and inventory '
'will be considered.')
@api.multi
@api.depends('history_start', 'history_end')
def _compute_history_days(self):
for wiz in self:
@@ -32,7 +31,6 @@ class PurchaseBySaleHistory(models.TransientModel):
delta = fields.Date.from_string(wiz.history_end) - fields.Date.from_string(wiz.history_start)
wiz.history_days = delta.days
@api.multi
@api.depends('purchase_id', 'purchase_id.order_line', 'purchase_id.partner_id')
def _compute_product_count(self):
for wiz in self:
@@ -130,7 +128,6 @@ class PurchaseBySaleHistory(models.TransientModel):
for line in other_lines:
line._onchange_quantity()
@api.multi
def action_confirm(self):
self.ensure_one()
history_product_ids = self._history_product_ids()

View File

@@ -32,7 +32,6 @@
<record id="purchase_sale_history_make_action" model="ir.actions.act_window">
<field name="name">Fill PO From Sales History</field>
<field name="res_model">purchase.sale.history.make</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="purchase_sale_history_make_form"/>
<field name="target">new</field>