Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cure blindness branding #2

Open
wants to merge 3 commits into
base: develop_branch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
25 changes: 25 additions & 0 deletions cure_blindness_branding/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@


{
'name': 'Cure Blindness UI',
'version': '1.0',
'summary': 'Cure Blindness UI',
'description': """
Updating of the Cure Blindness branding UI.
""",
'license': 'LGPL-3',


'assets': {
'web.assets_backend': [
'cure_blindness_branding/static/src/scss/index.scss',
],
'web.assets_frontend': [
'cure_blindness_branding/static/src/scss/index.scss',
],
},

'installable': True,
'auto_install': False,
'application': True,
}
67 changes: 67 additions & 0 deletions cure_blindness_branding/static/src/scss/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Primary color
$o-brand-primary: #284251 !important;
$o-brand-primary-text: #284251 !important;
$o-brand-btn: #88af28;
$body-font-size: 14px;


body {
font-family: 'Poppins', sans-serif !important;
font-size: var(--body-font-size);
}

.o_main_navbar {
background: $o-brand-primary;
border-bottom: 1px solid $o-brand-primary;
color: #FFFFFF !important;
}
.o_nav_entry {
color: #FFFFFF !important;
}
.o_navbar{
color: #FFFFFF !important;
}



.btn-primary {

background-color: $o-brand-btn;
border-color: $o-brand-btn;
}
.btn-fill-odoo, .btn-odoo {
color: #FFFFFF;
background-color: $o-brand-btn;
border-color: $o-brand-btn;
}
.btn-secondary {
color: $o-brand-primary;
}
.btn-outline-primary {
color: $o-brand-btn;
border-color: $o-brand-btn;
}

hr{
color: $o-brand-primary;
}

.o_kanban_renderer .oe_kanban_color_11:after {
background-color: $o-brand-primary;
outline: 1px solid $o-brand-primary;
}

.o_searchview_facet .o_searchview_facet_label{
background: $o-brand-primary;
}

.form-check-input::after{
background-color: $o-brand-primary;
border-color: $o-brand-primary;
}



.nav-link {
color: $o-brand-primary-text;
}
205 changes: 79 additions & 126 deletions custom_pos_receipt/views/invoice_layout.xml
Original file line number Diff line number Diff line change
@@ -1,140 +1,93 @@
<odoo>
<template id="report_invoice_pos_custom" inherit_id="account.report_invoice_document">
<xpath expr="//div[contains(@class, 'page')]" position="replace">
<div class="page" style="margin: 0; padding: 0;">
<style>
.invoice-row {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 20px;
}
<xpath expr="//t[@t-call='web.external_layout']" position="replace">
<t t-call="web.basic_layout">
<div class="page" style="margin: 0; padding: 0;">
<style>
h1 {
font-size: 20px;
margin-bottom: 15px;
font-weight: bold;
}

.invoice-info-container {
width: 100%;
padding-right: 20px;
}
.table {
width: 100%;
margin-top: 20px;
}

.billed-to {
width: 100%;
text-align: right;
}
.table th {
background-color: #f8f9fa;
border-bottom: 2px solid #dee2e6;
}

.table td, .table th {
padding: 8px;
}

.invoice-info-row {
line-height: 1.5;
margin-bottom: 3px;
}
.pos-invoice-header {
text-align: center;
margin-bottom: 20px;
}
</style>

.invoice-info-row .label {
display: inline-block;
min-width: 100px;
}

.billed-to-content {
text-align: right;
line-height: 1.5;
}

h1 {
font-size: 20px;
margin-bottom: 15px;
font-weight: bold;
}

.invoice-info-row {
margin-bottom: 8px;
}

.label {
font-weight: bold;
margin-right: 5px;
}

.value {
color: #555;
}

.table {
width: 100%;
margin-top: 20px;
}

.table th {
background-color: #f8f9fa;
border-bottom: 2px solid #dee2e6;
}

.table td,
.table th {
padding: 8px;
}

