diff --git a/golem_resource_account/wizard/golem_reservation_add_to_invoice.py b/golem_resource_account/wizard/golem_reservation_add_to_invoice.py index 8c993ca..bd50295 100644 --- a/golem_resource_account/wizard/golem_reservation_add_to_invoice.py +++ b/golem_resource_account/wizard/golem_reservation_add_to_invoice.py @@ -17,7 +17,7 @@ # along with this program. If not, see . """ GOLEM Reservation's Adding to invoice wizard""" -from odoo import models, fields, api, _ +from odoo import models, fields class GolemReservationAddToInvoiceWizard(models.TransientModel): """GOLEM Reservation Add to Invoice Wizard """ @@ -25,30 +25,3 @@ class GolemReservationAddToInvoiceWizard(models.TransientModel): invoice_ids = fields.Many2many('account.invoice', string="Partner invoice list") reservation_id = fields.Many2one('golem.resource.reservation') - - keyword = fields.Char(required=True) - member_ids = fields.Many2many('golem.member', string='Members') - contact_ids = fields.Many2many('res.partner', string='Contacts') - - @api.multi - def action(self): - """ Returns action window with current model and instance """ - self.ensure_one() - return {'name' : _('Search results'), - 'type' : 'ir.actions.act_window', - 'res_model' : self._name, - 'res_id': self[0].id, - 'view_mode': 'form', - 'target': 'new'} - - @api.multi - def search_partners(self): - """ Searches partners in name, email """ - self.ensure_one() - domain = ['|', - ('name', 'ilike', self[0].keyword), - ('email', 'ilike', self[0].keyword)] - partner_ids = self.env['res.partner'].search(domain) - self[0].write({'contact_ids': [(6, False, partner_ids.ids)], - 'member_ids': [(6, False, partner_ids.mapped('member_id').ids)]}) - return self[0].action() diff --git a/golem_resource_account/wizard/golem_reservation_add_to_invoice_views.xml b/golem_resource_account/wizard/golem_reservation_add_to_invoice_views.xml index cec5717..47a077b 100644 --- a/golem_resource_account/wizard/golem_reservation_add_to_invoice_views.xml +++ b/golem_resource_account/wizard/golem_reservation_add_to_invoice_views.xml @@ -24,16 +24,19 @@ along with this program. If not, see . golem.reservation.add.to.invoice.wizard
- - - - - -