-
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed full refund (VOID, ex annullamento) and partially refund (ex. R…
…eso Merce). Added Fiscal Operator to User and Employee
- Loading branch information
Showing
14 changed files
with
299 additions
and
237 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
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 |
---|---|---|
@@ -1,25 +1,15 @@ | ||
from odoo import api, fields, models | ||
|
||
from odoo import _, api, fields, models | ||
from odoo.exceptions import ValidationError | ||
|
||
class HrEmployeeBase(models.AbstractModel): | ||
|
||
_inherit = 'hr.employee.base' | ||
class HrEmployeeInherit(models.AbstractModel): | ||
_inherit = "hr.employee" | ||
|
||
fiscal_operator_number = fields.Char("Fiscal Printer Operator",size=1, default="1",tracking=True) | ||
fiscal_operator_number = fields.Char( | ||
string="Fiscal Printer Operator", size=1, default="1", tracking=True | ||
) | ||
|
||
class HrEmployee(models.AbstractModel): | ||
_inherit = 'hr.employee' | ||
|
||
fiscal_operator_number = fields.Char("Fiscal Printer Operator",size=1, default="1",tracking=True) | ||
|
||
@api.depends('fiscal_operator_number') | ||
@api.onchange("fiscal_operator_number") | ||
def _onchange_fiscal_operator_number(self): | ||
for rec in self: | ||
if rec.user_id: | ||
rec.user_id.fiscal_operator_number = rec.fiscal_operator_number | ||
|
||
class ResUsers(models.Model): | ||
_inherit = 'res.users' | ||
|
||
fiscal_operator_number = fields.Char("Fiscal Printer Operator",size=1, default="1") |
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,10 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class HrEmployeeBaseInherit(models.AbstractModel): | ||
_name = "hr.employee.base" | ||
_inherit = ["hr.employee.base", "mail.thread"] | ||
|
||
fiscal_operator_number = fields.Char( | ||
string="Fiscal Printer Operator", size=1, default="1", tracking=True | ||
) |
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,9 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class ResUsersInherit(models.Model): | ||
_inherit = "res.users" | ||
|
||
fiscal_operator_number = fields.Char( | ||
string="Fiscal Printer Operator", size=1, default="1" | ||
) |
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
Oops, something went wrong.