/* Styling the header section */
.pos-invoice-header {
text-align: center;
margin-bottom: 20px;
}
</style>

<!-- Header -->
<section class="pos-invoice-header">
<h2 t-if="o.company_id.logo" class="mt-0">
<img t-att-src="image_data_uri(o.company_id.logo)" style="max-height: 100px;" alt="Logo" />
</h2>
</section>
<hr/>
<section class="pos-invoice-header">
<h2 t-if="o.company_id.logo" class="mt-0">
<img t-att-src="image_data_uri(o.company_id.logo)" style="max-height: 100px;" alt="Logo" />
</h2>
</section>
<hr />
<section style="margin-bottom: 20px;">
<!-- Invoice Number -->
<div style="margin-bottom: 15px;">
<h1 style="font-size: 20px; margin: 0; font-weight: bold;">
Invoice
<span t-field="o.name"/>
<span t-field="o.name" />
</h1>
</div>

<div class="invoice-row">
<!-- Left Column: Invoice Info -->
<div class="invoice-info-container">
<div class="invoice-info-row">
<span class="label">Invoice Date:</span>
<span class="value">
<span t-field="o.invoice_date" />
</span>
</div>
<div class="invoice-info-row">
<span class="label">Due Date:</span>
<span class="value">
<span t-field="o.invoice_date_due" />
</span>
</div>
<div class="invoice-info-row">
<span class="label">Source:</span>
<span class="value">
<span t-field="o.pos_order_ids[0].pos_reference" t-if="o.pos_order_ids" />
</span>
</div>
<div class="invoice-info-row">
<span class="label">Reference:</span>
<span class="value">
<span t-field="o.invoice_origin" />
</span>
</div>
</div>
<!-- Right Column: Billed To -->
<div class="billed-to">
<strong>Billed to:</strong>
<br />
<span t-field="o.partner_id.name" />
<br />
<span t-field="o.partner_id.street" />
<br />
<span t-if="o.partner_id.phone" t-field="o.partner_id.phone" />
</div>
</div>

<table class="invoice-table" style="width: 100%; margin-bottom: 20px; border-collapse: collapse;">
<tr>
<td style="width: 50%; vertical-align: top;">
<table style="width: 100%; border-spacing: 0;">
<tr>
<td style="font-weight: bold;">Invoice Date:</td>
<td><span t-field="o.invoice_date" /></td>
</tr>
<tr>
<td style="font-weight: bold;">Due Date:</td>
<td><span t-field="o.invoice_date_due" /></td>
</tr>
<tr>
<td style="font-weight: bold;">Source:</td>
<td>
<span t-field="o.pos_order_ids[0].pos_reference" t-if="o.pos_order_ids" />
</td>
</tr>
<tr>
<td style="font-weight: bold;">Reference:</td>
<td><span t-field="o.invoice_origin" /></td>
</tr>
</table>
</td>
<td style="width: 50%; vertical-align: top;">
<table style="width: 100%; border-spacing: 0;">
<tr>
<td colspan="2" style="font-weight: bold;">Billed To:</td>
</tr>
<tr>
<td colspan="2">
<span t-field="o.partner_id.name" /><br />
<span t-field="o.partner_id.street" /><br />
<span t-if="o.partner_id.city" t-field="o.partner_id.city" />,
<span t-if="o.partner_id.state_id" t-field="o.partner_id.state_id.name" /><br />
<span t-if="o.partner_id.phone" t-field="o.partner_id.phone" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</section>
<hr />
<!-- Invoice Lines -->
<table class="table table-sm pos-invoice-table">
<thead>
<tr>
Expand Down Expand Up @@ -188,13 +141,13 @@
</tfoot>
</table>
<hr />
<!-- Footer -->
<div class="footer text-center" style="margin-top: 20px;">
<p>Please use the following communication for your payment:
<span t-field="o.name"/>
<span t-field="o.name" />
</p>
</div>
</div>
</div>
</t>
</xpath>
</template>
</odoo>
</odoo>