-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD][F#28475][S#17530]Batch send to scales
- Loading branch information
Nguyen Van Tin
committed
Jun 8, 2018
1 parent
e74cf4b
commit b8a15ba
Showing
10 changed files
with
80 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
from . import models | ||
from . import wizard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-Today: La Louve (<http://www.lalouve.fr/>) | ||
# @author: La Louve | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html | ||
|
||
from . import confirm_update_wizard |
19 changes: 19 additions & 0 deletions
19
louve_addons/product_to_scale_bizerba/wizard/confirm_update_wizard.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-Today: La Louve (<http://www.lalouve.fr/>) | ||
# @author: La Louve | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html | ||
|
||
from openerp import models, fields, api | ||
|
||
|
||
class ConfirmUpdateWizard(models.TransientModel): | ||
_name = 'confirm.update.wizard' | ||
_description = 'Confirm Update Wizard' | ||
|
||
@api.multi | ||
def confirm_update(self): | ||
self.ensure_one() | ||
products_to_send = self.env['product.product'].search([ | ||
('scale_group_id', '!=', False)]) | ||
products_to_send.send_scale_write() | ||
return True |
26 changes: 26 additions & 0 deletions
26
louve_addons/product_to_scale_bizerba/wizard/confirm_update_wizard_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
|
||
<record id="view_confirm_update_wizard_form" model="ir.ui.view"> | ||
<field name="name">view.confirm.update.wizard.form</field> | ||
<field name="model">confirm.update.wizard</field> | ||
<field name="arch" type="xml"> | ||
<form string="Confirmation"> | ||
<footer> | ||
<button name="confirm_update" type="object" string="Confirm" class="btn btn-primary o_sale_confirm"/> | ||
<button name="button_cancel" special="cancel" string="Cancel" class="oe_link"/> | ||
</footer> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="action_product_scale_force_update" model="ir.actions.act_window"> | ||
<field name="name">Force Update</field> | ||
<field name="type">ir.actions.act_window</field> | ||
<field name="res_model">confirm.update.wizard</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">form</field> | ||
<field name="target">new</field> | ||
</record> | ||
|
||
</odoo> |