Added some styling
authorniv-openerp <nicolas.vanhoren@openerp.com>
Tue, 2 Oct 2012 13:25:47 +0000 (15:25 +0200)
committerniv-openerp <nicolas.vanhoren@openerp.com>
Tue, 2 Oct 2012 13:25:47 +0000 (15:25 +0200)
bzr revid: nicolas.vanhoren@openerp.com-20121002132547-p7fi2ra8a0tgxpbn

addons/hr_timesheet_sheet/static/src/css/timesheet.css
addons/hr_timesheet_sheet/static/src/js/timesheet.js
addons/hr_timesheet_sheet/static/src/xml/timesheet.xml

index e69de29..e609bb6 100644 (file)
@@ -0,0 +1,40 @@
+
+.oe_timesheet_weekly table {
+    width: 100%;
+}
+
+.oe_timesheet_weekly th {
+    text-align: right;
+    color: #069;
+    font-family: 'Helvetica Neue', Arial, Verdana, 'Nimbus Sans L', sans-serif;
+    font-size: 10px;
+}
+
+.oe_timesheet_weekly td {
+    text-align: right;
+    vertical-align: middle;
+}
+
+.oe_timesheet_weekly .oe_timesheet_weekly_account {
+    text-align: left;
+}
+
+.oe_timesheet_weekly td input {
+    border: 1px solid #CCC;
+    padding: 5px 2px !important;
+    color: #666 !important;
+    font-size: 14px;
+    font-weight: bold;
+    width: 38px;
+    text-align: right;
+    min-width: 0 !important;
+}
+
+.oe_timesheet_weekly td .oe_timesheet_weekly_box {
+    padding: 5px 2px !important;
+    color: #666 !important;
+    font-size: 14px;
+    font-weight: bold;
+    width: 38px;
+    display: inline-block;
+}
\ No newline at end of file
index d80c451..16d4226 100644 (file)
@@ -48,7 +48,8 @@ openerp.hr_timesheet_sheet = function(instance) {
                 self.updating = false;
             });
         },
-        start: function() {
+        initialize_field: function() {
+            instance.web.form.ReinitializeWidgetMixin.initialize_field.call(this);
             var self = this;
             self.on("change:sheets", self, self.initialize_content);
             self.on("change:date_to", self, self.initialize_content);
index 4da95f5..7fb956c 100644 (file)
                     <th>Total</th>
                 </tr>
                 <tr t-foreach="widget.accounts" t-as="account">
-                    <td><t t-esc="widget.account_names[account.account]"/></td>
+                    <td class="oe_timesheet_weekly_account"><t t-esc="widget.account_names[account.account]"/></td>
                     <t t-set="day_count" t-value="0"/>
                     <td t-foreach="account.days" t-as="day">
                         <input t-if="!widget.get('effective_readonly')" t-att-data-account="account.account"
-                            t-att-data-day-count="day_count" type="text" class="oe_timesheet_weekly_box"/>
+                            t-att-data-day-count="day_count" type="text"/>
                         <span t-if="widget.get('effective_readonly')" t-att-data-account="account.account"
                             t-att-data-day-count="day_count" class="oe_timesheet_weekly_box"/>
                         <t t-set="day_count" t-value="day_count + 1"/>