title: Converting areas of measure - Rounding
body: <p>I have an old program that I am trying to replicate in Odoo 10. I am Stuck converting sq meters to linear meters with rounding. This is for rolls of carpet. The width of the carpet is 4M, Room width 9x5M. To get SQ meters I multiple Room width by Room Lenght which is 45sqm then divide by 4 which is the width of the carpet for Linear which is 11.25.</p>
  
  <p>The Linear is 11.25 but I can't figure out how they are getting 15. The supplier does not want to be cutting carpet so the program is doing some kind of rounding or calculation based on the width of carpet. To get square units required it then multiply Linear x Width (15x4 = 60)<br>
  (The Floor width text in the picture should be Carpet width)
  <a href="https://i.stack.imgur.com/T5R3U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T5R3U.png" alt="enter image description here"></a></p>
  
  <p>I am using below code for getting Room squared but can't figure out the math to even attempt the Linear conversion.</p>
  
  <pre><code>@api.onchange('roomwidth')
      def _onchange_squaremtr(self):
          self.sqfeet = (self.roomwidth or 1) * (self.roomlength or 1)
  
  
  
      @api.onchange('roomlength')
      def _onchange_roomlenght(self):
          self.sqfeet = (self.roomwidth or 1) * (self.roomlength or 1)
  </code></pre>
  
  <p>Here is another example.</p>
  
  <p><a href="https://i.stack.imgur.com/qwsS2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qwsS2.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/xr8PP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xr8PP.png" alt="enter image description here"></a></p>