From cf8c398be7bb48fc54f45bfa354ba7d3b38e02d8 Mon Sep 17 00:00:00 2001 From: Franco Leyes Date: Wed, 18 Dec 2024 10:45:22 -0300 Subject: [PATCH] [ADD] demo_academic: add new module X-original-commit: f6e054c1af6e56eea989c52ac6dbd1eac0fddda1 --- academic/demo/res_partner_demo.xml | 2 + demo_academic/README.rst | 70 +++++ demo_academic/__init__.py | 3 + demo_academic/__manifest__.py | 32 +++ demo_academic/demo/academic.level.csv | 5 + demo_academic/demo/academic.section.csv | 4 + demo_academic/demo/academic_group.xml | 30 +++ demo_academic/demo/init_demo_py.xml | 8 + demo_academic/demo/loyalty_program.xml | 10 + demo_academic/demo/loyalty_rule.xml | 6 + demo_academic/demo/product_pricelist.xml | 12 + demo_academic/demo/product_template.xml | 108 ++++++++ demo_academic/demo/res.partner.link.csv | 21 ++ demo_academic/demo/res_partner.xml | 250 ++++++++++++++++++ demo_academic/demo/res_partner_category.xml | 8 + demo_academic/demo/res_users.xml | 11 + demo_academic/demo_py/__init__.py | 7 + .../demo_py/base_language_install.py | 15 ++ demo_academic/demo_py/loyalty_reward.py | 37 +++ demo_academic/demo_py/product_template.py | 29 ++ demo_academic/demo_py/sale_order.py | 74 ++++++ demo_academic/demo_py/sale_order_template.py | 59 +++++ demo_academic/i18n/es.po | 182 +++++++++++++ 23 files changed, 983 insertions(+) create mode 100644 demo_academic/README.rst create mode 100644 demo_academic/__init__.py create mode 100644 demo_academic/__manifest__.py create mode 100644 demo_academic/demo/academic.level.csv create mode 100644 demo_academic/demo/academic.section.csv create mode 100644 demo_academic/demo/academic_group.xml create mode 100644 demo_academic/demo/init_demo_py.xml create mode 100644 demo_academic/demo/loyalty_program.xml create mode 100644 demo_academic/demo/loyalty_rule.xml create mode 100644 demo_academic/demo/product_pricelist.xml create mode 100644 demo_academic/demo/product_template.xml create mode 100644 demo_academic/demo/res.partner.link.csv create mode 100644 demo_academic/demo/res_partner.xml create mode 100644 demo_academic/demo/res_partner_category.xml create mode 100644 demo_academic/demo/res_users.xml create mode 100644 demo_academic/demo_py/__init__.py create mode 100644 demo_academic/demo_py/base_language_install.py create mode 100644 demo_academic/demo_py/loyalty_reward.py create mode 100644 demo_academic/demo_py/product_template.py create mode 100644 demo_academic/demo_py/sale_order.py create mode 100644 demo_academic/demo_py/sale_order_template.py create mode 100644 demo_academic/i18n/es.po diff --git a/academic/demo/res_partner_demo.xml b/academic/demo/res_partner_demo.xml index 3bec9263..e567b900 100644 --- a/academic/demo/res_partner_demo.xml +++ b/academic/demo/res_partner_demo.xml @@ -4,11 +4,13 @@ Colegio Los Arroyos + Colegio Los Molinos + diff --git a/demo_academic/README.rst b/demo_academic/README.rst new file mode 100644 index 00000000..944f22bb --- /dev/null +++ b/demo_academic/README.rst @@ -0,0 +1,70 @@ +.. |company| replace:: ADHOC SA + +.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png + :alt: ADHOC SA + :target: https://www.adhoc.com.ar + +.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png + +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +============= +Demo Academic +============= + + + +Installation +============ + +To install this module, you need to: + +#. Only need to install the module + +Configuration +============= + +To configure this module, you need to: + +#. Nothing to configure + +Usage +===== + +To use this module, you need to: + +#. Nothing to do + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: http://runbot.adhoc.com.ar/ + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* |company| |icon| + +Contributors +------------ + +Maintainer +---------- + +|company_logo| + +This module is maintained by the |company|. + +To contribute to this module, please visit https://www.adhoc.com.ar. diff --git a/demo_academic/__init__.py b/demo_academic/__init__.py new file mode 100644 index 00000000..450cd8be --- /dev/null +++ b/demo_academic/__init__.py @@ -0,0 +1,3 @@ +# © 2016 ADHOC SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from . import demo_py diff --git a/demo_academic/__manifest__.py b/demo_academic/__manifest__.py new file mode 100644 index 00000000..5af099d9 --- /dev/null +++ b/demo_academic/__manifest__.py @@ -0,0 +1,32 @@ +# © 2016 ADHOC SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + 'name': 'Demo Academic', + 'version': "18.0.1.0.0", + 'sequence': 14, + 'summary': '', + 'author': 'ADHOC SA', + 'website': 'www.adhoc.com.ar', + 'license': 'AGPL-3', + 'depends': [ + 'academic_sale_subscription', + 'sale_subscription_loyalty_ux', + 'sale_loyalty_ux', + ], + 'demo': [ + 'demo/res_partner_category.xml', + 'demo/res_partner.xml', + 'demo/res.partner.link.csv', + 'demo/product_template.xml', + 'demo/product_pricelist.xml', + 'demo/academic.section.csv', + 'demo/academic.level.csv', + 'demo/academic_group.xml', + 'demo/res_users.xml', + 'demo/loyalty_program.xml', + 'demo/init_demo_py.xml', + ], + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/demo_academic/demo/academic.level.csv b/demo_academic/demo/academic.level.csv new file mode 100644 index 00000000..8279108f --- /dev/null +++ b/demo_academic/demo/academic.level.csv @@ -0,0 +1,5 @@ +id,name,section_id/id +academic_level_pink_room,Pink Room,academic_section_initial_level +academic_level_blue_room,Blue Room,academic_section_initial_level +academic_level_1st_year_secondary,1st Year Secondary Level,academic_section_secondary_level +academic_level_1st_grade_primary,1st Grade Primary Level,academic_section_primary_level diff --git a/demo_academic/demo/academic.section.csv b/demo_academic/demo/academic.section.csv new file mode 100644 index 00000000..38fc1fb8 --- /dev/null +++ b/demo_academic/demo/academic.section.csv @@ -0,0 +1,4 @@ +id,name +academic_section_initial_level,Initial Level +academic_section_primary_level,Primary Level +academic_section_secondary_level,Secondary Level diff --git a/demo_academic/demo/academic_group.xml b/demo_academic/demo/academic_group.xml new file mode 100644 index 00000000..44a062ee --- /dev/null +++ b/demo_academic/demo/academic_group.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo_academic/demo/init_demo_py.xml b/demo_academic/demo/init_demo_py.xml new file mode 100644 index 00000000..25b77eed --- /dev/null +++ b/demo_academic/demo/init_demo_py.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/demo_academic/demo/loyalty_program.xml b/demo_academic/demo/loyalty_program.xml new file mode 100644 index 00000000..84785f52 --- /dev/null +++ b/demo_academic/demo/loyalty_program.xml @@ -0,0 +1,10 @@ + + + Discount 10% for Sibling + + + + Discount 20% for Official's Child + + + diff --git a/demo_academic/demo/loyalty_rule.xml b/demo_academic/demo/loyalty_rule.xml new file mode 100644 index 00000000..1f07b865 --- /dev/null +++ b/demo_academic/demo/loyalty_rule.xml @@ -0,0 +1,6 @@ + + + 0 + [("recurring_invoice", "=", True)] + + diff --git a/demo_academic/demo/product_pricelist.xml b/demo_academic/demo/product_pricelist.xml new file mode 100644 index 00000000..915fd0d9 --- /dev/null +++ b/demo_academic/demo/product_pricelist.xml @@ -0,0 +1,12 @@ + + + + Los Molinos Pricelist + + + Los Arroyos Pricelist + + + APDES Pricelist + + diff --git a/demo_academic/demo/product_template.xml b/demo_academic/demo/product_template.xml new file mode 100644 index 00000000..37322ae0 --- /dev/null +++ b/demo_academic/demo/product_template.xml @@ -0,0 +1,108 @@ + + + + Enrollment Pink Room + service + + 5000.0 + order + + + Enrollment Blue Room + service + + 5000.0 + order + + + Tuition Pink Room + service + + 10000.0 + order + + + Tuition Blue Room + service + + 10000.0 + order + + + Enrollment Primary Level + service + + 7000.0 + order + + + Enrollment Secondary Level + service + + 7500.0 + order + + + Tuition Primary Level + service + + 12000.0 + order + + + Tuition Secondary Level + service + + 13000.0 + order + + + Interest Due Debt + service + + 0.0 + order + + + Late Payment Fee + service + + 500.0 + order + + + Extracurricular Sports + service + + 3000.0 + order + + + Extracurricular English + service + + 4000.0 + order + + + Extracurricular Swimming + service + + 3500.0 + order + + + Discount for Official's Child + service + + -2000.0 + order + + + Discount for Sibling + service + + -1500.0 + order + + diff --git a/demo_academic/demo/res.partner.link.csv b/demo_academic/demo/res.partner.link.csv new file mode 100644 index 00000000..8353c2f6 --- /dev/null +++ b/demo_academic/demo/res.partner.link.csv @@ -0,0 +1,21 @@ +id,student_id/id,partner_id/id,relationship_id/id,role_ids/id,note +res_partner_link_family_1_mother_1,res_partner_family_1,res_partner_mother_1,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role", +res_partner_link_family_1_father_1,res_partner_family_1,res_partner_father_1,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role,academic.paying_role", +res_partner_link_family_2_mother_2,res_partner_family_2,res_partner_mother_2,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role,academic.paying_role", +res_partner_link_family_2_father_2,res_partner_family_2,res_partner_father_2,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role", +res_partner_link_family_3_mother_3,res_partner_family_3,res_partner_mother_3,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role,academic.paying_role", +res_partner_link_family_3_father_3,res_partner_family_3,res_partner_father_3,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role", +res_partner_link_family_4_mother_4,res_partner_family_4,res_partner_mother_4,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role,academic.paying_role", +res_partner_link_family_4_father_4,res_partner_family_4,res_partner_father_4,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role", +res_partner_link_family_5_mother_5,res_partner_family_5,res_partner_mother_5,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role,academic.paying_role", +res_partner_link_family_5_father_5,res_partner_family_5,res_partner_father_5,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role", +res_partner_link_family_6_mother_6,res_partner_family_6,res_partner_mother_6,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role,academic.paying_role", +res_partner_link_family_6_father_6,res_partner_family_6,res_partner_father_6,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role", +res_partner_link_family_7_mother_7,res_partner_family_7,res_partner_mother_7,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role,academic.paying_role", +res_partner_link_family_7_father_7,res_partner_family_7,res_partner_father_7,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role", +res_partner_link_family_8_mother_8,res_partner_family_8,res_partner_mother_8,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role,academic.paying_role", +res_partner_link_family_8_father_8,res_partner_family_8,res_partner_father_8,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role", +res_partner_link_family_9_mother_9,res_partner_family_9,res_partner_mother_9,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role,academic.paying_role", +res_partner_link_family_9_father_9,res_partner_family_9,res_partner_father_9,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role", +res_partner_link_family_10_mother_10,res_partner_family_10,res_partner_mother_10,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role,academic.paying_role", +res_partner_link_family_10_father_10,res_partner_family_10,res_partner_father_10,academic.parent_relationship,"academic.emergency_contact_role,academic.withdraw_role" diff --git a/demo_academic/demo/res_partner.xml b/demo_academic/demo/res_partner.xml new file mode 100644 index 00000000..34cce802 --- /dev/null +++ b/demo_academic/demo/res_partner.xml @@ -0,0 +1,250 @@ + + + + + Gonzalez Family + family + + + + Rodriguez Family + family + + + + Perez Family + family + + + + Lopez Family + family + + + + Martinez Family + family + + + + Fernandez Family + family + + + + Gomez Family + family + + + + Ramirez Family + family + + + + Torres Family + family + + + + Diaz Family + family + + + + + + Juan Gonzalez + student + + 40123456 + + + + + Maria Rodriguez + student + + 41234567 + + + + + Luis Perez + student + + 42345678 + + + + + Sofia Lopez + student + + 43345678 + + + + + Valentina Martinez + student + + 44345678 + + + + Mateo Fernandez + student + + 45345678 + + + + + Lucia Gomez + student + + 46345678 + + + + Santiago Ramirez + student + + 47345678 + + + + Florencia Torres + student + + 48345678 + + + + + Tomas Diaz + student + + 49345678 + + + + + + Ana Gonzalez + parent + + + + Laura Rodriguez + parent + + + + Patricia Perez + parent + + + + Elena Lopez + parent + + + + Clara Martinez + parent + + + + Sofia Fernandez + parent + + + + Gabriela Gomez + parent + + + + Andrea Ramirez + parent + + + + Marta Torres + parent + + + + Paula Diaz + parent + + + + + + Carlos Gonzalez + parent + + + + Javier Rodriguez + parent + + + + Fernando Perez + parent + + + + Martin Lopez + parent + + + + Jose Martinez + parent + + + + Ricardo Fernandez + parent + + + + Adrian Gomez + parent + + + + Oscar Ramirez + parent + + + + Manuel Torres + parent + + + + Pablo Diaz + parent + + + + + + Internet provider + + + Light provider + + + Gas supplier + + + Accounting firm + + diff --git a/demo_academic/demo/res_partner_category.xml b/demo_academic/demo/res_partner_category.xml new file mode 100644 index 00000000..faaafd56 --- /dev/null +++ b/demo_academic/demo/res_partner_category.xml @@ -0,0 +1,8 @@ + + + Sibling Discount 10% + + + Official's Child Discount 20% + + diff --git a/demo_academic/demo/res_users.xml b/demo_academic/demo/res_users.xml new file mode 100644 index 00000000..5984e9a1 --- /dev/null +++ b/demo_academic/demo/res_users.xml @@ -0,0 +1,11 @@ + + + + + parent_portal_1@academic.com + parent_portal_1@academic.com + + + + + diff --git a/demo_academic/demo_py/__init__.py b/demo_academic/demo_py/__init__.py new file mode 100644 index 00000000..7853b470 --- /dev/null +++ b/demo_academic/demo_py/__init__.py @@ -0,0 +1,7 @@ +# © 2016 ADHOC SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from . import base_language_install +from . import sale_order +from . import sale_order_template +from . import loyalty_reward +from . import product_template diff --git a/demo_academic/demo_py/base_language_install.py b/demo_academic/demo_py/base_language_install.py new file mode 100644 index 00000000..9aaf3d77 --- /dev/null +++ b/demo_academic/demo_py/base_language_install.py @@ -0,0 +1,15 @@ +from odoo import models, api + + +class BaseLanguageInstall(models.TransientModel): + _inherit = "base.language.install" + + @api.model + def _init_demo_base(self): + lang_ids = self.env['res.lang'].with_context(active_test=False).search([('code', 'in', ['es_AR', 'es_UY', 'es_CL'])]).ids + installer = self.env['base.language.install'].create({'lang_ids': [(6, 0, lang_ids)]}) + installer.lang_install() + for company in self.env['res.company'].search([('id', '!=', self.env.ref('base.main_company').id)]): + self.env['ir.default'].set('res.partner', 'lang', 'es_AR', company_id = company.id) + self.env['res.partner'].with_context(active_test=False).search( + [('id', 'not in', [self.env.ref('base.partner_root').id])]).write({'lang': 'es_AR'}) diff --git a/demo_academic/demo_py/loyalty_reward.py b/demo_academic/demo_py/loyalty_reward.py new file mode 100644 index 00000000..92ed2d4b --- /dev/null +++ b/demo_academic/demo_py/loyalty_reward.py @@ -0,0 +1,37 @@ +############################################################################## +# For copyright and license notices, see __manifest__.py file in module root +# directory +############################################################################## +from odoo import api, models + + +class LoyaltyReward(models.Model): + _inherit = 'loyalty.reward' + + @api.model + def _init_demo_base(self): + self.env['loyalty.reward'].create({ + 'discount': 10, + 'discount_applicability': 'specific', + 'discount_product_domain': str([ + "&", + ("recurring_invoice", "=", True), + ('product_variant_ids.name', 'in', ['Tuition', 'Arancel']), + ]), + 'description': "10% discount", + 'discount_line_product_id': self.env.ref('demo_academic.product_template_discount_sibling').product_variant_id.id, + 'program_id': self.env.ref('demo_academic.loyalty_program_discount_sibling').id + }) + + self.env['loyalty.reward'].create({ + 'discount': 20, + 'discount_applicability': 'specific', + 'discount_product_domain': str([ + "&", + ("recurring_invoice", "=", True), + ('product_variant_ids.name', 'in', ['Tuition', 'Arancel']), + ]), + 'description': "20% discount", + 'discount_line_product_id': self.env.ref('demo_academic.product_template_official_discount').product_variant_id.id, + 'program_id': self.env.ref('demo_academic.loyalty_program_discount_official').id + }) diff --git a/demo_academic/demo_py/product_template.py b/demo_academic/demo_py/product_template.py new file mode 100644 index 00000000..125d88b9 --- /dev/null +++ b/demo_academic/demo_py/product_template.py @@ -0,0 +1,29 @@ +from odoo import models, api +import logging + +_logger = logging.getLogger(__name__) + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + @api.model + def _init_demo_base(self): + product_ids_in_module = self.env['ir.model.data'].search([ + ('module', '=', 'demo_academic'), + ('model', '=', 'product.template') + ]).mapped('res_id') + + products = self.env['product.template'].search([ + ('id', 'not in', product_ids_in_module), + ('active', '=', True) + ]) + + for product in products: + try: + product.active = False + except Exception as e: + _logger.info( + "No se pudo archivar el producto %s (ID: %s). Error: %s", + product.display_name, product.id, str(e) + ) diff --git a/demo_academic/demo_py/sale_order.py b/demo_academic/demo_py/sale_order.py new file mode 100644 index 00000000..643c72f9 --- /dev/null +++ b/demo_academic/demo_py/sale_order.py @@ -0,0 +1,74 @@ +############################################################################## +# For copyright and license notices, see __manifest__.py file in module root +# directory +############################################################################## +from odoo import models, fields, api + + +class SaleOrder(models.Model): + _inherit = 'sale.order' + + active = fields.Boolean(default=True) + + @api.model + def _init_demo_base(self): + if self.env['ir.module.module'].search([('name', '=', 'sale_exception'), ('state', '=', 'installed')], limit=1): + self.env['exception.rule'].search([('active', '=', True)]).write({'active': False}) + + self.search([]).active = False + + student = self.env.ref('demo_academic.res_partner_student_1') + + product_enrollment = self.env.ref('demo_academic.product_template_enrollment_secondary_level') + product_tuition = self.env.ref('demo_academic.product_template_tuition_secondary_level') + product_english = self.env.ref('demo_academic.product_template_extracurricular_english') + + plan = self.env.ref('sale_subscription.subscription_plan_month') + + orders = self.create([ + { + 'partner_id': student.id, + 'plan_id': plan.id, + 'order_line': [ + (0, 0, {'product_id': product_enrollment.product_variant_id.id, 'product_uom_qty': 1}), + ], + }, + { + 'partner_id': student.id, + 'plan_id': plan.id, + 'order_line': [ + (0, 0, {'product_id': product_tuition.product_variant_id.id, 'product_uom_qty': 1}), + ], + }, + { + 'partner_id': student.id, + 'plan_id': plan.id, + 'order_line': [ + (0, 0, {'product_id': product_english.product_variant_id.id, 'product_uom_qty': 1}), + ], + }, + ]) + + for order in orders: + order.action_confirm() + order._create_invoices() + invoices = orders.mapped('invoice_ids') + + invoices[0].action_post() + self._create_payment(invoices[0], invoices[0].amount_total) + + invoices[1].action_post() + self._create_payment(invoices[1], invoices[1].amount_total / 2) + + invoices[2].action_post() + + def _create_payment(self, invoice, amount): + register_wizard = self.env['account.payment.register'].with_context({ + 'active_model': 'account.move', + 'active_ids': [invoice.id], + }) + register_wizard_obj = register_wizard.create({ + 'journal_id': self.env['account.journal'].search([('type', '=', 'bank')], limit=1).id, + 'amount': amount + }) + register_wizard_obj.action_create_payments() diff --git a/demo_academic/demo_py/sale_order_template.py b/demo_academic/demo_py/sale_order_template.py new file mode 100644 index 00000000..e41997f8 --- /dev/null +++ b/demo_academic/demo_py/sale_order_template.py @@ -0,0 +1,59 @@ +############################################################################## +# For copyright and license notices, see __manifest__.py file in module root +# directory +############################################################################## +from odoo import api, models + + +class SaleOrderTemplate(models.Model): + _inherit = 'sale.order.template' + + @api.model + def _init_demo_base(self): + products = { + 'product_template_enrollment_pink_room': self.env.ref('demo_academic.product_template_enrollment_pink_room').product_variant_id, + 'product_template_tuition_pink_room': self.env.ref('demo_academic.product_template_tuition_pink_room').product_variant_id, + 'product_template_enrollment_blue_room': self.env.ref('demo_academic.product_template_enrollment_blue_room').product_variant_id, + 'product_template_tuition_blue_room': self.env.ref('demo_academic.product_template_tuition_blue_room').product_variant_id, + 'product_template_enrollment_primary_level': self.env.ref('demo_academic.product_template_enrollment_primary_level').product_variant_id, + 'product_template_tuition_primary_level': self.env.ref('demo_academic.product_template_tuition_primary_level').product_variant_id, + 'product_template_enrollment_secondary_level': self.env.ref('demo_academic.product_template_enrollment_secondary_level').product_variant_id, + 'product_template_tuition_secondary_level': self.env.ref('demo_academic.product_template_tuition_secondary_level').product_variant_id, + } + + templates_data = [ + { + 'name': 'Pink Room - Initial Level', + 'plan_id': self.env.ref('sale_subscription.subscription_plan_month').id, + 'sale_order_template_line_ids': [ + (0, 0, {'product_id': products['product_template_enrollment_pink_room'].id}), + (0, 0, {'product_id': products['product_template_tuition_pink_room'].id}), + ], + }, + { + 'name': 'Blue Room - Initial Level', + 'plan_id': self.env.ref('sale_subscription.subscription_plan_month').id, + 'sale_order_template_line_ids': [ + (0, 0, {'product_id': products['product_template_enrollment_blue_room'].id}), + (0, 0, {'product_id': products['product_template_tuition_blue_room'].id}), + ], + }, + { + 'name': '1st Grade Primary Level - Primary Level', + 'plan_id': self.env.ref('sale_subscription.subscription_plan_month').id, + 'sale_order_template_line_ids': [ + (0, 0, {'product_id': products['product_template_enrollment_primary_level'].id}), + (0, 0, {'product_id': products['product_template_tuition_primary_level'].id}), + ], + }, + { + 'name': '1st Year Secondary Level - Secondary Level', + 'plan_id': self.env.ref('sale_subscription.subscription_plan_month').id, + 'sale_order_template_line_ids': [ + (0, 0, {'product_id': products['product_template_enrollment_secondary_level'].id}), + (0, 0, {'product_id': products['product_template_tuition_secondary_level'].id}), + ], + }, + ] + + self.create(templates_data) diff --git a/demo_academic/i18n/es.po b/demo_academic/i18n/es.po new file mode 100644 index 00000000..645e57b2 --- /dev/null +++ b/demo_academic/i18n/es.po @@ -0,0 +1,182 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * demo_academic +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-01-17 18:47+0000\n" +"PO-Revision-Date: 2025-01-17 18:47+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: demo_academic +#: model:academic.level,name:demo_academic.academic_level_1st_grade_primary +msgid "1st Grade Primary Level" +msgstr "Nivel Primario de Primer Grado" + +#. module: demo_academic +#: model:academic.level,name:demo_academic.academic_level_1st_year_secondary +msgid "1st Year Secondary Level" +msgstr "Nivel Secundario de Primer Año" + +#. module: demo_academic +#: model:product.pricelist,name:demo_academic.product_pricelist_apdes +msgid "APDES Pricelist" +msgstr "Lista de precios APDES" + +#. module: demo_academic +#: model:ir.model.fields,field_description:demo_academic.field_sale_order__active +msgid "Active" +msgstr "" + +#. module: demo_academic +#: model:academic.level,name:demo_academic.academic_level_blue_room +msgid "Blue Room" +msgstr "Sala Azul" + +#. module: demo_academic +#: model:loyalty.program,name:demo_academic.loyalty_program_discount_sibling +msgid "Discount 10% for Sibling" +msgstr "Descuento del 10% para Hermanos" + +#. module: demo_academic +#: model:loyalty.program,name:demo_academic.loyalty_program_discount_official +msgid "Discount 20% for Official's Child" +msgstr "Descuento del 20% para Hijos de Funcionarios" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_official_discount +msgid "Discount for Official's Child" +msgstr "Descuento para Hijos de Funcionarios" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_discount_sibling +msgid "Discount for Sibling" +msgstr "Descuento para Hermanos" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_enrollment_blue_room +msgid "Enrollment Blue Room" +msgstr "Matrícula Sala Azul" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_enrollment_pink_room +msgid "Enrollment Pink Room" +msgstr "Matrícula Sala Rosa" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_enrollment_primary_level +msgid "Enrollment Primary Level" +msgstr "Matrícula Nivel Primario" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_enrollment_secondary_level +msgid "Enrollment Secondary Level" +msgstr "Matrícula Nivel Secundario" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_extracurricular_english +msgid "Extracurricular English" +msgstr "Inglés Extracurricular" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_extracurricular_sports +msgid "Extracurricular Sports" +msgstr "Deportes Extracurriculares" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_extracurricular_swimming +msgid "Extracurricular Swimming" +msgstr "Natación Extracurricular" + +#. module: demo_academic +#: model:ir.model,name:demo_academic.model_base_language_install +msgid "Install Language" +msgstr "Instalar idioma" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_interest_due_debt +msgid "Interest Due Debt" +msgstr "Intereses por Deuda" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_late_payment_fee +msgid "Late Payment Fee" +msgstr "Recargo por Mora" + +#. module: demo_academic +#: model:product.pricelist,name:demo_academic.product_pricelist_los_arroyos +msgid "Los Arroyos Pricelist" +msgstr "Lista de Precios Los Arroyos" + +#. module: demo_academic +#: model:product.pricelist,name:demo_academic.product_pricelist_los_molinos +msgid "Los Molinos Pricelist" +msgstr "Lista de Precios Los Molinos" + +#. module: demo_academic +#: model:ir.model,name:demo_academic.model_loyalty_reward +msgid "Loyalty Reward" +msgstr "Recompensa de lealtad" + +#. module: demo_academic +#: model:res.partner.category,name:demo_academic.partner_category_discount_official +msgid "Official's Child Discount 20%" +msgstr "Descuento del 20% para Hijos de Funcionarios" + +#. module: demo_academic +#: model:academic.level,name:demo_academic.academic_level_pink_room +msgid "Pink Room" +msgstr "Sala Rosa" + +#. module: demo_academic +#: model:loyalty.program,portal_point_name:demo_academic.loyalty_program_discount_official +#: model:loyalty.program,portal_point_name:demo_academic.loyalty_program_discount_sibling +msgid "Points" +msgstr "Puntos" + +#. module: demo_academic +#: model:ir.model,name:demo_academic.model_product_template +msgid "Product" +msgstr "Producto" + +#. module: demo_academic +#: model:ir.model,name:demo_academic.model_sale_order_template +msgid "Quotation Template" +msgstr "Plantilla de cotización" + +#. module: demo_academic +#: model:ir.model,name:demo_academic.model_sale_order +msgid "Sales Order" +msgstr "Orden de venta" + +#. module: demo_academic +#: model:res.partner.category,name:demo_academic.partner_category_discount_sibling +msgid "Sibling Discount 10%" +msgstr "Descuento del 10% para Hermanos" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_tuition_blue_room +msgid "Tuition Blue Room" +msgstr "Arancel Sala Azul" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_tuition_pink_room +msgid "Tuition Pink Room" +msgstr "Arancel Sala Rosa" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_tuition_primary_level +msgid "Tuition Primary Level" +msgstr "Arancel Nivel Primario" + +#. module: demo_academic +#: model:product.template,name:demo_academic.product_template_tuition_secondary_level +msgid "Tuition Secondary Level" +msgstr "Arancel Nivel Secundario"