@@ -9,6 +9,7 @@
'account',
'purchase',
'eiru_bank_payments_references',
+ 'eiru_payments_invoices',
'eiru_sidebar_toggler',
'eiru_topbar_toggler'
],
@@ -128,9 +128,7 @@ def process_data(data=None):
account_voucher = create_account_voucher(account_move.id, journal_id, currency_id, payment)
close_invoice(invoice_ids)
- statement_lines = create_bank_statement_lines(account_voucher.id)
- bank_statement = create_bank_statement(account_voucher.id, statement_lines, date_now)
-
+ bank_statement = invoice.create_bank_statement(date_now, user_id, account_voucher, None)
return bank_statement.id
def complete_order(order_id):
@@ -21,5 +21,10 @@ def get_pricelist_id(currency_id):
})
else:
pricelist = pricelist.filtered(lambda p: p.currency_id.id == currency_id)
+
+ if len(pricelist) > 1:
+ pricelist = pricelist[0]
+ # 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
return pricelist.id
@@ -64,6 +64,9 @@ def create_purchase_order(supplier_id, cart_items, date_order, currency_id, pric
'product_uom': product.uom_id.id
}]]
+ if warehouse_id == None:
+ warehouse_id = r.env['stock.warehouse'].browse([1])
values = {
'name': '/',
'partner_id': supplier_id,